Version 2.9.0-21.0.dev

Merge commit '06cb010247fb9163db673ba2fd0b338ad6caafb8' into dev
diff --git a/.dart_tool/package_config.json b/.dart_tool/package_config.json
index a62e37d..25d9592 100644
--- a/.dart_tool/package_config.json
+++ b/.dart_tool/package_config.json
@@ -11,7 +11,7 @@
     "constraint, update this by running tools/generate_package_config.dart."
   ],
   "configVersion": 2,
-  "generated": "2020-06-23T13:49:13.378284",
+  "generated": "2020-06-29T11:21:54.984521",
   "generator": "tools/generate_package_config.dart",
   "packages": [
     {
@@ -119,7 +119,7 @@
       "name": "collection",
       "rootUri": "../third_party/pkg/collection",
       "packageUri": "lib/",
-      "languageVersion": "2.3"
+      "languageVersion": "2.9"
     },
     {
       "name": "compiler",
@@ -225,7 +225,7 @@
       "name": "fixnum",
       "rootUri": "../third_party/pkg/fixnum",
       "packageUri": "lib/",
-      "languageVersion": "2.1"
+      "languageVersion": "2.9"
     },
     {
       "name": "front_end",
@@ -566,7 +566,7 @@
       "name": "stagehand",
       "rootUri": "../third_party/pkg/stagehand",
       "packageUri": "lib/",
-      "languageVersion": "2.7"
+      "languageVersion": "2.8"
     },
     {
       "name": "status_file",
@@ -656,7 +656,7 @@
       "name": "typed_data",
       "rootUri": "../third_party/pkg/typed_data",
       "packageUri": "lib/",
-      "languageVersion": "2.0"
+      "languageVersion": "2.9"
     },
     {
       "name": "usage",
@@ -707,4 +707,4 @@
       "languageVersion": "2.4"
     }
   ]
-}
\ No newline at end of file
+}
diff --git a/.gitignore b/.gitignore
index bc9f56c..2bc7008 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,6 +3,7 @@
 /.project
 /Makefile
 /base
+/benchmarks-internal
 /buildtools
 /ipch
 /out
diff --git a/CHANGELOG.md b/CHANGELOG.md
index b58c4a0..3ebc479 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -4,12 +4,11 @@
 
 ### Core libraries
 
-#### `dart:io`
+#### `dart:async`
 
-*   [#42006][]: The signature of `exit` has been changed to return the
-    `Never`type instead of `void`. since no code will run after it,
-
-[#42006]: https://github.com/dart-lang/sdk/issues/42006
+*   Adds `Stream.multi` constructor creating streams which can be
+    listened to more than once, and where each individual listener
+    can be controlled independently.
 
 #### `dart:convert`
 
@@ -23,6 +22,20 @@
 [#41100]: https://github.com/dart-lang/sdk/issues/41100
 [WHATWG encoding standard]: https://encoding.spec.whatwg.org/#utf-8-decoder
 
+#### `dart:io`
+
+*   [#42006][]: The signature of `exit` has been changed to return the
+    `Never`type instead of `void`. since no code will run after it,
+*   Class `OSError` now implements `Exception`. This change means `OSError` will
+    now be caught in catch clauses catching `Exception`s.
+*   Added `InternetAddress.tryParse`.
+*   [Abstract Unix Domain Socket][] is supported on Linux/Android now. Using an
+    `InternetAddress` with `address` starting with '@' and type being
+    `InternetAddressType.Unix` will create an abstract Unix Domain Socket.
+
+[#42006]: https://github.com/dart-lang/sdk/issues/42006
+[Abstract Unix Domain Socket]: http://man7.org/linux/man-pages/man7/unix.7.html
+
 #### `dart:html`
 
 *   **Breaking Change**: `CssClassSet.add()` previously returned `null` if the
@@ -37,21 +50,13 @@
     `Future` is empty instead, it completes asynchronously, therefore
     potentially invalidating code that relied on the synchronous side-effect.
     This change will only affect code using sound null-safety. See issue
-    [41653][] for more details.
+    [#41653][] for more details.
 
-[41653]: https://github.com/dart-lang/sdk/issues/41653
+*   Methods in `Console` have been updated to better reflect the modern Console
+    specification. Particularly of interest are `dir` and `table` which take in
+    extra optional arguments.
 
-
-#### `dart:io`
-
-*   Class `OSError` now implements `Exception`. This change means `OSError` will
-    now be caught in catch clauses catching `Exception`s.
-*   Added `InternetAddress.tryParse`.
-*   [Abstract Unix Domain Socket][] is supported on Linux/Android now. Using an
-    `InternetAddress` with `address` starting with '@' and type being
-    `InternetAddressType.Unix` will create an abstract Unix Domain Socket.
-
-[Abstract Unix Domain Socket]: http://man7.org/linux/man-pages/man7/unix.7.html
+[#41653]: https://github.com/dart-lang/sdk/issues/41653
 
 ### Tools
 
@@ -89,6 +94,13 @@
 
 ### Dart VM
 
+*   **Breaking Change** [#41100][]: When printing a string using the `print`
+    function, the default implementation (used when not overridden by the
+    embedder or the current zone) will print any unpaired surrogates in the
+    string as replacement characters (`U+FFFD`). Similarly, the
+    `Dart_StringToUTF8` function in the Dart API will convert unpaired
+    surrogates into replacement characters.
+
 ### Pub
 * `pub run` and `pub global run` accepts a `--enable-experiment` flag enabling
   experiments in the Dart VM (and language).
@@ -100,7 +112,7 @@
 * Warn at publishing first time a package version opts in to null-safety.
 * Preserve Windows line endings in pubspec.lock if they are already there (#2489)
 * Better terminal color-detection. Use colors in terminals on Windows.
-* `pub outdated`: If the current version of a dependency is a prerelease 
+* `pub outdated`: If the current version of a dependency is a prerelease
   version, use prereleases for latest if no newer stable.
 * `pub outdated` now works without a lockfile. In that case the 'Current'
   column will be empty.
diff --git a/DEPS b/DEPS
index f9bd771..de99bfd 100644
--- a/DEPS
+++ b/DEPS
@@ -44,11 +44,11 @@
   # co19 is a cipd package. Use update.sh in tests/co19[_2] to update these
   # hashes. It requires access to the dart-build-access group, which EngProd
   # has.
-  "co19_rev": "bfa5ab1e3a0be81899760af9c24ab734348114a5",
+  "co19_rev": "4035c66f0cacb70064395473cb54d810c046c225",
   "co19_2_rev": "620c1148c8b7a3d7f74afacf348c46f109eb64f2",
 
   # The internal benchmarks to use. See go/dart-benchmarks-internal
-  "benchmarks_internal_rev": "02695da98bcf006b95630d3c386f4169d7ec4ecf",
+  "benchmarks_internal_rev": "88af52754f272e7a4c5737b7e003c2ed9e8a754f",
   "checkout_benchmarks_internal": False,
 
   # As Flutter does, we use Fuchsia's GN and Clang toolchain. These revision
@@ -66,8 +66,8 @@
 
   # Revisions of /third_party/* dependencies.
   "args_tag": "1.6.0",
-  "async_tag": "2.4.1",
-  "bazel_worker_tag": "v0.1.22",
+  "async_rev": "e0c41e0c1fb70ba606dc81335c981af7c00987c6",
+  "bazel_worker_rev": "26680d5e249b249c7216ab2fed0ac8ed4ee285c5",
   "benchmark_harness_rev": "81641290dea44c34138a109a37e215482f405f81",
   "boolean_selector_rev": "1309eabed510cc3b7536fd4367d39b97ebee3d69",
   "boringssl_gen_rev": "429ccb1877f7987a6f3988228bc2440e61293499",
@@ -76,7 +76,7 @@
   "charcode_rev": "9085e6b6127f084d66c0a94810a808121459012a",
   "chrome_rev" : "19997",
   "cli_util_tag" : "0.1.4",
-  "collection_rev": "7be42e03d427cc19571cd7f9fc628a5913a6b757",
+  "collection_rev": "80f5b6de8a8d8d584732a71bb59912da3e44883b",
   "convert_rev": "49bde5b371eb5c2c8e721557cf762f17c75e49fc",
   "crypto_rev": "7422fb2f6584fe1839eb30bc4ca56e9f9760b801",
   "csslib_rev": "bf372d4fdc6dfa232ad93f77a0a3de0891edd04c",
@@ -98,7 +98,7 @@
 
   "dartdoc_tag" : "v0.32.1",
   "ffi_rev": "454ab0f9ea6bd06942a983238d8a6818b1357edb",
-  "fixnum_rev": "13da5123989a5d91cb59e76793c3923dd8d06e90",
+  "fixnum_rev": "9b38f49f6679654d66a363e69e48173cca07e882",
   "glob_rev": "e9f4e6b7ae8abe5071461cf8f47191bb19cf7ef6",
   "html_rev": "083a36cd801a4b787ba156b7c6e4c8b2e2daed4a",
   "http_io_rev": "2fa188caf7937e313026557713f7feffedd4978b",
@@ -142,23 +142,23 @@
   "source_maps-0.9.4_rev": "38524",
   "source_maps_rev": "87b4fd9027378bbd51b02e9d7df794eee8a82b7a",
   "source_span_tag": "1.7.0",
-  "stack_trace_tag": "07569831f17844ef90214a179db211954a7f7324",
-  "stagehand_tag": "v3.3.7",
+  "stack_trace_tag": "56811dbb2530d823b764fe167ec335879a4adb32",
+  "stagehand_tag": "v3.3.9",
   "stream_channel_tag": "70433d577be02c48cb16d72d65654f3b4d82c6ed",
   "string_scanner_rev": "a918e7371af6b6e73bfd534ff9da6084741c1f99",
   "test_descriptor_tag": "1.1.1",
   "test_process_tag": "1.0.3",
   "term_glyph_rev": "b3da31e9684a99cfe5f192b89914492018b44da7",
   "test_reflective_loader_tag": "0.1.9",
-  "test_rev": "988e38ff3051f24607ad0aaf4e780835785f2ab5",
+  "test_rev": "718fe6f93c4655208460f28e89d887c5ef4144c5",
   "tflite_native_rev": "3c777c40608a2a9f1427bfe0028ab48e7116b4c1",
-  "typed_data_tag": "1.1.6",
+  "typed_data_tag": "0c369b73a9b7ebf042c06512951bfe5b52b84a5f",
   "usage_tag": "3.4.0",
   "watcher_rev": "fc3c9aae5d31d707b3013b42634dde8d8a1161b4",
   "web_components_rev": "8f57dac273412a7172c8ade6f361b407e2e4ed02",
   "web_socket_channel_rev": "490061ef0e22d3c8460ad2802f9948219365ad6b",
   "WebCore_rev": "fb11e887f77919450e497344da570d780e078bc8",
-  "yaml_rev": "62e9f6b3a933b1f76dd3007d1a5ce0be8e429b2d",
+  "yaml_rev": "e5de429147a6b0fcb7e8ddb3c8e4674dc5dd0ecc",
   "zlib_rev": "c44fb7248079cc3d5563b14b3f758aee60d6b415",
   "crashpad_rev": "bf327d8ceb6a669607b0dbab5a83a275d03f99ed",
   "minichromium_rev": "8d641e30a8b12088649606b912c2bc4947419ccc",
@@ -295,9 +295,9 @@
   Var("dart_root") + "/third_party/pkg/args":
       Var("dart_git") + "args.git" + "@" + Var("args_tag"),
   Var("dart_root") + "/third_party/pkg/async":
-      Var("dart_git") + "async.git" + "@" + Var("async_tag"),
+      Var("dart_git") + "async.git" + "@" + Var("async_rev"),
   Var("dart_root") + "/third_party/pkg/bazel_worker":
-      Var("dart_git") + "bazel_worker.git" + "@" + Var("bazel_worker_tag"),
+      Var("dart_git") + "bazel_worker.git" + "@" + Var("bazel_worker_rev"),
   Var("dart_root") + "/third_party/pkg/benchmark_harness":
       Var("dart_git") + "benchmark_harness.git" + "@" +
       Var("benchmark_harness_rev"),
@@ -512,7 +512,7 @@
     "packages": [
       {
         "package": "dart/cfe/dart2js_dills",
-        "version": "binary_version:42",
+        "version": "binary_version:43_2",
       }
     ],
     "dep_type": "cipd",
diff --git a/WATCHLISTS b/WATCHLISTS
index a07b665..4672363 100644
--- a/WATCHLISTS
+++ b/WATCHLISTS
@@ -28,7 +28,7 @@
       'filepath': (
         '^pkg/compiler|'
         '^sdk/lib/_internal/js_runtime|'
-        '^tests/compiler/dart2js'
+        '^tests/dart2js'
       )
     },
     'dartdevc': {
diff --git a/benchmarks/FfiBoringssl/dart/FfiBoringssl.dart b/benchmarks/FfiBoringssl/dart/FfiBoringssl.dart
index 104588e..7025194 100644
--- a/benchmarks/FfiBoringssl/dart/FfiBoringssl.dart
+++ b/benchmarks/FfiBoringssl/dart/FfiBoringssl.dart
@@ -71,30 +71,33 @@
 
 // Hash of generated data of `L` bytes with `hashAlgorithm`.
 const String expectedHash =
-    "bNLtqb+cBZcSkCmwBUuB5DP2uLe0madetwXv10usGUFJg1sdGhTEi+aW5NWIRW1RKiLq56obV74rVurn014Iyw==";
+    'bNLtqb+cBZcSkCmwBUuB5DP2uLe0madetwXv10usGUFJg1sdGhTEi+aW5NWIRW1RKiLq56obV74rVurn014Iyw==';
 
 /// This benchmark runs a digest algorithm on data residing in C memory.
 ///
 /// This benchmark is intended as macro benchmark with a realistic workload.
 class DigestCMemory extends BenchmarkBase {
-  DigestCMemory() : super("FfiBoringssl.DigestCMemory");
+  DigestCMemory() : super('FfiBoringssl.DigestCMemory');
 
-  Pointer<Data> data; // Data in C memory that we want to digest.
+  Pointer<Data> data = nullptr; // Data in C memory that we want to digest.
 
+  @override
   void setup() {
     data = allocate<Uint8>(count: L).cast();
     copyFromUint8ListToTarget(inventData(L), data.ref);
     hash(data, L, hashAlgorithm);
   }
 
+  @override
   void teardown() {
     free(data);
   }
 
+  @override
   void run() {
     final String result = hash(data, L, hashAlgorithm);
     if (result != expectedHash) {
-      throw Exception("$name: Unexpected result: $result");
+      throw Exception('$name: Unexpected result: $result');
     }
   }
 }
@@ -103,10 +106,11 @@
 ///
 /// This benchmark is intended as macro benchmark with a realistic workload.
 class DigestDartMemory extends BenchmarkBase {
-  DigestDartMemory() : super("FfiBoringssl.DigestDartMemory");
+  DigestDartMemory() : super('FfiBoringssl.DigestDartMemory');
 
-  Uint8List data; // Data in C memory that we want to digest.
+  Uint8List data = Uint8List(0); // Data in C memory that we want to digest.
 
+  @override
   void setup() {
     data = inventData(L);
     final Pointer<Data> dataInC = allocate<Uint8>(count: L).cast();
@@ -115,15 +119,17 @@
     free(dataInC);
   }
 
+  @override
   void teardown() {}
 
+  @override
   void run() {
     final Pointer<Data> dataInC = allocate<Uint8>(count: L).cast();
     copyFromUint8ListToTarget(data, dataInC.ref);
     final String result = hash(dataInC, L, hashAlgorithm);
     free(dataInC);
     if (result != expectedHash) {
-      throw Exception("$name: Unexpected result: $result");
+      throw Exception('$name: Unexpected result: $result');
     }
   }
 }
@@ -132,10 +138,12 @@
 // Main driver.
 //
 
-main() {
+void main() {
   final benchmarks = [
     () => DigestCMemory(),
     () => DigestDartMemory(),
   ];
-  benchmarks.forEach((benchmark) => benchmark().report());
+  for (final benchmark in benchmarks) {
+    benchmark().report();
+  }
 }
diff --git a/benchmarks/FfiBoringssl/dart/digest.dart b/benchmarks/FfiBoringssl/dart/digest.dart
index 655e12f..9af7617 100644
--- a/benchmarks/FfiBoringssl/dart/digest.dart
+++ b/benchmarks/FfiBoringssl/dart/digest.dart
@@ -13,10 +13,10 @@
 
 DynamicLibrary openSsl() {
   // Force load crypto.
-  dlopenPlatformSpecific("crypto",
-      path: Platform.script.resolve("../native/out/").path);
-  DynamicLibrary ssl = dlopenPlatformSpecific("ssl",
-      path: Platform.script.resolve("../native/out/").path);
+  dlopenPlatformSpecific('crypto',
+      path: Platform.script.resolve('../native/out/').path);
+  final ssl = dlopenPlatformSpecific('ssl',
+      path: Platform.script.resolve('../native/out/').path);
   return ssl;
 }
 
diff --git a/benchmarks/FfiBoringssl/dart/dlopen_helper.dart b/benchmarks/FfiBoringssl/dart/dlopen_helper.dart
index b031002..fe80879 100644
--- a/benchmarks/FfiBoringssl/dart/dlopen_helper.dart
+++ b/benchmarks/FfiBoringssl/dart/dlopen_helper.dart
@@ -5,54 +5,57 @@
 import 'dart:ffi';
 import 'dart:io';
 
-const kArm = "arm";
-const kArm64 = "arm64";
-const kIa32 = "ia32";
-const kX64 = "x64";
+const arm = 'arm';
+const arm64 = 'arm64';
+const ia32 = 'ia32';
+const x64 = 'x64';
 
 // https://stackoverflow.com/questions/45125516/possible-values-for-uname-m
 final _unames = {
-  "arm": kArm,
-  "aarch64_be": kArm64,
-  "aarch64": kArm64,
-  "armv8b": kArm64,
-  "armv8l": kArm64,
-  "i386": kIa32,
-  "i686": kIa32,
-  "x86_64": kX64,
+  'arm': arm,
+  'aarch64_be': arm64,
+  'aarch64': arm64,
+  'armv8b': arm64,
+  'armv8l': arm64,
+  'i386': ia32,
+  'i686': ia32,
+  'x86_64': x64,
 };
 
 String _checkRunningMode(String architecture) {
   // Check if we're running in 32bit mode.
   final int pointerSize = sizeOf<IntPtr>();
-  if (pointerSize == 4 && architecture == kX64) return kIa32;
-  if (pointerSize == 4 && architecture == kArm64) return kArm;
+  if (pointerSize == 4 && architecture == x64) return ia32;
+  if (pointerSize == 4 && architecture == arm64) return arm;
 
   return architecture;
 }
 
 String _architecture() {
-  final String uname = Process.runSync("uname", ["-m"]).stdout.trim();
-  final String architecture = _unames[uname];
-  if (architecture == null)
-    throw Exception("Unrecognized architecture: '$uname'");
+  final String uname = Process.runSync('uname', ['-m']).stdout.trim();
+  final String? architecture = _unames[uname];
+  if (architecture == null) {
+    throw Exception('Unrecognized architecture: "$uname"');
+  }
 
   // Check if we're running in 32bit mode.
   return _checkRunningMode(architecture);
 }
 
-String _platformPath(String name, {String path = ""}) {
-  if (Platform.isMacOS || Platform.isIOS)
-    return "${path}mac/${_architecture()}/lib$name.dylib";
+String _platformPath(String name, String path) {
+  if (Platform.isMacOS || Platform.isIOS) {
+    return '${path}mac/${_architecture()}/lib$name.dylib';
+  }
 
-  if (Platform.isWindows)
-    return "${path}win/${_checkRunningMode(kX64)}/$name.dll";
+  if (Platform.isWindows) {
+    return '${path}win/${_checkRunningMode(x64)}/$name.dll';
+  }
 
   // Unknown platforms default to Unix implementation.
-  return "${path}linux/${_architecture()}/lib$name.so";
+  return '${path}linux/${_architecture()}/lib$name.so';
 }
 
-DynamicLibrary dlopenPlatformSpecific(String name, {String path}) {
-  final String fullPath = _platformPath(name, path: path);
+DynamicLibrary dlopenPlatformSpecific(String name, {String path = ''}) {
+  final String fullPath = _platformPath(name, path);
   return DynamicLibrary.open(fullPath);
 }
diff --git a/benchmarks/FfiBoringssl/dart/types.dart b/benchmarks/FfiBoringssl/dart/types.dart
index 5d97475..2dd5f76 100644
--- a/benchmarks/FfiBoringssl/dart/types.dart
+++ b/benchmarks/FfiBoringssl/dart/types.dart
@@ -2,6 +2,8 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+// ignore_for_file: camel_case_types
+
 import 'dart:ffi';
 
 /// digest algorithm.
@@ -14,12 +16,12 @@
 class Data extends Struct {
   static Data fromUint8Pointer(Pointer<Uint8> p) => p.cast<Data>().ref;
 
-  Pointer<Uint8> asUint8Pointer() => this.addressOf.cast();
+  Pointer<Uint8> asUint8Pointer() => addressOf.cast();
 }
 
 /// Type for `uint8_t*` used to represent byte data.
 class Bytes extends Struct {
   static Data fromUint8Pointer(Pointer<Uint8> p) => p.cast<Data>().ref;
 
-  Pointer<Uint8> asUint8Pointer() => this.addressOf.cast();
+  Pointer<Uint8> asUint8Pointer() => addressOf.cast();
 }
diff --git a/benchmarks/FfiBoringssl/dart2/FfiBoringssl.dart b/benchmarks/FfiBoringssl/dart2/FfiBoringssl.dart
index 104588e..1e12b3d 100644
--- a/benchmarks/FfiBoringssl/dart2/FfiBoringssl.dart
+++ b/benchmarks/FfiBoringssl/dart2/FfiBoringssl.dart
@@ -71,30 +71,33 @@
 
 // Hash of generated data of `L` bytes with `hashAlgorithm`.
 const String expectedHash =
-    "bNLtqb+cBZcSkCmwBUuB5DP2uLe0madetwXv10usGUFJg1sdGhTEi+aW5NWIRW1RKiLq56obV74rVurn014Iyw==";
+    'bNLtqb+cBZcSkCmwBUuB5DP2uLe0madetwXv10usGUFJg1sdGhTEi+aW5NWIRW1RKiLq56obV74rVurn014Iyw==';
 
 /// This benchmark runs a digest algorithm on data residing in C memory.
 ///
 /// This benchmark is intended as macro benchmark with a realistic workload.
 class DigestCMemory extends BenchmarkBase {
-  DigestCMemory() : super("FfiBoringssl.DigestCMemory");
+  DigestCMemory() : super('FfiBoringssl.DigestCMemory');
 
   Pointer<Data> data; // Data in C memory that we want to digest.
 
+  @override
   void setup() {
     data = allocate<Uint8>(count: L).cast();
     copyFromUint8ListToTarget(inventData(L), data.ref);
     hash(data, L, hashAlgorithm);
   }
 
+  @override
   void teardown() {
     free(data);
   }
 
+  @override
   void run() {
     final String result = hash(data, L, hashAlgorithm);
     if (result != expectedHash) {
-      throw Exception("$name: Unexpected result: $result");
+      throw Exception('$name: Unexpected result: $result');
     }
   }
 }
@@ -103,10 +106,11 @@
 ///
 /// This benchmark is intended as macro benchmark with a realistic workload.
 class DigestDartMemory extends BenchmarkBase {
-  DigestDartMemory() : super("FfiBoringssl.DigestDartMemory");
+  DigestDartMemory() : super('FfiBoringssl.DigestDartMemory');
 
   Uint8List data; // Data in C memory that we want to digest.
 
+  @override
   void setup() {
     data = inventData(L);
     final Pointer<Data> dataInC = allocate<Uint8>(count: L).cast();
@@ -115,15 +119,17 @@
     free(dataInC);
   }
 
+  @override
   void teardown() {}
 
+  @override
   void run() {
     final Pointer<Data> dataInC = allocate<Uint8>(count: L).cast();
     copyFromUint8ListToTarget(data, dataInC.ref);
     final String result = hash(dataInC, L, hashAlgorithm);
     free(dataInC);
     if (result != expectedHash) {
-      throw Exception("$name: Unexpected result: $result");
+      throw Exception('$name: Unexpected result: $result');
     }
   }
 }
@@ -132,10 +138,12 @@
 // Main driver.
 //
 
-main() {
+void main() {
   final benchmarks = [
     () => DigestCMemory(),
     () => DigestDartMemory(),
   ];
-  benchmarks.forEach((benchmark) => benchmark().report());
+  for (final benchmark in benchmarks) {
+    benchmark().report();
+  }
 }
diff --git a/benchmarks/FfiBoringssl/dart2/digest.dart b/benchmarks/FfiBoringssl/dart2/digest.dart
index 655e12f..9af7617 100644
--- a/benchmarks/FfiBoringssl/dart2/digest.dart
+++ b/benchmarks/FfiBoringssl/dart2/digest.dart
@@ -13,10 +13,10 @@
 
 DynamicLibrary openSsl() {
   // Force load crypto.
-  dlopenPlatformSpecific("crypto",
-      path: Platform.script.resolve("../native/out/").path);
-  DynamicLibrary ssl = dlopenPlatformSpecific("ssl",
-      path: Platform.script.resolve("../native/out/").path);
+  dlopenPlatformSpecific('crypto',
+      path: Platform.script.resolve('../native/out/').path);
+  final ssl = dlopenPlatformSpecific('ssl',
+      path: Platform.script.resolve('../native/out/').path);
   return ssl;
 }
 
diff --git a/benchmarks/FfiBoringssl/dart2/dlopen_helper.dart b/benchmarks/FfiBoringssl/dart2/dlopen_helper.dart
index b031002..726c181 100644
--- a/benchmarks/FfiBoringssl/dart2/dlopen_helper.dart
+++ b/benchmarks/FfiBoringssl/dart2/dlopen_helper.dart
@@ -5,51 +5,54 @@
 import 'dart:ffi';
 import 'dart:io';
 
-const kArm = "arm";
-const kArm64 = "arm64";
-const kIa32 = "ia32";
-const kX64 = "x64";
+const arm = 'arm';
+const arm64 = 'arm64';
+const ia32 = 'ia32';
+const x64 = 'x64';
 
 // https://stackoverflow.com/questions/45125516/possible-values-for-uname-m
 final _unames = {
-  "arm": kArm,
-  "aarch64_be": kArm64,
-  "aarch64": kArm64,
-  "armv8b": kArm64,
-  "armv8l": kArm64,
-  "i386": kIa32,
-  "i686": kIa32,
-  "x86_64": kX64,
+  'arm': arm,
+  'aarch64_be': arm64,
+  'aarch64': arm64,
+  'armv8b': arm64,
+  'armv8l': arm64,
+  'i386': ia32,
+  'i686': ia32,
+  'x86_64': x64,
 };
 
 String _checkRunningMode(String architecture) {
   // Check if we're running in 32bit mode.
   final int pointerSize = sizeOf<IntPtr>();
-  if (pointerSize == 4 && architecture == kX64) return kIa32;
-  if (pointerSize == 4 && architecture == kArm64) return kArm;
+  if (pointerSize == 4 && architecture == x64) return ia32;
+  if (pointerSize == 4 && architecture == arm64) return arm;
 
   return architecture;
 }
 
 String _architecture() {
-  final String uname = Process.runSync("uname", ["-m"]).stdout.trim();
+  final String uname = Process.runSync('uname', ['-m']).stdout.trim();
   final String architecture = _unames[uname];
-  if (architecture == null)
-    throw Exception("Unrecognized architecture: '$uname'");
+  if (architecture == null) {
+    throw Exception('Unrecognized architecture: "$uname"');
+  }
 
   // Check if we're running in 32bit mode.
   return _checkRunningMode(architecture);
 }
 
-String _platformPath(String name, {String path = ""}) {
-  if (Platform.isMacOS || Platform.isIOS)
-    return "${path}mac/${_architecture()}/lib$name.dylib";
+String _platformPath(String name, {String path = ''}) {
+  if (Platform.isMacOS || Platform.isIOS) {
+    return '${path}mac/${_architecture()}/lib$name.dylib';
+  }
 
-  if (Platform.isWindows)
-    return "${path}win/${_checkRunningMode(kX64)}/$name.dll";
+  if (Platform.isWindows) {
+    return '${path}win/${_checkRunningMode(x64)}/$name.dll';
+  }
 
   // Unknown platforms default to Unix implementation.
-  return "${path}linux/${_architecture()}/lib$name.so";
+  return '${path}linux/${_architecture()}/lib$name.so';
 }
 
 DynamicLibrary dlopenPlatformSpecific(String name, {String path}) {
diff --git a/benchmarks/FfiBoringssl/dart2/types.dart b/benchmarks/FfiBoringssl/dart2/types.dart
index 5d97475..2dd5f76 100644
--- a/benchmarks/FfiBoringssl/dart2/types.dart
+++ b/benchmarks/FfiBoringssl/dart2/types.dart
@@ -2,6 +2,8 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+// ignore_for_file: camel_case_types
+
 import 'dart:ffi';
 
 /// digest algorithm.
@@ -14,12 +16,12 @@
 class Data extends Struct {
   static Data fromUint8Pointer(Pointer<Uint8> p) => p.cast<Data>().ref;
 
-  Pointer<Uint8> asUint8Pointer() => this.addressOf.cast();
+  Pointer<Uint8> asUint8Pointer() => addressOf.cast();
 }
 
 /// Type for `uint8_t*` used to represent byte data.
 class Bytes extends Struct {
   static Data fromUint8Pointer(Pointer<Uint8> p) => p.cast<Data>().ref;
 
-  Pointer<Uint8> asUint8Pointer() => this.addressOf.cast();
+  Pointer<Uint8> asUint8Pointer() => addressOf.cast();
 }
diff --git a/benchmarks/FfiCall/dart/FfiCall.dart b/benchmarks/FfiCall/dart/FfiCall.dart
index e6afd40..c2392a1 100644
--- a/benchmarks/FfiCall/dart/FfiCall.dart
+++ b/benchmarks/FfiCall/dart/FfiCall.dart
@@ -19,54 +19,54 @@
 // Trampoline functions.
 //
 
-DynamicLibrary ffiTestFunctions = dlopenPlatformSpecific("native_functions",
-    path: Platform.script.resolve("../native/out/").path);
+DynamicLibrary ffiTestFunctions = dlopenPlatformSpecific('native_functions',
+    path: Platform.script.resolve('../native/out/').path);
 
 typedef NativeFunction1Uint8 = Uint8 Function(Uint8);
 typedef Function1int = int Function(int);
-Function1int function1Uint8 = ffiTestFunctions
-    .lookupFunction<NativeFunction1Uint8, Function1int>("Function1Uint8");
+final function1Uint8 = ffiTestFunctions
+    .lookupFunction<NativeFunction1Uint8, Function1int>('Function1Uint8');
 
 typedef NativeFunction1Uint16 = Uint16 Function(Uint16);
-Function1int function1Uint16 = ffiTestFunctions
-    .lookupFunction<NativeFunction1Uint16, Function1int>("Function1Uint16");
+final function1Uint16 = ffiTestFunctions
+    .lookupFunction<NativeFunction1Uint16, Function1int>('Function1Uint16');
 
 typedef NativeFunction1Uint32 = Uint32 Function(Uint32);
-Function1int function1Uint32 = ffiTestFunctions
-    .lookupFunction<NativeFunction1Uint32, Function1int>("Function1Uint32");
+final function1Uint32 = ffiTestFunctions
+    .lookupFunction<NativeFunction1Uint32, Function1int>('Function1Uint32');
 
 typedef NativeFunction1Uint64 = Uint64 Function(Uint64);
-Function1int function1Uint64 = ffiTestFunctions
-    .lookupFunction<NativeFunction1Uint64, Function1int>("Function1Uint64");
+final function1Uint64 = ffiTestFunctions
+    .lookupFunction<NativeFunction1Uint64, Function1int>('Function1Uint64');
 
 typedef NativeFunction1Int8 = Int8 Function(Int8);
-Function1int function1Int8 = ffiTestFunctions
-    .lookupFunction<NativeFunction1Int8, Function1int>("Function1Int8");
+final function1Int8 = ffiTestFunctions
+    .lookupFunction<NativeFunction1Int8, Function1int>('Function1Int8');
 
 typedef NativeFunction1Int16 = Int16 Function(Int16);
-Function1int function1Int16 = ffiTestFunctions
-    .lookupFunction<NativeFunction1Int16, Function1int>("Function1Int16");
+final function1Int16 = ffiTestFunctions
+    .lookupFunction<NativeFunction1Int16, Function1int>('Function1Int16');
 
 typedef NativeFunction1Int32 = Int32 Function(Int32);
-Function1int function1Int32 = ffiTestFunctions
-    .lookupFunction<NativeFunction1Int32, Function1int>("Function1Int32");
+final function1Int32 = ffiTestFunctions
+    .lookupFunction<NativeFunction1Int32, Function1int>('Function1Int32');
 
 typedef NativeFunction2Int32 = Int32 Function(Int32, Int32);
 typedef Function2int = int Function(int, int);
-Function2int function2Int32 = ffiTestFunctions
-    .lookupFunction<NativeFunction2Int32, Function2int>("Function2Int32");
+final function2Int32 = ffiTestFunctions
+    .lookupFunction<NativeFunction2Int32, Function2int>('Function2Int32');
 
 typedef NativeFunction4Int32 = Int32 Function(Int32, Int32, Int32, Int32);
 typedef Function4int = int Function(int, int, int, int);
-Function4int function4Int32 = ffiTestFunctions
-    .lookupFunction<NativeFunction4Int32, Function4int>("Function4Int32");
+final function4Int32 = ffiTestFunctions
+    .lookupFunction<NativeFunction4Int32, Function4int>('Function4Int32');
 
 typedef NativeFunction10Int32 = Int32 Function(
     Int32, Int32, Int32, Int32, Int32, Int32, Int32, Int32, Int32, Int32);
 typedef Function10int = int Function(
     int, int, int, int, int, int, int, int, int, int);
-Function10int function10Int32 = ffiTestFunctions
-    .lookupFunction<NativeFunction10Int32, Function10int>("Function10Int32");
+final function10Int32 = ffiTestFunctions
+    .lookupFunction<NativeFunction10Int32, Function10int>('Function10Int32');
 
 typedef NativeFunction20Int32 = Int32 Function(
     Int32,
@@ -91,25 +91,25 @@
     Int32);
 typedef Function20int = int Function(int, int, int, int, int, int, int, int,
     int, int, int, int, int, int, int, int, int, int, int, int);
-Function20int function20Int32 = ffiTestFunctions
-    .lookupFunction<NativeFunction20Int32, Function20int>("Function20Int32");
+final function20Int32 = ffiTestFunctions
+    .lookupFunction<NativeFunction20Int32, Function20int>('Function20Int32');
 
 typedef NativeFunction1Int64 = Int64 Function(Int64);
-Function1int function1Int64 = ffiTestFunctions
-    .lookupFunction<NativeFunction1Int64, Function1int>("Function1Int64");
+final function1Int64 = ffiTestFunctions
+    .lookupFunction<NativeFunction1Int64, Function1int>('Function1Int64');
 
 typedef NativeFunction2Int64 = Int64 Function(Int64, Int64);
-Function2int function2Int64 = ffiTestFunctions
-    .lookupFunction<NativeFunction2Int64, Function2int>("Function2Int64");
+final function2Int64 = ffiTestFunctions
+    .lookupFunction<NativeFunction2Int64, Function2int>('Function2Int64');
 
 typedef NativeFunction4Int64 = Int64 Function(Int64, Int64, Int64, Int64);
-Function4int function4Int64 = ffiTestFunctions
-    .lookupFunction<NativeFunction4Int64, Function4int>("Function4Int64");
+final function4Int64 = ffiTestFunctions
+    .lookupFunction<NativeFunction4Int64, Function4int>('Function4Int64');
 
 typedef NativeFunction10Int64 = Int64 Function(
     Int64, Int64, Int64, Int64, Int64, Int64, Int64, Int64, Int64, Int64);
-Function10int function10Int64 = ffiTestFunctions
-    .lookupFunction<NativeFunction10Int64, Function10int>("Function10Int64");
+final function10Int64 = ffiTestFunctions
+    .lookupFunction<NativeFunction10Int64, Function10int>('Function10Int64');
 
 typedef NativeFunction20Int64 = Int64 Function(
     Int64,
@@ -132,30 +132,30 @@
     Int64,
     Int64,
     Int64);
-Function20int function20Int64 = ffiTestFunctions
-    .lookupFunction<NativeFunction20Int64, Function20int>("Function20Int64");
+final function20Int64 = ffiTestFunctions
+    .lookupFunction<NativeFunction20Int64, Function20int>('Function20Int64');
 
 typedef NativeFunction1Float = Float Function(Float);
 typedef Function1double = double Function(double);
-Function1double function1Float = ffiTestFunctions
-    .lookupFunction<NativeFunction1Float, Function1double>("Function1Float");
+final function1Float = ffiTestFunctions
+    .lookupFunction<NativeFunction1Float, Function1double>('Function1Float');
 
 typedef NativeFunction2Float = Float Function(Float, Float);
 typedef Function2double = double Function(double, double);
-Function2double function2Float = ffiTestFunctions
-    .lookupFunction<NativeFunction2Float, Function2double>("Function2Float");
+final function2Float = ffiTestFunctions
+    .lookupFunction<NativeFunction2Float, Function2double>('Function2Float');
 
 typedef NativeFunction4Float = Float Function(Float, Float, Float, Float);
 typedef Function4double = double Function(double, double, double, double);
-Function4double function4Float = ffiTestFunctions
-    .lookupFunction<NativeFunction4Float, Function4double>("Function4Float");
+final function4Float = ffiTestFunctions
+    .lookupFunction<NativeFunction4Float, Function4double>('Function4Float');
 
 typedef NativeFunction10Float = Float Function(
     Float, Float, Float, Float, Float, Float, Float, Float, Float, Float);
 typedef Function10double = double Function(double, double, double, double,
     double, double, double, double, double, double);
-Function10double function10Float = ffiTestFunctions
-    .lookupFunction<NativeFunction10Float, Function10double>("Function10Float");
+final function10Float = ffiTestFunctions
+    .lookupFunction<NativeFunction10Float, Function10double>('Function10Float');
 
 typedef NativeFunction20Float = Float Function(
     Float,
@@ -199,26 +199,26 @@
     double,
     double,
     double);
-Function20double function20Float = ffiTestFunctions
-    .lookupFunction<NativeFunction20Float, Function20double>("Function20Float");
+final function20Float = ffiTestFunctions
+    .lookupFunction<NativeFunction20Float, Function20double>('Function20Float');
 
 typedef NativeFunction1Double = Double Function(Double);
-Function1double function1Double = ffiTestFunctions
-    .lookupFunction<NativeFunction1Double, Function1double>("Function1Double");
+final function1Double = ffiTestFunctions
+    .lookupFunction<NativeFunction1Double, Function1double>('Function1Double');
 
 typedef NativeFunction2Double = Double Function(Double, Double);
-Function2double function2Double = ffiTestFunctions
-    .lookupFunction<NativeFunction2Double, Function2double>("Function1Double");
+final function2Double = ffiTestFunctions
+    .lookupFunction<NativeFunction2Double, Function2double>('Function1Double');
 
 typedef NativeFunction4Double = Double Function(Double, Double, Double, Double);
-Function4double function4Double = ffiTestFunctions
-    .lookupFunction<NativeFunction4Double, Function4double>("Function1Double");
+final function4Double = ffiTestFunctions
+    .lookupFunction<NativeFunction4Double, Function4double>('Function1Double');
 
 typedef NativeFunction10Double = Double Function(Double, Double, Double, Double,
     Double, Double, Double, Double, Double, Double);
 Function10double function10Double =
     ffiTestFunctions.lookupFunction<NativeFunction10Double, Function10double>(
-        "Function10Double");
+        'Function10Double');
 
 typedef NativeFunction20Double = Double Function(
     Double,
@@ -243,21 +243,21 @@
     Double);
 Function20double function20Double =
     ffiTestFunctions.lookupFunction<NativeFunction20Double, Function20double>(
-        "Function20Double");
+        'Function20Double');
 
 typedef Function1PointerUint8 = Pointer<Uint8> Function(Pointer<Uint8>);
-Function1PointerUint8 function1PointerUint8 = ffiTestFunctions.lookupFunction<
-    Function1PointerUint8, Function1PointerUint8>("Function1PointerUint8");
+final function1PointerUint8 = ffiTestFunctions.lookupFunction<
+    Function1PointerUint8, Function1PointerUint8>('Function1PointerUint8');
 
 typedef Function2PointerUint8 = Pointer<Uint8> Function(
     Pointer<Uint8>, Pointer<Uint8>);
-Function2PointerUint8 function2PointerUint8 = ffiTestFunctions.lookupFunction<
-    Function2PointerUint8, Function2PointerUint8>("Function2PointerUint8");
+final function2PointerUint8 = ffiTestFunctions.lookupFunction<
+    Function2PointerUint8, Function2PointerUint8>('Function2PointerUint8');
 
 typedef Function4PointerUint8 = Pointer<Uint8> Function(
     Pointer<Uint8>, Pointer<Uint8>, Pointer<Uint8>, Pointer<Uint8>);
-Function4PointerUint8 function4PointerUint8 = ffiTestFunctions.lookupFunction<
-    Function4PointerUint8, Function4PointerUint8>("Function4PointerUint8");
+final function4PointerUint8 = ffiTestFunctions.lookupFunction<
+    Function4PointerUint8, Function4PointerUint8>('Function4PointerUint8');
 
 typedef Function10PointerUint8 = Pointer<Uint8> Function(
     Pointer<Uint8>,
@@ -270,8 +270,8 @@
     Pointer<Uint8>,
     Pointer<Uint8>,
     Pointer<Uint8>);
-Function10PointerUint8 function10PointerUint8 = ffiTestFunctions.lookupFunction<
-    Function10PointerUint8, Function10PointerUint8>("Function10PointerUint8");
+final function10PointerUint8 = ffiTestFunctions.lookupFunction<
+    Function10PointerUint8, Function10PointerUint8>('Function10PointerUint8');
 
 typedef Function20PointerUint8 = Pointer<Uint8> Function(
     Pointer<Uint8>,
@@ -294,25 +294,25 @@
     Pointer<Uint8>,
     Pointer<Uint8>,
     Pointer<Uint8>);
-Function20PointerUint8 function20PointerUint8 = ffiTestFunctions.lookupFunction<
-    Function20PointerUint8, Function20PointerUint8>("Function20PointerUint8");
+final function20PointerUint8 = ffiTestFunctions.lookupFunction<
+    Function20PointerUint8, Function20PointerUint8>('Function20PointerUint8');
 
 final function1handle = ffiTestFunctions.lookupFunction<Handle Function(Handle),
-    Object Function(Object)>("Function1Handle");
+    Object Function(Object)>('Function1Handle');
 
 final function2handle = ffiTestFunctions.lookupFunction<
     Handle Function(Handle, Handle),
-    Object Function(Object, Object)>("Function2Handle");
+    Object Function(Object, Object)>('Function2Handle');
 
 final function4handle = ffiTestFunctions.lookupFunction<
     Handle Function(Handle, Handle, Handle, Handle),
-    Object Function(Object, Object, Object, Object)>("Function4Handle");
+    Object Function(Object, Object, Object, Object)>('Function4Handle');
 
 final function10handle = ffiTestFunctions.lookupFunction<
     Handle Function(Handle, Handle, Handle, Handle, Handle, Handle, Handle,
         Handle, Handle, Handle),
     Object Function(Object, Object, Object, Object, Object, Object, Object,
-        Object, Object, Object)>("Function10Handle");
+        Object, Object, Object)>('Function10Handle');
 
 final function20handle = ffiTestFunctions.lookupFunction<
     Handle Function(
@@ -356,7 +356,7 @@
         Object,
         Object,
         Object,
-        Object)>("Function20Handle");
+        Object)>('Function20Handle');
 
 //
 // Trampoline call.
@@ -732,354 +732,392 @@
 const N = 1000;
 
 class Uint8x01 extends BenchmarkBase {
-  Uint8x01() : super("FfiCall.Uint8x01");
+  Uint8x01() : super('FfiCall.Uint8x01');
 
+  @override
   void run() {
     final int x = doCall1Uint8(N);
     if (x != N * 17 + N * 42) {
-      throw Exception("$name: Unexpected result: $x");
+      throw Exception('$name: Unexpected result: $x');
     }
   }
 }
 
 class Uint16x01 extends BenchmarkBase {
-  Uint16x01() : super("FfiCall.Uint16x01");
+  Uint16x01() : super('FfiCall.Uint16x01');
 
+  @override
   void run() {
     final int x = doCall1Uint16(N);
     if (x != N * 17 + N * 42) {
-      throw Exception("$name: Unexpected result: $x");
+      throw Exception('$name: Unexpected result: $x');
     }
   }
 }
 
 class Uint32x01 extends BenchmarkBase {
-  Uint32x01() : super("FfiCall.Uint32x01");
+  Uint32x01() : super('FfiCall.Uint32x01');
 
+  @override
   void run() {
     final int x = doCall1Uint32(N);
     if (x != N * (N - 1) / 2 + N * 42) {
-      throw Exception("$name: Unexpected result: $x");
+      throw Exception('$name: Unexpected result: $x');
     }
   }
 }
 
 class Uint64x01 extends BenchmarkBase {
-  Uint64x01() : super("FfiCall.Uint64x01");
+  Uint64x01() : super('FfiCall.Uint64x01');
 
+  @override
   void run() {
     final int x = doCall1Uint64(N);
     if (x != N * (N - 1) / 2 + N * 42) {
-      throw Exception("$name: Unexpected result: $x");
+      throw Exception('$name: Unexpected result: $x');
     }
   }
 }
 
 class Int8x01 extends BenchmarkBase {
-  Int8x01() : super("FfiCall.Int8x01");
+  Int8x01() : super('FfiCall.Int8x01');
 
+  @override
   void run() {
     final int x = doCall1Int8(N);
     if (x != N * 17 + N * 42) {
-      throw Exception("$name: Unexpected result: $x");
+      throw Exception('$name: Unexpected result: $x');
     }
   }
 }
 
 class Int16x01 extends BenchmarkBase {
-  Int16x01() : super("FfiCall.Int16x01");
+  Int16x01() : super('FfiCall.Int16x01');
 
+  @override
   void run() {
     final int x = doCall1Int16(N);
     if (x != N * 17 + N * 42) {
-      throw Exception("$name: Unexpected result: $x");
+      throw Exception('$name: Unexpected result: $x');
     }
   }
 }
 
 class Int32x01 extends BenchmarkBase {
-  Int32x01() : super("FfiCall.Int32x01");
+  Int32x01() : super('FfiCall.Int32x01');
 
+  @override
   void run() {
     final int x = doCall1Int32(N);
     if (x != N * (N - 1) / 2 + N * 42) {
-      throw Exception("$name: Unexpected result: $x");
+      throw Exception('$name: Unexpected result: $x');
     }
   }
 }
 
 class Int32x02 extends BenchmarkBase {
-  Int32x02() : super("FfiCall.Int32x02");
+  Int32x02() : super('FfiCall.Int32x02');
 
+  @override
   void run() {
     final int x = doCall2Int32(N);
     if (x != N * (N - 1) * 2 / 2) {
-      throw Exception("$name: Unexpected result: $x");
+      throw Exception('$name: Unexpected result: $x');
     }
   }
 }
 
 class Int32x04 extends BenchmarkBase {
-  Int32x04() : super("FfiCall.Int32x04");
+  Int32x04() : super('FfiCall.Int32x04');
 
+  @override
   void run() {
     final int x = doCall4Int32(N);
     if (x != N * (N - 1) * 4 / 2) {
-      throw Exception("$name: Unexpected result: $x");
+      throw Exception('$name: Unexpected result: $x');
     }
   }
 }
 
 class Int32x10 extends BenchmarkBase {
-  Int32x10() : super("FfiCall.Int32x10");
+  Int32x10() : super('FfiCall.Int32x10');
 
+  @override
   void run() {
     final int x = doCall10Int32(N);
     if (x != N * (N - 1) * 10 / 2) {
-      throw Exception("$name: Unexpected result: $x");
+      throw Exception('$name: Unexpected result: $x');
     }
   }
 }
 
 class Int32x20 extends BenchmarkBase {
-  Int32x20() : super("FfiCall.Int32x20");
+  Int32x20() : super('FfiCall.Int32x20');
 
+  @override
   void run() {
     final int x = doCall20Int32(N);
     if (x != N * (N - 1) * 20 / 2) {
-      throw Exception("$name: Unexpected result: $x");
+      throw Exception('$name: Unexpected result: $x');
     }
   }
 }
 
 class Int64x01 extends BenchmarkBase {
-  Int64x01() : super("FfiCall.Int64x01");
+  Int64x01() : super('FfiCall.Int64x01');
 
+  @override
   void run() {
     final int x = doCall1Int64(N);
     if (x != N * (N - 1) / 2 + N * 42) {
-      throw Exception("$name: Unexpected result: $x");
+      throw Exception('$name: Unexpected result: $x');
     }
   }
 }
 
 class Int64x02 extends BenchmarkBase {
-  Int64x02() : super("FfiCall.Int64x02");
+  Int64x02() : super('FfiCall.Int64x02');
 
+  @override
   void run() {
     final int x = doCall2Int64(N);
     if (x != N * (N - 1) * 2 / 2) {
-      throw Exception("$name: Unexpected result: $x");
+      throw Exception('$name: Unexpected result: $x');
     }
   }
 }
 
 class Int64x04 extends BenchmarkBase {
-  Int64x04() : super("FfiCall.Int64x04");
+  Int64x04() : super('FfiCall.Int64x04');
 
+  @override
   void run() {
     final int x = doCall4Int64(N);
     if (x != N * (N - 1) * 4 / 2) {
-      throw Exception("$name: Unexpected result: $x");
+      throw Exception('$name: Unexpected result: $x');
     }
   }
 }
 
 class Int64x10 extends BenchmarkBase {
-  Int64x10() : super("FfiCall.Int64x10");
+  Int64x10() : super('FfiCall.Int64x10');
 
+  @override
   void run() {
     final int x = doCall10Int64(N);
     if (x != N * (N - 1) * 10 / 2) {
-      throw Exception("$name: Unexpected result: $x");
+      throw Exception('$name: Unexpected result: $x');
     }
   }
 }
 
 class Int64x20 extends BenchmarkBase {
-  Int64x20() : super("FfiCall.Int64x20");
+  Int64x20() : super('FfiCall.Int64x20');
 
+  @override
   void run() {
     final int x = doCall20Int64(N);
     if (x != N * (N - 1) * 20 / 2) {
-      throw Exception("$name: Unexpected result: $x");
+      throw Exception('$name: Unexpected result: $x');
     }
   }
 }
 
 class Int64Mintx01 extends BenchmarkBase {
-  Int64Mintx01() : super("FfiCall.Int64Mintx01");
+  Int64Mintx01() : super('FfiCall.Int64Mintx01');
 
+  @override
   void run() {
     final int x = doCall1Int64Mint(N);
     if (x != 0x7FFFFFFF00000000 + N * 42) {
-      throw Exception("$name: Unexpected result: $x");
+      throw Exception('$name: Unexpected result: $x');
     }
   }
 }
 
 class Floatx01 extends BenchmarkBase {
-  Floatx01() : super("FfiCall.Floatx01");
+  Floatx01() : super('FfiCall.Floatx01');
 
+  @override
   void run() {
     final double x = doCall1Float(N);
     final double expected = N * (N - 1) / 2 + N * 42;
     if (0.999 * expected > x && x > 1.001 * expected) {
-      throw Exception("$name: Unexpected result: $x");
+      throw Exception('$name: Unexpected result: $x');
     }
   }
 }
 
 class Floatx02 extends BenchmarkBase {
-  Floatx02() : super("FfiCall.Floatx02");
+  Floatx02() : super('FfiCall.Floatx02');
 
+  @override
   void run() {
     final double x = doCall2Float(N);
     final double expected = N * 55.0;
     if (0.999 * expected > x && x > 1.001 * expected) {
-      throw Exception("$name: Unexpected result: $x");
+      throw Exception('$name: Unexpected result: $x');
     }
   }
 }
 
 class Floatx04 extends BenchmarkBase {
-  Floatx04() : super("FfiCall.Floatx04");
+  Floatx04() : super('FfiCall.Floatx04');
 
+  @override
   void run() {
     final double x = doCall4Float(N);
     final double expected = N * 55.0;
     if (0.999 * expected > x && x > 1.001 * expected) {
-      throw Exception("$name: Unexpected result: $x");
+      throw Exception('$name: Unexpected result: $x');
     }
   }
 }
 
 class Floatx10 extends BenchmarkBase {
-  Floatx10() : super("FfiCall.Floatx10");
+  Floatx10() : super('FfiCall.Floatx10');
 
+  @override
   void run() {
     final double x = doCall10Float(N);
     final double expected = N * 55.0;
     if (0.999 * expected > x && x > 1.001 * expected) {
-      throw Exception("$name: Unexpected result: $x");
+      throw Exception('$name: Unexpected result: $x');
     }
   }
 }
 
 class Floatx20 extends BenchmarkBase {
-  Floatx20() : super("FfiCall.Floatx20");
+  Floatx20() : super('FfiCall.Floatx20');
 
+  @override
   void run() {
     final double x = doCall20Float(N);
     final double expected = N * 220.0;
     if (0.999 * expected > x && x > 1.001 * expected) {
-      throw Exception("$name: Unexpected result: $x");
+      throw Exception('$name: Unexpected result: $x');
     }
   }
 }
 
 class Doublex01 extends BenchmarkBase {
-  Doublex01() : super("FfiCall.Doublex01");
+  Doublex01() : super('FfiCall.Doublex01');
 
+  @override
   void run() {
     final double x = doCall1Double(N);
     final double expected = N * (N - 1) / 2 + N * 42;
     if (0.999 * expected > x && x > 1.001 * expected) {
-      throw Exception("$name: Unexpected result: $x");
+      throw Exception('$name: Unexpected result: $x');
     }
   }
 }
 
 class Doublex02 extends BenchmarkBase {
-  Doublex02() : super("FfiCall.Doublex02");
+  Doublex02() : super('FfiCall.Doublex02');
 
+  @override
   void run() {
     final double x = doCall2Double(N);
     final double expected = N * 55.0;
     if (0.999 * expected > x && x > 1.001 * expected) {
-      throw Exception("$name: Unexpected result: $x");
+      throw Exception('$name: Unexpected result: $x');
     }
   }
 }
 
 class Doublex04 extends BenchmarkBase {
-  Doublex04() : super("FfiCall.Doublex04");
+  Doublex04() : super('FfiCall.Doublex04');
 
+  @override
   void run() {
     final double x = doCall4Double(N);
     final double expected = N * 55.0;
     if (0.999 * expected > x && x > 1.001 * expected) {
-      throw Exception("$name: Unexpected result: $x");
+      throw Exception('$name: Unexpected result: $x');
     }
   }
 }
 
 class Doublex10 extends BenchmarkBase {
-  Doublex10() : super("FfiCall.Doublex10");
+  Doublex10() : super('FfiCall.Doublex10');
 
+  @override
   void run() {
     final double x = doCall10Double(N);
     final double expected = N * 55.0;
     if (0.999 * expected > x && x > 1.001 * expected) {
-      throw Exception("$name: Unexpected result: $x");
+      throw Exception('$name: Unexpected result: $x');
     }
   }
 }
 
 class Doublex20 extends BenchmarkBase {
-  Doublex20() : super("FfiCall.Doublex20");
+  Doublex20() : super('FfiCall.Doublex20');
 
+  @override
   void run() {
     final double x = doCall20Double(N);
     final double expected = N * 220.0;
     if (0.999 * expected > x && x > 1.001 * expected) {
-      throw Exception("$name: Unexpected result: $x");
+      throw Exception('$name: Unexpected result: $x');
     }
   }
 }
 
 class PointerUint8x01 extends BenchmarkBase {
-  PointerUint8x01() : super("FfiCall.PointerUint8x01");
+  PointerUint8x01() : super('FfiCall.PointerUint8x01');
 
-  Pointer<Uint8> pointer;
+  Pointer<Uint8> pointer = nullptr;
+  @override
   void setup() => pointer = allocate(count: N + 1);
+  @override
   void teardown() => free(pointer);
 
+  @override
   void run() {
     final Pointer<Uint8> x = doCall1PointerUint8(N, pointer);
     if (x.address != pointer.address + N) {
-      throw Exception("$name: Unexpected result: $x");
+      throw Exception('$name: Unexpected result: $x');
     }
   }
 }
 
 class PointerUint8x02 extends BenchmarkBase {
-  PointerUint8x02() : super("FfiCall.PointerUint8x02");
+  PointerUint8x02() : super('FfiCall.PointerUint8x02');
 
-  Pointer<Uint8> pointer, pointer2;
+  Pointer<Uint8> pointer = nullptr;
+  Pointer<Uint8> pointer2 = nullptr;
 
+  @override
   void setup() {
     pointer = allocate(count: N + 1);
     pointer2 = pointer.elementAt(1);
   }
 
+  @override
   void teardown() {
     free(pointer);
   }
 
+  @override
   void run() {
     final Pointer<Uint8> x = doCall2PointerUint8(N, pointer, pointer2);
     if (x.address != pointer.address + N * sizeOf<Uint8>()) {
-      throw Exception("$name: Unexpected result: $x");
+      throw Exception('$name: Unexpected result: $x');
     }
   }
 }
 
 class PointerUint8x04 extends BenchmarkBase {
-  PointerUint8x04() : super("FfiCall.PointerUint8x04");
+  PointerUint8x04() : super('FfiCall.PointerUint8x04');
 
-  Pointer<Uint8> pointer, pointer2, pointer3, pointer4;
+  Pointer<Uint8> pointer = nullptr;
+  Pointer<Uint8> pointer2 = nullptr;
+  Pointer<Uint8> pointer3 = nullptr;
+  Pointer<Uint8> pointer4 = nullptr;
 
+  @override
   void setup() {
     pointer = allocate(count: N + 1);
     pointer2 = pointer.elementAt(1);
@@ -1087,33 +1125,36 @@
     pointer4 = pointer.elementAt(3);
   }
 
+  @override
   void teardown() {
     free(pointer);
   }
 
+  @override
   void run() {
     final Pointer<Uint8> x =
         doCall4PointerUint8(N, pointer, pointer2, pointer3, pointer4);
     if (x.address != pointer.address + N * sizeOf<Uint8>()) {
-      throw Exception("$name: Unexpected result: $x");
+      throw Exception('$name: Unexpected result: $x');
     }
   }
 }
 
 class PointerUint8x10 extends BenchmarkBase {
-  PointerUint8x10() : super("FfiCall.PointerUint8x10");
+  PointerUint8x10() : super('FfiCall.PointerUint8x10');
 
-  Pointer<Uint8> pointer,
-      pointer2,
-      pointer3,
-      pointer4,
-      pointer5,
-      pointer6,
-      pointer7,
-      pointer8,
-      pointer9,
-      pointer10;
+  Pointer<Uint8> pointer = nullptr;
+  Pointer<Uint8> pointer2 = nullptr;
+  Pointer<Uint8> pointer3 = nullptr;
+  Pointer<Uint8> pointer4 = nullptr;
+  Pointer<Uint8> pointer5 = nullptr;
+  Pointer<Uint8> pointer6 = nullptr;
+  Pointer<Uint8> pointer7 = nullptr;
+  Pointer<Uint8> pointer8 = nullptr;
+  Pointer<Uint8> pointer9 = nullptr;
+  Pointer<Uint8> pointer10 = nullptr;
 
+  @override
   void setup() {
     pointer = allocate(count: N + 1);
     pointer2 = pointer.elementAt(1);
@@ -1127,10 +1168,12 @@
     pointer10 = pointer.elementAt(9);
   }
 
+  @override
   void teardown() {
     free(pointer);
   }
 
+  @override
   void run() {
     final Pointer<Uint8> x = doCall10PointerUint8(
         N,
@@ -1145,35 +1188,36 @@
         pointer9,
         pointer10);
     if (x.address != pointer.address + N * sizeOf<Uint8>()) {
-      throw Exception("$name: Unexpected result: $x");
+      throw Exception('$name: Unexpected result: $x');
     }
   }
 }
 
 class PointerUint8x20 extends BenchmarkBase {
-  PointerUint8x20() : super("FfiCall.PointerUint8x20");
+  PointerUint8x20() : super('FfiCall.PointerUint8x20');
 
-  Pointer<Uint8> pointer,
-      pointer2,
-      pointer3,
-      pointer4,
-      pointer5,
-      pointer6,
-      pointer7,
-      pointer8,
-      pointer9,
-      pointer10,
-      pointer11,
-      pointer12,
-      pointer13,
-      pointer14,
-      pointer15,
-      pointer16,
-      pointer17,
-      pointer18,
-      pointer19,
-      pointer20;
+  Pointer<Uint8> pointer = nullptr;
+  Pointer<Uint8> pointer2 = nullptr;
+  Pointer<Uint8> pointer3 = nullptr;
+  Pointer<Uint8> pointer4 = nullptr;
+  Pointer<Uint8> pointer5 = nullptr;
+  Pointer<Uint8> pointer6 = nullptr;
+  Pointer<Uint8> pointer7 = nullptr;
+  Pointer<Uint8> pointer8 = nullptr;
+  Pointer<Uint8> pointer9 = nullptr;
+  Pointer<Uint8> pointer10 = nullptr;
+  Pointer<Uint8> pointer11 = nullptr;
+  Pointer<Uint8> pointer12 = nullptr;
+  Pointer<Uint8> pointer13 = nullptr;
+  Pointer<Uint8> pointer14 = nullptr;
+  Pointer<Uint8> pointer15 = nullptr;
+  Pointer<Uint8> pointer16 = nullptr;
+  Pointer<Uint8> pointer17 = nullptr;
+  Pointer<Uint8> pointer18 = nullptr;
+  Pointer<Uint8> pointer19 = nullptr;
+  Pointer<Uint8> pointer20 = nullptr;
 
+  @override
   void setup() {
     pointer = allocate(count: N + 1);
     pointer2 = pointer.elementAt(1);
@@ -1197,10 +1241,12 @@
     pointer20 = pointer.elementAt(19);
   }
 
+  @override
   void teardown() {
     free(pointer);
   }
 
+  @override
   void run() {
     final Pointer<Uint8> x = doCall20PointerUint8(
         N,
@@ -1225,7 +1271,7 @@
         pointer19,
         pointer20);
     if (x.address != pointer.address + N * sizeOf<Uint8>()) {
-      throw Exception("$name: Unexpected result: $x");
+      throw Exception('$name: Unexpected result: $x');
     }
   }
 }
@@ -1236,35 +1282,38 @@
 }
 
 class Handlex01 extends BenchmarkBase {
-  Handlex01() : super("FfiCall.Handlex01");
+  Handlex01() : super('FfiCall.Handlex01');
 
+  @override
   void run() {
     final p1 = MyClass(123);
     final x = doCall1Handle(N, p1);
 
     if (!identical(p1, x)) {
-      throw Exception("$name: Unexpected result: $x");
+      throw Exception('$name: Unexpected result: $x');
     }
   }
 }
 
 class Handlex02 extends BenchmarkBase {
-  Handlex02() : super("FfiCall.Handlex02");
+  Handlex02() : super('FfiCall.Handlex02');
 
+  @override
   void run() {
     final p1 = MyClass(123);
     final p2 = MyClass(2);
     final x = doCall2Handle(N, p1, p2);
 
     if (!identical(p1, x)) {
-      throw Exception("$name: Unexpected result: $x");
+      throw Exception('$name: Unexpected result: $x');
     }
   }
 }
 
 class Handlex04 extends BenchmarkBase {
-  Handlex04() : super("FfiCall.Handlex04");
+  Handlex04() : super('FfiCall.Handlex04');
 
+  @override
   void run() {
     final p1 = MyClass(123);
     final p2 = MyClass(2);
@@ -1273,14 +1322,15 @@
     final x = doCall4Handle(N, p1, p2, p3, p4);
 
     if (!identical(p1, x)) {
-      throw Exception("$name: Unexpected result: $x");
+      throw Exception('$name: Unexpected result: $x');
     }
   }
 }
 
 class Handlex10 extends BenchmarkBase {
-  Handlex10() : super("FfiCall.Handlex10");
+  Handlex10() : super('FfiCall.Handlex10');
 
+  @override
   void run() {
     final p1 = MyClass(123);
     final p2 = MyClass(2);
@@ -1295,14 +1345,15 @@
     final x = doCall10Handle(N, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10);
 
     if (!identical(p1, x)) {
-      throw Exception("$name: Unexpected result: $x");
+      throw Exception('$name: Unexpected result: $x');
     }
   }
 }
 
 class Handlex20 extends BenchmarkBase {
-  Handlex20() : super("FfiCall.Handlex20");
+  Handlex20() : super('FfiCall.Handlex20');
 
+  @override
   void run() {
     final p1 = MyClass(123);
     final p2 = MyClass(2);
@@ -1328,7 +1379,7 @@
         p12, p13, p14, p15, p16, p17, p18, p19, p20);
 
     if (!identical(p1, x)) {
-      throw Exception("$name: Unexpected result: $x");
+      throw Exception('$name: Unexpected result: $x');
     }
   }
 }
@@ -1337,7 +1388,7 @@
 // Main driver.
 //
 
-main() {
+void main() {
   final benchmarks = [
     () => Uint8x01(),
     () => Uint16x01(),
@@ -1377,5 +1428,7 @@
     () => Handlex10(),
     () => Handlex20(),
   ];
-  benchmarks.forEach((benchmark) => benchmark().report());
+  for (final benchmark in benchmarks) {
+    benchmark().report();
+  }
 }
diff --git a/benchmarks/FfiCall/dart/dlopen_helper.dart b/benchmarks/FfiCall/dart/dlopen_helper.dart
index b031002..fe80879 100644
--- a/benchmarks/FfiCall/dart/dlopen_helper.dart
+++ b/benchmarks/FfiCall/dart/dlopen_helper.dart
@@ -5,54 +5,57 @@
 import 'dart:ffi';
 import 'dart:io';
 
-const kArm = "arm";
-const kArm64 = "arm64";
-const kIa32 = "ia32";
-const kX64 = "x64";
+const arm = 'arm';
+const arm64 = 'arm64';
+const ia32 = 'ia32';
+const x64 = 'x64';
 
 // https://stackoverflow.com/questions/45125516/possible-values-for-uname-m
 final _unames = {
-  "arm": kArm,
-  "aarch64_be": kArm64,
-  "aarch64": kArm64,
-  "armv8b": kArm64,
-  "armv8l": kArm64,
-  "i386": kIa32,
-  "i686": kIa32,
-  "x86_64": kX64,
+  'arm': arm,
+  'aarch64_be': arm64,
+  'aarch64': arm64,
+  'armv8b': arm64,
+  'armv8l': arm64,
+  'i386': ia32,
+  'i686': ia32,
+  'x86_64': x64,
 };
 
 String _checkRunningMode(String architecture) {
   // Check if we're running in 32bit mode.
   final int pointerSize = sizeOf<IntPtr>();
-  if (pointerSize == 4 && architecture == kX64) return kIa32;
-  if (pointerSize == 4 && architecture == kArm64) return kArm;
+  if (pointerSize == 4 && architecture == x64) return ia32;
+  if (pointerSize == 4 && architecture == arm64) return arm;
 
   return architecture;
 }
 
 String _architecture() {
-  final String uname = Process.runSync("uname", ["-m"]).stdout.trim();
-  final String architecture = _unames[uname];
-  if (architecture == null)
-    throw Exception("Unrecognized architecture: '$uname'");
+  final String uname = Process.runSync('uname', ['-m']).stdout.trim();
+  final String? architecture = _unames[uname];
+  if (architecture == null) {
+    throw Exception('Unrecognized architecture: "$uname"');
+  }
 
   // Check if we're running in 32bit mode.
   return _checkRunningMode(architecture);
 }
 
-String _platformPath(String name, {String path = ""}) {
-  if (Platform.isMacOS || Platform.isIOS)
-    return "${path}mac/${_architecture()}/lib$name.dylib";
+String _platformPath(String name, String path) {
+  if (Platform.isMacOS || Platform.isIOS) {
+    return '${path}mac/${_architecture()}/lib$name.dylib';
+  }
 
-  if (Platform.isWindows)
-    return "${path}win/${_checkRunningMode(kX64)}/$name.dll";
+  if (Platform.isWindows) {
+    return '${path}win/${_checkRunningMode(x64)}/$name.dll';
+  }
 
   // Unknown platforms default to Unix implementation.
-  return "${path}linux/${_architecture()}/lib$name.so";
+  return '${path}linux/${_architecture()}/lib$name.so';
 }
 
-DynamicLibrary dlopenPlatformSpecific(String name, {String path}) {
-  final String fullPath = _platformPath(name, path: path);
+DynamicLibrary dlopenPlatformSpecific(String name, {String path = ''}) {
+  final String fullPath = _platformPath(name, path);
   return DynamicLibrary.open(fullPath);
 }
diff --git a/benchmarks/FfiCall/dart2/FfiCall.dart b/benchmarks/FfiCall/dart2/FfiCall.dart
index e6afd40..1c34bc9 100644
--- a/benchmarks/FfiCall/dart2/FfiCall.dart
+++ b/benchmarks/FfiCall/dart2/FfiCall.dart
@@ -19,54 +19,54 @@
 // Trampoline functions.
 //
 
-DynamicLibrary ffiTestFunctions = dlopenPlatformSpecific("native_functions",
-    path: Platform.script.resolve("../native/out/").path);
+DynamicLibrary ffiTestFunctions = dlopenPlatformSpecific('native_functions',
+    path: Platform.script.resolve('../native/out/').path);
 
 typedef NativeFunction1Uint8 = Uint8 Function(Uint8);
 typedef Function1int = int Function(int);
-Function1int function1Uint8 = ffiTestFunctions
-    .lookupFunction<NativeFunction1Uint8, Function1int>("Function1Uint8");
+final function1Uint8 = ffiTestFunctions
+    .lookupFunction<NativeFunction1Uint8, Function1int>('Function1Uint8');
 
 typedef NativeFunction1Uint16 = Uint16 Function(Uint16);
-Function1int function1Uint16 = ffiTestFunctions
-    .lookupFunction<NativeFunction1Uint16, Function1int>("Function1Uint16");
+final function1Uint16 = ffiTestFunctions
+    .lookupFunction<NativeFunction1Uint16, Function1int>('Function1Uint16');
 
 typedef NativeFunction1Uint32 = Uint32 Function(Uint32);
-Function1int function1Uint32 = ffiTestFunctions
-    .lookupFunction<NativeFunction1Uint32, Function1int>("Function1Uint32");
+final function1Uint32 = ffiTestFunctions
+    .lookupFunction<NativeFunction1Uint32, Function1int>('Function1Uint32');
 
 typedef NativeFunction1Uint64 = Uint64 Function(Uint64);
-Function1int function1Uint64 = ffiTestFunctions
-    .lookupFunction<NativeFunction1Uint64, Function1int>("Function1Uint64");
+final function1Uint64 = ffiTestFunctions
+    .lookupFunction<NativeFunction1Uint64, Function1int>('Function1Uint64');
 
 typedef NativeFunction1Int8 = Int8 Function(Int8);
-Function1int function1Int8 = ffiTestFunctions
-    .lookupFunction<NativeFunction1Int8, Function1int>("Function1Int8");
+final function1Int8 = ffiTestFunctions
+    .lookupFunction<NativeFunction1Int8, Function1int>('Function1Int8');
 
 typedef NativeFunction1Int16 = Int16 Function(Int16);
-Function1int function1Int16 = ffiTestFunctions
-    .lookupFunction<NativeFunction1Int16, Function1int>("Function1Int16");
+final function1Int16 = ffiTestFunctions
+    .lookupFunction<NativeFunction1Int16, Function1int>('Function1Int16');
 
 typedef NativeFunction1Int32 = Int32 Function(Int32);
-Function1int function1Int32 = ffiTestFunctions
-    .lookupFunction<NativeFunction1Int32, Function1int>("Function1Int32");
+final function1Int32 = ffiTestFunctions
+    .lookupFunction<NativeFunction1Int32, Function1int>('Function1Int32');
 
 typedef NativeFunction2Int32 = Int32 Function(Int32, Int32);
 typedef Function2int = int Function(int, int);
-Function2int function2Int32 = ffiTestFunctions
-    .lookupFunction<NativeFunction2Int32, Function2int>("Function2Int32");
+final function2Int32 = ffiTestFunctions
+    .lookupFunction<NativeFunction2Int32, Function2int>('Function2Int32');
 
 typedef NativeFunction4Int32 = Int32 Function(Int32, Int32, Int32, Int32);
 typedef Function4int = int Function(int, int, int, int);
-Function4int function4Int32 = ffiTestFunctions
-    .lookupFunction<NativeFunction4Int32, Function4int>("Function4Int32");
+final function4Int32 = ffiTestFunctions
+    .lookupFunction<NativeFunction4Int32, Function4int>('Function4Int32');
 
 typedef NativeFunction10Int32 = Int32 Function(
     Int32, Int32, Int32, Int32, Int32, Int32, Int32, Int32, Int32, Int32);
 typedef Function10int = int Function(
     int, int, int, int, int, int, int, int, int, int);
-Function10int function10Int32 = ffiTestFunctions
-    .lookupFunction<NativeFunction10Int32, Function10int>("Function10Int32");
+final function10Int32 = ffiTestFunctions
+    .lookupFunction<NativeFunction10Int32, Function10int>('Function10Int32');
 
 typedef NativeFunction20Int32 = Int32 Function(
     Int32,
@@ -91,25 +91,25 @@
     Int32);
 typedef Function20int = int Function(int, int, int, int, int, int, int, int,
     int, int, int, int, int, int, int, int, int, int, int, int);
-Function20int function20Int32 = ffiTestFunctions
-    .lookupFunction<NativeFunction20Int32, Function20int>("Function20Int32");
+final function20Int32 = ffiTestFunctions
+    .lookupFunction<NativeFunction20Int32, Function20int>('Function20Int32');
 
 typedef NativeFunction1Int64 = Int64 Function(Int64);
-Function1int function1Int64 = ffiTestFunctions
-    .lookupFunction<NativeFunction1Int64, Function1int>("Function1Int64");
+final function1Int64 = ffiTestFunctions
+    .lookupFunction<NativeFunction1Int64, Function1int>('Function1Int64');
 
 typedef NativeFunction2Int64 = Int64 Function(Int64, Int64);
-Function2int function2Int64 = ffiTestFunctions
-    .lookupFunction<NativeFunction2Int64, Function2int>("Function2Int64");
+final function2Int64 = ffiTestFunctions
+    .lookupFunction<NativeFunction2Int64, Function2int>('Function2Int64');
 
 typedef NativeFunction4Int64 = Int64 Function(Int64, Int64, Int64, Int64);
-Function4int function4Int64 = ffiTestFunctions
-    .lookupFunction<NativeFunction4Int64, Function4int>("Function4Int64");
+final function4Int64 = ffiTestFunctions
+    .lookupFunction<NativeFunction4Int64, Function4int>('Function4Int64');
 
 typedef NativeFunction10Int64 = Int64 Function(
     Int64, Int64, Int64, Int64, Int64, Int64, Int64, Int64, Int64, Int64);
-Function10int function10Int64 = ffiTestFunctions
-    .lookupFunction<NativeFunction10Int64, Function10int>("Function10Int64");
+final function10Int64 = ffiTestFunctions
+    .lookupFunction<NativeFunction10Int64, Function10int>('Function10Int64');
 
 typedef NativeFunction20Int64 = Int64 Function(
     Int64,
@@ -132,30 +132,30 @@
     Int64,
     Int64,
     Int64);
-Function20int function20Int64 = ffiTestFunctions
-    .lookupFunction<NativeFunction20Int64, Function20int>("Function20Int64");
+final function20Int64 = ffiTestFunctions
+    .lookupFunction<NativeFunction20Int64, Function20int>('Function20Int64');
 
 typedef NativeFunction1Float = Float Function(Float);
 typedef Function1double = double Function(double);
-Function1double function1Float = ffiTestFunctions
-    .lookupFunction<NativeFunction1Float, Function1double>("Function1Float");
+final function1Float = ffiTestFunctions
+    .lookupFunction<NativeFunction1Float, Function1double>('Function1Float');
 
 typedef NativeFunction2Float = Float Function(Float, Float);
 typedef Function2double = double Function(double, double);
-Function2double function2Float = ffiTestFunctions
-    .lookupFunction<NativeFunction2Float, Function2double>("Function2Float");
+final function2Float = ffiTestFunctions
+    .lookupFunction<NativeFunction2Float, Function2double>('Function2Float');
 
 typedef NativeFunction4Float = Float Function(Float, Float, Float, Float);
 typedef Function4double = double Function(double, double, double, double);
-Function4double function4Float = ffiTestFunctions
-    .lookupFunction<NativeFunction4Float, Function4double>("Function4Float");
+final function4Float = ffiTestFunctions
+    .lookupFunction<NativeFunction4Float, Function4double>('Function4Float');
 
 typedef NativeFunction10Float = Float Function(
     Float, Float, Float, Float, Float, Float, Float, Float, Float, Float);
 typedef Function10double = double Function(double, double, double, double,
     double, double, double, double, double, double);
-Function10double function10Float = ffiTestFunctions
-    .lookupFunction<NativeFunction10Float, Function10double>("Function10Float");
+final function10Float = ffiTestFunctions
+    .lookupFunction<NativeFunction10Float, Function10double>('Function10Float');
 
 typedef NativeFunction20Float = Float Function(
     Float,
@@ -199,26 +199,26 @@
     double,
     double,
     double);
-Function20double function20Float = ffiTestFunctions
-    .lookupFunction<NativeFunction20Float, Function20double>("Function20Float");
+final function20Float = ffiTestFunctions
+    .lookupFunction<NativeFunction20Float, Function20double>('Function20Float');
 
 typedef NativeFunction1Double = Double Function(Double);
-Function1double function1Double = ffiTestFunctions
-    .lookupFunction<NativeFunction1Double, Function1double>("Function1Double");
+final function1Double = ffiTestFunctions
+    .lookupFunction<NativeFunction1Double, Function1double>('Function1Double');
 
 typedef NativeFunction2Double = Double Function(Double, Double);
-Function2double function2Double = ffiTestFunctions
-    .lookupFunction<NativeFunction2Double, Function2double>("Function1Double");
+final function2Double = ffiTestFunctions
+    .lookupFunction<NativeFunction2Double, Function2double>('Function1Double');
 
 typedef NativeFunction4Double = Double Function(Double, Double, Double, Double);
-Function4double function4Double = ffiTestFunctions
-    .lookupFunction<NativeFunction4Double, Function4double>("Function1Double");
+final function4Double = ffiTestFunctions
+    .lookupFunction<NativeFunction4Double, Function4double>('Function1Double');
 
 typedef NativeFunction10Double = Double Function(Double, Double, Double, Double,
     Double, Double, Double, Double, Double, Double);
 Function10double function10Double =
     ffiTestFunctions.lookupFunction<NativeFunction10Double, Function10double>(
-        "Function10Double");
+        'Function10Double');
 
 typedef NativeFunction20Double = Double Function(
     Double,
@@ -243,21 +243,21 @@
     Double);
 Function20double function20Double =
     ffiTestFunctions.lookupFunction<NativeFunction20Double, Function20double>(
-        "Function20Double");
+        'Function20Double');
 
 typedef Function1PointerUint8 = Pointer<Uint8> Function(Pointer<Uint8>);
-Function1PointerUint8 function1PointerUint8 = ffiTestFunctions.lookupFunction<
-    Function1PointerUint8, Function1PointerUint8>("Function1PointerUint8");
+final function1PointerUint8 = ffiTestFunctions.lookupFunction<
+    Function1PointerUint8, Function1PointerUint8>('Function1PointerUint8');
 
 typedef Function2PointerUint8 = Pointer<Uint8> Function(
     Pointer<Uint8>, Pointer<Uint8>);
-Function2PointerUint8 function2PointerUint8 = ffiTestFunctions.lookupFunction<
-    Function2PointerUint8, Function2PointerUint8>("Function2PointerUint8");
+final function2PointerUint8 = ffiTestFunctions.lookupFunction<
+    Function2PointerUint8, Function2PointerUint8>('Function2PointerUint8');
 
 typedef Function4PointerUint8 = Pointer<Uint8> Function(
     Pointer<Uint8>, Pointer<Uint8>, Pointer<Uint8>, Pointer<Uint8>);
-Function4PointerUint8 function4PointerUint8 = ffiTestFunctions.lookupFunction<
-    Function4PointerUint8, Function4PointerUint8>("Function4PointerUint8");
+final function4PointerUint8 = ffiTestFunctions.lookupFunction<
+    Function4PointerUint8, Function4PointerUint8>('Function4PointerUint8');
 
 typedef Function10PointerUint8 = Pointer<Uint8> Function(
     Pointer<Uint8>,
@@ -270,8 +270,8 @@
     Pointer<Uint8>,
     Pointer<Uint8>,
     Pointer<Uint8>);
-Function10PointerUint8 function10PointerUint8 = ffiTestFunctions.lookupFunction<
-    Function10PointerUint8, Function10PointerUint8>("Function10PointerUint8");
+final function10PointerUint8 = ffiTestFunctions.lookupFunction<
+    Function10PointerUint8, Function10PointerUint8>('Function10PointerUint8');
 
 typedef Function20PointerUint8 = Pointer<Uint8> Function(
     Pointer<Uint8>,
@@ -294,25 +294,25 @@
     Pointer<Uint8>,
     Pointer<Uint8>,
     Pointer<Uint8>);
-Function20PointerUint8 function20PointerUint8 = ffiTestFunctions.lookupFunction<
-    Function20PointerUint8, Function20PointerUint8>("Function20PointerUint8");
+final function20PointerUint8 = ffiTestFunctions.lookupFunction<
+    Function20PointerUint8, Function20PointerUint8>('Function20PointerUint8');
 
 final function1handle = ffiTestFunctions.lookupFunction<Handle Function(Handle),
-    Object Function(Object)>("Function1Handle");
+    Object Function(Object)>('Function1Handle');
 
 final function2handle = ffiTestFunctions.lookupFunction<
     Handle Function(Handle, Handle),
-    Object Function(Object, Object)>("Function2Handle");
+    Object Function(Object, Object)>('Function2Handle');
 
 final function4handle = ffiTestFunctions.lookupFunction<
     Handle Function(Handle, Handle, Handle, Handle),
-    Object Function(Object, Object, Object, Object)>("Function4Handle");
+    Object Function(Object, Object, Object, Object)>('Function4Handle');
 
 final function10handle = ffiTestFunctions.lookupFunction<
     Handle Function(Handle, Handle, Handle, Handle, Handle, Handle, Handle,
         Handle, Handle, Handle),
     Object Function(Object, Object, Object, Object, Object, Object, Object,
-        Object, Object, Object)>("Function10Handle");
+        Object, Object, Object)>('Function10Handle');
 
 final function20handle = ffiTestFunctions.lookupFunction<
     Handle Function(
@@ -356,7 +356,7 @@
         Object,
         Object,
         Object,
-        Object)>("Function20Handle");
+        Object)>('Function20Handle');
 
 //
 // Trampoline call.
@@ -732,354 +732,388 @@
 const N = 1000;
 
 class Uint8x01 extends BenchmarkBase {
-  Uint8x01() : super("FfiCall.Uint8x01");
+  Uint8x01() : super('FfiCall.Uint8x01');
 
+  @override
   void run() {
     final int x = doCall1Uint8(N);
     if (x != N * 17 + N * 42) {
-      throw Exception("$name: Unexpected result: $x");
+      throw Exception('$name: Unexpected result: $x');
     }
   }
 }
 
 class Uint16x01 extends BenchmarkBase {
-  Uint16x01() : super("FfiCall.Uint16x01");
+  Uint16x01() : super('FfiCall.Uint16x01');
 
+  @override
   void run() {
     final int x = doCall1Uint16(N);
     if (x != N * 17 + N * 42) {
-      throw Exception("$name: Unexpected result: $x");
+      throw Exception('$name: Unexpected result: $x');
     }
   }
 }
 
 class Uint32x01 extends BenchmarkBase {
-  Uint32x01() : super("FfiCall.Uint32x01");
+  Uint32x01() : super('FfiCall.Uint32x01');
 
+  @override
   void run() {
     final int x = doCall1Uint32(N);
     if (x != N * (N - 1) / 2 + N * 42) {
-      throw Exception("$name: Unexpected result: $x");
+      throw Exception('$name: Unexpected result: $x');
     }
   }
 }
 
 class Uint64x01 extends BenchmarkBase {
-  Uint64x01() : super("FfiCall.Uint64x01");
+  Uint64x01() : super('FfiCall.Uint64x01');
 
+  @override
   void run() {
     final int x = doCall1Uint64(N);
     if (x != N * (N - 1) / 2 + N * 42) {
-      throw Exception("$name: Unexpected result: $x");
+      throw Exception('$name: Unexpected result: $x');
     }
   }
 }
 
 class Int8x01 extends BenchmarkBase {
-  Int8x01() : super("FfiCall.Int8x01");
+  Int8x01() : super('FfiCall.Int8x01');
 
+  @override
   void run() {
     final int x = doCall1Int8(N);
     if (x != N * 17 + N * 42) {
-      throw Exception("$name: Unexpected result: $x");
+      throw Exception('$name: Unexpected result: $x');
     }
   }
 }
 
 class Int16x01 extends BenchmarkBase {
-  Int16x01() : super("FfiCall.Int16x01");
+  Int16x01() : super('FfiCall.Int16x01');
 
+  @override
   void run() {
     final int x = doCall1Int16(N);
     if (x != N * 17 + N * 42) {
-      throw Exception("$name: Unexpected result: $x");
+      throw Exception('$name: Unexpected result: $x');
     }
   }
 }
 
 class Int32x01 extends BenchmarkBase {
-  Int32x01() : super("FfiCall.Int32x01");
+  Int32x01() : super('FfiCall.Int32x01');
 
+  @override
   void run() {
     final int x = doCall1Int32(N);
     if (x != N * (N - 1) / 2 + N * 42) {
-      throw Exception("$name: Unexpected result: $x");
+      throw Exception('$name: Unexpected result: $x');
     }
   }
 }
 
 class Int32x02 extends BenchmarkBase {
-  Int32x02() : super("FfiCall.Int32x02");
+  Int32x02() : super('FfiCall.Int32x02');
 
+  @override
   void run() {
     final int x = doCall2Int32(N);
     if (x != N * (N - 1) * 2 / 2) {
-      throw Exception("$name: Unexpected result: $x");
+      throw Exception('$name: Unexpected result: $x');
     }
   }
 }
 
 class Int32x04 extends BenchmarkBase {
-  Int32x04() : super("FfiCall.Int32x04");
+  Int32x04() : super('FfiCall.Int32x04');
 
+  @override
   void run() {
     final int x = doCall4Int32(N);
     if (x != N * (N - 1) * 4 / 2) {
-      throw Exception("$name: Unexpected result: $x");
+      throw Exception('$name: Unexpected result: $x');
     }
   }
 }
 
 class Int32x10 extends BenchmarkBase {
-  Int32x10() : super("FfiCall.Int32x10");
+  Int32x10() : super('FfiCall.Int32x10');
 
+  @override
   void run() {
     final int x = doCall10Int32(N);
     if (x != N * (N - 1) * 10 / 2) {
-      throw Exception("$name: Unexpected result: $x");
+      throw Exception('$name: Unexpected result: $x');
     }
   }
 }
 
 class Int32x20 extends BenchmarkBase {
-  Int32x20() : super("FfiCall.Int32x20");
+  Int32x20() : super('FfiCall.Int32x20');
 
+  @override
   void run() {
     final int x = doCall20Int32(N);
     if (x != N * (N - 1) * 20 / 2) {
-      throw Exception("$name: Unexpected result: $x");
+      throw Exception('$name: Unexpected result: $x');
     }
   }
 }
 
 class Int64x01 extends BenchmarkBase {
-  Int64x01() : super("FfiCall.Int64x01");
+  Int64x01() : super('FfiCall.Int64x01');
 
+  @override
   void run() {
     final int x = doCall1Int64(N);
     if (x != N * (N - 1) / 2 + N * 42) {
-      throw Exception("$name: Unexpected result: $x");
+      throw Exception('$name: Unexpected result: $x');
     }
   }
 }
 
 class Int64x02 extends BenchmarkBase {
-  Int64x02() : super("FfiCall.Int64x02");
+  Int64x02() : super('FfiCall.Int64x02');
 
+  @override
   void run() {
     final int x = doCall2Int64(N);
     if (x != N * (N - 1) * 2 / 2) {
-      throw Exception("$name: Unexpected result: $x");
+      throw Exception('$name: Unexpected result: $x');
     }
   }
 }
 
 class Int64x04 extends BenchmarkBase {
-  Int64x04() : super("FfiCall.Int64x04");
+  Int64x04() : super('FfiCall.Int64x04');
 
+  @override
   void run() {
     final int x = doCall4Int64(N);
     if (x != N * (N - 1) * 4 / 2) {
-      throw Exception("$name: Unexpected result: $x");
+      throw Exception('$name: Unexpected result: $x');
     }
   }
 }
 
 class Int64x10 extends BenchmarkBase {
-  Int64x10() : super("FfiCall.Int64x10");
+  Int64x10() : super('FfiCall.Int64x10');
 
+  @override
   void run() {
     final int x = doCall10Int64(N);
     if (x != N * (N - 1) * 10 / 2) {
-      throw Exception("$name: Unexpected result: $x");
+      throw Exception('$name: Unexpected result: $x');
     }
   }
 }
 
 class Int64x20 extends BenchmarkBase {
-  Int64x20() : super("FfiCall.Int64x20");
+  Int64x20() : super('FfiCall.Int64x20');
 
+  @override
   void run() {
     final int x = doCall20Int64(N);
     if (x != N * (N - 1) * 20 / 2) {
-      throw Exception("$name: Unexpected result: $x");
+      throw Exception('$name: Unexpected result: $x');
     }
   }
 }
 
 class Int64Mintx01 extends BenchmarkBase {
-  Int64Mintx01() : super("FfiCall.Int64Mintx01");
+  Int64Mintx01() : super('FfiCall.Int64Mintx01');
 
+  @override
   void run() {
     final int x = doCall1Int64Mint(N);
     if (x != 0x7FFFFFFF00000000 + N * 42) {
-      throw Exception("$name: Unexpected result: $x");
+      throw Exception('$name: Unexpected result: $x');
     }
   }
 }
 
 class Floatx01 extends BenchmarkBase {
-  Floatx01() : super("FfiCall.Floatx01");
+  Floatx01() : super('FfiCall.Floatx01');
 
+  @override
   void run() {
     final double x = doCall1Float(N);
     final double expected = N * (N - 1) / 2 + N * 42;
     if (0.999 * expected > x && x > 1.001 * expected) {
-      throw Exception("$name: Unexpected result: $x");
+      throw Exception('$name: Unexpected result: $x');
     }
   }
 }
 
 class Floatx02 extends BenchmarkBase {
-  Floatx02() : super("FfiCall.Floatx02");
+  Floatx02() : super('FfiCall.Floatx02');
 
+  @override
   void run() {
     final double x = doCall2Float(N);
     final double expected = N * 55.0;
     if (0.999 * expected > x && x > 1.001 * expected) {
-      throw Exception("$name: Unexpected result: $x");
+      throw Exception('$name: Unexpected result: $x');
     }
   }
 }
 
 class Floatx04 extends BenchmarkBase {
-  Floatx04() : super("FfiCall.Floatx04");
+  Floatx04() : super('FfiCall.Floatx04');
 
+  @override
   void run() {
     final double x = doCall4Float(N);
     final double expected = N * 55.0;
     if (0.999 * expected > x && x > 1.001 * expected) {
-      throw Exception("$name: Unexpected result: $x");
+      throw Exception('$name: Unexpected result: $x');
     }
   }
 }
 
 class Floatx10 extends BenchmarkBase {
-  Floatx10() : super("FfiCall.Floatx10");
+  Floatx10() : super('FfiCall.Floatx10');
 
+  @override
   void run() {
     final double x = doCall10Float(N);
     final double expected = N * 55.0;
     if (0.999 * expected > x && x > 1.001 * expected) {
-      throw Exception("$name: Unexpected result: $x");
+      throw Exception('$name: Unexpected result: $x');
     }
   }
 }
 
 class Floatx20 extends BenchmarkBase {
-  Floatx20() : super("FfiCall.Floatx20");
+  Floatx20() : super('FfiCall.Floatx20');
 
+  @override
   void run() {
     final double x = doCall20Float(N);
     final double expected = N * 220.0;
     if (0.999 * expected > x && x > 1.001 * expected) {
-      throw Exception("$name: Unexpected result: $x");
+      throw Exception('$name: Unexpected result: $x');
     }
   }
 }
 
 class Doublex01 extends BenchmarkBase {
-  Doublex01() : super("FfiCall.Doublex01");
+  Doublex01() : super('FfiCall.Doublex01');
 
+  @override
   void run() {
     final double x = doCall1Double(N);
     final double expected = N * (N - 1) / 2 + N * 42;
     if (0.999 * expected > x && x > 1.001 * expected) {
-      throw Exception("$name: Unexpected result: $x");
+      throw Exception('$name: Unexpected result: $x');
     }
   }
 }
 
 class Doublex02 extends BenchmarkBase {
-  Doublex02() : super("FfiCall.Doublex02");
+  Doublex02() : super('FfiCall.Doublex02');
 
+  @override
   void run() {
     final double x = doCall2Double(N);
     final double expected = N * 55.0;
     if (0.999 * expected > x && x > 1.001 * expected) {
-      throw Exception("$name: Unexpected result: $x");
+      throw Exception('$name: Unexpected result: $x');
     }
   }
 }
 
 class Doublex04 extends BenchmarkBase {
-  Doublex04() : super("FfiCall.Doublex04");
+  Doublex04() : super('FfiCall.Doublex04');
 
+  @override
   void run() {
     final double x = doCall4Double(N);
     final double expected = N * 55.0;
     if (0.999 * expected > x && x > 1.001 * expected) {
-      throw Exception("$name: Unexpected result: $x");
+      throw Exception('$name: Unexpected result: $x');
     }
   }
 }
 
 class Doublex10 extends BenchmarkBase {
-  Doublex10() : super("FfiCall.Doublex10");
+  Doublex10() : super('FfiCall.Doublex10');
 
+  @override
   void run() {
     final double x = doCall10Double(N);
     final double expected = N * 55.0;
     if (0.999 * expected > x && x > 1.001 * expected) {
-      throw Exception("$name: Unexpected result: $x");
+      throw Exception('$name: Unexpected result: $x');
     }
   }
 }
 
 class Doublex20 extends BenchmarkBase {
-  Doublex20() : super("FfiCall.Doublex20");
+  Doublex20() : super('FfiCall.Doublex20');
 
+  @override
   void run() {
     final double x = doCall20Double(N);
     final double expected = N * 220.0;
     if (0.999 * expected > x && x > 1.001 * expected) {
-      throw Exception("$name: Unexpected result: $x");
+      throw Exception('$name: Unexpected result: $x');
     }
   }
 }
 
 class PointerUint8x01 extends BenchmarkBase {
-  PointerUint8x01() : super("FfiCall.PointerUint8x01");
+  PointerUint8x01() : super('FfiCall.PointerUint8x01');
 
   Pointer<Uint8> pointer;
+  @override
   void setup() => pointer = allocate(count: N + 1);
+  @override
   void teardown() => free(pointer);
 
+  @override
   void run() {
     final Pointer<Uint8> x = doCall1PointerUint8(N, pointer);
     if (x.address != pointer.address + N) {
-      throw Exception("$name: Unexpected result: $x");
+      throw Exception('$name: Unexpected result: $x');
     }
   }
 }
 
 class PointerUint8x02 extends BenchmarkBase {
-  PointerUint8x02() : super("FfiCall.PointerUint8x02");
+  PointerUint8x02() : super('FfiCall.PointerUint8x02');
 
   Pointer<Uint8> pointer, pointer2;
 
+  @override
   void setup() {
     pointer = allocate(count: N + 1);
     pointer2 = pointer.elementAt(1);
   }
 
+  @override
   void teardown() {
     free(pointer);
   }
 
+  @override
   void run() {
     final Pointer<Uint8> x = doCall2PointerUint8(N, pointer, pointer2);
     if (x.address != pointer.address + N * sizeOf<Uint8>()) {
-      throw Exception("$name: Unexpected result: $x");
+      throw Exception('$name: Unexpected result: $x');
     }
   }
 }
 
 class PointerUint8x04 extends BenchmarkBase {
-  PointerUint8x04() : super("FfiCall.PointerUint8x04");
+  PointerUint8x04() : super('FfiCall.PointerUint8x04');
 
   Pointer<Uint8> pointer, pointer2, pointer3, pointer4;
 
+  @override
   void setup() {
     pointer = allocate(count: N + 1);
     pointer2 = pointer.elementAt(1);
@@ -1087,21 +1121,23 @@
     pointer4 = pointer.elementAt(3);
   }
 
+  @override
   void teardown() {
     free(pointer);
   }
 
+  @override
   void run() {
     final Pointer<Uint8> x =
         doCall4PointerUint8(N, pointer, pointer2, pointer3, pointer4);
     if (x.address != pointer.address + N * sizeOf<Uint8>()) {
-      throw Exception("$name: Unexpected result: $x");
+      throw Exception('$name: Unexpected result: $x');
     }
   }
 }
 
 class PointerUint8x10 extends BenchmarkBase {
-  PointerUint8x10() : super("FfiCall.PointerUint8x10");
+  PointerUint8x10() : super('FfiCall.PointerUint8x10');
 
   Pointer<Uint8> pointer,
       pointer2,
@@ -1114,6 +1150,7 @@
       pointer9,
       pointer10;
 
+  @override
   void setup() {
     pointer = allocate(count: N + 1);
     pointer2 = pointer.elementAt(1);
@@ -1127,10 +1164,12 @@
     pointer10 = pointer.elementAt(9);
   }
 
+  @override
   void teardown() {
     free(pointer);
   }
 
+  @override
   void run() {
     final Pointer<Uint8> x = doCall10PointerUint8(
         N,
@@ -1145,13 +1184,13 @@
         pointer9,
         pointer10);
     if (x.address != pointer.address + N * sizeOf<Uint8>()) {
-      throw Exception("$name: Unexpected result: $x");
+      throw Exception('$name: Unexpected result: $x');
     }
   }
 }
 
 class PointerUint8x20 extends BenchmarkBase {
-  PointerUint8x20() : super("FfiCall.PointerUint8x20");
+  PointerUint8x20() : super('FfiCall.PointerUint8x20');
 
   Pointer<Uint8> pointer,
       pointer2,
@@ -1174,6 +1213,7 @@
       pointer19,
       pointer20;
 
+  @override
   void setup() {
     pointer = allocate(count: N + 1);
     pointer2 = pointer.elementAt(1);
@@ -1197,10 +1237,12 @@
     pointer20 = pointer.elementAt(19);
   }
 
+  @override
   void teardown() {
     free(pointer);
   }
 
+  @override
   void run() {
     final Pointer<Uint8> x = doCall20PointerUint8(
         N,
@@ -1225,7 +1267,7 @@
         pointer19,
         pointer20);
     if (x.address != pointer.address + N * sizeOf<Uint8>()) {
-      throw Exception("$name: Unexpected result: $x");
+      throw Exception('$name: Unexpected result: $x');
     }
   }
 }
@@ -1236,35 +1278,38 @@
 }
 
 class Handlex01 extends BenchmarkBase {
-  Handlex01() : super("FfiCall.Handlex01");
+  Handlex01() : super('FfiCall.Handlex01');
 
+  @override
   void run() {
     final p1 = MyClass(123);
     final x = doCall1Handle(N, p1);
 
     if (!identical(p1, x)) {
-      throw Exception("$name: Unexpected result: $x");
+      throw Exception('$name: Unexpected result: $x');
     }
   }
 }
 
 class Handlex02 extends BenchmarkBase {
-  Handlex02() : super("FfiCall.Handlex02");
+  Handlex02() : super('FfiCall.Handlex02');
 
+  @override
   void run() {
     final p1 = MyClass(123);
     final p2 = MyClass(2);
     final x = doCall2Handle(N, p1, p2);
 
     if (!identical(p1, x)) {
-      throw Exception("$name: Unexpected result: $x");
+      throw Exception('$name: Unexpected result: $x');
     }
   }
 }
 
 class Handlex04 extends BenchmarkBase {
-  Handlex04() : super("FfiCall.Handlex04");
+  Handlex04() : super('FfiCall.Handlex04');
 
+  @override
   void run() {
     final p1 = MyClass(123);
     final p2 = MyClass(2);
@@ -1273,14 +1318,15 @@
     final x = doCall4Handle(N, p1, p2, p3, p4);
 
     if (!identical(p1, x)) {
-      throw Exception("$name: Unexpected result: $x");
+      throw Exception('$name: Unexpected result: $x');
     }
   }
 }
 
 class Handlex10 extends BenchmarkBase {
-  Handlex10() : super("FfiCall.Handlex10");
+  Handlex10() : super('FfiCall.Handlex10');
 
+  @override
   void run() {
     final p1 = MyClass(123);
     final p2 = MyClass(2);
@@ -1295,14 +1341,15 @@
     final x = doCall10Handle(N, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10);
 
     if (!identical(p1, x)) {
-      throw Exception("$name: Unexpected result: $x");
+      throw Exception('$name: Unexpected result: $x');
     }
   }
 }
 
 class Handlex20 extends BenchmarkBase {
-  Handlex20() : super("FfiCall.Handlex20");
+  Handlex20() : super('FfiCall.Handlex20');
 
+  @override
   void run() {
     final p1 = MyClass(123);
     final p2 = MyClass(2);
@@ -1328,7 +1375,7 @@
         p12, p13, p14, p15, p16, p17, p18, p19, p20);
 
     if (!identical(p1, x)) {
-      throw Exception("$name: Unexpected result: $x");
+      throw Exception('$name: Unexpected result: $x');
     }
   }
 }
@@ -1337,7 +1384,7 @@
 // Main driver.
 //
 
-main() {
+void main() {
   final benchmarks = [
     () => Uint8x01(),
     () => Uint16x01(),
@@ -1377,5 +1424,7 @@
     () => Handlex10(),
     () => Handlex20(),
   ];
-  benchmarks.forEach((benchmark) => benchmark().report());
+  for (final benchmark in benchmarks) {
+    benchmark().report();
+  }
 }
diff --git a/benchmarks/FfiCall/dart2/dlopen_helper.dart b/benchmarks/FfiCall/dart2/dlopen_helper.dart
index b031002..726c181 100644
--- a/benchmarks/FfiCall/dart2/dlopen_helper.dart
+++ b/benchmarks/FfiCall/dart2/dlopen_helper.dart
@@ -5,51 +5,54 @@
 import 'dart:ffi';
 import 'dart:io';
 
-const kArm = "arm";
-const kArm64 = "arm64";
-const kIa32 = "ia32";
-const kX64 = "x64";
+const arm = 'arm';
+const arm64 = 'arm64';
+const ia32 = 'ia32';
+const x64 = 'x64';
 
 // https://stackoverflow.com/questions/45125516/possible-values-for-uname-m
 final _unames = {
-  "arm": kArm,
-  "aarch64_be": kArm64,
-  "aarch64": kArm64,
-  "armv8b": kArm64,
-  "armv8l": kArm64,
-  "i386": kIa32,
-  "i686": kIa32,
-  "x86_64": kX64,
+  'arm': arm,
+  'aarch64_be': arm64,
+  'aarch64': arm64,
+  'armv8b': arm64,
+  'armv8l': arm64,
+  'i386': ia32,
+  'i686': ia32,
+  'x86_64': x64,
 };
 
 String _checkRunningMode(String architecture) {
   // Check if we're running in 32bit mode.
   final int pointerSize = sizeOf<IntPtr>();
-  if (pointerSize == 4 && architecture == kX64) return kIa32;
-  if (pointerSize == 4 && architecture == kArm64) return kArm;
+  if (pointerSize == 4 && architecture == x64) return ia32;
+  if (pointerSize == 4 && architecture == arm64) return arm;
 
   return architecture;
 }
 
 String _architecture() {
-  final String uname = Process.runSync("uname", ["-m"]).stdout.trim();
+  final String uname = Process.runSync('uname', ['-m']).stdout.trim();
   final String architecture = _unames[uname];
-  if (architecture == null)
-    throw Exception("Unrecognized architecture: '$uname'");
+  if (architecture == null) {
+    throw Exception('Unrecognized architecture: "$uname"');
+  }
 
   // Check if we're running in 32bit mode.
   return _checkRunningMode(architecture);
 }
 
-String _platformPath(String name, {String path = ""}) {
-  if (Platform.isMacOS || Platform.isIOS)
-    return "${path}mac/${_architecture()}/lib$name.dylib";
+String _platformPath(String name, {String path = ''}) {
+  if (Platform.isMacOS || Platform.isIOS) {
+    return '${path}mac/${_architecture()}/lib$name.dylib';
+  }
 
-  if (Platform.isWindows)
-    return "${path}win/${_checkRunningMode(kX64)}/$name.dll";
+  if (Platform.isWindows) {
+    return '${path}win/${_checkRunningMode(x64)}/$name.dll';
+  }
 
   // Unknown platforms default to Unix implementation.
-  return "${path}linux/${_architecture()}/lib$name.so";
+  return '${path}linux/${_architecture()}/lib$name.so';
 }
 
 DynamicLibrary dlopenPlatformSpecific(String name, {String path}) {
diff --git a/benchmarks/FfiMemory/dart/FfiMemory.dart b/benchmarks/FfiMemory/dart/FfiMemory.dart
index 50f8435..d9ee487 100644
--- a/benchmarks/FfiMemory/dart/FfiMemory.dart
+++ b/benchmarks/FfiMemory/dart/FfiMemory.dart
@@ -206,202 +206,238 @@
 const N = 1000;
 
 class PointerInt8 extends BenchmarkBase {
-  Pointer<Int8> pointer;
-  PointerInt8() : super("FfiMemory.PointerInt8");
+  Pointer<Int8> pointer = nullptr;
+  PointerInt8() : super('FfiMemory.PointerInt8');
 
+  @override
   void setup() => pointer = allocate(count: N);
+  @override
   void teardown() => free(pointer);
 
+  @override
   void run() {
     doStoreInt8(pointer, N);
     final int x = doLoadInt8(pointer, N);
     if (x != N) {
-      throw Exception("$name: Unexpected result: $x");
+      throw Exception('$name: Unexpected result: $x');
     }
   }
 }
 
 class PointerUint8 extends BenchmarkBase {
-  Pointer<Uint8> pointer;
-  PointerUint8() : super("FfiMemory.PointerUint8");
+  Pointer<Uint8> pointer = nullptr;
+  PointerUint8() : super('FfiMemory.PointerUint8');
 
+  @override
   void setup() => pointer = allocate(count: N);
+  @override
   void teardown() => free(pointer);
 
+  @override
   void run() {
     doStoreUint8(pointer, N);
     final int x = doLoadUint8(pointer, N);
     if (x != N) {
-      throw Exception("$name: Unexpected result: $x");
+      throw Exception('$name: Unexpected result: $x');
     }
   }
 }
 
 class PointerInt16 extends BenchmarkBase {
-  Pointer<Int16> pointer;
-  PointerInt16() : super("FfiMemory.PointerInt16");
+  Pointer<Int16> pointer = nullptr;
+  PointerInt16() : super('FfiMemory.PointerInt16');
 
+  @override
   void setup() => pointer = allocate(count: N);
+  @override
   void teardown() => free(pointer);
 
+  @override
   void run() {
     doStoreInt16(pointer, N);
     final int x = doLoadInt16(pointer, N);
     if (x != N) {
-      throw Exception("$name: Unexpected result: $x");
+      throw Exception('$name: Unexpected result: $x');
     }
   }
 }
 
 class PointerUint16 extends BenchmarkBase {
-  Pointer<Uint16> pointer;
-  PointerUint16() : super("FfiMemory.PointerUint16");
+  Pointer<Uint16> pointer = nullptr;
+  PointerUint16() : super('FfiMemory.PointerUint16');
 
+  @override
   void setup() => pointer = allocate(count: N);
+  @override
   void teardown() => free(pointer);
 
+  @override
   void run() {
     doStoreUint16(pointer, N);
     final int x = doLoadUint16(pointer, N);
     if (x != N) {
-      throw Exception("$name: Unexpected result: $x");
+      throw Exception('$name: Unexpected result: $x');
     }
   }
 }
 
 class PointerInt32 extends BenchmarkBase {
-  Pointer<Int32> pointer;
-  PointerInt32() : super("FfiMemory.PointerInt32");
+  Pointer<Int32> pointer = nullptr;
+  PointerInt32() : super('FfiMemory.PointerInt32');
 
+  @override
   void setup() => pointer = allocate(count: N);
+  @override
   void teardown() => free(pointer);
 
+  @override
   void run() {
     doStoreInt32(pointer, N);
     final int x = doLoadInt32(pointer, N);
     if (x != N) {
-      throw Exception("$name: Unexpected result: $x");
+      throw Exception('$name: Unexpected result: $x');
     }
   }
 }
 
 class PointerUint32 extends BenchmarkBase {
-  Pointer<Uint32> pointer;
-  PointerUint32() : super("FfiMemory.PointerUint32");
+  Pointer<Uint32> pointer = nullptr;
+  PointerUint32() : super('FfiMemory.PointerUint32');
 
+  @override
   void setup() => pointer = allocate(count: N);
+  @override
   void teardown() => free(pointer);
 
+  @override
   void run() {
     doStoreUint32(pointer, N);
     final int x = doLoadUint32(pointer, N);
     if (x != N) {
-      throw Exception("$name: Unexpected result: $x");
+      throw Exception('$name: Unexpected result: $x');
     }
   }
 }
 
 class PointerInt64 extends BenchmarkBase {
-  Pointer<Int64> pointer;
-  PointerInt64() : super("FfiMemory.PointerInt64");
+  Pointer<Int64> pointer = nullptr;
+  PointerInt64() : super('FfiMemory.PointerInt64');
 
+  @override
   void setup() => pointer = allocate(count: N);
+  @override
   void teardown() => free(pointer);
 
+  @override
   void run() {
     doStoreInt64(pointer, N);
     final int x = doLoadInt64(pointer, N);
     if (x != N) {
-      throw Exception("$name: Unexpected result: $x");
+      throw Exception('$name: Unexpected result: $x');
     }
   }
 }
 
 class PointerUint64 extends BenchmarkBase {
-  Pointer<Uint64> pointer;
-  PointerUint64() : super("FfiMemory.PointerUint64");
+  Pointer<Uint64> pointer = nullptr;
+  PointerUint64() : super('FfiMemory.PointerUint64');
 
+  @override
   void setup() => pointer = allocate(count: N);
+  @override
   void teardown() => free(pointer);
 
+  @override
   void run() {
     doStoreUint64(pointer, N);
     final int x = doLoadUint64(pointer, N);
     if (x != N) {
-      throw Exception("$name: Unexpected result: $x");
+      throw Exception('$name: Unexpected result: $x');
     }
   }
 }
 
 class PointerFloat extends BenchmarkBase {
-  Pointer<Float> pointer;
-  PointerFloat() : super("FfiMemory.PointerFloat");
+  Pointer<Float> pointer = nullptr;
+  PointerFloat() : super('FfiMemory.PointerFloat');
 
+  @override
   void setup() => pointer = allocate(count: N);
+  @override
   void teardown() => free(pointer);
 
+  @override
   void run() {
     doStoreFloat(pointer, N);
     final double x = doLoadFloat(pointer, N);
     if (0.99 * N > x || x > 1.01 * N) {
-      throw Exception("$name: Unexpected result: $x");
+      throw Exception('$name: Unexpected result: $x');
     }
   }
 }
 
 class PointerDouble extends BenchmarkBase {
-  Pointer<Double> pointer;
-  PointerDouble() : super("FfiMemory.PointerDouble");
+  Pointer<Double> pointer = nullptr;
+  PointerDouble() : super('FfiMemory.PointerDouble');
 
+  @override
   void setup() => pointer = allocate(count: N);
+  @override
   void teardown() => free(pointer);
 
+  @override
   void run() {
     doStoreDouble(pointer, N);
     final double x = doLoadDouble(pointer, N);
     if (0.99 * N > x || x > 1.01 * N) {
-      throw Exception("$name: Unexpected result: $x");
+      throw Exception('$name: Unexpected result: $x');
     }
   }
 }
 
 class PointerPointer extends BenchmarkBase {
-  Pointer<Pointer<Int8>> pointer;
-  Pointer<Int8> data;
-  PointerPointer() : super("FfiMemory.PointerPointer");
+  Pointer<Pointer<Int8>> pointer = nullptr;
+  Pointer<Int8> data = nullptr;
+  PointerPointer() : super('FfiMemory.PointerPointer');
 
+  @override
   void setup() {
     pointer = allocate(count: N);
     data = allocate();
   }
 
+  @override
   void teardown() {
     free(pointer);
     free(data);
   }
 
+  @override
   void run() {
     doStorePointer(pointer, N, data);
     final int x = doLoadPointer(pointer, N);
     if (x != 0 || x == data.address) {
-      throw Exception("$name: Unexpected result: $x");
+      throw Exception('$name: Unexpected result: $x');
     }
   }
 }
 
 class PointerInt64Mint extends BenchmarkBase {
-  Pointer<Int64> pointer;
-  PointerInt64Mint() : super("FfiMemory.PointerInt64Mint");
+  Pointer<Int64> pointer = nullptr;
+  PointerInt64Mint() : super('FfiMemory.PointerInt64Mint');
 
+  @override
   void setup() => pointer = allocate(count: N);
+  @override
   void teardown() => free(pointer);
 
+  @override
   void run() {
     doStoreInt64Mint(pointer, N);
     final int x = doLoadInt64Mint(pointer, N);
     // Using overflow semantics in aggregation.
     if (x != -N) {
-      throw Exception("$name: Unexpected result: $x");
+      throw Exception('$name: Unexpected result: $x');
     }
   }
 }
@@ -410,7 +446,7 @@
 // Main driver.
 //
 
-main() {
+void main() {
   final benchmarks = [
     () => PointerInt8(),
     () => PointerUint8(),
@@ -425,5 +461,7 @@
     () => PointerDouble(),
     () => PointerPointer(),
   ];
-  benchmarks.forEach((benchmark) => benchmark().report());
+  for (final benchmark in benchmarks) {
+    benchmark().report();
+  }
 }
diff --git a/benchmarks/FfiMemory/dart2/FfiMemory.dart b/benchmarks/FfiMemory/dart2/FfiMemory.dart
index 50f8435..18a510e 100644
--- a/benchmarks/FfiMemory/dart2/FfiMemory.dart
+++ b/benchmarks/FfiMemory/dart2/FfiMemory.dart
@@ -207,160 +207,190 @@
 
 class PointerInt8 extends BenchmarkBase {
   Pointer<Int8> pointer;
-  PointerInt8() : super("FfiMemory.PointerInt8");
+  PointerInt8() : super('FfiMemory.PointerInt8');
 
+  @override
   void setup() => pointer = allocate(count: N);
+  @override
   void teardown() => free(pointer);
 
+  @override
   void run() {
     doStoreInt8(pointer, N);
     final int x = doLoadInt8(pointer, N);
     if (x != N) {
-      throw Exception("$name: Unexpected result: $x");
+      throw Exception('$name: Unexpected result: $x');
     }
   }
 }
 
 class PointerUint8 extends BenchmarkBase {
   Pointer<Uint8> pointer;
-  PointerUint8() : super("FfiMemory.PointerUint8");
+  PointerUint8() : super('FfiMemory.PointerUint8');
 
+  @override
   void setup() => pointer = allocate(count: N);
+  @override
   void teardown() => free(pointer);
 
+  @override
   void run() {
     doStoreUint8(pointer, N);
     final int x = doLoadUint8(pointer, N);
     if (x != N) {
-      throw Exception("$name: Unexpected result: $x");
+      throw Exception('$name: Unexpected result: $x');
     }
   }
 }
 
 class PointerInt16 extends BenchmarkBase {
   Pointer<Int16> pointer;
-  PointerInt16() : super("FfiMemory.PointerInt16");
+  PointerInt16() : super('FfiMemory.PointerInt16');
 
+  @override
   void setup() => pointer = allocate(count: N);
+  @override
   void teardown() => free(pointer);
 
+  @override
   void run() {
     doStoreInt16(pointer, N);
     final int x = doLoadInt16(pointer, N);
     if (x != N) {
-      throw Exception("$name: Unexpected result: $x");
+      throw Exception('$name: Unexpected result: $x');
     }
   }
 }
 
 class PointerUint16 extends BenchmarkBase {
   Pointer<Uint16> pointer;
-  PointerUint16() : super("FfiMemory.PointerUint16");
+  PointerUint16() : super('FfiMemory.PointerUint16');
 
+  @override
   void setup() => pointer = allocate(count: N);
+  @override
   void teardown() => free(pointer);
 
+  @override
   void run() {
     doStoreUint16(pointer, N);
     final int x = doLoadUint16(pointer, N);
     if (x != N) {
-      throw Exception("$name: Unexpected result: $x");
+      throw Exception('$name: Unexpected result: $x');
     }
   }
 }
 
 class PointerInt32 extends BenchmarkBase {
   Pointer<Int32> pointer;
-  PointerInt32() : super("FfiMemory.PointerInt32");
+  PointerInt32() : super('FfiMemory.PointerInt32');
 
+  @override
   void setup() => pointer = allocate(count: N);
+  @override
   void teardown() => free(pointer);
 
+  @override
   void run() {
     doStoreInt32(pointer, N);
     final int x = doLoadInt32(pointer, N);
     if (x != N) {
-      throw Exception("$name: Unexpected result: $x");
+      throw Exception('$name: Unexpected result: $x');
     }
   }
 }
 
 class PointerUint32 extends BenchmarkBase {
   Pointer<Uint32> pointer;
-  PointerUint32() : super("FfiMemory.PointerUint32");
+  PointerUint32() : super('FfiMemory.PointerUint32');
 
+  @override
   void setup() => pointer = allocate(count: N);
+  @override
   void teardown() => free(pointer);
 
+  @override
   void run() {
     doStoreUint32(pointer, N);
     final int x = doLoadUint32(pointer, N);
     if (x != N) {
-      throw Exception("$name: Unexpected result: $x");
+      throw Exception('$name: Unexpected result: $x');
     }
   }
 }
 
 class PointerInt64 extends BenchmarkBase {
   Pointer<Int64> pointer;
-  PointerInt64() : super("FfiMemory.PointerInt64");
+  PointerInt64() : super('FfiMemory.PointerInt64');
 
+  @override
   void setup() => pointer = allocate(count: N);
+  @override
   void teardown() => free(pointer);
 
+  @override
   void run() {
     doStoreInt64(pointer, N);
     final int x = doLoadInt64(pointer, N);
     if (x != N) {
-      throw Exception("$name: Unexpected result: $x");
+      throw Exception('$name: Unexpected result: $x');
     }
   }
 }
 
 class PointerUint64 extends BenchmarkBase {
   Pointer<Uint64> pointer;
-  PointerUint64() : super("FfiMemory.PointerUint64");
+  PointerUint64() : super('FfiMemory.PointerUint64');
 
+  @override
   void setup() => pointer = allocate(count: N);
+  @override
   void teardown() => free(pointer);
 
+  @override
   void run() {
     doStoreUint64(pointer, N);
     final int x = doLoadUint64(pointer, N);
     if (x != N) {
-      throw Exception("$name: Unexpected result: $x");
+      throw Exception('$name: Unexpected result: $x');
     }
   }
 }
 
 class PointerFloat extends BenchmarkBase {
   Pointer<Float> pointer;
-  PointerFloat() : super("FfiMemory.PointerFloat");
+  PointerFloat() : super('FfiMemory.PointerFloat');
 
+  @override
   void setup() => pointer = allocate(count: N);
+  @override
   void teardown() => free(pointer);
 
+  @override
   void run() {
     doStoreFloat(pointer, N);
     final double x = doLoadFloat(pointer, N);
     if (0.99 * N > x || x > 1.01 * N) {
-      throw Exception("$name: Unexpected result: $x");
+      throw Exception('$name: Unexpected result: $x');
     }
   }
 }
 
 class PointerDouble extends BenchmarkBase {
   Pointer<Double> pointer;
-  PointerDouble() : super("FfiMemory.PointerDouble");
+  PointerDouble() : super('FfiMemory.PointerDouble');
 
+  @override
   void setup() => pointer = allocate(count: N);
+  @override
   void teardown() => free(pointer);
 
+  @override
   void run() {
     doStoreDouble(pointer, N);
     final double x = doLoadDouble(pointer, N);
     if (0.99 * N > x || x > 1.01 * N) {
-      throw Exception("$name: Unexpected result: $x");
+      throw Exception('$name: Unexpected result: $x');
     }
   }
 }
@@ -368,40 +398,46 @@
 class PointerPointer extends BenchmarkBase {
   Pointer<Pointer<Int8>> pointer;
   Pointer<Int8> data;
-  PointerPointer() : super("FfiMemory.PointerPointer");
+  PointerPointer() : super('FfiMemory.PointerPointer');
 
+  @override
   void setup() {
     pointer = allocate(count: N);
     data = allocate();
   }
 
+  @override
   void teardown() {
     free(pointer);
     free(data);
   }
 
+  @override
   void run() {
     doStorePointer(pointer, N, data);
     final int x = doLoadPointer(pointer, N);
     if (x != 0 || x == data.address) {
-      throw Exception("$name: Unexpected result: $x");
+      throw Exception('$name: Unexpected result: $x');
     }
   }
 }
 
 class PointerInt64Mint extends BenchmarkBase {
   Pointer<Int64> pointer;
-  PointerInt64Mint() : super("FfiMemory.PointerInt64Mint");
+  PointerInt64Mint() : super('FfiMemory.PointerInt64Mint');
 
+  @override
   void setup() => pointer = allocate(count: N);
+  @override
   void teardown() => free(pointer);
 
+  @override
   void run() {
     doStoreInt64Mint(pointer, N);
     final int x = doLoadInt64Mint(pointer, N);
     // Using overflow semantics in aggregation.
     if (x != -N) {
-      throw Exception("$name: Unexpected result: $x");
+      throw Exception('$name: Unexpected result: $x');
     }
   }
 }
@@ -410,7 +446,7 @@
 // Main driver.
 //
 
-main() {
+void main() {
   final benchmarks = [
     () => PointerInt8(),
     () => PointerUint8(),
@@ -425,5 +461,7 @@
     () => PointerDouble(),
     () => PointerPointer(),
   ];
-  benchmarks.forEach((benchmark) => benchmark().report());
+  for (final benchmark in benchmarks) {
+    benchmark().report();
+  }
 }
diff --git a/benchmarks/FfiStruct/dart/FfiStruct.dart b/benchmarks/FfiStruct/dart/FfiStruct.dart
index f2952ec..26768c5 100644
--- a/benchmarks/FfiStruct/dart/FfiStruct.dart
+++ b/benchmarks/FfiStruct/dart/FfiStruct.dart
@@ -46,17 +46,20 @@
 const N = 1000;
 
 class FieldLoadStore extends BenchmarkBase {
-  Pointer<VeryLargeStruct> pointer;
-  FieldLoadStore() : super("FfiStruct.FieldLoadStore");
+  Pointer<VeryLargeStruct> pointer = nullptr;
+  FieldLoadStore() : super('FfiStruct.FieldLoadStore');
 
+  @override
   void setup() => pointer = allocate(count: N);
+  @override
   void teardown() => free(pointer);
 
+  @override
   void run() {
     doStoreInt32(pointer, N);
     final int x = doLoadInt32(pointer, N);
     if (x != N) {
-      throw Exception("$name: Unexpected result: $x");
+      throw Exception('$name: Unexpected result: $x');
     }
   }
 }
@@ -65,11 +68,13 @@
 // Main driver.
 //
 
-main() {
+void main() {
   final benchmarks = [
     () => FieldLoadStore(),
   ];
-  benchmarks.forEach((benchmark) => benchmark().report());
+  for (final benchmark in benchmarks) {
+    benchmark().report();
+  }
 }
 
 //
@@ -77,45 +82,45 @@
 //
 class VeryLargeStruct extends Struct {
   @Int8()
-  int a;
+  external int a;
 
   @Int16()
-  int b;
+  external int b;
 
   @Int32()
-  int c;
+  external int c;
 
   @Int64()
-  int d;
+  external int d;
 
   @Uint8()
-  int e;
+  external int e;
 
   @Uint16()
-  int f;
+  external int f;
 
   @Uint32()
-  int g;
+  external int g;
 
   @Uint64()
-  int h;
+  external int h;
 
   @IntPtr()
-  int i;
+  external int i;
 
   @Double()
-  double j;
+  external double j;
 
   @Float()
-  double k;
+  external double k;
 
-  Pointer<VeryLargeStruct> parent;
+  external Pointer<VeryLargeStruct> parent;
 
   @IntPtr()
-  int numChildren;
+  external int numChildren;
 
-  Pointer<VeryLargeStruct> children;
+  external Pointer<VeryLargeStruct> children;
 
   @Int8()
-  int smallLastField;
+  external int smallLastField;
 }
diff --git a/benchmarks/FfiStruct/dart2/FfiStruct.dart b/benchmarks/FfiStruct/dart2/FfiStruct.dart
index f2952ec..6e7e90d 100644
--- a/benchmarks/FfiStruct/dart2/FfiStruct.dart
+++ b/benchmarks/FfiStruct/dart2/FfiStruct.dart
@@ -47,16 +47,19 @@
 
 class FieldLoadStore extends BenchmarkBase {
   Pointer<VeryLargeStruct> pointer;
-  FieldLoadStore() : super("FfiStruct.FieldLoadStore");
+  FieldLoadStore() : super('FfiStruct.FieldLoadStore');
 
+  @override
   void setup() => pointer = allocate(count: N);
+  @override
   void teardown() => free(pointer);
 
+  @override
   void run() {
     doStoreInt32(pointer, N);
     final int x = doLoadInt32(pointer, N);
     if (x != N) {
-      throw Exception("$name: Unexpected result: $x");
+      throw Exception('$name: Unexpected result: $x');
     }
   }
 }
@@ -65,11 +68,13 @@
 // Main driver.
 //
 
-main() {
+void main() {
   final benchmarks = [
     () => FieldLoadStore(),
   ];
-  benchmarks.forEach((benchmark) => benchmark().report());
+  for (final benchmark in benchmarks) {
+    benchmark().report();
+  }
 }
 
 //
diff --git a/benchmarks/ListCopy/dart/ListCopy.dart b/benchmarks/ListCopy/dart/ListCopy.dart
index 1091c93..86a3d5c 100644
--- a/benchmarks/ListCopy/dart/ListCopy.dart
+++ b/benchmarks/ListCopy/dart/ListCopy.dart
@@ -131,8 +131,17 @@
         output = <num>[...input];
       }),
       Benchmark('spread.int', length, () {
+        output = <int>[...input as dynamic];
+      }),
+      Benchmark('spread.int.cast', length, () {
         output = <int>[...input.cast<int>()];
       }),
+      Benchmark('spread.int.map', length, () {
+        output = <int>[...input.map((x) => x as int)];
+      }),
+      Benchmark('for.int', length, () {
+        output = <int>[for (var n in input) n as int];
+      }),
     ];
 
 void main() {
diff --git a/benchmarks/ListCopy/dart2/ListCopy.dart b/benchmarks/ListCopy/dart2/ListCopy.dart
index 0a5f643..acbb5a1 100644
--- a/benchmarks/ListCopy/dart2/ListCopy.dart
+++ b/benchmarks/ListCopy/dart2/ListCopy.dart
@@ -133,6 +133,15 @@
       Benchmark('spread.int', length, () {
         output = <int>[...input];
       }),
+      Benchmark('spread.int.cast', length, () {
+        output = <int>[...input.cast<int>()];
+      }),
+      Benchmark('spread.int.map', length, () {
+        output = <int>[...input.map((x) => x as int)];
+      }),
+      Benchmark('for.int', length, () {
+        output = <int>[for (var n in input) n as int];
+      }),
     ];
 
 void main() {
diff --git a/benchmarks/RuntimeType/dart/RuntimeType.dart b/benchmarks/RuntimeType/dart/RuntimeType.dart
index fe21b30..a965197 100644
--- a/benchmarks/RuntimeType/dart/RuntimeType.dart
+++ b/benchmarks/RuntimeType/dart/RuntimeType.dart
@@ -35,7 +35,7 @@
 
 abstract class Widget {
   const Widget({this.key});
-  final Key key;
+  final Key? key;
 
   @pragma('dart2js:noInline')
   static bool canUpdate(Widget oldWidget, Widget newWidget) {
@@ -45,32 +45,32 @@
 }
 
 class AWidget extends Widget {
-  const AWidget({Key key}) : super(key: key);
+  const AWidget({Key? key}) : super(key: key);
 }
 
 class BWidget extends Widget {
-  const BWidget({Key key}) : super(key: key);
+  const BWidget({Key? key}) : super(key: key);
 }
 
 class CWidget extends Widget {
-  const CWidget({Key key}) : super(key: key);
+  const CWidget({Key? key}) : super(key: key);
 }
 
 class DWidget extends Widget {
-  const DWidget({Key key}) : super(key: key);
+  const DWidget({Key? key}) : super(key: key);
 }
 
 class EWidget extends Widget {
-  const EWidget({Key key}) : super(key: key);
+  const EWidget({Key? key}) : super(key: key);
 }
 
 class FWidget extends Widget {
-  const FWidget({Key key}) : super(key: key);
+  const FWidget({Key? key}) : super(key: key);
 }
 
 class WWidget<W extends Widget> extends Widget {
-  final W /*?*/ ref;
-  const WWidget({this.ref, Key key}) : super(key: key);
+  final W? ref;
+  const WWidget({this.ref, Key? key}) : super(key: key);
 }
 
 class WidgetCanUpdateBenchmark extends BenchmarkBase {
diff --git a/benchmarks/Utf8Decode/dart/Utf8Decode.dart b/benchmarks/Utf8Decode/dart/Utf8Decode.dart
index a1b423d..504debe 100644
--- a/benchmarks/Utf8Decode/dart/Utf8Decode.dart
+++ b/benchmarks/Utf8Decode/dart/Utf8Decode.dart
@@ -21,16 +21,16 @@
   final String text;
   final int size;
   final bool allowMalformed;
-  List<Uint8List> chunks;
-  int totalInputSize;
-  int totalOutputSize;
+  late List<Uint8List> chunks;
+  int totalInputSize = 0;
+  int totalOutputSize = 0;
 
   static String _makeName(String language, int size, bool allowMalformed) {
-    String name = "Utf8Decode.$language.";
+    String name = 'Utf8Decode.$language.';
     name += size >= 1000000
-        ? "${size ~/ 1000000}M"
-        : size >= 1000 ? "${size ~/ 1000}k" : "$size";
-    if (allowMalformed) name += ".malformed";
+        ? '${size ~/ 1000000}M'
+        : size >= 1000 ? '${size ~/ 1000}k' : '$size';
+    if (allowMalformed) name += '.malformed';
     return name;
   }
 
@@ -39,9 +39,9 @@
 
   @override
   void setup() {
-    Uint8List data = utf8.encode(text) as Uint8List;
+    final Uint8List data = utf8.encode(text) as Uint8List;
     if (data.length != 10000) {
-      throw "Expected input data of exactly 10000 bytes.";
+      throw 'Expected input data of exactly 10000 bytes.';
     }
     if (size < data.length) {
       // Split into chunks.
@@ -83,7 +83,7 @@
       lengthSum += s.length;
     }
     if (lengthSum != totalOutputSize) {
-      throw "Output length doesn't match expected.";
+      throw 'Output length doesn\'t match expected.';
     }
   }
 
@@ -108,28 +108,29 @@
   void report() {
     // Report time in nanoseconds.
     final double score = measure() * 1000.0;
-    print("$name(RunTime): $score ns.");
+    print('$name(RunTime): $score ns.');
   }
 }
 
 void main(List<String> args) {
   const texts = {
-    "en": en,
-    "da": da,
-    "sk": sk,
-    "ru": ru,
-    "ne": ne,
-    "zh": zh,
+    'en': en,
+    'da': da,
+    'sk': sk,
+    'ru': ru,
+    'ne': ne,
+    'zh': zh,
   };
-  final bool testMalformed =
-      args != null && args.isNotEmpty && args.first == "malformed";
+  final bool testMalformed = args.isNotEmpty && args.first == 'malformed';
   final benchmarks = [
     // Only benchmark with allowMalformed: false unless specified otherwise.
     for (bool allowMalformed in [false, if (testMalformed) true])
       for (int size in [10, 10000, 10000000])
         for (String language in texts.keys)
-          () => Utf8Decode(language, texts[language], size, allowMalformed)
+          () => Utf8Decode(language, texts[language]!, size, allowMalformed)
   ];
 
-  benchmarks.forEach((bm) => bm().report());
+  for (var bm in benchmarks) {
+    bm().report();
+  }
 }
diff --git a/benchmarks/Utf8Decode/dart/datext_latin1_10k.dart b/benchmarks/Utf8Decode/dart/datext_latin1_10k.dart
index 866ff83..bce6c80 100644
--- a/benchmarks/Utf8Decode/dart/datext_latin1_10k.dart
+++ b/benchmarks/Utf8Decode/dart/datext_latin1_10k.dart
@@ -7,7 +7,7 @@
 // The material is licensed under the Creative Commons Attribution-Share-Alike
 // License 3.0: https://creativecommons.org/licenses/by-sa/3.0/
 
-const String da = """
+const String da = '''
 Anders And
 
 Anders Fauntleroy And er en berømt figur i Disneys tegnefilm og tegneserier. Selv om han ikke er særligt populær i USA, optræder han i mange ugeblade i Europa: I Norge, Tyskland, Sverige, Danmark, Holland, Italien med flere. Hans første optræden var i tegnefilmen "The Wise Little Hen" (Den kloge lille høne) fra 9. juni 1934. Hans karakteristiske stemme blev indtalt af radiokomikeren Clarence Nash, der siden fast lagde stemme til.
@@ -59,4 +59,4 @@
 Serien fik en fornyelse i 2001, hvilket ændrede markant på historierne. Everett Ducklair vender tilbage, slukker Globus, smider Stålanden ud af Ducklair Tower og genopretter sit gamle imperium. Undervejs bliver Ducklair's to døtre afsløret. De hader begge Everett af grunde, der ikke bliver afsløret til fulde, selvom det bliver antydet, at Everett skilte sig af med deres mor på en eller anden måde.
 Denne fornyelse holdt 18 numre, før serien blev afsluttet, dog uden at historierne fik en slutning.
 
-Barks-historien "Anders And og den gyldne hjelm" fra 1954 kom i 2006 med i """;
+Barks-historien "Anders And og den gyldne hjelm" fra 1954 kom i 2006 med i ''';
diff --git a/benchmarks/Utf8Decode/dart/entext_ascii_10k.dart b/benchmarks/Utf8Decode/dart/entext_ascii_10k.dart
index 9353d6d..82cb721 100644
--- a/benchmarks/Utf8Decode/dart/entext_ascii_10k.dart
+++ b/benchmarks/Utf8Decode/dart/entext_ascii_10k.dart
@@ -7,7 +7,7 @@
 // The material is licensed under the Creative Commons Attribution-Share-Alike
 // License 3.0: https://creativecommons.org/licenses/by-sa/3.0/
 
-const String en = """
+const String en = '''
 Anarchism
 
 Anarchism is a radical political movement that is highly skeptical towards authority and rejects all forms of unjust hierarchy. It calls for the abolition of the state which it holds to be undesirable, unnecessary, and harmful. Anarchism advocates for the replacement of the state with stateless societies or other forms of free associations.
@@ -32,4 +32,4 @@
 At the turning of the century, anarchism had spread all over the world. In China, small groups of students imported the humanistic pro-science version of anarcho-communism. Tokyo was a hotspot for rebellious youth from countries of the far east, pouring into the Japanese capital to study. In Latin America, So Paulo was a stronghold for anarcho-syndicalism where it became the most prominent left-wing ideology. During this time, a minority of anarchists adopted tactics of revolutionary political violence. This strategy became known as propaganda of the deed. The dismemberment of the French socialist movement into many groups and the execution and exile of many Communards to penal colonies following the suppression of the Paris Commune favoured individualist political expression and acts. Even though many anarchists distanced themselves from these terrorist acts, infamy came upon the movement. Illegalism was another strategy which some anarchists adopted these same years.
 Anarchists enthusiastically participated in the Russian Revolutiondespite concernsin opposition to the Whites. However, they met harsh suppression after the Bolshevik government was stabilized. Several anarchists from Petrograd and Moscow fled to Ukraine, notably leading to the Kronstadt rebellion and Nestor Makhno's struggle in the Free Territory. With the anarchists being crushed in Russia, two new antithetical currents emerged, namely platformism and synthesis anarchism. The former sought to create a coherent group that would push for the revolution while the latter were against anything that would resemble a political party. Seeing the victories of the Bolsheviks in the October Revolution and the resulting Russian Civil War, many workers and activists turned to communist parties which grew at the expense of anarchism and other socialist movements. In France and the United States, members of major syndicalist movements, the General Confederation of Labour and Industrial Workers of the World, left their organisations and joined the Communist International.
 
-In the Spanish Civil War, anarchists and syndicalists (CNT and FAI) once again allied themselves with various currents of leftists. A long tradition of Spanish anarchism led to anarchists playing a pivotal role in the war. In response to the army rebellion, an anarchist-inspired movement of peasants and workers, supported by armed militias, took control of Barcelona and of large areas of rural Spain where they collectivised """;
+In the Spanish Civil War, anarchists and syndicalists (CNT and FAI) once again allied themselves with various currents of leftists. A long tradition of Spanish anarchism led to anarchists playing a pivotal role in the war. In response to the army rebellion, an anarchist-inspired movement of peasants and workers, supported by armed militias, took control of Barcelona and of large areas of rural Spain where they collectivised ''';
diff --git a/benchmarks/Utf8Decode/dart/netext_3_10k.dart b/benchmarks/Utf8Decode/dart/netext_3_10k.dart
index be53bc3..8fce550 100644
--- a/benchmarks/Utf8Decode/dart/netext_3_10k.dart
+++ b/benchmarks/Utf8Decode/dart/netext_3_10k.dart
@@ -7,7 +7,7 @@
 // The material is licensed under the Creative Commons Attribution-Share-Alike
 // License 3.0: https://creativecommons.org/licenses/by-sa/3.0/
 
-const String ne = """
+const String ne = '''
 नेपाल
 
 नेपाल (आधिकारिक नाम: सङ्घीय लोकतान्त्रिक गणतन्त्र नेपाल) दक्षिण एसियाली भूपरिवेष्ठित हिमाली राष्ट्र हो । यसको भौगोलिक अक्षांश २६ डिग्री २२ मिनेटदेखि ३० डिग्री २७ मिनेट उत्तर र ८० डिग्री ४ मिनेटदेखि ८८ डिग्री १२ मिनेट पूर्वी देशान्तरसम्म फैलिएको छ । यसको कूल क्षेत्रफल १,४७,१८१ वर्ग कि.मि छ । यो क्षेत्रफल पृथ्वीको कूल क्षेत्रफलको ०.०३% र एसिया महादेशको ०.३% पर्दछ । लण्डन स्थित "ग्रीनवीच मिनटाइम" भन्दा पूर्वतर्फ रहेकोले गौरीशङ्कर हिमालको नजिक भएर जाने ८६ डिग्री १५ मिनेट पूर्वी देशान्तरलाई आधार मानी नेपालको प्रमाणिक समय ५ घण्टा ४५ मिनेट आगाडि मानिएको छ ।
@@ -21,4 +21,4 @@
 हिमालय क्षेत्रमा मानिसहरू बस्न थालेको कम्तिमा पनि ९,००० वर्ष भएको कुरा काठमाडौं उपत्यकामा पाइएका प्राचीन औजारहरूबाट पुष्टि हुन्छ। सम्भवत: भोट-बर्मेली मूलका मानिसहरू नेपालमा २,५०० वर्ष अगाडि बसोबास गर्दथे। 
 
 ईशापूर्व १५०० तिर इन्डो-आर्यन जातिहरू उपत्यका प्रवेश गरे। ईशापूर्वको १००० तिर स-साना राज्यहरू र राज्यसङ्गठनहरू बने। सिद्धार्थ गौतम (ईशापूर्व ५६३–४८३) त्यस्तै एक वंश, शाक्यवंशका राजकुमार थिए, जसले आफ्नो राजकाज त्यागी तपस्वीको जीवन अँगाले र उनी बुद्ध भनेर विश्व प्रसिद्ध भए। 
-ईशापूर्वको २५० सम्ममा, यो क्षेत्र उत्तर""";
+ईशापूर्वको २५० सम्ममा, यो क्षेत्र उत्तर''';
diff --git a/benchmarks/Utf8Decode/dart/rutext_2_10k.dart b/benchmarks/Utf8Decode/dart/rutext_2_10k.dart
index 50b0130..c61a665 100644
--- a/benchmarks/Utf8Decode/dart/rutext_2_10k.dart
+++ b/benchmarks/Utf8Decode/dart/rutext_2_10k.dart
@@ -7,7 +7,7 @@
 // The material is licensed under the Creative Commons Attribution-Share-Alike
 // License 3.0: https://creativecommons.org/licenses/by-sa/3.0/
 
-const String ru = """
+const String ru = '''
 Литва
 
 Литва́ (), официальное название  Лито́вская Респу́блика ()  государство, расположенное в северной части Европы. Столица страны  Вильнюс.
@@ -41,4 +41,4 @@
 
 В XIV  начале XV веках территория Великого княжества Литовского стремительно росла, в основном за счёт присоединения земель Западной Руси. Включение в состав государства славянских земель, многократно превышающих по площади и количеству населения собственно литовские земли, привело к перениманию литовскими князьями, получившими во владение русские земли, православной культуры и западнорусского языка. Со временем западнорусский язык стал официальным языком канцелярии великих князей. Собственно литовский язык до XVI века оставался бесписьменным, хотя и продолжал использоваться на этнически литовских землях.
 
-В 1385 году великий князь литовский Ягайло заключил Кревскую унию с Королевством Польским. По условиям унии, Ягайло обязался присоединить Великое княжество Литовское к Королевству Польскому и крестить литовские земли по католическому обряду, а сам становился королём Польши и сохранял титул великого князя литовского. Однако вскоре он вынужден был уступить власть в Великом княжестве Литовском своему двоюродному брату Витовту.""";
+В 1385 году великий князь литовский Ягайло заключил Кревскую унию с Королевством Польским. По условиям унии, Ягайло обязался присоединить Великое княжество Литовское к Королевству Польскому и крестить литовские земли по католическому обряду, а сам становился королём Польши и сохранял титул великого князя литовского. Однако вскоре он вынужден был уступить власть в Великом княжестве Литовском своему двоюродному брату Витовту.''';
diff --git a/benchmarks/Utf8Decode/dart/sktext_10k.dart b/benchmarks/Utf8Decode/dart/sktext_10k.dart
index b1ce251..7dc2d13 100644
--- a/benchmarks/Utf8Decode/dart/sktext_10k.dart
+++ b/benchmarks/Utf8Decode/dart/sktext_10k.dart
@@ -7,7 +7,7 @@
 // The material is licensed under the Creative Commons Attribution-Share-Alike
 // License 3.0: https://creativecommons.org/licenses/by-sa/3.0/
 
-const String sk = """
+const String sk = '''
 Esperanto (pôvodne Lingvo Internacia – „medzinárodný jazyk“) je najrozšírenejší medzinárodný plánový jazyk. Názov je odvodený od pseudonymu, pod ktorým v roku 1887 zverejnil lekár L. L. Zamenhof základy tohto jazyka. Zámerom tvorcu bolo vytvoriť ľahko naučiteľný a použiteľný neutrálny jazyk, vhodný na použitie v medzinárodnej komunikácii. Cieľom nebolo nahradiť národné jazyky, čo bolo neskôr aj deklarované v Boulonskej deklarácii.
 
 Hoci žiaden štát neprijal esperanto ako úradný jazyk, používa ho komunita s odhadovaným počtom hovoriacich 100 000 až 2 000 000, z čoho približne 2 000 tvoria rodení hovoriaci. V Poľsku je na zozname nemateriálneho kultúrneho dedičstva. Získalo aj isté medzinárodné uznania, napríklad dve rezolúcie UNESCO či podporu známych osobností verejného života. V súčasnosti sa esperanto využíva pri cestovaní, korešpondencii, medzinárodných stretnutiach a kultúrnych výmenách, kongresoch, vedeckých diskusiách, v pôvodnej aj prekladovej literatúre, divadle a kine, hudbe, tlačenom aj internetovom spravodajstve, rozhlasovom a televíznom vysielaní.
@@ -43,4 +43,4 @@
 
 Po prvej svetovej vojne sa oba pražské spolky zlúčili do "Československej Esperantskej Asociácie". Tá bola v roku 1936 premenovaná na "Esperantskú Asociáciu v Československej republike". V tomto období bolo hnutie veľmi aktívne, fungovalo mnoho klubov, konalo sa veľa prednášok a kurzov. Esperanto bolo vyučované na školách rôznych stupňov, rádio Bratislava od 1930 vysielalo kurzy a od 1932 aj kultúrny program v esperante. Bola vydaná "Československá antológia" predstavujúca diela 20 slovenských autorov. V rámci protifašistickej aktivity vychádzali aj preklady protifašistických článkov z esperantských časopisov z obdobia Španielskej občianskej vojny.
 
-Druhá svetová vojna utlmila esperantské hnutie. Bratislavský esperantský klub požiadal o zmenu štatútu a rozšírenie poľa pôsobnosti na celú vtedajšiu Slovenskú republiku a následne sa stal strediskom esperantského hnutia na Slovensku.""";
+Druhá svetová vojna utlmila esperantské hnutie. Bratislavský esperantský klub požiadal o zmenu štatútu a rozšírenie poľa pôsobnosti na celú vtedajšiu Slovenskú republiku a následne sa stal strediskom esperantského hnutia na Slovensku.''';
diff --git a/benchmarks/Utf8Decode/dart/zhtext_10k.dart b/benchmarks/Utf8Decode/dart/zhtext_10k.dart
index dc81c6d6..b5e2a54 100644
--- a/benchmarks/Utf8Decode/dart/zhtext_10k.dart
+++ b/benchmarks/Utf8Decode/dart/zhtext_10k.dart
@@ -7,7 +7,7 @@
 // The material is licensed under the Creative Commons Attribution-Share-Alike
 // License 3.0: https://creativecommons.org/licenses/by-sa/3.0/
 
-const String zh = """
+const String zh = '''
 最簡單的漢字只有一笔画,但卻不止一個字:除了「一」字以外,「乙」、「〇」、「丶」、「丨」、「亅」、「丿」、「乀」、「乁」、「𠄌」、「𠃋」、「𠃉」、「𠃊」、「乚」等都是漢字,而且都有各自的讀音。
 
 中文汉字中,笔画最多的汉字可能是“”,是一种面食的名称,此字至今习用,其不同写法的笔画数在54至71画之间不等。被传统辞典收录的笔画最多的汉字为《字汇补》、《汉语大字典》中由四个“-{龍}-”字组成的「」字,共64画;同樣屬於64劃的字由四個“-{興}-”字組成的“𠔻”字,收入自《中文大辭典》;之後的是由四個「雷」字組成的“䨻”字,有52劃,收錄於《說文解字》。
@@ -70,4 +70,4 @@
 
 随着各种中文输入法的出现,汉字的计算机输入、存储、输出技术得到了基本解决,大大提高了中文写作、出版、信息检索等的效率。目前中文输入法有上千种之多,主要包括表音输入和表形输入两类,也有两者兼之的。汉字的语音输入、手写识别和光学字符识别(OCR)技术也已得到广泛应用。
 
-如收录数千字的GB 2312(中國大陸)、B""";
+如收录数千字的GB 2312(中國大陸)、B''';
diff --git a/benchmarks/Utf8Decode/dart2/Utf8Decode.dart b/benchmarks/Utf8Decode/dart2/Utf8Decode.dart
index a1b423d..7be3a8f 100644
--- a/benchmarks/Utf8Decode/dart2/Utf8Decode.dart
+++ b/benchmarks/Utf8Decode/dart2/Utf8Decode.dart
@@ -26,11 +26,11 @@
   int totalOutputSize;
 
   static String _makeName(String language, int size, bool allowMalformed) {
-    String name = "Utf8Decode.$language.";
+    String name = 'Utf8Decode.$language.';
     name += size >= 1000000
-        ? "${size ~/ 1000000}M"
-        : size >= 1000 ? "${size ~/ 1000}k" : "$size";
-    if (allowMalformed) name += ".malformed";
+        ? '${size ~/ 1000000}M'
+        : size >= 1000 ? '${size ~/ 1000}k' : '$size';
+    if (allowMalformed) name += '.malformed';
     return name;
   }
 
@@ -39,9 +39,9 @@
 
   @override
   void setup() {
-    Uint8List data = utf8.encode(text) as Uint8List;
+    final Uint8List data = utf8.encode(text) as Uint8List;
     if (data.length != 10000) {
-      throw "Expected input data of exactly 10000 bytes.";
+      throw 'Expected input data of exactly 10000 bytes.';
     }
     if (size < data.length) {
       // Split into chunks.
@@ -83,7 +83,7 @@
       lengthSum += s.length;
     }
     if (lengthSum != totalOutputSize) {
-      throw "Output length doesn't match expected.";
+      throw 'Output length doesn\'t match expected.';
     }
   }
 
@@ -108,21 +108,21 @@
   void report() {
     // Report time in nanoseconds.
     final double score = measure() * 1000.0;
-    print("$name(RunTime): $score ns.");
+    print('$name(RunTime): $score ns.');
   }
 }
 
 void main(List<String> args) {
   const texts = {
-    "en": en,
-    "da": da,
-    "sk": sk,
-    "ru": ru,
-    "ne": ne,
-    "zh": zh,
+    'en': en,
+    'da': da,
+    'sk': sk,
+    'ru': ru,
+    'ne': ne,
+    'zh': zh,
   };
   final bool testMalformed =
-      args != null && args.isNotEmpty && args.first == "malformed";
+      args != null && args.isNotEmpty && args.first == 'malformed';
   final benchmarks = [
     // Only benchmark with allowMalformed: false unless specified otherwise.
     for (bool allowMalformed in [false, if (testMalformed) true])
@@ -131,5 +131,7 @@
           () => Utf8Decode(language, texts[language], size, allowMalformed)
   ];
 
-  benchmarks.forEach((bm) => bm().report());
+  for (var bm in benchmarks) {
+    bm().report();
+  }
 }
diff --git a/benchmarks/Utf8Decode/dart2/datext_latin1_10k.dart b/benchmarks/Utf8Decode/dart2/datext_latin1_10k.dart
index 866ff83..bce6c80 100644
--- a/benchmarks/Utf8Decode/dart2/datext_latin1_10k.dart
+++ b/benchmarks/Utf8Decode/dart2/datext_latin1_10k.dart
@@ -7,7 +7,7 @@
 // The material is licensed under the Creative Commons Attribution-Share-Alike
 // License 3.0: https://creativecommons.org/licenses/by-sa/3.0/
 
-const String da = """
+const String da = '''
 Anders And
 
 Anders Fauntleroy And er en berømt figur i Disneys tegnefilm og tegneserier. Selv om han ikke er særligt populær i USA, optræder han i mange ugeblade i Europa: I Norge, Tyskland, Sverige, Danmark, Holland, Italien med flere. Hans første optræden var i tegnefilmen "The Wise Little Hen" (Den kloge lille høne) fra 9. juni 1934. Hans karakteristiske stemme blev indtalt af radiokomikeren Clarence Nash, der siden fast lagde stemme til.
@@ -59,4 +59,4 @@
 Serien fik en fornyelse i 2001, hvilket ændrede markant på historierne. Everett Ducklair vender tilbage, slukker Globus, smider Stålanden ud af Ducklair Tower og genopretter sit gamle imperium. Undervejs bliver Ducklair's to døtre afsløret. De hader begge Everett af grunde, der ikke bliver afsløret til fulde, selvom det bliver antydet, at Everett skilte sig af med deres mor på en eller anden måde.
 Denne fornyelse holdt 18 numre, før serien blev afsluttet, dog uden at historierne fik en slutning.
 
-Barks-historien "Anders And og den gyldne hjelm" fra 1954 kom i 2006 med i """;
+Barks-historien "Anders And og den gyldne hjelm" fra 1954 kom i 2006 med i ''';
diff --git a/benchmarks/Utf8Decode/dart2/entext_ascii_10k.dart b/benchmarks/Utf8Decode/dart2/entext_ascii_10k.dart
index 9353d6d..82cb721 100644
--- a/benchmarks/Utf8Decode/dart2/entext_ascii_10k.dart
+++ b/benchmarks/Utf8Decode/dart2/entext_ascii_10k.dart
@@ -7,7 +7,7 @@
 // The material is licensed under the Creative Commons Attribution-Share-Alike
 // License 3.0: https://creativecommons.org/licenses/by-sa/3.0/
 
-const String en = """
+const String en = '''
 Anarchism
 
 Anarchism is a radical political movement that is highly skeptical towards authority and rejects all forms of unjust hierarchy. It calls for the abolition of the state which it holds to be undesirable, unnecessary, and harmful. Anarchism advocates for the replacement of the state with stateless societies or other forms of free associations.
@@ -32,4 +32,4 @@
 At the turning of the century, anarchism had spread all over the world. In China, small groups of students imported the humanistic pro-science version of anarcho-communism. Tokyo was a hotspot for rebellious youth from countries of the far east, pouring into the Japanese capital to study. In Latin America, So Paulo was a stronghold for anarcho-syndicalism where it became the most prominent left-wing ideology. During this time, a minority of anarchists adopted tactics of revolutionary political violence. This strategy became known as propaganda of the deed. The dismemberment of the French socialist movement into many groups and the execution and exile of many Communards to penal colonies following the suppression of the Paris Commune favoured individualist political expression and acts. Even though many anarchists distanced themselves from these terrorist acts, infamy came upon the movement. Illegalism was another strategy which some anarchists adopted these same years.
 Anarchists enthusiastically participated in the Russian Revolutiondespite concernsin opposition to the Whites. However, they met harsh suppression after the Bolshevik government was stabilized. Several anarchists from Petrograd and Moscow fled to Ukraine, notably leading to the Kronstadt rebellion and Nestor Makhno's struggle in the Free Territory. With the anarchists being crushed in Russia, two new antithetical currents emerged, namely platformism and synthesis anarchism. The former sought to create a coherent group that would push for the revolution while the latter were against anything that would resemble a political party. Seeing the victories of the Bolsheviks in the October Revolution and the resulting Russian Civil War, many workers and activists turned to communist parties which grew at the expense of anarchism and other socialist movements. In France and the United States, members of major syndicalist movements, the General Confederation of Labour and Industrial Workers of the World, left their organisations and joined the Communist International.
 
-In the Spanish Civil War, anarchists and syndicalists (CNT and FAI) once again allied themselves with various currents of leftists. A long tradition of Spanish anarchism led to anarchists playing a pivotal role in the war. In response to the army rebellion, an anarchist-inspired movement of peasants and workers, supported by armed militias, took control of Barcelona and of large areas of rural Spain where they collectivised """;
+In the Spanish Civil War, anarchists and syndicalists (CNT and FAI) once again allied themselves with various currents of leftists. A long tradition of Spanish anarchism led to anarchists playing a pivotal role in the war. In response to the army rebellion, an anarchist-inspired movement of peasants and workers, supported by armed militias, took control of Barcelona and of large areas of rural Spain where they collectivised ''';
diff --git a/benchmarks/Utf8Decode/dart2/netext_3_10k.dart b/benchmarks/Utf8Decode/dart2/netext_3_10k.dart
index be53bc3..8fce550 100644
--- a/benchmarks/Utf8Decode/dart2/netext_3_10k.dart
+++ b/benchmarks/Utf8Decode/dart2/netext_3_10k.dart
@@ -7,7 +7,7 @@
 // The material is licensed under the Creative Commons Attribution-Share-Alike
 // License 3.0: https://creativecommons.org/licenses/by-sa/3.0/
 
-const String ne = """
+const String ne = '''
 नेपाल
 
 नेपाल (आधिकारिक नाम: सङ्घीय लोकतान्त्रिक गणतन्त्र नेपाल) दक्षिण एसियाली भूपरिवेष्ठित हिमाली राष्ट्र हो । यसको भौगोलिक अक्षांश २६ डिग्री २२ मिनेटदेखि ३० डिग्री २७ मिनेट उत्तर र ८० डिग्री ४ मिनेटदेखि ८८ डिग्री १२ मिनेट पूर्वी देशान्तरसम्म फैलिएको छ । यसको कूल क्षेत्रफल १,४७,१८१ वर्ग कि.मि छ । यो क्षेत्रफल पृथ्वीको कूल क्षेत्रफलको ०.०३% र एसिया महादेशको ०.३% पर्दछ । लण्डन स्थित "ग्रीनवीच मिनटाइम" भन्दा पूर्वतर्फ रहेकोले गौरीशङ्कर हिमालको नजिक भएर जाने ८६ डिग्री १५ मिनेट पूर्वी देशान्तरलाई आधार मानी नेपालको प्रमाणिक समय ५ घण्टा ४५ मिनेट आगाडि मानिएको छ ।
@@ -21,4 +21,4 @@
 हिमालय क्षेत्रमा मानिसहरू बस्न थालेको कम्तिमा पनि ९,००० वर्ष भएको कुरा काठमाडौं उपत्यकामा पाइएका प्राचीन औजारहरूबाट पुष्टि हुन्छ। सम्भवत: भोट-बर्मेली मूलका मानिसहरू नेपालमा २,५०० वर्ष अगाडि बसोबास गर्दथे। 
 
 ईशापूर्व १५०० तिर इन्डो-आर्यन जातिहरू उपत्यका प्रवेश गरे। ईशापूर्वको १००० तिर स-साना राज्यहरू र राज्यसङ्गठनहरू बने। सिद्धार्थ गौतम (ईशापूर्व ५६३–४८३) त्यस्तै एक वंश, शाक्यवंशका राजकुमार थिए, जसले आफ्नो राजकाज त्यागी तपस्वीको जीवन अँगाले र उनी बुद्ध भनेर विश्व प्रसिद्ध भए। 
-ईशापूर्वको २५० सम्ममा, यो क्षेत्र उत्तर""";
+ईशापूर्वको २५० सम्ममा, यो क्षेत्र उत्तर''';
diff --git a/benchmarks/Utf8Decode/dart2/rutext_2_10k.dart b/benchmarks/Utf8Decode/dart2/rutext_2_10k.dart
index 50b0130..c61a665 100644
--- a/benchmarks/Utf8Decode/dart2/rutext_2_10k.dart
+++ b/benchmarks/Utf8Decode/dart2/rutext_2_10k.dart
@@ -7,7 +7,7 @@
 // The material is licensed under the Creative Commons Attribution-Share-Alike
 // License 3.0: https://creativecommons.org/licenses/by-sa/3.0/
 
-const String ru = """
+const String ru = '''
 Литва
 
 Литва́ (), официальное название  Лито́вская Респу́блика ()  государство, расположенное в северной части Европы. Столица страны  Вильнюс.
@@ -41,4 +41,4 @@
 
 В XIV  начале XV веках территория Великого княжества Литовского стремительно росла, в основном за счёт присоединения земель Западной Руси. Включение в состав государства славянских земель, многократно превышающих по площади и количеству населения собственно литовские земли, привело к перениманию литовскими князьями, получившими во владение русские земли, православной культуры и западнорусского языка. Со временем западнорусский язык стал официальным языком канцелярии великих князей. Собственно литовский язык до XVI века оставался бесписьменным, хотя и продолжал использоваться на этнически литовских землях.
 
-В 1385 году великий князь литовский Ягайло заключил Кревскую унию с Королевством Польским. По условиям унии, Ягайло обязался присоединить Великое княжество Литовское к Королевству Польскому и крестить литовские земли по католическому обряду, а сам становился королём Польши и сохранял титул великого князя литовского. Однако вскоре он вынужден был уступить власть в Великом княжестве Литовском своему двоюродному брату Витовту.""";
+В 1385 году великий князь литовский Ягайло заключил Кревскую унию с Королевством Польским. По условиям унии, Ягайло обязался присоединить Великое княжество Литовское к Королевству Польскому и крестить литовские земли по католическому обряду, а сам становился королём Польши и сохранял титул великого князя литовского. Однако вскоре он вынужден был уступить власть в Великом княжестве Литовском своему двоюродному брату Витовту.''';
diff --git a/benchmarks/Utf8Decode/dart2/sktext_10k.dart b/benchmarks/Utf8Decode/dart2/sktext_10k.dart
index b1ce251..7dc2d13 100644
--- a/benchmarks/Utf8Decode/dart2/sktext_10k.dart
+++ b/benchmarks/Utf8Decode/dart2/sktext_10k.dart
@@ -7,7 +7,7 @@
 // The material is licensed under the Creative Commons Attribution-Share-Alike
 // License 3.0: https://creativecommons.org/licenses/by-sa/3.0/
 
-const String sk = """
+const String sk = '''
 Esperanto (pôvodne Lingvo Internacia – „medzinárodný jazyk“) je najrozšírenejší medzinárodný plánový jazyk. Názov je odvodený od pseudonymu, pod ktorým v roku 1887 zverejnil lekár L. L. Zamenhof základy tohto jazyka. Zámerom tvorcu bolo vytvoriť ľahko naučiteľný a použiteľný neutrálny jazyk, vhodný na použitie v medzinárodnej komunikácii. Cieľom nebolo nahradiť národné jazyky, čo bolo neskôr aj deklarované v Boulonskej deklarácii.
 
 Hoci žiaden štát neprijal esperanto ako úradný jazyk, používa ho komunita s odhadovaným počtom hovoriacich 100 000 až 2 000 000, z čoho približne 2 000 tvoria rodení hovoriaci. V Poľsku je na zozname nemateriálneho kultúrneho dedičstva. Získalo aj isté medzinárodné uznania, napríklad dve rezolúcie UNESCO či podporu známych osobností verejného života. V súčasnosti sa esperanto využíva pri cestovaní, korešpondencii, medzinárodných stretnutiach a kultúrnych výmenách, kongresoch, vedeckých diskusiách, v pôvodnej aj prekladovej literatúre, divadle a kine, hudbe, tlačenom aj internetovom spravodajstve, rozhlasovom a televíznom vysielaní.
@@ -43,4 +43,4 @@
 
 Po prvej svetovej vojne sa oba pražské spolky zlúčili do "Československej Esperantskej Asociácie". Tá bola v roku 1936 premenovaná na "Esperantskú Asociáciu v Československej republike". V tomto období bolo hnutie veľmi aktívne, fungovalo mnoho klubov, konalo sa veľa prednášok a kurzov. Esperanto bolo vyučované na školách rôznych stupňov, rádio Bratislava od 1930 vysielalo kurzy a od 1932 aj kultúrny program v esperante. Bola vydaná "Československá antológia" predstavujúca diela 20 slovenských autorov. V rámci protifašistickej aktivity vychádzali aj preklady protifašistických článkov z esperantských časopisov z obdobia Španielskej občianskej vojny.
 
-Druhá svetová vojna utlmila esperantské hnutie. Bratislavský esperantský klub požiadal o zmenu štatútu a rozšírenie poľa pôsobnosti na celú vtedajšiu Slovenskú republiku a následne sa stal strediskom esperantského hnutia na Slovensku.""";
+Druhá svetová vojna utlmila esperantské hnutie. Bratislavský esperantský klub požiadal o zmenu štatútu a rozšírenie poľa pôsobnosti na celú vtedajšiu Slovenskú republiku a následne sa stal strediskom esperantského hnutia na Slovensku.''';
diff --git a/benchmarks/Utf8Decode/dart2/zhtext_10k.dart b/benchmarks/Utf8Decode/dart2/zhtext_10k.dart
index dc81c6d6..b5e2a54 100644
--- a/benchmarks/Utf8Decode/dart2/zhtext_10k.dart
+++ b/benchmarks/Utf8Decode/dart2/zhtext_10k.dart
@@ -7,7 +7,7 @@
 // The material is licensed under the Creative Commons Attribution-Share-Alike
 // License 3.0: https://creativecommons.org/licenses/by-sa/3.0/
 
-const String zh = """
+const String zh = '''
 最簡單的漢字只有一笔画,但卻不止一個字:除了「一」字以外,「乙」、「〇」、「丶」、「丨」、「亅」、「丿」、「乀」、「乁」、「𠄌」、「𠃋」、「𠃉」、「𠃊」、「乚」等都是漢字,而且都有各自的讀音。
 
 中文汉字中,笔画最多的汉字可能是“”,是一种面食的名称,此字至今习用,其不同写法的笔画数在54至71画之间不等。被传统辞典收录的笔画最多的汉字为《字汇补》、《汉语大字典》中由四个“-{龍}-”字组成的「」字,共64画;同樣屬於64劃的字由四個“-{興}-”字組成的“𠔻”字,收入自《中文大辭典》;之後的是由四個「雷」字組成的“䨻”字,有52劃,收錄於《說文解字》。
@@ -70,4 +70,4 @@
 
 随着各种中文输入法的出现,汉字的计算机输入、存储、输出技术得到了基本解决,大大提高了中文写作、出版、信息检索等的效率。目前中文输入法有上千种之多,主要包括表音输入和表形输入两类,也有两者兼之的。汉字的语音输入、手写识别和光学字符识别(OCR)技术也已得到广泛应用。
 
-如收录数千字的GB 2312(中國大陸)、B""";
+如收录数千字的GB 2312(中國大陸)、B''';
diff --git a/pkg/_fe_analyzer_shared/lib/src/flow_analysis/flow_analysis.dart b/pkg/_fe_analyzer_shared/lib/src/flow_analysis/flow_analysis.dart
index ca263ae..6893a79 100644
--- a/pkg/_fe_analyzer_shared/lib/src/flow_analysis/flow_analysis.dart
+++ b/pkg/_fe_analyzer_shared/lib/src/flow_analysis/flow_analysis.dart
@@ -1188,67 +1188,9 @@
     }());
   }
 
-  /// Register a declaration of the [variable].
-  /// Should also be called for function parameters.
-  ///
-  /// A local variable is [initialized] if its declaration has an initializer.
-  /// A function parameter is always initialized, so [initialized] is `true`.
-  FlowModel<Variable, Type> declare(Variable variable, bool initialized) {
-    VariableModel<Variable, Type> newInfoForVar = _freshVariableInfo;
-    if (initialized) {
-      newInfoForVar = newInfoForVar.initialize();
-    }
-
-    return _updateVariableInfo(variable, newInfoForVar);
-  }
-
-  /// Gets the info for the given [variable], creating it if it doesn't exist.
-  VariableModel<Variable, Type> infoFor(Variable variable) =>
-      variableInfo[variable] ?? _freshVariableInfo;
-
-  /// Updates the state to indicate that variables that are not definitely
-  /// unassigned in the [other], or are [written], are also not definitely
-  /// unassigned in the result.
-  FlowModel<Variable, Type> joinUnassigned({
-    FlowModel<Variable, Type> other,
-    Iterable<Variable> written,
-  }) {
-    Map<Variable, VariableModel<Variable, Type>> newVariableInfo;
-
-    void markNotUnassigned(Variable variable) {
-      VariableModel<Variable, Type> info = variableInfo[variable];
-      if (info == null) return;
-
-      VariableModel<Variable, Type> newInfo = info.markNotUnassigned();
-      if (identical(newInfo, info)) return;
-
-      (newVariableInfo ??=
-          new Map<Variable, VariableModel<Variable, Type>>.from(
-              variableInfo))[variable] = newInfo;
-    }
-
-    if (other != null) {
-      for (Variable variable in other.variableInfo.keys) {
-        VariableModel<Variable, Type> otherInfo = other.variableInfo[variable];
-        if (!otherInfo.unassigned) {
-          markNotUnassigned(variable);
-        }
-      }
-    }
-
-    if (written != null) {
-      for (Variable variable in written) {
-        markNotUnassigned(variable);
-      }
-    }
-
-    if (newVariableInfo == null) return this;
-
-    return new FlowModel<Variable, Type>._(reachable, newVariableInfo);
-  }
-
   /// Updates the state to indicate that the given [writtenVariables] are no
-  /// longer promoted; they are presumed to have their declared types.
+  /// longer promoted and are no longer definitely unassigned, and the given
+  /// [capturedVariables] have been captured by closures.
   ///
   /// This is used at the top of loops to conservatively cancel the promotion of
   /// variables that are modified within the loop, so that we correctly analyze
@@ -1266,17 +1208,19 @@
   /// and only remove promotions if it can be shown that they aren't restored
   /// later in the loop body.  If we switch to a fixed point analysis, we should
   /// be able to remove this method.
-  FlowModel<Variable, Type> removePromotedAll(
+  FlowModel<Variable, Type> conservativeJoin(
       Iterable<Variable> writtenVariables,
       Iterable<Variable> capturedVariables) {
     Map<Variable, VariableModel<Variable, Type>> newVariableInfo;
 
     for (Variable variable in writtenVariables) {
       VariableModel<Variable, Type> info = infoFor(variable);
-      if (info.promotedTypes != null) {
+      VariableModel<Variable, Type> newInfo =
+          info.discardPromotionsAndMarkNotUnassigned();
+      if (!identical(info, newInfo)) {
         (newVariableInfo ??=
             new Map<Variable, VariableModel<Variable, Type>>.from(
-                variableInfo))[variable] = info.discardPromotions();
+                variableInfo))[variable] = newInfo;
       }
     }
 
@@ -1298,11 +1242,57 @@
         ? this
         : new FlowModel<Variable, Type>._(reachable, newVariableInfo);
 
-    result = result.joinUnassigned(written: writtenVariables);
-
     return result;
   }
 
+  /// Register a declaration of the [variable].
+  /// Should also be called for function parameters.
+  ///
+  /// A local variable is [initialized] if its declaration has an initializer.
+  /// A function parameter is always initialized, so [initialized] is `true`.
+  FlowModel<Variable, Type> declare(Variable variable, bool initialized) {
+    VariableModel<Variable, Type> newInfoForVar = _freshVariableInfo;
+    if (initialized) {
+      newInfoForVar = newInfoForVar.initialize();
+    }
+
+    return _updateVariableInfo(variable, newInfoForVar);
+  }
+
+  /// Gets the info for the given [variable], creating it if it doesn't exist.
+  VariableModel<Variable, Type> infoFor(Variable variable) =>
+      variableInfo[variable] ?? _freshVariableInfo;
+
+  /// Updates the state to indicate that variables that are not definitely
+  /// unassigned in the [other], are also not definitely unassigned in the
+  /// result.
+  FlowModel<Variable, Type> joinUnassigned(FlowModel<Variable, Type> other) {
+    Map<Variable, VariableModel<Variable, Type>> newVariableInfo;
+
+    void markNotUnassigned(Variable variable) {
+      VariableModel<Variable, Type> info = variableInfo[variable];
+      if (info == null) return;
+
+      VariableModel<Variable, Type> newInfo = info.markNotUnassigned();
+      if (identical(newInfo, info)) return;
+
+      (newVariableInfo ??=
+          new Map<Variable, VariableModel<Variable, Type>>.from(
+              variableInfo))[variable] = newInfo;
+    }
+
+    for (Variable variable in other.variableInfo.keys) {
+      VariableModel<Variable, Type> otherInfo = other.variableInfo[variable];
+      if (!otherInfo.unassigned) {
+        markNotUnassigned(variable);
+      }
+    }
+
+    if (newVariableInfo == null) return this;
+
+    return new FlowModel<Variable, Type>._(reachable, newVariableInfo);
+  }
+
   /// Updates the state to reflect a control path that is known to have
   /// previously passed through some [other] state.
   ///
@@ -1754,11 +1744,13 @@
         writeCaptured = false;
 
   /// Returns a new [VariableModel] in which any promotions present have been
-  /// dropped.
-  VariableModel<Variable, Type> discardPromotions() {
-    assert(promotedTypes != null, 'No promotions to discard');
+  /// dropped, and the variable has been marked as "not unassigned".
+  VariableModel<Variable, Type> discardPromotionsAndMarkNotUnassigned() {
+    if (promotedTypes == null && !unassigned) {
+      return this;
+    }
     return new VariableModel<Variable, Type>(
-        null, tested, assigned, unassigned, writeCaptured);
+        null, tested, assigned, false, writeCaptured);
   }
 
   /// Returns a new [VariableModel] reflecting the fact that the variable was
@@ -2392,7 +2384,7 @@
     _BranchTargetContext<Variable, Type> context =
         new _BranchTargetContext<Variable, Type>();
     _stack.add(context);
-    _current = _current.removePromotedAll(info._written, info._captured);
+    _current = _current.conservativeJoin(info._written, info._captured);
     _statementToContext[doStatement] = context;
   }
 
@@ -2462,7 +2454,7 @@
   void for_conditionBegin(Node node) {
     AssignedVariablesNodeInfo<Variable> info =
         _assignedVariables._getInfoForNode(node);
-    _current = _current.removePromotedAll(info._written, info._captured);
+    _current = _current.conservativeJoin(info._written, info._captured);
   }
 
   @override
@@ -2490,7 +2482,7 @@
     _SimpleStatementContext<Variable, Type> context =
         new _SimpleStatementContext<Variable, Type>(_current);
     _stack.add(context);
-    _current = _current.removePromotedAll(info._written, info._captured);
+    _current = _current.conservativeJoin(info._written, info._captured);
     if (loopVariable != null) {
       _current = _current.write(loopVariable, writtenType, typeOperations);
     }
@@ -2508,9 +2500,9 @@
     AssignedVariablesNodeInfo<Variable> info =
         _assignedVariables._getInfoForNode(node);
     ++_functionNestingLevel;
-    _current = _current.removePromotedAll(const [], info._written);
+    _current = _current.conservativeJoin(const [], info._written);
     _stack.add(new _SimpleContext(_current));
-    _current = _current.removePromotedAll(_assignedVariables._anywhere._written,
+    _current = _current.conservativeJoin(_assignedVariables._anywhere._written,
         _assignedVariables._anywhere._captured);
   }
 
@@ -2522,7 +2514,7 @@
     _SimpleContext<Variable, Type> context =
         _stack.removeLast() as _SimpleContext<Variable, Type>;
     _current = context._previous;
-    _current = _current.joinUnassigned(other: afterBody);
+    _current = _current.joinUnassigned(afterBody);
   }
 
   @override
@@ -2735,7 +2727,7 @@
         _stack.last as _SimpleStatementContext<Variable, Type>;
     if (hasLabel) {
       _current =
-          context._previous.removePromotedAll(info._written, info._captured);
+          context._previous.conservativeJoin(info._written, info._captured);
     } else {
       _current = context._previous;
     }
@@ -2781,7 +2773,7 @@
     AssignedVariablesNodeInfo<Variable> info =
         _assignedVariables._getInfoForNode(body);
     FlowModel<Variable, Type> beforeCatch =
-        beforeBody.removePromotedAll(info._written, info._captured);
+        beforeBody.conservativeJoin(info._written, info._captured);
 
     context._beforeCatch = beforeCatch;
     context._afterBodyAndCatches = afterBody;
@@ -2839,7 +2831,7 @@
         _stack.last as _TryContext<Variable, Type>;
     context._afterBodyAndCatches = _current;
     _current = _join(_current,
-        context._previous.removePromotedAll(info._written, info._captured));
+        context._previous.conservativeJoin(info._written, info._captured));
   }
 
   @override
@@ -2863,7 +2855,7 @@
   void whileStatement_conditionBegin(Node node) {
     AssignedVariablesNodeInfo<Variable> info =
         _assignedVariables._getInfoForNode(node);
-    _current = _current.removePromotedAll(info._written, info._captured);
+    _current = _current.conservativeJoin(info._written, info._captured);
   }
 
   @override
diff --git a/pkg/_fe_analyzer_shared/lib/src/messages/codes_generated.dart b/pkg/_fe_analyzer_shared/lib/src/messages/codes_generated.dart
index 9472270..309004e 100644
--- a/pkg/_fe_analyzer_shared/lib/src/messages/codes_generated.dart
+++ b/pkg/_fe_analyzer_shared/lib/src/messages/codes_generated.dart
@@ -7542,6 +7542,26 @@
     message: r"""Must explicitly return a value from a non-void function.""");
 
 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Code<Null> codeReturnWithoutExpressionAsync =
+    messageReturnWithoutExpressionAsync;
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const MessageCode messageReturnWithoutExpressionAsync = const MessageCode(
+    "ReturnWithoutExpressionAsync",
+    message:
+        r"""A value must be explicitly returned from a non-void async function.""");
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Code<Null> codeReturnWithoutExpressionSync =
+    messageReturnWithoutExpressionSync;
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const MessageCode messageReturnWithoutExpressionSync = const MessageCode(
+    "ReturnWithoutExpressionSync",
+    message:
+        r"""A value must be explicitly returned from a non-void function.""");
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
 const Template<Message Function(Uri uri_)> templateSdkRootNotFound =
     const Template<Message Function(Uri uri_)>(
         messageTemplate: r"""SDK root directory not found: #uri.""",
@@ -7850,7 +7870,7 @@
 const MessageCode messageStrongModeNNBDButOptOut = const MessageCode(
     "StrongModeNNBDButOptOut",
     message:
-        r"""A library can't opt out of non-nullable by default, when in nnbd-strong mode.""");
+        r"""A library can't opt out of null safety by default, when using sound null safety.""");
 
 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
 const Code<Null> codeSuperAsExpression = messageSuperAsExpression;
diff --git a/pkg/_fe_analyzer_shared/pubspec.yaml b/pkg/_fe_analyzer_shared/pubspec.yaml
index 61bec90..ac83ab7 100644
--- a/pkg/_fe_analyzer_shared/pubspec.yaml
+++ b/pkg/_fe_analyzer_shared/pubspec.yaml
@@ -1,5 +1,5 @@
 name: _fe_analyzer_shared
-version: 4.0.0
+version: 5.0.0
 description: Logic that is shared between the front_end and analyzer packages.
 homepage: https://github.com/dart-lang/sdk/tree/master/pkg/_fe_analyzer_shared
 
diff --git a/pkg/_fe_analyzer_shared/test/flow_analysis/flow_analysis_test.dart b/pkg/_fe_analyzer_shared/test/flow_analysis/flow_analysis_test.dart
index 2434c9b..9a6e31b 100644
--- a/pkg/_fe_analyzer_shared/test/flow_analysis/flow_analysis_test.dart
+++ b/pkg/_fe_analyzer_shared/test/flow_analysis/flow_analysis_test.dart
@@ -2000,7 +2000,7 @@
             x: _matchVariableModel(chain: null),
           });
 
-          var s2 = s1.removePromotedAll([], [x]);
+          var s2 = s1.conservativeJoin([], [x]);
           expect(s2.variableInfo, {
             x: _matchVariableModel(chain: null, writeCaptured: true),
           });
@@ -2393,7 +2393,7 @@
             b: _matchVariableModel(assigned: false, unassigned: true),
           });
 
-          var s3 = s1.joinUnassigned(other: s2);
+          var s3 = s1.joinUnassigned(s2);
           expect(s3, same(s1));
         });
 
@@ -2422,7 +2422,7 @@
             c: _matchVariableModel(assigned: false, unassigned: true),
           });
 
-          var s3 = s1.joinUnassigned(other: s2);
+          var s3 = s1.joinUnassigned(s2);
           expect(s3.variableInfo, {
             a: _matchVariableModel(assigned: true, unassigned: false),
             b: _matchVariableModel(assigned: false, unassigned: false),
@@ -2430,62 +2430,16 @@
           });
         });
       });
-
-      group('written', () {
-        test('unchanged', () {
-          var h = _Harness();
-
-          var a = _Var('a', _Type('int'));
-          var b = _Var('b', _Type('int'));
-
-          var s1 = FlowModel<_Var, _Type>(true)
-              .declare(a, false)
-              .declare(b, false)
-              .write(a, _Type('int'), h);
-          expect(s1.variableInfo, {
-            a: _matchVariableModel(assigned: true, unassigned: false),
-            b: _matchVariableModel(assigned: false, unassigned: true),
-          });
-
-          var s2 = s1.joinUnassigned(written: [a]);
-          expect(s2, same(s1));
-        });
-
-        test('changed', () {
-          var h = _Harness();
-
-          var a = _Var('a', _Type('int'));
-          var b = _Var('b', _Type('int'));
-          var c = _Var('c', _Type('int'));
-
-          var s1 = FlowModel<_Var, _Type>(true)
-              .declare(a, false)
-              .declare(b, false)
-              .declare(c, false)
-              .write(a, _Type('int'), h);
-          expect(s1.variableInfo, {
-            a: _matchVariableModel(assigned: true, unassigned: false),
-            b: _matchVariableModel(assigned: false, unassigned: true),
-            c: _matchVariableModel(assigned: false, unassigned: true),
-          });
-
-          var s2 = s1.joinUnassigned(written: [b]);
-          expect(s2.variableInfo, {
-            a: _matchVariableModel(assigned: true, unassigned: false),
-            b: _matchVariableModel(assigned: false, unassigned: false),
-            c: _matchVariableModel(assigned: false, unassigned: true),
-          });
-        });
-      });
     });
 
-    group('removePromotedAll', () {
+    group('conservativeJoin', () {
       test('unchanged', () {
         var h = _Harness();
         var s1 = FlowModel<_Var, _Type>(true)
+            .declare(intQVar, true)
             .tryPromoteForTypeCheck(h, objectQVar, _Type('int'))
             .ifTrue;
-        var s2 = s1.removePromotedAll([intQVar], []);
+        var s2 = s1.conservativeJoin([intQVar], []);
         expect(s2, same(s1));
       });
 
@@ -2496,7 +2450,7 @@
             .ifTrue
             .tryPromoteForTypeCheck(h, intQVar, _Type('int'))
             .ifTrue;
-        var s2 = s1.removePromotedAll([intQVar], []);
+        var s2 = s1.conservativeJoin([intQVar], []);
         expect(s2.reachable, true);
         expect(s2.variableInfo, {
           objectQVar: _matchVariableModel(chain: ['int'], ofInterest: ['int']),
@@ -2511,7 +2465,7 @@
             .ifTrue
             .tryPromoteForTypeCheck(h, intQVar, _Type('int'))
             .ifTrue;
-        var s2 = s1.removePromotedAll([], [intQVar]);
+        var s2 = s1.conservativeJoin([], [intQVar]);
         expect(s2.reachable, true);
         expect(s2.variableInfo, {
           objectQVar: _matchVariableModel(chain: ['int'], ofInterest: ['int']),
@@ -2564,8 +2518,8 @@
             .declare(c, false)
             .declare(d, false);
         // In s1, a and b are write captured.  In s2, a and c are.
-        var s1 = s0.removePromotedAll([a, b], [a, b]);
-        var s2 = s1.removePromotedAll([a, c], [a, c]);
+        var s1 = s0.conservativeJoin([a, b], [a, b]);
+        var s2 = s1.conservativeJoin([a, c], [a, c]);
         var result = s2.restrict(h, s1, Set());
         expect(
           result.infoFor(a),
diff --git a/pkg/_fe_analyzer_shared/test/flow_analysis/nullability/data/issue42504.dart b/pkg/_fe_analyzer_shared/test/flow_analysis/nullability/data/issue42504.dart
new file mode 100644
index 0000000..1bad138
--- /dev/null
+++ b/pkg/_fe_analyzer_shared/test/flow_analysis/nullability/data/issue42504.dart
@@ -0,0 +1,30 @@
+// Copyright (c) 2020, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+abstract class Bar {}
+
+abstract class Foo {
+  dynamic get _map;
+
+  Bar? putIfAbsent(Object key, Bar loader()) {
+    assert(key != null);
+    assert(loader != null);
+    Bar? result = _map[key]?.result;
+    if (result != null) {
+      return /*nonNullable*/ result;
+    }
+    result = loader();
+    /*nonNullable*/ result;
+    try {
+      result = loader();
+      /*nonNullable*/ result;
+    } catch (error) {
+      return null;
+    }
+
+    return /*nonNullable*/ result;
+  }
+}
+
+main() {}
diff --git a/pkg/analysis_server/lib/src/cider/completion.dart b/pkg/analysis_server/lib/src/cider/completion.dart
index f942566..a3049d34 100644
--- a/pkg/analysis_server/lib/src/cider/completion.dart
+++ b/pkg/analysis_server/lib/src/cider/completion.dart
@@ -13,9 +13,9 @@
 import 'package:analysis_server/src/services/completion/filtering/fuzzy_matcher.dart';
 import 'package:analyzer/dart/element/element.dart' show LibraryElement;
 import 'package:analyzer/src/dart/analysis/performance_logger.dart';
-import 'package:analyzer/src/dart/micro/performance.dart';
 import 'package:analyzer/src/dart/micro/resolve_file.dart';
 import 'package:analyzer/src/dartdoc/dartdoc_directive_info.dart';
+import 'package:analyzer/src/util/performance/operation_performance.dart';
 import 'package:analyzer_plugin/protocol/protocol_common.dart';
 import 'package:meta/meta.dart';
 
@@ -32,8 +32,8 @@
   final CiderCompletionCache _cache;
   final FileResolver _fileResolver;
 
-  final CiderOperationPerformanceImpl _performanceRoot =
-      CiderOperationPerformanceImpl('<root>');
+  final OperationPerformanceImpl _performanceRoot =
+      OperationPerformanceImpl('<root>');
 
   DartCompletionRequestImpl _dartCompletionRequest;
 
@@ -103,23 +103,18 @@
             );
 
             return await manager.computeSuggestions(
+              performance,
               completionRequest,
               enableUriContributor: false,
             );
           });
 
-          for (var operation in completionRequest.performance.operations) {
-            performance.addChildFixed(
-              operation.name,
-              operation.elapsed,
-            );
-          }
-
           return result;
         },
       );
 
       _dartCompletionRequest = await DartCompletionRequestImpl.from(
+        performance,
         completionRequest,
         dartdocDirectiveInfo,
       );
@@ -129,7 +124,8 @@
           _logger.run('Add imported suggestions', () {
             suggestions.addAll(
               _importedLibrariesSuggestions(
-                resolvedUnit.libraryElement,
+                target: resolvedUnit.libraryElement,
+                performance: performance,
               ),
             );
           });
@@ -187,12 +183,16 @@
   ///
   /// TODO(scheglov) Implement show / hide combinators.
   /// TODO(scheglov) Implement prefixes.
-  List<CompletionSuggestion> _importedLibrariesSuggestions(
-    LibraryElement target,
-  ) {
+  List<CompletionSuggestion> _importedLibrariesSuggestions({
+    @required LibraryElement target,
+    @required OperationPerformanceImpl performance,
+  }) {
     var suggestions = <CompletionSuggestion>[];
     for (var importedLibrary in target.importedLibraries) {
-      var importedSuggestions = _importedLibrarySuggestions(importedLibrary);
+      var importedSuggestions = _importedLibrarySuggestions(
+        element: importedLibrary,
+        performance: performance,
+      );
       suggestions.addAll(importedSuggestions);
     }
     return suggestions;
@@ -200,11 +200,15 @@
 
   /// Return cached, or compute unprefixed suggestions for all elements
   /// exported from the library.
-  List<CompletionSuggestion> _importedLibrarySuggestions(
-    LibraryElement element,
-  ) {
+  List<CompletionSuggestion> _importedLibrarySuggestions({
+    @required LibraryElement element,
+    @required OperationPerformanceImpl performance,
+  }) {
     var path = element.source.fullName;
-    var signature = _fileResolver.getLibraryLinkedSignature(path);
+    var signature = _fileResolver.getLibraryLinkedSignature(
+      path: path,
+      performance: performance,
+    );
 
     var cacheEntry = _cache._importedLibraries[path];
     if (cacheEntry == null || cacheEntry.signature != signature) {
@@ -247,7 +251,7 @@
   final Duration suggestions;
 
   /// The tree of operation performances.
-  final CiderOperationPerformance operations;
+  final OperationPerformance operations;
 
   CiderCompletionPerformance._({
     @required this.file,
diff --git a/pkg/analysis_server/lib/src/domain_completion.dart b/pkg/analysis_server/lib/src/domain_completion.dart
index 5dac07a..cd9cb94 100644
--- a/pkg/analysis_server/lib/src/domain_completion.dart
+++ b/pkg/analysis_server/lib/src/domain_completion.dart
@@ -21,6 +21,7 @@
 import 'package:analyzer/dart/analysis/session.dart';
 import 'package:analyzer/exception/exception.dart';
 import 'package:analyzer/src/generated/engine.dart';
+import 'package:analyzer/src/util/performance/operation_performance.dart';
 import 'package:analyzer_plugin/protocol/protocol.dart' as plugin;
 import 'package:analyzer_plugin/protocol/protocol_common.dart';
 import 'package:analyzer_plugin/protocol/protocol_constants.dart' as plugin;
@@ -63,6 +64,7 @@
   /// [results]. Subclasses should override this method, append at least one
   /// result to the [controller], and close the controller stream once complete.
   Future<CompletionResult> computeSuggestions(
+    OperationPerformanceImpl perf,
     CompletionRequestImpl request,
     CompletionGetSuggestionsParams params,
     Set<ElementKind> includedElementKinds,
@@ -88,29 +90,31 @@
     var suggestions = <CompletionSuggestion>[];
     if (request.result != null) {
       const COMPUTE_SUGGESTIONS_TAG = 'computeSuggestions';
-      performance.logStartTime(COMPUTE_SUGGESTIONS_TAG);
-
-      var manager = DartCompletionManager(
-        dartdocDirectiveInfo: server.getDartdocDirectiveInfoFor(request.result),
-        includedElementKinds: includedElementKinds,
-        includedElementNames: includedElementNames,
-        includedSuggestionRelevanceTags: includedSuggestionRelevanceTags,
-      );
-
-      var contributorTag = 'computeSuggestions - ${manager.runtimeType}';
-      performance.logStartTime(contributorTag);
-      try {
-        suggestions.addAll(
-          await manager.computeSuggestions(
-            request,
-            enableUriContributor: true,
+      await perf.runAsync(COMPUTE_SUGGESTIONS_TAG, (perf) async {
+        var manager = DartCompletionManager(
+          dartdocDirectiveInfo: server.getDartdocDirectiveInfoFor(
+            request.result,
           ),
+          includedElementKinds: includedElementKinds,
+          includedElementNames: includedElementNames,
+          includedSuggestionRelevanceTags: includedSuggestionRelevanceTags,
         );
-      } on AbortCompletion {
-        suggestions.clear();
-      }
-      performance.logElapseTime(contributorTag);
-      performance.logElapseTime(COMPUTE_SUGGESTIONS_TAG);
+
+        var contributorTag = 'computeSuggestions - ${manager.runtimeType}';
+        await perf.runAsync(contributorTag, (performance) async {
+          try {
+            suggestions.addAll(
+              await manager.computeSuggestions(
+                performance,
+                request,
+                enableUriContributor: true,
+              ),
+            );
+          } on AbortCompletion {
+            suggestions.clear();
+          }
+        });
+      });
     }
     // TODO (danrubel) if request is obsolete (processAnalysisRequest returns
     // false) then send empty results
@@ -289,95 +293,95 @@
   Future<void> processRequest(Request request) async {
     performance = CompletionPerformance();
 
-    // extract and validate params
-    var params = CompletionGetSuggestionsParams.fromRequest(request);
-    var file = params.file;
-    var offset = params.offset;
+    await performance.runRequestOperation((perf) async {
+      // extract and validate params
+      var params = CompletionGetSuggestionsParams.fromRequest(request);
+      var file = params.file;
+      var offset = params.offset;
 
-    if (server.sendResponseErrorIfInvalidFilePath(request, file)) {
-      return;
-    }
-
-    var resolvedUnit = await server.getResolvedUnit(file);
-    server.requestStatistics?.addItemTimeNow(request, 'resolvedUnit');
-    if (resolvedUnit?.state == ResultState.VALID) {
-      if (offset < 0 || offset > resolvedUnit.content.length) {
-        server.sendResponse(Response.invalidParameter(
-            request,
-            'params.offset',
-            'Expected offset between 0 and source length inclusive,'
-                ' but found $offset'));
+      if (server.sendResponseErrorIfInvalidFilePath(request, file)) {
         return;
       }
 
-      recordRequest(performance, file, resolvedUnit.content, offset);
-    }
-    var completionRequest = CompletionRequestImpl(
-        resolvedUnit, offset, server.options.useNewRelevance, performance);
+      var resolvedUnit = await server.getResolvedUnit(file);
+      server.requestStatistics?.addItemTimeNow(request, 'resolvedUnit');
+      if (resolvedUnit?.state == ResultState.VALID) {
+        if (offset < 0 || offset > resolvedUnit.content.length) {
+          server.sendResponse(Response.invalidParameter(
+              request,
+              'params.offset',
+              'Expected offset between 0 and source length inclusive,'
+                  ' but found $offset'));
+          return;
+        }
 
-    var completionId = (_nextCompletionId++).toString();
+        recordRequest(performance, file, resolvedUnit.content, offset);
+      }
+      var completionRequest = CompletionRequestImpl(
+          resolvedUnit, offset, server.options.useNewRelevance, performance);
 
-    setNewRequest(completionRequest);
+      var completionId = (_nextCompletionId++).toString();
 
-    // initial response without results
-    server.sendResponse(
-        CompletionGetSuggestionsResult(completionId).toResponse(request.id));
+      setNewRequest(completionRequest);
 
-    // If the client opted into using available suggestion sets,
-    // create the kinds set, so signal the completion manager about opt-in.
-    Set<ElementKind> includedElementKinds;
-    Set<String> includedElementNames;
-    List<IncludedSuggestionRelevanceTag> includedSuggestionRelevanceTags;
-    if (subscriptions.contains(CompletionService.AVAILABLE_SUGGESTION_SETS)) {
-      includedElementKinds = <ElementKind>{};
-      includedElementNames = <String>{};
-      includedSuggestionRelevanceTags = <IncludedSuggestionRelevanceTag>[];
-    }
+      // initial response without results
+      server.sendResponse(
+          CompletionGetSuggestionsResult(completionId).toResponse(request.id));
 
-    // Compute suggestions in the background
-    computeSuggestions(
-      completionRequest,
-      params,
-      includedElementKinds,
-      includedElementNames,
-      includedSuggestionRelevanceTags,
-    ).then((CompletionResult result) {
-      String libraryFile;
-      var includedSuggestionSets = <IncludedSuggestionSet>[];
-      if (includedElementKinds != null && resolvedUnit != null) {
-        libraryFile = resolvedUnit.libraryElement.source.fullName;
-        server.sendNotification(
-          createExistingImportsNotification(resolvedUnit),
-        );
-        computeIncludedSetList(
-          server.declarationsTracker,
-          resolvedUnit,
-          includedSuggestionSets,
-          includedElementNames,
-        );
+      // If the client opted into using available suggestion sets,
+      // create the kinds set, so signal the completion manager about opt-in.
+      Set<ElementKind> includedElementKinds;
+      Set<String> includedElementNames;
+      List<IncludedSuggestionRelevanceTag> includedSuggestionRelevanceTags;
+      if (subscriptions.contains(CompletionService.AVAILABLE_SUGGESTION_SETS)) {
+        includedElementKinds = <ElementKind>{};
+        includedElementNames = <String>{};
+        includedSuggestionRelevanceTags = <IncludedSuggestionRelevanceTag>[];
       }
 
-      const SEND_NOTIFICATION_TAG = 'send notification';
-      performance.logStartTime(SEND_NOTIFICATION_TAG);
-      sendCompletionNotification(
-        completionId,
-        result.replacementOffset,
-        result.replacementLength,
-        result.suggestions,
-        libraryFile,
-        includedSuggestionSets,
-        includedElementKinds?.toList(),
-        includedSuggestionRelevanceTags,
-      );
-      performance.logElapseTime(SEND_NOTIFICATION_TAG);
+      // Compute suggestions in the background
+      try {
+        var result = await computeSuggestions(
+          perf,
+          completionRequest,
+          params,
+          includedElementKinds,
+          includedElementNames,
+          includedSuggestionRelevanceTags,
+        );
+        String libraryFile;
+        var includedSuggestionSets = <IncludedSuggestionSet>[];
+        if (includedElementKinds != null && resolvedUnit != null) {
+          libraryFile = resolvedUnit.libraryElement.source.fullName;
+          server.sendNotification(
+            createExistingImportsNotification(resolvedUnit),
+          );
+          computeIncludedSetList(
+            server.declarationsTracker,
+            resolvedUnit,
+            includedSuggestionSets,
+            includedElementNames,
+          );
+        }
 
-      performance.notificationCount = 1;
-      performance.logFirstNotificationComplete('notification 1 complete');
-      performance.suggestionCountFirst = result.suggestions.length;
-      performance.suggestionCountLast = result.suggestions.length;
-      performance.complete();
-    }).whenComplete(() {
-      ifMatchesRequestClear(completionRequest);
+        const SEND_NOTIFICATION_TAG = 'send notification';
+        perf.run(SEND_NOTIFICATION_TAG, (_) {
+          sendCompletionNotification(
+            completionId,
+            result.replacementOffset,
+            result.replacementLength,
+            result.suggestions,
+            libraryFile,
+            includedSuggestionSets,
+            includedElementKinds?.toList(),
+            includedSuggestionRelevanceTags,
+          );
+        });
+
+        performance.suggestionCount = result.suggestions.length;
+      } finally {
+        ifMatchesRequestClear(completionRequest);
+      }
     });
   }
 
diff --git a/pkg/analysis_server/lib/src/domains/execution/completion.dart b/pkg/analysis_server/lib/src/domains/execution/completion.dart
index 24b0d46..bf6d781 100644
--- a/pkg/analysis_server/lib/src/domains/execution/completion.dart
+++ b/pkg/analysis_server/lib/src/domains/execution/completion.dart
@@ -90,9 +90,15 @@
       false,
       CompletionPerformance(),
     );
-    var suggestions = await contributor.computeSuggestions(
-      request,
-      enableUriContributor: true,
+
+    var suggestions = await request.performance.runRequestOperation(
+      (performance) async {
+        return await contributor.computeSuggestions(
+          performance,
+          request,
+          enableUriContributor: true,
+        );
+      },
     );
 
     // Remove completions with synthetic import prefixes.
diff --git a/pkg/analysis_server/lib/src/edit/edit_domain.dart b/pkg/analysis_server/lib/src/edit/edit_domain.dart
index 7799a3b..760da48 100644
--- a/pkg/analysis_server/lib/src/edit/edit_domain.dart
+++ b/pkg/analysis_server/lib/src/edit/edit_domain.dart
@@ -27,7 +27,7 @@
 import 'package:analysis_server/src/services/correction/fix/manifest/fix_generator.dart';
 import 'package:analysis_server/src/services/correction/fix/pubspec/fix_generator.dart';
 import 'package:analysis_server/src/services/correction/fix_internal.dart';
-import 'package:analysis_server/src/services/correction/organize_directives.dart';
+import 'package:analysis_server/src/services/correction/organize_imports.dart';
 import 'package:analysis_server/src/services/correction/sort_members.dart';
 import 'package:analysis_server/src/services/correction/status.dart';
 import 'package:analysis_server/src/services/refactoring/refactoring.dart';
@@ -502,7 +502,7 @@
       return;
     }
     // do organize
-    var sorter = DirectiveOrganizer(code, unit, errors);
+    var sorter = ImportOrganizer(code, unit, errors);
     var edits = sorter.organize();
     var fileEdit = SourceFileEdit(file, fileStamp, edits: edits);
     server.sendResponse(
diff --git a/pkg/analysis_server/lib/src/lsp/constants.dart b/pkg/analysis_server/lib/src/lsp/constants.dart
index b1c20df..ba91e4b 100644
--- a/pkg/analysis_server/lib/src/lsp/constants.dart
+++ b/pkg/analysis_server/lib/src/lsp/constants.dart
@@ -104,5 +104,5 @@
   ///   restart the server. However clients should be careful to not restart a
   ///   crashing server endlessly. VS Code for example doesn't restart a server
   ///   if it crashes 5 times in the last 180 seconds."
-  static const ClientServerInconsistentState = ErrorCodes(-32010);
+  static const ClientServerInconsistentState = ErrorCodes(-32099);
 }
diff --git a/pkg/analysis_server/lib/src/lsp/handlers/commands/organize_imports.dart b/pkg/analysis_server/lib/src/lsp/handlers/commands/organize_imports.dart
index 9fa94a5..3bf5324 100644
--- a/pkg/analysis_server/lib/src/lsp/handlers/commands/organize_imports.dart
+++ b/pkg/analysis_server/lib/src/lsp/handlers/commands/organize_imports.dart
@@ -9,7 +9,7 @@
 import 'package:analysis_server/src/lsp/constants.dart';
 import 'package:analysis_server/src/lsp/handlers/commands/simple_edit_handler.dart';
 import 'package:analysis_server/src/lsp/lsp_analysis_server.dart';
-import 'package:analysis_server/src/services/correction/organize_directives.dart';
+import 'package:analysis_server/src/services/correction/organize_imports.dart';
 
 class OrganizeImportsCommandHandler extends SimpleEditCommandHandler {
   OrganizeImportsCommandHandler(LspAnalysisServer server) : super(server);
@@ -48,7 +48,7 @@
         return success();
       }
 
-      final organizer = DirectiveOrganizer(code, unit, result.errors);
+      final organizer = ImportOrganizer(code, unit, result.errors);
       final edits = organizer.organize();
 
       return sendSourceEditsToClient(docIdentifier, unit, edits);
diff --git a/pkg/analysis_server/lib/src/lsp/handlers/handler_code_actions.dart b/pkg/analysis_server/lib/src/lsp/handlers/handler_code_actions.dart
index 6931804..da57ee1 100644
--- a/pkg/analysis_server/lib/src/lsp/handlers/handler_code_actions.dart
+++ b/pkg/analysis_server/lib/src/lsp/handlers/handler_code_actions.dart
@@ -30,6 +30,7 @@
 class CodeActionHandler extends MessageHandler<CodeActionParams,
     List<Either2<Command, CodeAction>>> {
   CodeActionHandler(LspAnalysisServer server) : super(server);
+
   @override
   Method get handlesMessage => Method.textDocument_codeAction;
 
diff --git a/pkg/analysis_server/lib/src/lsp/handlers/handler_completion.dart b/pkg/analysis_server/lib/src/lsp/handlers/handler_completion.dart
index 7d4445d..cc4b415 100644
--- a/pkg/analysis_server/lib/src/lsp/handlers/handler_completion.dart
+++ b/pkg/analysis_server/lib/src/lsp/handlers/handler_completion.dart
@@ -189,154 +189,154 @@
     performance.setContentsAndOffset(unit.content, offset);
     server.performanceStats.completion.add(performance);
 
-    final completionRequest = CompletionRequestImpl(
-        unit, offset, server.options.useNewRelevance, performance);
-    final directiveInfo =
-        server.getDartdocDirectiveInfoFor(completionRequest.result);
-    final dartCompletionRequest =
-        await DartCompletionRequestImpl.from(completionRequest, directiveInfo);
+    return await performance.runRequestOperation((perf) async {
+      final completionRequest = CompletionRequestImpl(
+          unit, offset, server.options.useNewRelevance, performance);
+      final directiveInfo =
+          server.getDartdocDirectiveInfoFor(completionRequest.result);
+      final dartCompletionRequest = await DartCompletionRequestImpl.from(
+          perf, completionRequest, directiveInfo);
 
-    Set<ElementKind> includedElementKinds;
-    Set<String> includedElementNames;
-    List<IncludedSuggestionRelevanceTag> includedSuggestionRelevanceTags;
-    if (includeSuggestionSets) {
-      includedElementKinds = <ElementKind>{};
-      includedElementNames = <String>{};
-      includedSuggestionRelevanceTags = <IncludedSuggestionRelevanceTag>[];
-    }
-
-    try {
-      var contributor = DartCompletionManager(
-        dartdocDirectiveInfo: directiveInfo,
-        includedElementKinds: includedElementKinds,
-        includedElementNames: includedElementNames,
-        includedSuggestionRelevanceTags: includedSuggestionRelevanceTags,
-      );
-
-      final serverSuggestions = await contributor.computeSuggestions(
-        completionRequest,
-        enableUriContributor: true,
-      );
-
-      if (token.isCancellationRequested) {
-        return cancelled();
+      Set<ElementKind> includedElementKinds;
+      Set<String> includedElementNames;
+      List<IncludedSuggestionRelevanceTag> includedSuggestionRelevanceTags;
+      if (includeSuggestionSets) {
+        includedElementKinds = <ElementKind>{};
+        includedElementNames = <String>{};
+        includedSuggestionRelevanceTags = <IncludedSuggestionRelevanceTag>[];
       }
 
-      final results = serverSuggestions
-          .map(
-            (item) => toCompletionItem(
-              completionCapabilities,
-              clientSupportedCompletionKinds,
-              unit.lineInfo,
-              item,
-              completionRequest.replacementOffset,
-              completionRequest.replacementLength,
-            ),
-          )
-          .toList();
-
-      // Now compute items in suggestion sets.
-      var includedSuggestionSets = <IncludedSuggestionSet>[];
-      if (includedElementKinds != null && unit != null) {
-        computeIncludedSetList(
-          server.declarationsTracker,
-          unit,
-          includedSuggestionSets,
-          includedElementNames,
+      try {
+        var contributor = DartCompletionManager(
+          dartdocDirectiveInfo: directiveInfo,
+          includedElementKinds: includedElementKinds,
+          includedElementNames: includedElementNames,
+          includedSuggestionRelevanceTags: includedSuggestionRelevanceTags,
         );
-      }
 
-      // Build a fast lookup for imported symbols so that we can filter out
-      // duplicates.
-      final alreadyImportedSymbols = _buildLookupOfImportedSymbols(unit);
+        final serverSuggestions = await contributor.computeSuggestions(
+          perf,
+          completionRequest,
+          enableUriContributor: true,
+        );
 
-      includedSuggestionSets.forEach((includedSet) {
-        final library = server.declarationsTracker.getLibrary(includedSet.id);
-        if (library == null) {
-          return;
+        if (token.isCancellationRequested) {
+          return cancelled();
         }
 
-        // Make a fast lookup for tag relevance.
-        final tagBoosts = <String, int>{};
-        includedSuggestionRelevanceTags
-            .forEach((t) => tagBoosts[t.tag] = t.relevanceBoost);
-
-        // Only specific types of child declarations should be included.
-        // This list matches what's in _protocolAvailableSuggestion in
-        // the DAS implementation.
-        bool shouldIncludeChild(Declaration child) =>
-            child.kind == DeclarationKind.CONSTRUCTOR ||
-            child.kind == DeclarationKind.ENUM_CONSTANT ||
-            (child.kind == DeclarationKind.GETTER && child.isStatic) ||
-            (child.kind == DeclarationKind.FIELD && child.isStatic);
-
-        // Collect declarations and their children.
-        final allDeclarations = library.declarations
-            .followedBy(library.declarations
-                .expand((decl) => decl.children.where(shouldIncludeChild)))
+        final results = serverSuggestions
+            .map(
+              (item) => toCompletionItem(
+                completionCapabilities,
+                clientSupportedCompletionKinds,
+                unit.lineInfo,
+                item,
+                completionRequest.replacementOffset,
+                completionRequest.replacementLength,
+              ),
+            )
             .toList();
 
-        final setResults = allDeclarations
-            // Filter to only the kinds we should return.
-            .where((item) =>
-                includedElementKinds.contains(protocolElementKind(item.kind)))
-            .where((item) {
-          // Check existing imports to ensure we don't already import
-          // this element (this exact element from its declaring
-          // library, not just something with the same name). If we do
-          // we'll want to skip it.
-          final declaringUri = item.parent != null
-              ? item.parent.locationLibraryUri
-              : item.locationLibraryUri;
+        // Now compute items in suggestion sets.
+        var includedSuggestionSets = <IncludedSuggestionSet>[];
+        if (includedElementKinds != null && unit != null) {
+          computeIncludedSetList(
+            server.declarationsTracker,
+            unit,
+            includedSuggestionSets,
+            includedElementNames,
+          );
+        }
 
-          // For enums and named constructors, only the parent enum/class is in
-          // the list of imported symbols so we use the parents name.
-          final nameKey = item.kind == DeclarationKind.ENUM_CONSTANT ||
-                  item.kind == DeclarationKind.CONSTRUCTOR
-              ? item.parent.name
-              : item.name;
-          final key = _createImportedSymbolKey(nameKey, declaringUri);
-          final importingUris = alreadyImportedSymbols[key];
+        // Build a fast lookup for imported symbols so that we can filter out
+        // duplicates.
+        final alreadyImportedSymbols = _buildLookupOfImportedSymbols(unit);
 
-          // Keep it only if there are either:
-          // - no URIs importing it
-          // - the URIs importing it include this one
-          return importingUris == null ||
-              importingUris.contains('${library.uri}');
-        }).map((item) => declarationToCompletionItem(
-                  completionCapabilities,
-                  clientSupportedCompletionKinds,
-                  unit.path,
-                  offset,
-                  includedSet,
-                  library,
-                  tagBoosts,
-                  unit.lineInfo,
-                  item,
-                  completionRequest.replacementOffset,
-                  completionRequest.replacementLength,
-                ));
-        results.addAll(setResults);
-      });
+        includedSuggestionSets.forEach((includedSet) {
+          final library = server.declarationsTracker.getLibrary(includedSet.id);
+          if (library == null) {
+            return;
+          }
 
-      // Perform fuzzy matching based on the identifier in front of the caret to
-      // reduce the size of the payload.
-      final fuzzyPattern = dartCompletionRequest.targetPrefix;
-      final fuzzyMatcher =
-          FuzzyMatcher(fuzzyPattern, matchStyle: MatchStyle.TEXT);
+          // Make a fast lookup for tag relevance.
+          final tagBoosts = <String, int>{};
+          includedSuggestionRelevanceTags
+              .forEach((t) => tagBoosts[t.tag] = t.relevanceBoost);
 
-      final matchingResults =
-          results.where((e) => fuzzyMatcher.score(e.label) > 0).toList();
+          // Only specific types of child declarations should be included.
+          // This list matches what's in _protocolAvailableSuggestion in
+          // the DAS implementation.
+          bool shouldIncludeChild(Declaration child) =>
+              child.kind == DeclarationKind.CONSTRUCTOR ||
+              child.kind == DeclarationKind.ENUM_CONSTANT ||
+              (child.kind == DeclarationKind.GETTER && child.isStatic) ||
+              (child.kind == DeclarationKind.FIELD && child.isStatic);
 
-      performance.notificationCount = 1;
-      performance.suggestionCountFirst = results.length;
-      performance.suggestionCountLast = results.length;
-      performance.complete();
+          // Collect declarations and their children.
+          final allDeclarations = library.declarations
+              .followedBy(library.declarations
+                  .expand((decl) => decl.children.where(shouldIncludeChild)))
+              .toList();
 
-      return success(matchingResults);
-    } on AbortCompletion {
-      return success([]);
-    }
+          final setResults = allDeclarations
+              // Filter to only the kinds we should return.
+              .where((item) =>
+                  includedElementKinds.contains(protocolElementKind(item.kind)))
+              .where((item) {
+            // Check existing imports to ensure we don't already import
+            // this element (this exact element from its declaring
+            // library, not just something with the same name). If we do
+            // we'll want to skip it.
+            final declaringUri = item.parent != null
+                ? item.parent.locationLibraryUri
+                : item.locationLibraryUri;
+
+            // For enums and named constructors, only the parent enum/class is in
+            // the list of imported symbols so we use the parents name.
+            final nameKey = item.kind == DeclarationKind.ENUM_CONSTANT ||
+                    item.kind == DeclarationKind.CONSTRUCTOR
+                ? item.parent.name
+                : item.name;
+            final key = _createImportedSymbolKey(nameKey, declaringUri);
+            final importingUris = alreadyImportedSymbols[key];
+
+            // Keep it only if there are either:
+            // - no URIs importing it
+            // - the URIs importing it include this one
+            return importingUris == null ||
+                importingUris.contains('${library.uri}');
+          }).map((item) => declarationToCompletionItem(
+                    completionCapabilities,
+                    clientSupportedCompletionKinds,
+                    unit.path,
+                    offset,
+                    includedSet,
+                    library,
+                    tagBoosts,
+                    unit.lineInfo,
+                    item,
+                    completionRequest.replacementOffset,
+                    completionRequest.replacementLength,
+                  ));
+          results.addAll(setResults);
+        });
+
+        // Perform fuzzy matching based on the identifier in front of the caret to
+        // reduce the size of the payload.
+        final fuzzyPattern = dartCompletionRequest.targetPrefix;
+        final fuzzyMatcher =
+            FuzzyMatcher(fuzzyPattern, matchStyle: MatchStyle.TEXT);
+
+        final matchingResults =
+            results.where((e) => fuzzyMatcher.score(e.label) > 0).toList();
+
+        performance.suggestionCount = results.length;
+
+        return success(matchingResults);
+      } on AbortCompletion {
+        return success([]);
+      }
+    });
   }
 
   Iterable<CompletionItem> _pluginResultsToItems(
diff --git a/pkg/analysis_server/lib/src/server/driver.dart b/pkg/analysis_server/lib/src/server/driver.dart
index 5d9a1f8..cc0f406 100644
--- a/pkg/analysis_server/lib/src/server/driver.dart
+++ b/pkg/analysis_server/lib/src/server/driver.dart
@@ -437,12 +437,12 @@
     }
 
     final defaultSdkPath = _getSdkPath(results);
-    final dartSdkManager = DartSdkManager(defaultSdkPath, true);
+    final dartSdkManager = DartSdkManager(defaultSdkPath);
 
     // TODO(brianwilkerson) It would be nice to avoid creating an SDK that
     // cannot be re-used, but the SDK is needed to create a package map provider
     // in the case where we need to run `pub` in order to get the package map.
-    var defaultSdk = _createDefaultSdk(defaultSdkPath, true);
+    var defaultSdk = _createDefaultSdk(defaultSdkPath);
     //
     // Initialize the instrumentation service.
     //
@@ -825,12 +825,12 @@
     return parser;
   }
 
-  DartSdk _createDefaultSdk(String defaultSdkPath, bool useSummaries) {
+  DartSdk _createDefaultSdk(String defaultSdkPath) {
     var resourceProvider = PhysicalResourceProvider.INSTANCE;
-    var sdk = FolderBasedDartSdk(
-        resourceProvider, resourceProvider.getFolder(defaultSdkPath));
-    sdk.useSummary = useSummaries;
-    return sdk;
+    return FolderBasedDartSdk(
+      resourceProvider,
+      resourceProvider.getFolder(defaultSdkPath),
+    );
   }
 
   /// Constructs a uuid combining the current date and a random integer.
diff --git a/pkg/analysis_server/lib/src/services/completion/completion_performance.dart b/pkg/analysis_server/lib/src/services/completion/completion_performance.dart
index c9c0fdc..e233d13 100644
--- a/pkg/analysis_server/lib/src/services/completion/completion_performance.dart
+++ b/pkg/analysis_server/lib/src/services/completion/completion_performance.dart
@@ -2,6 +2,8 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+import 'package:analyzer/src/util/performance/operation_performance.dart';
+
 /// Compute a string representing a code completion operation at the
 /// given source and location.
 ///
@@ -36,71 +38,34 @@
 
 /// Overall performance of a code completion operation.
 class CompletionPerformance {
-  final DateTime start = DateTime.now();
-  final Map<String, Duration> _startTimes = <String, Duration>{};
-  final Stopwatch _stopwatch = Stopwatch();
-  final List<OperationPerformance> operations = <OperationPerformance>[];
-
   String path;
   String snippet = '';
-  int notificationCount = -1;
-  int suggestionCountFirst = -1;
-  int suggestionCountLast = -1;
-  Duration _firstNotification;
+  int suggestionCount = -1;
+  OperationPerformanceImpl _operation;
 
-  CompletionPerformance() {
-    _stopwatch.start();
+  int get elapsedInMilliseconds {
+    return _operation.elapsed.inMilliseconds;
   }
 
-  int get elapsedInMilliseconds =>
-      operations.isNotEmpty ? operations.last.elapsed.inMilliseconds : 0;
-
-  String get suggestionCount {
-    if (notificationCount < 1) return '';
-    if (notificationCount == 1) return '$suggestionCountFirst';
-    return '$suggestionCountFirst,  $suggestionCountLast';
+  String get suggestionCountStr {
+    if (suggestionCount < 1) return '';
+    return '$suggestionCount';
   }
 
-  void complete([String tag]) {
-    _stopwatch.stop();
-    _logDuration(tag ?? 'total time', _stopwatch.elapsed);
-  }
-
-  void logElapseTime(String tag) {
-    var end = _stopwatch.elapsed;
-    var start = _startTimes[tag];
-    if (start == null) {
-      _logDuration(tag, null);
-      return null;
+  Future<T> runRequestOperation<T>(
+    Future<T> Function(OperationPerformanceImpl) operation,
+  ) async {
+    var rootOperation = OperationPerformanceImpl('<root>');
+    try {
+      return rootOperation.runAsync('<request>', (performance) async {
+        return await operation(performance);
+      });
+    } finally {
+      _operation = rootOperation.children.first;
     }
-    _logDuration(tag, end - start);
-  }
-
-  void logFirstNotificationComplete(String tag) {
-    _firstNotification = _stopwatch.elapsed;
-    _logDuration(tag, _firstNotification);
-  }
-
-  void logStartTime(String tag) {
-    _startTimes[tag] = _stopwatch.elapsed;
   }
 
   void setContentsAndOffset(String contents, int offset) {
     snippet = computeCompletionSnippet(contents, offset);
   }
-
-  void _logDuration(String tag, Duration elapsed) {
-    operations.add(OperationPerformance(tag, elapsed));
-  }
-}
-
-/// The performance of an operation when computing code completion.
-class OperationPerformance {
-  /// The name of the operation
-  final String name;
-
-  /// The elapse time or `null` if undefined.
-  final Duration elapsed;
-
-  OperationPerformance(this.name, this.elapsed);
 }
diff --git a/pkg/analysis_server/lib/src/services/completion/dart/completion_manager.dart b/pkg/analysis_server/lib/src/services/completion/dart/completion_manager.dart
index f09f8a8..1118ce0 100644
--- a/pkg/analysis_server/lib/src/services/completion/dart/completion_manager.dart
+++ b/pkg/analysis_server/lib/src/services/completion/dart/completion_manager.dart
@@ -6,7 +6,7 @@
 
 import 'package:analysis_server/src/protocol_server.dart';
 import 'package:analysis_server/src/provisional/completion/completion_core.dart'
-    show AbortCompletion, CompletionContributor, CompletionRequest;
+    show AbortCompletion, CompletionRequest;
 import 'package:analysis_server/src/provisional/completion/dart/completion_dart.dart';
 import 'package:analysis_server/src/services/completion/completion_core.dart';
 import 'package:analysis_server/src/services/completion/completion_performance.dart';
@@ -45,6 +45,7 @@
 import 'package:analyzer/src/dartdoc/dartdoc_directive_info.dart';
 import 'package:analyzer/src/generated/engine.dart';
 import 'package:analyzer/src/generated/source.dart';
+import 'package:analyzer/src/util/performance/operation_performance.dart';
 import 'package:analyzer_plugin/protocol/protocol_common.dart';
 import 'package:analyzer_plugin/protocol/protocol_common.dart' as protocol;
 import 'package:analyzer_plugin/src/utilities/completion/completion_target.dart';
@@ -53,7 +54,7 @@
 
 /// [DartCompletionManager] determines if a completion request is Dart specific
 /// and forwards those requests to all [DartCompletionContributor]s.
-class DartCompletionManager implements CompletionContributor {
+class DartCompletionManager {
   /// The [contributionSorter] is a long-lived object that isn't allowed
   /// to maintain state between calls to [DartContributionSorter#sort(...)].
   static DartContributionSorter contributionSorter = CommonUsageSorter();
@@ -98,8 +99,8 @@
                 includedElementNames == null &&
                 includedSuggestionRelevanceTags == null));
 
-  @override
   Future<List<CompletionSuggestion>> computeSuggestions(
+    OperationPerformanceImpl performance,
     CompletionRequest request, {
     @required bool enableUriContributor,
   }) async {
@@ -108,15 +109,19 @@
       return const <CompletionSuggestion>[];
     }
 
-    var performance = (request as CompletionRequestImpl).performance;
-    DartCompletionRequestImpl dartRequest =
-        await DartCompletionRequestImpl.from(request, dartdocDirectiveInfo);
+    var dartRequest = await DartCompletionRequestImpl.from(
+      performance,
+      request,
+      dartdocDirectiveInfo,
+    );
 
     // Don't suggest in comments.
     if (dartRequest.target.isCommentText) {
       return const <CompletionSuggestion>[];
     }
 
+    request.checkAborted();
+
     final ranking = CompletionRanking.instance;
     var probabilityFuture =
         ranking != null ? ranking.predict(dartRequest) : Future.value(null);
@@ -156,11 +161,12 @@
 
     try {
       for (var contributor in contributors) {
-        var contributorTag =
-            'DartCompletionManager - ${contributor.runtimeType}';
-        performance.logStartTime(contributorTag);
-        await contributor.computeSuggestions(dartRequest, builder);
-        performance.logElapseTime(contributorTag);
+        await performance.runAsync(
+          'DartCompletionManager - ${contributor.runtimeType}',
+          (_) async {
+            await contributor.computeSuggestions(dartRequest, builder);
+          },
+        );
         request.checkAborted();
       }
     } on InconsistentAnalysisException {
@@ -172,33 +178,33 @@
     // Adjust suggestion relevance before returning
     var suggestions = builder.suggestions.toList();
     const SORT_TAG = 'DartCompletionManager - sort';
-    performance.logStartTime(SORT_TAG);
-    if (ranking != null) {
-      request.checkAborted();
-      try {
-        suggestions = await ranking.rerank(
-            probabilityFuture,
-            suggestions,
-            includedElementNames,
-            includedSuggestionRelevanceTags,
-            dartRequest,
-            request.result.unit.featureSet);
-      } catch (exception, stackTrace) {
-        // TODO(brianwilkerson) Shutdown the isolates that have already been
-        //  started.
-        // Disable smart ranking if prediction fails.
-        CompletionRanking.instance = null;
-        AnalysisEngine.instance.instrumentationService.logException(
-            CaughtException.withMessage(
-                'Failed to rerank completion suggestions',
-                exception,
-                stackTrace));
+    await performance.runAsync(SORT_TAG, (_) async {
+      if (ranking != null) {
+        request.checkAborted();
+        try {
+          suggestions = await ranking.rerank(
+              probabilityFuture,
+              suggestions,
+              includedElementNames,
+              includedSuggestionRelevanceTags,
+              dartRequest,
+              request.result.unit.featureSet);
+        } catch (exception, stackTrace) {
+          // TODO(brianwilkerson) Shutdown the isolates that have already been
+          //  started.
+          // Disable smart ranking if prediction fails.
+          CompletionRanking.instance = null;
+          AnalysisEngine.instance.instrumentationService.logException(
+              CaughtException.withMessage(
+                  'Failed to rerank completion suggestions',
+                  exception,
+                  stackTrace));
+          await contributionSorter.sort(dartRequest, suggestions);
+        }
+      } else if (!request.useNewRelevance) {
         await contributionSorter.sort(dartRequest, suggestions);
       }
-    } else if (!request.useNewRelevance) {
-      await contributionSorter.sort(dartRequest, suggestions);
-    }
-    performance.logElapseTime(SORT_TAG);
+    });
     request.checkAborted();
     return suggestions;
   }
@@ -430,30 +436,32 @@
   /// Return a [Future] that completes with a newly created completion request
   /// based on the given [request]. This method will throw [AbortCompletion]
   /// if the completion request has been aborted.
-  static Future<DartCompletionRequest> from(CompletionRequest request,
+  static Future<DartCompletionRequest> from(
+      OperationPerformanceImpl performance,
+      CompletionRequest request,
       DartdocDirectiveInfo dartdocDirectiveInfo) async {
     request.checkAborted();
-    var performance = (request as CompletionRequestImpl).performance;
-    const BUILD_REQUEST_TAG = 'build DartCompletionRequest';
-    performance.logStartTime(BUILD_REQUEST_TAG);
 
-    var unit = request.result.unit;
-    var libSource = unit.declaredElement.library.source;
-    var objectType = request.result.typeProvider.objectType;
+    return performance.run(
+      'build DartCompletionRequest',
+      (_) {
+        var unit = request.result.unit;
+        var libSource = unit.declaredElement.library.source;
+        var objectType = request.result.typeProvider.objectType;
 
-    var dartRequest = DartCompletionRequestImpl._(
-        request.result,
-        request.resourceProvider,
-        objectType,
-        libSource,
-        request.source,
-        request.offset,
-        unit,
-        dartdocDirectiveInfo,
-        request,
-        performance);
-
-    performance.logElapseTime(BUILD_REQUEST_TAG);
-    return dartRequest;
+        return DartCompletionRequestImpl._(
+          request.result,
+          request.resourceProvider,
+          objectType,
+          libSource,
+          request.source,
+          request.offset,
+          unit,
+          dartdocDirectiveInfo,
+          request,
+          (request as CompletionRequestImpl).performance,
+        );
+      },
+    );
   }
 }
diff --git a/pkg/analysis_server/lib/src/services/completion/dart/completion_ranking.dart b/pkg/analysis_server/lib/src/services/completion/dart/completion_ranking.dart
index c80e50f..6be6f54 100644
--- a/pkg/analysis_server/lib/src/services/completion/dart/completion_ranking.dart
+++ b/pkg/analysis_server/lib/src/services/completion/dart/completion_ranking.dart
@@ -105,8 +105,6 @@
       return Future.value();
     }
 
-    request.checkAborted();
-
     performanceMetrics._incrementPredictionRequestCount();
 
     var timer = Stopwatch()..start();
diff --git a/pkg/analysis_server/lib/src/services/completion/dart/feature_computer.dart b/pkg/analysis_server/lib/src/services/completion/dart/feature_computer.dart
index 944f8cc..6f1e545 100644
--- a/pkg/analysis_server/lib/src/services/completion/dart/feature_computer.dart
+++ b/pkg/analysis_server/lib/src/services/completion/dart/feature_computer.dart
@@ -22,7 +22,8 @@
         FieldElement,
         LibraryElement,
         PropertyAccessorElement,
-        TopLevelVariableElement;
+        TopLevelVariableElement,
+        LocalVariableElement;
 import 'package:analyzer/dart/element/type.dart';
 import 'package:analyzer/dart/element/type_provider.dart';
 import 'package:analyzer/dart/element/type_system.dart';
@@ -83,10 +84,10 @@
   var totalWeight = 0.0;
   for (var i = 0; i < values.length; i++) {
     var value = values[i];
+    var weight = weights[i];
+    totalWeight += weight;
     if (value >= 0.0) {
-      var weight = weights[i];
       totalValue += value * weight;
-      totalWeight += weight;
     }
   }
   if (totalWeight == 0.0) {
@@ -236,9 +237,6 @@
   double inheritanceDistanceFeature(
       ClassElement subclass, ClassElement superclass) {
     var distance = _inheritanceDistance(subclass, superclass, {});
-    if (distance < 0) {
-      return 0.0;
-    }
     return _distanceToPercent(distance);
   }
 
@@ -286,6 +284,87 @@
     return range.upper;
   }
 
+  /// Return the distance between the [reference] and the referenced local
+  /// [variable], where the distance is defined to be the number of variable
+  /// declarations between the local variable and the reference.
+  int localVariableDistance(AstNode reference, LocalVariableElement variable) {
+    var distance = 0;
+    var node = reference;
+    while (node != null) {
+      if (node is ForStatement || node is ForElement) {
+        var loopParts = node is ForStatement
+            ? node.forLoopParts
+            : (node as ForElement).forLoopParts;
+        if (loopParts is ForPartsWithDeclarations) {
+          for (var declaredVariable in loopParts.variables.variables.reversed) {
+            if (declaredVariable.declaredElement == variable) {
+              return distance;
+            }
+            distance++;
+          }
+        } else if (loopParts is ForEachPartsWithDeclaration) {
+          if (loopParts.loopVariable.declaredElement == variable) {
+            return distance;
+          }
+          distance++;
+        }
+      } else if (node is VariableDeclaration) {
+        var parent = node.parent;
+        if (parent is VariableDeclarationList) {
+          var variables = parent.variables;
+          var index = variables.indexOf(node);
+          for (var i = index - 1; i >= 0; i--) {
+            var declaredVariable = variables[i];
+            if (declaredVariable.declaredElement == variable) {
+              return distance;
+            }
+            distance++;
+          }
+        }
+      } else if (node is CatchClause) {
+        if (node.exceptionParameter?.staticElement == variable ||
+            node.stackTraceParameter?.staticElement == variable) {
+          return distance;
+        }
+      }
+      if (node is Statement) {
+        var parent = node.parent;
+        var statements = const <Statement>[];
+        if (parent is Block) {
+          statements = parent.statements;
+        } else if (parent is SwitchCase) {
+          statements = parent.statements;
+        } else if (parent is SwitchDefault) {
+          statements = parent.statements;
+        }
+        var index = statements.indexOf(node);
+        for (var i = index - 1; i >= 0; i--) {
+          var statement = statements[i];
+          if (statement is VariableDeclarationStatement) {
+            for (var declaredVariable
+                in statement.variables.variables.reversed) {
+              if (declaredVariable.declaredElement == variable) {
+                return distance;
+              }
+              distance++;
+            }
+          }
+        }
+      }
+      node = node.parent;
+    }
+    return -1;
+  }
+
+  /// Return the value of the _local variable distance_ feature for a local
+  /// variable whose declaration is separated from the completion location by
+  /// [distance] other variable declarations.
+  double localVariableDistanceFeature(
+      AstNode reference, LocalVariableElement variable) {
+    var distance = localVariableDistance(reference, variable);
+    return _distanceToPercent(distance);
+  }
+
   /// Return the value of the _starts with dollar_ feature.
   double startsWithDollarFeature(String name) =>
       name.startsWith('\$') ? 0.0 : 1.0;
@@ -297,8 +376,14 @@
           ? -1.0
           : (proposedMemberName == containingMethodName ? 1.0 : 0.0);
 
-  /// Convert a [distance] to a percentage value and return the percentage.
-  double _distanceToPercent(int distance) => math.pow(0.95, distance);
+  /// Convert a [distance] to a percentage value and return the percentage. If
+  /// the [distance] is negative, return `-1.0`.
+  double _distanceToPercent(int distance) {
+    if (distance < 0) {
+      return -1.0;
+    }
+    return math.pow(0.98, distance);
+  }
 
   /// Return the inheritance distance between the [subclass] and the
   /// [superclass]. The set of [visited] elements is used to guard against
@@ -362,47 +447,45 @@
     if (range
         .endStart(node.leftParenthesis, node.rightParenthesis)
         .contains(offset)) {
-      final paramElts = node.functionType?.parameters;
-      if (paramElts == null || paramElts.isEmpty) {
+      final parameters = node.functionType?.parameters;
+      if (parameters == null) {
         return null;
       }
 
-      // Required parameters
-      final positionalParamElts =
-          paramElts.where((param) => !param.isNamed)?.toList(growable: false);
-      var i = 0;
-      if (positionalParamElts.isNotEmpty) {
-        for (;
-            i < node.arguments.length && i < positionalParamElts.length;
-            i++) {
-          // We don't need to compare offsets between commas, tests show that
-          // such tests aren't needed, also the commas and their respective
-          // offsets aren't accessible with existing getters and setters.
-          if (node.arguments[i].contains(offset)) {
-            return positionalParamElts[i].type;
+      var index = 0;
+
+      DartType typeOfIndexPositionalParameter() {
+        if (index < parameters.length) {
+          var parameter = parameters[index];
+          if (parameter.isPositional) {
+            return parameter.type;
           }
         }
-        // The case where the user is filling out the required parameters
-        if (i < positionalParamElts.length) {
-          return positionalParamElts[i].type;
-        }
+        return null;
       }
-      // Named and positional parameters
-      if (positionalParamElts.length < paramElts.length) {
-        for (; i < node.arguments.length && i < paramElts.length; i++) {
-          if (node.arguments[i].contains(offset)) {
-            if (node.arguments[i] is NamedExpression) {
-              var namedExpression = node.arguments[i] as NamedExpression;
-              var needle = paramElts
-                  .where((paramElt) =>
-                      paramElt.isNamed &&
-                      paramElt.name == namedExpression.name.label.name)
-                  ?.first;
-              return needle?.type;
+
+      Expression previousArgument;
+      for (var argument in node.arguments) {
+        if (argument is NamedExpression) {
+          if (offset <= argument.offset) {
+            return typeOfIndexPositionalParameter();
+          }
+          if (argument.contains(offset)) {
+            return argument.staticParameterElement?.type;
+          }
+          return null;
+        } else {
+          if (previousArgument == null || previousArgument.end < offset) {
+            if (offset <= argument.end) {
+              return argument.staticParameterElement?.type;
             }
           }
+          previousArgument = argument;
+          index++;
         }
       }
+
+      return typeOfIndexPositionalParameter();
     }
     return null;
   }
@@ -641,6 +724,9 @@
 
   @override
   DartType visitLabel(Label node) {
+    if (offset == node.offset) {
+      return _visitParent(node);
+    }
     if (node.colon.end <= offset) {
       return _visitParent(node);
     }
@@ -679,6 +765,9 @@
 
   @override
   DartType visitNamedExpression(NamedExpression node) {
+    if (offset == node.offset) {
+      return _visitParent(node);
+    }
     if (node.name.end <= offset) {
       return _visitParent(node);
     }
diff --git a/pkg/analysis_server/lib/src/services/completion/dart/imported_reference_contributor.dart b/pkg/analysis_server/lib/src/services/completion/dart/imported_reference_contributor.dart
index d839ed3..b2c1335 100644
--- a/pkg/analysis_server/lib/src/services/completion/dart/imported_reference_contributor.dart
+++ b/pkg/analysis_server/lib/src/services/completion/dart/imported_reference_contributor.dart
@@ -8,7 +8,7 @@
 import 'package:analysis_server/src/services/completion/dart/local_library_contributor.dart';
 import 'package:analysis_server/src/services/completion/dart/suggestion_builder.dart'
     show SuggestionBuilder;
-import 'package:analyzer/src/generated/resolver.dart';
+import 'package:analyzer/src/dart/resolver/scope.dart';
 
 /// A contributor for calculating suggestions for imported top level members.
 class ImportedReferenceContributor extends DartCompletionContributor {
diff --git a/pkg/analysis_server/lib/src/services/completion/dart/suggestion_builder.dart b/pkg/analysis_server/lib/src/services/completion/dart/suggestion_builder.dart
index adcd138..6e3ebea 100644
--- a/pkg/analysis_server/lib/src/services/completion/dart/suggestion_builder.dart
+++ b/pkg/analysis_server/lib/src/services/completion/dart/suggestion_builder.dart
@@ -661,17 +661,19 @@
     var variableType = variable.type;
     int relevance;
     if (request.useNewRelevance) {
-      // TODO(brianwilkerson) Use the distance to the local variable as
-      //  another feature.
       var contextType = request.featureComputer
           .contextTypeFeature(request.contextType, variableType);
       var elementKind = _computeElementKind(variable);
       var isConstant = request.inConstantContext
           ? request.featureComputer.isConstantFeature(variable)
           : -1.0;
+      var localVariableDistance = request.featureComputer
+          .localVariableDistanceFeature(
+              request.target.containingNode, variable);
       relevance = toRelevance(
           weightedAverage(
-              [contextType, elementKind, isConstant], [1.0, 1.0, 1.0]),
+              [contextType, elementKind, isConstant, localVariableDistance],
+              [1.0, 1.0, 1.0, 1.0]),
           800);
       listener?.computedFeatures(contextType: contextType);
     } else {
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/abstract_producer.dart b/pkg/analysis_server/lib/src/services/correction/dart/abstract_producer.dart
index 00a5cc6..bf2c9f2 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/abstract_producer.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/abstract_producer.dart
@@ -15,13 +15,14 @@
 import 'package:analyzer/dart/ast/token.dart';
 import 'package:analyzer/dart/element/element.dart';
 import 'package:analyzer/dart/element/type.dart';
+import 'package:analyzer/dart/element/type_provider.dart';
+import 'package:analyzer/dart/element/type_system.dart';
 import 'package:analyzer/diagnostic/diagnostic.dart';
 import 'package:analyzer/file_system/file_system.dart';
 import 'package:analyzer/source/source_range.dart';
 import 'package:analyzer/src/dart/analysis/session_helper.dart';
 import 'package:analyzer/src/dart/ast/utilities.dart';
 import 'package:analyzer/src/dart/element/type.dart';
-import 'package:analyzer/src/generated/resolver.dart';
 import 'package:analyzer_plugin/utilities/assist/assist.dart';
 import 'package:analyzer_plugin/utilities/change_builder/change_builder_dart.dart';
 import 'package:analyzer_plugin/utilities/change_builder/change_workspace.dart';
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/make_final.dart b/pkg/analysis_server/lib/src/services/correction/dart/make_final.dart
index c35bcf8..33d3b0f 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/make_final.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/make_final.dart
@@ -16,9 +16,23 @@
 
   @override
   Future<void> compute(DartChangeBuilder builder) async {
-    VariableDeclarationList list;
     var node = this.node;
     if (node is SimpleIdentifier &&
+        node.parent is DeclaredIdentifier &&
+        node.parent.parent is ForEachPartsWithDeclaration) {
+      var declaration = node.parent as DeclaredIdentifier;
+      await builder.addFileEdit(file, (DartFileEditBuilder builder) {
+        if (declaration.keyword?.keyword == Keyword.VAR) {
+          builder.addSimpleReplacement(
+              range.token(declaration.keyword), 'final');
+        } else if (declaration.keyword == null) {
+          builder.addSimpleInsertion(declaration.offset, 'final ');
+        }
+      });
+      return;
+    }
+    VariableDeclarationList list;
+    if (node is SimpleIdentifier &&
         node.parent is VariableDeclaration &&
         node.parent.parent is VariableDeclarationList) {
       list = node.parent.parent;
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/organize_imports.dart b/pkg/analysis_server/lib/src/services/correction/dart/organize_imports.dart
new file mode 100644
index 0000000..bb09e08
--- /dev/null
+++ b/pkg/analysis_server/lib/src/services/correction/dart/organize_imports.dart
@@ -0,0 +1,32 @@
+// Copyright (c) 2020, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analysis_server/src/services/correction/dart/abstract_producer.dart';
+import 'package:analysis_server/src/services/correction/fix.dart';
+import 'package:analysis_server/src/services/correction/organize_imports.dart';
+import 'package:analyzer/source/source_range.dart';
+import 'package:analyzer_plugin/utilities/change_builder/change_builder_dart.dart';
+import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
+
+class OrganizeImports extends CorrectionProducer {
+  @override
+  FixKind get fixKind => DartFixKind.ORGANIZE_IMPORTS;
+
+  @override
+  Future<void> compute(DartChangeBuilder builder) async {
+    var organizer =
+        ImportOrganizer(resolvedResult.content, unit, resolvedResult.errors);
+    // todo (pq): consider restructuring organizer to allow a passed-in change
+    //  builder
+    for (var edit in organizer.organize()) {
+      await builder.addFileEdit(file, (DartFileEditBuilder builder) {
+        builder.addSimpleReplacement(
+            SourceRange(edit.offset, edit.length), edit.replacement);
+      });
+    }
+  }
+
+  /// Return an instance of this class. Used as a tear-off in `FixProcessor`.
+  static OrganizeImports newInstance() => OrganizeImports();
+}
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/sort_directives.dart b/pkg/analysis_server/lib/src/services/correction/dart/sort_directives.dart
deleted file mode 100644
index 2a09341..0000000
--- a/pkg/analysis_server/lib/src/services/correction/dart/sort_directives.dart
+++ /dev/null
@@ -1,32 +0,0 @@
-// Copyright (c) 2020, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-import 'package:analysis_server/src/services/correction/dart/abstract_producer.dart';
-import 'package:analysis_server/src/services/correction/fix.dart';
-import 'package:analysis_server/src/services/correction/organize_directives.dart';
-import 'package:analyzer/source/source_range.dart';
-import 'package:analyzer_plugin/utilities/change_builder/change_builder_dart.dart';
-import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
-
-class SortDirectives extends CorrectionProducer {
-  @override
-  FixKind get fixKind => DartFixKind.SORT_DIRECTIVES;
-
-  @override
-  Future<void> compute(DartChangeBuilder builder) async {
-    var organizer =
-        DirectiveOrganizer(resolvedResult.content, unit, resolvedResult.errors);
-    // todo (pq): consider restructuring organizer to allow a passed-in change
-    //  builder
-    for (var edit in organizer.organize()) {
-      await builder.addFileEdit(file, (DartFileEditBuilder builder) {
-        builder.addSimpleReplacement(
-            SourceRange(edit.offset, edit.length), edit.replacement);
-      });
-    }
-  }
-
-  /// Return an instance of this class. Used as a tear-off in `FixProcessor`.
-  static SortDirectives newInstance() => SortDirectives();
-}
diff --git a/pkg/analysis_server/lib/src/services/correction/fix.dart b/pkg/analysis_server/lib/src/services/correction/fix.dart
index a24e389..3b11ecc 100644
--- a/pkg/analysis_server/lib/src/services/correction/fix.dart
+++ b/pkg/analysis_server/lib/src/services/correction/fix.dart
@@ -316,6 +316,8 @@
       'Move type arguments to after class name');
   static const MAKE_VARIABLE_NOT_FINAL = FixKind(
       'dart.fix.makeVariableNotFinal', 50, "Make variable '{0}' not final");
+  static const ORGANIZE_IMPORTS =
+      FixKind('dart.fix.organize.imports', 50, 'Organize Imports');
   static const QUALIFY_REFERENCE =
       FixKind('dart.fix.qualifyReference', 50, "Use '{0}'");
   static const REMOVE_ANNOTATION =
@@ -449,8 +451,6 @@
       'dart.fix.sort.childPropertyLast',
       50,
       'Move child property to end of arguments');
-  static const SORT_DIRECTIVES =
-      FixKind('dart.fix.sort.directives', 50, 'Sort directives');
   static const UPDATE_SDK_CONSTRAINTS = FixKind(
       'dart.fix.updateSdkConstraints', 50, 'Update the SDK constraints');
   static const USE_CONST =
diff --git a/pkg/analysis_server/lib/src/services/correction/fix_internal.dart b/pkg/analysis_server/lib/src/services/correction/fix_internal.dart
index 3b987e9..6b83c92 100644
--- a/pkg/analysis_server/lib/src/services/correction/fix_internal.dart
+++ b/pkg/analysis_server/lib/src/services/correction/fix_internal.dart
@@ -79,6 +79,7 @@
 import 'package:analysis_server/src/services/correction/dart/make_final.dart';
 import 'package:analysis_server/src/services/correction/dart/make_variable_not_final.dart';
 import 'package:analysis_server/src/services/correction/dart/move_type_arguments_to_class.dart';
+import 'package:analysis_server/src/services/correction/dart/organize_imports.dart';
 import 'package:analysis_server/src/services/correction/dart/qualify_reference.dart';
 import 'package:analysis_server/src/services/correction/dart/remove_annotation.dart';
 import 'package:analysis_server/src/services/correction/dart/remove_argument.dart';
@@ -132,7 +133,6 @@
 import 'package:analysis_server/src/services/correction/dart/replace_with_tear_off.dart';
 import 'package:analysis_server/src/services/correction/dart/replace_with_var.dart';
 import 'package:analysis_server/src/services/correction/dart/sort_child_property_last.dart';
-import 'package:analysis_server/src/services/correction/dart/sort_directives.dart';
 import 'package:analysis_server/src/services/correction/dart/update_sdk_constraints.dart';
 import 'package:analysis_server/src/services/correction/dart/use_const.dart';
 import 'package:analysis_server/src/services/correction/dart/use_curly_braces.dart';
@@ -323,7 +323,7 @@
       AddDiagnosticPropertyReference.newInstance,
     ],
     LintNames.directives_ordering: [
-      SortDirectives.newInstance,
+      OrganizeImports.newInstance,
     ],
     LintNames.empty_catches: [
       RemoveEmptyCatch.newInstance,
@@ -383,6 +383,9 @@
     LintNames.prefer_final_fields: [
       MakeFinal.newInstance,
     ],
+    LintNames.prefer_final_in_for_each: [
+      MakeFinal.newInstance,
+    ],
     LintNames.prefer_final_locals: [
       MakeFinal.newInstance,
     ],
diff --git a/pkg/analysis_server/lib/src/services/correction/organize_directives.dart b/pkg/analysis_server/lib/src/services/correction/organize_directives.dart
deleted file mode 100644
index aefd3cd..0000000
--- a/pkg/analysis_server/lib/src/services/correction/organize_directives.dart
+++ /dev/null
@@ -1,243 +0,0 @@
-// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-import 'package:analysis_server/src/utilities/strings.dart';
-import 'package:analyzer/dart/ast/ast.dart';
-import 'package:analyzer/dart/ast/token.dart';
-import 'package:analyzer/error/error.dart';
-import 'package:analyzer/src/error/codes.dart';
-import 'package:analyzer_plugin/protocol/protocol_common.dart'
-    hide AnalysisError, Element;
-
-/// Organizer of directives in the [unit].
-class DirectiveOrganizer {
-  final String initialCode;
-  final CompilationUnit unit;
-  final List<AnalysisError> errors;
-  final bool removeUnused;
-
-  String code;
-  String endOfLine;
-  bool hasUnresolvedIdentifierError;
-
-  DirectiveOrganizer(this.initialCode, this.unit, this.errors,
-      {this.removeUnused = true}) {
-    code = initialCode;
-    endOfLine = getEOL(code);
-    hasUnresolvedIdentifierError = errors.any((error) {
-      return error.errorCode.isUnresolvedIdentifier;
-    });
-  }
-
-  /// Return the [SourceEdit]s that organize directives in the [unit].
-  List<SourceEdit> organize() {
-    _organizeDirectives();
-    // prepare edits
-    var edits = <SourceEdit>[];
-    if (code != initialCode) {
-      var suffixLength = findCommonSuffix(initialCode, code);
-      var edit = SourceEdit(0, initialCode.length - suffixLength,
-          code.substring(0, code.length - suffixLength));
-      edits.add(edit);
-    }
-    return edits;
-  }
-
-  bool _isUnusedImport(UriBasedDirective directive) {
-    for (var error in errors) {
-      if ((error.errorCode == HintCode.DUPLICATE_IMPORT ||
-              error.errorCode == HintCode.UNUSED_IMPORT) &&
-          directive.uri.offset == error.offset) {
-        return true;
-      }
-    }
-    return false;
-  }
-
-  /// Organize all [Directive]s.
-  void _organizeDirectives() {
-    var lineInfo = unit.lineInfo;
-    var directives = <_DirectiveInfo>[];
-    for (var directive in unit.directives) {
-      if (directive is UriBasedDirective) {
-        var priority = getDirectivePriority(directive);
-        if (priority != null) {
-          var offset = directive.offset;
-
-          var end = directive.end;
-          var line = lineInfo.getLocation(end).lineNumber;
-          Token comment = directive.endToken.next.precedingComments;
-          while (comment != null) {
-            if (lineInfo.getLocation(comment.offset).lineNumber == line) {
-              end = comment.end;
-            }
-            comment = comment.next;
-          }
-
-          var text = code.substring(offset, end);
-          var uriContent = directive.uri.stringValue;
-          directives.add(
-            _DirectiveInfo(
-              directive,
-              priority,
-              uriContent,
-              offset,
-              end,
-              text,
-            ),
-          );
-        }
-      }
-    }
-    // nothing to do
-    if (directives.isEmpty) {
-      return;
-    }
-    var firstDirectiveOffset = directives.first.offset;
-    var lastDirectiveEnd = directives.last.end;
-    // sort
-    directives.sort();
-    // append directives with grouping
-    String directivesCode;
-    {
-      var sb = StringBuffer();
-      _DirectivePriority currentPriority;
-      for (var directiveInfo in directives) {
-        if (!hasUnresolvedIdentifierError) {
-          var directive = directiveInfo.directive;
-          if (removeUnused && _isUnusedImport(directive)) {
-            continue;
-          }
-        }
-        if (currentPriority != directiveInfo.priority) {
-          if (sb.length != 0) {
-            sb.write(endOfLine);
-          }
-          currentPriority = directiveInfo.priority;
-        }
-        sb.write(directiveInfo.text);
-        sb.write(endOfLine);
-      }
-      directivesCode = sb.toString();
-      directivesCode = directivesCode.trimRight();
-    }
-    // prepare code
-    var beforeDirectives = code.substring(0, firstDirectiveOffset);
-    var afterDirectives = code.substring(lastDirectiveEnd);
-    code = beforeDirectives + directivesCode + afterDirectives;
-  }
-
-  static _DirectivePriority getDirectivePriority(UriBasedDirective directive) {
-    var uriContent = directive.uri.stringValue;
-    if (directive is ImportDirective) {
-      if (uriContent.startsWith('dart:')) {
-        return _DirectivePriority.IMPORT_SDK;
-      } else if (uriContent.startsWith('package:')) {
-        return _DirectivePriority.IMPORT_PKG;
-      } else if (uriContent.contains('://')) {
-        return _DirectivePriority.IMPORT_OTHER;
-      } else {
-        return _DirectivePriority.IMPORT_REL;
-      }
-    }
-    if (directive is ExportDirective) {
-      if (uriContent.startsWith('dart:')) {
-        return _DirectivePriority.EXPORT_SDK;
-      } else if (uriContent.startsWith('package:')) {
-        return _DirectivePriority.EXPORT_PKG;
-      } else if (uriContent.contains('://')) {
-        return _DirectivePriority.EXPORT_OTHER;
-      } else {
-        return _DirectivePriority.EXPORT_REL;
-      }
-    }
-    if (directive is PartDirective) {
-      return _DirectivePriority.PART;
-    }
-    return null;
-  }
-
-  /// Return the EOL to use for [code].
-  static String getEOL(String code) {
-    if (code.contains('\r\n')) {
-      return '\r\n';
-    } else {
-      return '\n';
-    }
-  }
-}
-
-class _DirectiveInfo implements Comparable<_DirectiveInfo> {
-  final UriBasedDirective directive;
-  final _DirectivePriority priority;
-  final String uri;
-
-  /// The offset of the first token, usually the keyword.
-  final int offset;
-
-  /// The offset after the least token, including the end-of-line comment.
-  final int end;
-
-  /// The text between [offset] and [end].
-  final String text;
-
-  _DirectiveInfo(
-    this.directive,
-    this.priority,
-    this.uri,
-    this.offset,
-    this.end,
-    this.text,
-  );
-
-  @override
-  int compareTo(_DirectiveInfo other) {
-    if (priority == other.priority) {
-      return _compareUri(uri, other.uri);
-    }
-    return priority.ordinal - other.priority.ordinal;
-  }
-
-  @override
-  String toString() => '(priority=$priority; text=$text)';
-
-  static int _compareUri(String a, String b) {
-    var aList = _splitUri(a);
-    var bList = _splitUri(b);
-    int result;
-    if ((result = aList[0].compareTo(bList[0])) != 0) return result;
-    if ((result = aList[1].compareTo(bList[1])) != 0) return result;
-    return 0;
-  }
-
-  /// Split the given [uri] like `package:some.name/and/path.dart` into a list
-  /// like `[package:some.name, and/path.dart]`.
-  static List<String> _splitUri(String uri) {
-    var index = uri.indexOf('/');
-    if (index == -1) {
-      return <String>[uri, ''];
-    }
-    return <String>[uri.substring(0, index), uri.substring(index + 1)];
-  }
-}
-
-class _DirectivePriority {
-  static const IMPORT_SDK = _DirectivePriority('IMPORT_SDK', 0);
-  static const IMPORT_PKG = _DirectivePriority('IMPORT_PKG', 1);
-  static const IMPORT_OTHER = _DirectivePriority('IMPORT_OTHER', 2);
-  static const IMPORT_REL = _DirectivePriority('IMPORT_REL', 3);
-  static const EXPORT_SDK = _DirectivePriority('EXPORT_SDK', 4);
-  static const EXPORT_PKG = _DirectivePriority('EXPORT_PKG', 5);
-  static const EXPORT_OTHER = _DirectivePriority('EXPORT_OTHER', 6);
-  static const EXPORT_REL = _DirectivePriority('EXPORT_REL', 7);
-  static const PART = _DirectivePriority('PART', 8);
-
-  final String name;
-  final int ordinal;
-
-  const _DirectivePriority(this.name, this.ordinal);
-
-  @override
-  String toString() => name;
-}
diff --git a/pkg/analysis_server/lib/src/services/correction/organize_imports.dart b/pkg/analysis_server/lib/src/services/correction/organize_imports.dart
new file mode 100644
index 0000000..6b0184e
--- /dev/null
+++ b/pkg/analysis_server/lib/src/services/correction/organize_imports.dart
@@ -0,0 +1,243 @@
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analysis_server/src/utilities/strings.dart';
+import 'package:analyzer/dart/ast/ast.dart';
+import 'package:analyzer/dart/ast/token.dart';
+import 'package:analyzer/error/error.dart';
+import 'package:analyzer/src/error/codes.dart';
+import 'package:analyzer_plugin/protocol/protocol_common.dart'
+    hide AnalysisError, Element;
+
+/// Organizer of imports (and other directives) in the [unit].
+class ImportOrganizer {
+  final String initialCode;
+  final CompilationUnit unit;
+  final List<AnalysisError> errors;
+  final bool removeUnused;
+
+  String code;
+  String endOfLine;
+  bool hasUnresolvedIdentifierError;
+
+  ImportOrganizer(this.initialCode, this.unit, this.errors,
+      {this.removeUnused = true}) {
+    code = initialCode;
+    endOfLine = getEOL(code);
+    hasUnresolvedIdentifierError = errors.any((error) {
+      return error.errorCode.isUnresolvedIdentifier;
+    });
+  }
+
+  /// Return the [SourceEdit]s that organize imports in the [unit].
+  List<SourceEdit> organize() {
+    _organizeDirectives();
+    // prepare edits
+    var edits = <SourceEdit>[];
+    if (code != initialCode) {
+      var suffixLength = findCommonSuffix(initialCode, code);
+      var edit = SourceEdit(0, initialCode.length - suffixLength,
+          code.substring(0, code.length - suffixLength));
+      edits.add(edit);
+    }
+    return edits;
+  }
+
+  bool _isUnusedImport(UriBasedDirective directive) {
+    for (var error in errors) {
+      if ((error.errorCode == HintCode.DUPLICATE_IMPORT ||
+              error.errorCode == HintCode.UNUSED_IMPORT) &&
+          directive.uri.offset == error.offset) {
+        return true;
+      }
+    }
+    return false;
+  }
+
+  /// Organize all [Directive]s.
+  void _organizeDirectives() {
+    var lineInfo = unit.lineInfo;
+    var directives = <_DirectiveInfo>[];
+    for (var directive in unit.directives) {
+      if (directive is UriBasedDirective) {
+        var priority = getDirectivePriority(directive);
+        if (priority != null) {
+          var offset = directive.offset;
+
+          var end = directive.end;
+          var line = lineInfo.getLocation(end).lineNumber;
+          Token comment = directive.endToken.next.precedingComments;
+          while (comment != null) {
+            if (lineInfo.getLocation(comment.offset).lineNumber == line) {
+              end = comment.end;
+            }
+            comment = comment.next;
+          }
+
+          var text = code.substring(offset, end);
+          var uriContent = directive.uri.stringValue;
+          directives.add(
+            _DirectiveInfo(
+              directive,
+              priority,
+              uriContent,
+              offset,
+              end,
+              text,
+            ),
+          );
+        }
+      }
+    }
+    // nothing to do
+    if (directives.isEmpty) {
+      return;
+    }
+    var firstDirectiveOffset = directives.first.offset;
+    var lastDirectiveEnd = directives.last.end;
+    // sort
+    directives.sort();
+    // append directives with grouping
+    String directivesCode;
+    {
+      var sb = StringBuffer();
+      _DirectivePriority currentPriority;
+      for (var directiveInfo in directives) {
+        if (!hasUnresolvedIdentifierError) {
+          var directive = directiveInfo.directive;
+          if (removeUnused && _isUnusedImport(directive)) {
+            continue;
+          }
+        }
+        if (currentPriority != directiveInfo.priority) {
+          if (sb.length != 0) {
+            sb.write(endOfLine);
+          }
+          currentPriority = directiveInfo.priority;
+        }
+        sb.write(directiveInfo.text);
+        sb.write(endOfLine);
+      }
+      directivesCode = sb.toString();
+      directivesCode = directivesCode.trimRight();
+    }
+    // prepare code
+    var beforeDirectives = code.substring(0, firstDirectiveOffset);
+    var afterDirectives = code.substring(lastDirectiveEnd);
+    code = beforeDirectives + directivesCode + afterDirectives;
+  }
+
+  static _DirectivePriority getDirectivePriority(UriBasedDirective directive) {
+    var uriContent = directive.uri.stringValue;
+    if (directive is ImportDirective) {
+      if (uriContent.startsWith('dart:')) {
+        return _DirectivePriority.IMPORT_SDK;
+      } else if (uriContent.startsWith('package:')) {
+        return _DirectivePriority.IMPORT_PKG;
+      } else if (uriContent.contains('://')) {
+        return _DirectivePriority.IMPORT_OTHER;
+      } else {
+        return _DirectivePriority.IMPORT_REL;
+      }
+    }
+    if (directive is ExportDirective) {
+      if (uriContent.startsWith('dart:')) {
+        return _DirectivePriority.EXPORT_SDK;
+      } else if (uriContent.startsWith('package:')) {
+        return _DirectivePriority.EXPORT_PKG;
+      } else if (uriContent.contains('://')) {
+        return _DirectivePriority.EXPORT_OTHER;
+      } else {
+        return _DirectivePriority.EXPORT_REL;
+      }
+    }
+    if (directive is PartDirective) {
+      return _DirectivePriority.PART;
+    }
+    return null;
+  }
+
+  /// Return the EOL to use for [code].
+  static String getEOL(String code) {
+    if (code.contains('\r\n')) {
+      return '\r\n';
+    } else {
+      return '\n';
+    }
+  }
+}
+
+class _DirectiveInfo implements Comparable<_DirectiveInfo> {
+  final UriBasedDirective directive;
+  final _DirectivePriority priority;
+  final String uri;
+
+  /// The offset of the first token, usually the keyword.
+  final int offset;
+
+  /// The offset after the least token, including the end-of-line comment.
+  final int end;
+
+  /// The text between [offset] and [end].
+  final String text;
+
+  _DirectiveInfo(
+    this.directive,
+    this.priority,
+    this.uri,
+    this.offset,
+    this.end,
+    this.text,
+  );
+
+  @override
+  int compareTo(_DirectiveInfo other) {
+    if (priority == other.priority) {
+      return _compareUri(uri, other.uri);
+    }
+    return priority.ordinal - other.priority.ordinal;
+  }
+
+  @override
+  String toString() => '(priority=$priority; text=$text)';
+
+  static int _compareUri(String a, String b) {
+    var aList = _splitUri(a);
+    var bList = _splitUri(b);
+    int result;
+    if ((result = aList[0].compareTo(bList[0])) != 0) return result;
+    if ((result = aList[1].compareTo(bList[1])) != 0) return result;
+    return 0;
+  }
+
+  /// Split the given [uri] like `package:some.name/and/path.dart` into a list
+  /// like `[package:some.name, and/path.dart]`.
+  static List<String> _splitUri(String uri) {
+    var index = uri.indexOf('/');
+    if (index == -1) {
+      return <String>[uri, ''];
+    }
+    return <String>[uri.substring(0, index), uri.substring(index + 1)];
+  }
+}
+
+class _DirectivePriority {
+  static const IMPORT_SDK = _DirectivePriority('IMPORT_SDK', 0);
+  static const IMPORT_PKG = _DirectivePriority('IMPORT_PKG', 1);
+  static const IMPORT_OTHER = _DirectivePriority('IMPORT_OTHER', 2);
+  static const IMPORT_REL = _DirectivePriority('IMPORT_REL', 3);
+  static const EXPORT_SDK = _DirectivePriority('EXPORT_SDK', 4);
+  static const EXPORT_PKG = _DirectivePriority('EXPORT_PKG', 5);
+  static const EXPORT_OTHER = _DirectivePriority('EXPORT_OTHER', 6);
+  static const EXPORT_REL = _DirectivePriority('EXPORT_REL', 7);
+  static const PART = _DirectivePriority('PART', 8);
+
+  final String name;
+  final int ordinal;
+
+  const _DirectivePriority(this.name, this.ordinal);
+
+  @override
+  String toString() => name;
+}
diff --git a/pkg/analysis_server/lib/src/services/linter/lint_names.dart b/pkg/analysis_server/lib/src/services/linter/lint_names.dart
index 804b6b5..4b2883f 100644
--- a/pkg/analysis_server/lib/src/services/linter/lint_names.dart
+++ b/pkg/analysis_server/lib/src/services/linter/lint_names.dart
@@ -59,6 +59,7 @@
   static const String prefer_expression_function_bodies =
       'prefer_expression_function_bodies';
   static const String prefer_final_fields = 'prefer_final_fields';
+  static const String prefer_final_in_for_each = 'prefer_final_in_for_each';
   static const String prefer_final_locals = 'prefer_final_locals';
   static const String prefer_for_elements_to_map_fromIterable =
       'prefer_for_elements_to_map_fromIterable';
diff --git a/pkg/analysis_server/lib/src/services/refactoring/extract_method.dart b/pkg/analysis_server/lib/src/services/refactoring/extract_method.dart
index 8aa4a78..75a526b 100644
--- a/pkg/analysis_server/lib/src/services/refactoring/extract_method.dart
+++ b/pkg/analysis_server/lib/src/services/refactoring/extract_method.dart
@@ -26,8 +26,8 @@
 import 'package:analyzer/dart/element/type_system.dart';
 import 'package:analyzer/src/dart/analysis/session_helper.dart';
 import 'package:analyzer/src/dart/ast/utilities.dart';
+import 'package:analyzer/src/dart/resolver/exit_detector.dart';
 import 'package:analyzer/src/generated/java_core.dart';
-import 'package:analyzer/src/generated/resolver.dart' show ExitDetector;
 import 'package:analyzer/src/generated/source.dart';
 import 'package:analyzer_plugin/utilities/range_factory.dart';
 
diff --git a/pkg/analysis_server/lib/src/status/diagnostics.dart b/pkg/analysis_server/lib/src/status/diagnostics.dart
index e0c20bb..38470ac 100644
--- a/pkg/analysis_server/lib/src/status/diagnostics.dart
+++ b/pkg/analysis_server/lib/src/status/diagnostics.dart
@@ -215,7 +215,7 @@
       var shortName = pathContext.basename(completion.path);
       buf.writeln('<tr>'
           '<td class="pre right">${printMilliseconds(completion.elapsedInMilliseconds)}</td>'
-          '<td class="right">${completion.suggestionCount}</td>'
+          '<td class="right">${completion.suggestionCountStr}</td>'
           '<td>${escape(shortName)}</td>'
           '<td><code>${escape(completion.snippet)}</code></td>'
           '</tr>');
@@ -516,10 +516,6 @@
     if (sdkOptions != null) {
       h3('SDK analysis options');
       p(describe(sdkOptions), raw: true);
-
-      if (sdk is FolderBasedDartSdk) {
-        p(writeOption('Use summaries', sdk.useSummary), raw: true);
-      }
     }
 
     buf.writeln('</div>');
diff --git a/pkg/analysis_server/test/analysis_abstract.dart b/pkg/analysis_server/test/analysis_abstract.dart
index f740aa1..6603372 100644
--- a/pkg/analysis_server/test/analysis_abstract.dart
+++ b/pkg/analysis_server/test/analysis_abstract.dart
@@ -121,7 +121,7 @@
         serverChannel,
         resourceProvider,
         options,
-        DartSdkManager(resourceProvider.convertPath('/sdk'), true),
+        DartSdkManager(resourceProvider.convertPath('/sdk')),
         CrashReportingAttachmentsBuilder.empty,
         InstrumentationService.NULL_SERVICE);
   }
diff --git a/pkg/analysis_server/test/analysis_server_test.dart b/pkg/analysis_server/test/analysis_server_test.dart
index 64a0fae..e0bd3d6 100644
--- a/pkg/analysis_server/test/analysis_server_test.dart
+++ b/pkg/analysis_server/test/analysis_server_test.dart
@@ -84,7 +84,7 @@
         channel,
         resourceProvider,
         AnalysisServerOptions(),
-        DartSdkManager(convertPath('/sdk'), false),
+        DartSdkManager(convertPath('/sdk')),
         CrashReportingAttachmentsBuilder.empty,
         InstrumentationService.NULL_SERVICE);
   }
diff --git a/pkg/analysis_server/test/client/impl/abstract_client.dart b/pkg/analysis_server/test/client/impl/abstract_client.dart
index 0c82e50..f5ea242 100644
--- a/pkg/analysis_server/test/client/impl/abstract_client.dart
+++ b/pkg/analysis_server/test/client/impl/abstract_client.dart
@@ -111,7 +111,7 @@
         serverChannel,
         resourceProvider,
         serverOptions,
-        DartSdkManager(sdkPath, true),
+        DartSdkManager(sdkPath),
         CrashReportingAttachmentsBuilder.empty,
         InstrumentationService.NULL_SERVICE);
   }
diff --git a/pkg/analysis_server/test/context_manager_test.dart b/pkg/analysis_server/test/context_manager_test.dart
index b8e4a99..51e813f 100644
--- a/pkg/analysis_server/test/context_manager_test.dart
+++ b/pkg/analysis_server/test/context_manager_test.dart
@@ -1591,7 +1591,7 @@
     resourceProvider.newFolder(projPath);
     // Create an SDK in the mock file system.
     MockSdk(resourceProvider: resourceProvider);
-    var sdkManager = DartSdkManager(convertPath('/sdk'), true);
+    var sdkManager = DartSdkManager(convertPath('/sdk'));
     manager = ContextManagerImpl(
         resourceProvider,
         sdkManager,
@@ -2290,7 +2290,7 @@
     expect(contextRoot.root, path);
     currentContextTimestamps[path] = now;
 
-    var builder = createContextBuilder(folder, options, useSummaries: true);
+    var builder = createContextBuilder(folder, options);
     builder.analysisDriverScheduler = scheduler;
     builder.byteStore = MemoryByteStore();
     builder.performanceLog = logger;
@@ -2347,8 +2347,7 @@
   }
 
   @override
-  ContextBuilder createContextBuilder(Folder folder, AnalysisOptions options,
-      {bool useSummaries = false}) {
+  ContextBuilder createContextBuilder(Folder folder, AnalysisOptions options) {
     var builderOptions = ContextBuilderOptions();
     builderOptions.defaultOptions = options;
     var builder = ContextBuilder(resourceProvider, sdkManager, null,
diff --git a/pkg/analysis_server/test/domain_analysis_test.dart b/pkg/analysis_server/test/domain_analysis_test.dart
index 0d9c790..45b57b3 100644
--- a/pkg/analysis_server/test/domain_analysis_test.dart
+++ b/pkg/analysis_server/test/domain_analysis_test.dart
@@ -363,7 +363,7 @@
         serverChannel,
         resourceProvider,
         AnalysisServerOptions(),
-        DartSdkManager(convertPath('/sdk'), false),
+        DartSdkManager(convertPath('/sdk')),
         CrashReportingAttachmentsBuilder.empty,
         InstrumentationService.NULL_SERVICE);
     handler = AnalysisDomainHandler(server);
diff --git a/pkg/analysis_server/test/domain_execution_test.dart b/pkg/analysis_server/test/domain_execution_test.dart
index 8532220..72b7b5b 100644
--- a/pkg/analysis_server/test/domain_execution_test.dart
+++ b/pkg/analysis_server/test/domain_execution_test.dart
@@ -31,7 +31,7 @@
           MockServerChannel(),
           provider,
           AnalysisServerOptions(),
-          DartSdkManager('', false),
+          DartSdkManager(''),
           CrashReportingAttachmentsBuilder.empty,
           InstrumentationService.NULL_SERVICE);
       handler = ExecutionDomainHandler(server);
diff --git a/pkg/analysis_server/test/domain_server_test.dart b/pkg/analysis_server/test/domain_server_test.dart
index cb73ed3..1ac94cc 100644
--- a/pkg/analysis_server/test/domain_server_test.dart
+++ b/pkg/analysis_server/test/domain_server_test.dart
@@ -29,7 +29,7 @@
         serverChannel,
         resourceProvider,
         AnalysisServerOptions(),
-        DartSdkManager('', false),
+        DartSdkManager(''),
         CrashReportingAttachmentsBuilder.empty,
         InstrumentationService.NULL_SERVICE);
     handler = ServerDomainHandler(server);
diff --git a/pkg/analysis_server/test/lsp/code_actions_fixes_test.dart b/pkg/analysis_server/test/lsp/code_actions_fixes_test.dart
index 3c1d73b..ac4a575 100644
--- a/pkg/analysis_server/test/lsp/code_actions_fixes_test.dart
+++ b/pkg/analysis_server/test/lsp/code_actions_fixes_test.dart
@@ -3,6 +3,7 @@
 // BSD-style license that can be found in the LICENSE file.
 
 import 'package:analysis_server/lsp_protocol/protocol_generated.dart';
+import 'package:linter/src/rules.dart';
 import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
@@ -146,4 +147,52 @@
         await getCodeActions(pubspecFileUri.toString(), range: startOfDocRange);
     expect(codeActions, isEmpty);
   }
+
+  Future<void> test_organizeImportsFix_namedOrganizeImports() async {
+    registerLintRules();
+    newFile(analysisOptionsPath, content: '''
+linter:
+  rules:
+    - directives_ordering
+    ''');
+
+    // This code should get a fix to sort the imports.
+    const content = '''
+import 'dart:io';
+[[import 'dart:async']];
+
+Completer a;
+ProcessInfo b;
+    ''';
+
+    const expectedContent = '''
+import 'dart:async';
+import 'dart:io';
+
+Completer a;
+ProcessInfo b;
+    ''';
+    await newFile(mainFilePath, content: withoutMarkers(content));
+    await initialize(
+      textDocumentCapabilities: withCodeActionKinds(
+          emptyTextDocumentClientCapabilities, [CodeActionKind.QuickFix]),
+    );
+
+    final codeActions = await getCodeActions(mainFileUri.toString(),
+        range: rangeFromMarkers(content));
+    final fixAction = findEditAction(codeActions,
+        CodeActionKind('quickfix.organize.imports'), 'Organize Imports');
+
+    // Ensure the edit came back, and using changes.
+    expect(fixAction, isNotNull);
+    expect(fixAction.edit.changes, isNotNull);
+    expect(fixAction.edit.documentChanges, isNull);
+
+    // Ensure applying the changes will give us the expected content.
+    final contents = {
+      mainFilePath: withoutMarkers(content),
+    };
+    applyChanges(contents, fixAction.edit.changes);
+    expect(contents[mainFilePath], equals(expectedContent));
+  }
 }
diff --git a/pkg/analysis_server/test/lsp/rename_test.dart b/pkg/analysis_server/test/lsp/rename_test.dart
index 54a4f45..5c1127b 100644
--- a/pkg/analysis_server/test/lsp/rename_test.dart
+++ b/pkg/analysis_server/test/lsp/rename_test.dart
@@ -248,6 +248,16 @@
     expect(error.message, contains('already declares class with name'));
   }
 
+  Future<void> test_rename_rejectedForSameName() async {
+    const content = '''
+    class My^Class {}
+    ''';
+    final error = await _test_rename_failure(content, 'MyClass');
+    expect(error.code, equals(ServerErrorCodes.RenameNotValid));
+    expect(error.message,
+        contains('new name must be different than the current name'));
+  }
+
   Future<void> test_rename_rejectedForStaleDocument() async {
     const content = '''
     class MyClass {}
@@ -259,6 +269,22 @@
     expect(error.message, contains('Document was modified'));
   }
 
+  Future<void> test_rename_rejectionsDoNotCrashServer() async {
+    // Checks that a rename failure does not stop the server from responding
+    // as was previously the case in https://github.com/dart-lang/sdk/issues/42573
+    // because the error code was duplicated/reused for ClientServerInconsistentState.
+    const content = '''
+    /// Test Class
+    class My^Class {}
+    ''';
+    final error = await _test_rename_failure(content, 'MyClass');
+    expect(error.code, isNotNull);
+
+    // Send any other request to ensure the server is still responsive.
+    final hover = await getHover(mainFileUri, positionFromMarker(content));
+    expect(hover?.contents, isNotNull);
+  }
+
   Future<void> test_rename_sdkClass() async {
     const content = '''
     final a = new [[Ob^ject]]();
diff --git a/pkg/analysis_server/test/lsp/server_abstract.dart b/pkg/analysis_server/test/lsp/server_abstract.dart
index bbf3ca1..a00a44e 100644
--- a/pkg/analysis_server/test/lsp/server_abstract.dart
+++ b/pkg/analysis_server/test/lsp/server_abstract.dart
@@ -118,7 +118,7 @@
         channel,
         resourceProvider,
         AnalysisServerOptions(),
-        DartSdkManager(convertPath('/sdk'), false),
+        DartSdkManager(convertPath('/sdk')),
         CrashReportingAttachmentsBuilder.empty,
         InstrumentationService.NULL_SERVICE);
     server.pluginManager = pluginManager;
diff --git a/pkg/analysis_server/test/services/completion/dart/completion_contributor_util.dart b/pkg/analysis_server/test/services/completion/dart/completion_contributor_util.dart
index cdb2c73..2242171 100644
--- a/pkg/analysis_server/test/services/completion/dart/completion_contributor_util.dart
+++ b/pkg/analysis_server/test/services/completion/dart/completion_contributor_util.dart
@@ -607,17 +607,21 @@
     var baseRequest = CompletionRequestImpl(resolveResult, completionOffset,
         useNewRelevance, CompletionPerformance());
 
-    // Build the request
-    var request =
-        await DartCompletionRequestImpl.from(baseRequest, dartdocInfo);
+    return await baseRequest.performance.runRequestOperation(
+      (performance) async {
+        // Build the request
+        var request = await DartCompletionRequestImpl.from(
+            performance, baseRequest, dartdocInfo);
 
-    var range = request.target.computeReplacementRange(request.offset);
-    replacementOffset = range.offset;
-    replacementLength = range.length;
+        var range = request.target.computeReplacementRange(request.offset);
+        replacementOffset = range.offset;
+        replacementLength = range.length;
 
-    // Request completions
-    suggestions = await computeContributedSuggestions(request);
-    expect(suggestions, isNotNull, reason: 'expected suggestions');
+        // Request completions
+        suggestions = await computeContributedSuggestions(request);
+        expect(suggestions, isNotNull, reason: 'expected suggestions');
+      },
+    );
   }
 
   void failedCompletion(String message,
diff --git a/pkg/analysis_server/test/services/completion/dart/completion_manager_test.dart b/pkg/analysis_server/test/services/completion/dart/completion_manager_test.dart
index ed776f5..c77e7ce 100644
--- a/pkg/analysis_server/test/services/completion/dart/completion_manager_test.dart
+++ b/pkg/analysis_server/test/services/completion/dart/completion_manager_test.dart
@@ -51,12 +51,15 @@
         completionOffset,
         false,
         CompletionPerformance());
-    var requestCompleter = Completer<DartCompletionRequest>();
-    DartCompletionRequestImpl.from(baseRequest, DartdocDirectiveInfo())
-        .then((DartCompletionRequest request) {
-      requestCompleter.complete(request);
+    await baseRequest.performance.runRequestOperation((performance) async {
+      var requestCompleter = Completer<DartCompletionRequest>();
+      DartCompletionRequestImpl.from(
+              performance, baseRequest, DartdocDirectiveInfo())
+          .then((DartCompletionRequest request) {
+        requestCompleter.complete(request);
+      });
+      request = await performAnalysis(200, requestCompleter);
     });
-    request = await performAnalysis(200, requestCompleter);
 
     var directives = request.target.unit.directives;
 
diff --git a/pkg/analysis_server/test/services/completion/dart/local_reference_contributor_test.dart b/pkg/analysis_server/test/services/completion/dart/local_reference_contributor_test.dart
index b56c10c..475f6e5 100644
--- a/pkg/analysis_server/test/services/completion/dart/local_reference_contributor_test.dart
+++ b/pkg/analysis_server/test/services/completion/dart/local_reference_contributor_test.dart
@@ -2995,6 +2995,32 @@
     assertNotSuggested('String');
   }
 
+  @failingTest
+  Future<void> test_ForEachStatement_statement_typed() async {
+    // Statement  ForEachStatement
+    addTestSource('main(args) {for (int foo in bar) ^}');
+    await computeSuggestions();
+
+    expect(replacementOffset, completionOffset);
+    expect(replacementLength, 0);
+    assertSuggestParameter('args', null);
+    assertSuggestLocalVariable('foo', 'int');
+    assertNotSuggested('Object');
+  }
+
+  @failingTest
+  Future<void> test_ForEachStatement_statement_untyped() async {
+    // Statement  ForEachStatement
+    addTestSource('main(args) {for (var foo in bar) ^}');
+    await computeSuggestions();
+
+    expect(replacementOffset, completionOffset);
+    expect(replacementLength, 0);
+    assertSuggestParameter('args', null);
+    assertSuggestLocalVariable('foo', null);
+    assertNotSuggested('Object');
+  }
+
   Future<void> test_FormalParameterList() async {
     // FormalParameterList MethodDeclaration
     addTestSource('''
diff --git a/pkg/analysis_server/test/services/completion/dart/relevance/local_variable_relevance_test.dart b/pkg/analysis_server/test/services/completion/dart/relevance/local_variable_relevance_test.dart
new file mode 100644
index 0000000..722a9db
--- /dev/null
+++ b/pkg/analysis_server/test/services/completion/dart/relevance/local_variable_relevance_test.dart
@@ -0,0 +1,43 @@
+// Copyright (c) 2020, the Dart project authors. Please see the AUTHORS file
+// for 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_plugin/protocol/protocol_common.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'completion_relevance.dart';
+
+void main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(LocalVariableRelevanceTest);
+  });
+}
+
+@reflectiveTest
+class LocalVariableRelevanceTest extends CompletionRelevanceTest {
+  Future<void> test_localVariables() async {
+    await addTestFile('''
+int f() {
+  var a = 0;
+  var b = 1;
+  var c = 2;
+  var d = ^;
+}
+''');
+
+    assertOrder([
+      suggestionWith(
+          completion: 'c',
+          element: ElementKind.LOCAL_VARIABLE,
+          kind: CompletionSuggestionKind.INVOCATION),
+      suggestionWith(
+          completion: 'b',
+          element: ElementKind.LOCAL_VARIABLE,
+          kind: CompletionSuggestionKind.INVOCATION),
+      suggestionWith(
+          completion: 'a',
+          element: ElementKind.LOCAL_VARIABLE,
+          kind: CompletionSuggestionKind.INVOCATION),
+    ]);
+  }
+}
diff --git a/pkg/analysis_server/test/services/completion/dart/relevance/test_all.dart b/pkg/analysis_server/test/services/completion/dart/relevance/test_all.dart
index 372bafa..cf8fe01 100644
--- a/pkg/analysis_server/test/services/completion/dart/relevance/test_all.dart
+++ b/pkg/analysis_server/test/services/completion/dart/relevance/test_all.dart
@@ -7,6 +7,7 @@
 import 'bool_assignment_relevance_test.dart' as bool_assignments;
 import 'deprecated_member_relevance_test.dart' as deprecated_members;
 import 'instance_member_relevance_test.dart' as instance_member_relevance;
+import 'local_variable_relevance_test.dart' as local_variable_relevance;
 import 'named_argument_relevance_test.dart' as named_argument_relevance;
 import 'non_type_member_relevance_test.dart' as non_type_member_relevance;
 import 'static_member_relevance_test.dart' as static_member_relevance;
@@ -16,6 +17,7 @@
     bool_assignments.main();
     deprecated_members.main();
     instance_member_relevance.main();
+    local_variable_relevance.main();
     named_argument_relevance.main();
     non_type_member_relevance.main();
     static_member_relevance.main();
diff --git a/pkg/analysis_server/test/services/correction/organize_directives_test.dart b/pkg/analysis_server/test/services/correction/organize_directives_test.dart
index 78175d0..2cfde40 100644
--- a/pkg/analysis_server/test/services/correction/organize_directives_test.dart
+++ b/pkg/analysis_server/test/services/correction/organize_directives_test.dart
@@ -4,7 +4,7 @@
 
 import 'dart:async';
 
-import 'package:analysis_server/src/services/correction/organize_directives.dart';
+import 'package:analysis_server/src/services/correction/organize_imports.dart';
 import 'package:analyzer/error/error.dart';
 import 'package:analyzer_plugin/protocol/protocol_common.dart'
     hide AnalysisError;
@@ -315,7 +315,7 @@
   }
 
   void _assertOrganize(String expectedCode, {bool removeUnused = false}) {
-    var organizer = DirectiveOrganizer(testCode, testUnit, testErrors,
+    var organizer = ImportOrganizer(testCode, testUnit, testErrors,
         removeUnused: removeUnused);
     var edits = organizer.organize();
     var result = SourceEdit.applySequence(testCode, edits);
diff --git a/pkg/analysis_server/test/socket_server_test.dart b/pkg/analysis_server/test/socket_server_test.dart
index 260bf0b..c546b23 100644
--- a/pkg/analysis_server/test/socket_server_test.dart
+++ b/pkg/analysis_server/test/socket_server_test.dart
@@ -105,7 +105,7 @@
     final errorNotifier = ErrorNotifier();
     final server = SocketServer(
         AnalysisServerOptions(),
-        DartSdkManager('', false),
+        DartSdkManager(''),
         CrashReportingAttachmentsBuilder.empty,
         errorNotifier,
         null,
diff --git a/pkg/analysis_server/test/src/services/completion/dart/feature_computer_test.dart b/pkg/analysis_server/test/src/services/completion/dart/feature_computer_test.dart
index 6684dc5..fc8eba5 100644
--- a/pkg/analysis_server/test/src/services/completion/dart/feature_computer_test.dart
+++ b/pkg/analysis_server/test/src/services/completion/dart/feature_computer_test.dart
@@ -42,28 +42,86 @@
     }
   }
 
-  Future<void> test_argumentList_named() async {
+  Future<void> test_argumentList_named_afterColon() async {
     await assertContextType('''
 void f({int i, String s, bool b}) {}
-void g(int j) {
-  f(i:^);
-}
-''', 'int');
-  }
-
-  Future<void> test_argumentList_named2() async {
-    await assertContextType('''
-void f({int i, String s, bool b}) {}
-void g(int j) {
+void g() {
   f(s:^);
 }
 ''', 'String');
   }
 
+  Future<void> test_argumentList_named_afterColon_withSpace() async {
+    await assertContextType('''
+void f({int i, String s, bool b}) {}
+void g() {
+  f(s: ^);
+}
+''', 'String');
+  }
+
+  Future<void> test_argumentList_named_beforeColon() async {
+    await assertContextType('''
+void f({int i = 0}) {}
+void g() {
+  f(i^:);
+}
+''', null);
+  }
+
+  Future<void> test_argumentList_named_beforeLabel() async {
+    await assertContextType('''
+void f({int i = 0}) {}
+void g() {
+  f(^i:);
+}
+''', null);
+  }
+
+  Future<void>
+      test_argumentList_named_beforeLabel_hasPreviousParameter() async {
+    await assertContextType('''
+void f(int i, {String s = ''}) {}
+void g() {
+  f(^s:);
+}
+''', 'int');
+  }
+
+  Future<void>
+      test_argumentList_named_beforeLabel_hasPreviousParameter2() async {
+    await assertContextType('''
+void f(int i, {String s = ''}) {}
+void g() {
+  f(^ s:);
+}
+''', 'int');
+  }
+
+  Future<void> test_argumentList_named_unresolved_hasNamedParameters() async {
+    await assertContextType('''
+void f({int i}) {}
+
+void g() {
+  f(j: ^);
+}
+''', null);
+  }
+
+  Future<void> test_argumentList_named_unresolved_noNamedParameters() async {
+    await assertContextType('''
+void f() {}
+
+void g() {
+  f(j: ^);
+}
+''', null);
+  }
+
   Future<void> test_argumentList_named_with_requiredPositional() async {
     await assertContextType('''
 void f(String s, {int i}) {}
-void g(int j) {
+void g() {
   f('str', i: ^);
 }
 ''', 'int');
@@ -73,7 +131,7 @@
       test_argumentList_named_with_requiredPositional_defaultValue() async {
     await assertContextType('''
 void f(String s, {int i = 0}) {}
-void g(int j) {
+void g() {
   f('str', i: ^);
 }
 ''', 'int');
@@ -118,35 +176,54 @@
   Future<void> test_argumentList_positional() async {
     await assertContextType('''
 void f([int i]) {}
-void g(int j) {
-  f(i:^);
+void g() {
+  f(^);
 }
 ''', 'int');
   }
 
-  Future<void> test_argumentList_positional_completionInLabel() async {
+  Future<void> test_argumentList_positional_asNamed() async {
     await assertContextType('''
-void f([int i = 2]) {}
-void g(int j) {
-  f(^i:);
+void f([int i]) {}
+void g() {
+  f(i: ^);
 }
 ''', null);
   }
 
-  Future<void> test_argumentList_positional_completionInLabel2() async {
+  Future<void> test_argumentList_positional_asNamed_beforeColon() async {
     await assertContextType('''
-void f(String s, bool b, [int i = 2]) {}
-void g(int j) {
+void f(String s, bool b, [int i = 0]) {}
+void g() {
   f(i^:);
 }
 ''', null);
   }
 
+  Future<void> test_argumentList_positional_asNamed_beforeLabel() async {
+    await assertContextType('''
+void f([int i = 0]) {}
+void g() {
+  f(^i:);
+}
+''', 'int');
+  }
+
+  Future<void>
+      test_argumentList_positional_asNamed_beforeLabel_hasPreviousParameter() async {
+    await assertContextType('''
+void f(String s, [int i = 0]) {}
+void g() {
+  f(^i:);
+}
+''', 'String');
+  }
+
   Future<void> test_argumentList_positional_whitespace() async {
     await assertContextType('''
 void f([int i]) {}
-void g(int j) {
-  f(i:  ^  );
+void g() {
+  f(  ^  );
 }
 ''', 'int');
   }
@@ -154,8 +231,8 @@
   Future<void> test_argumentList_positional_with_requiredPositional() async {
     await assertContextType('''
 void f(String s, bool b, [int i]) {}
-void g(int j) {
-  f('', 3, i:^);
+void g() {
+  f('str', false, ^);
 }
 ''', 'int');
   }
@@ -164,17 +241,35 @@
       test_argumentList_positional_with_requiredPositional_defaultValue() async {
     await assertContextType('''
 void f(String s, bool b, [int i = 2]) {}
-void g(int j) {
-  f('', 3, i:^);
+void g() {
+  f('str', false, ^);
 }
 ''', 'int');
   }
 
+  Future<void> test_argumentList_requiredPositional_asNamed() async {
+    await assertContextType('''
+void f(int i, String str, bool b) {}
+void g() {
+  f(i: ^);
+}
+''', null);
+  }
+
   Future<void> test_argumentList_requiredPositional_first() async {
     await assertContextType('''
 void f(int i, String str, bool b) {}
-void g(int j) {
-  f(^j);
+void g() {
+  f(^w);
+}
+''', 'int');
+  }
+
+  Future<void> test_argumentList_requiredPositional_first2() async {
+    await assertContextType('''
+void f(int i, String str, bool b) {}
+void g() {
+  f( ^ , 'str');
 }
 ''', 'int');
   }
@@ -191,8 +286,8 @@
   Future<void> test_argumentList_requiredPositional_last() async {
     await assertContextType('''
 void f(int i, String str, bool b) {}
-void g(int j) {
-  f(1, '2', t^);
+void g() {
+  f(1, 'str', t^);
 }
 ''', 'bool');
   }
@@ -200,8 +295,17 @@
   Future<void> test_argumentList_requiredPositional_last_implicit() async {
     await assertContextType('''
 void f(int i, String str, bool b, num n) {}
-void g(int j) {
-  f(1, '2', ^);
+void g() {
+  f(1, 'str', ^);
+}
+''', 'bool');
+  }
+
+  Future<void> test_argumentList_requiredPositional_last_implicit2() async {
+    await assertContextType('''
+void f(int i, String str, bool b, num n) {}
+void g() {
+  f(1, 'str', ^ );
 }
 ''', 'bool');
   }
@@ -209,7 +313,7 @@
   Future<void> test_argumentList_requiredPositional_middle() async {
     await assertContextType('''
 void f(int i, String str, bool b) {}
-void g(int j) {
+void g() {
   f(1, w^);
 }
 ''', 'String');
@@ -218,16 +322,25 @@
   Future<void> test_argumentList_requiredPositional_middle2() async {
     await assertContextType('''
 void f(int i, String str, bool b) {}
-void g(int j) {
+void g() {
   f(1, ^, );
 }
 ''', 'String');
   }
 
+  Future<void> test_argumentList_requiredPositional_middle3() async {
+    await assertContextType('''
+void f(int i, String str, bool b) {}
+void g() {
+  f(1, ^ , );
+}
+''', 'String');
+  }
+
   Future<void> test_argumentList_requiredPositional_middle_implicit() async {
     await assertContextType('''
 void f(int i, String str, bool b) {}
-void g(int j) {
+void g() {
   f(1, ^ );
 }
 ''', 'String');
diff --git a/pkg/analysis_server/test/src/services/correction/fix/make_final_test.dart b/pkg/analysis_server/test/src/services/correction/fix/make_final_test.dart
index e6154ba..4d4dd62 100644
--- a/pkg/analysis_server/test/src/services/correction/fix/make_final_test.dart
+++ b/pkg/analysis_server/test/src/services/correction/fix/make_final_test.dart
@@ -12,13 +12,14 @@
 
 void main() {
   defineReflectiveSuite(() {
-    defineReflectiveTests(MakeFinalTest);
-    defineReflectiveTests(MakeFinalWithNNBDTest);
+    defineReflectiveTests(PreferFinalInForEachTest);
+    defineReflectiveTests(PreferFinalFieldsTest);
+    defineReflectiveTests(PreferFinalFieldsWithNNBDTest);
   });
 }
 
 @reflectiveTest
-class MakeFinalTest extends FixProcessorLintTest {
+class PreferFinalFieldsTest extends FixProcessorLintTest {
   @override
   FixKind get kind => DartFixKind.MAKE_FINAL;
 
@@ -57,7 +58,7 @@
 }
 
 @reflectiveTest
-class MakeFinalWithNNBDTest extends FixProcessorLintTest {
+class PreferFinalFieldsWithNNBDTest extends FixProcessorLintTest {
   @override
   List<String> get experiments => [EnableString.non_nullable];
 
@@ -97,3 +98,46 @@
 ''');
   }
 }
+
+@reflectiveTest
+class PreferFinalInForEachTest extends FixProcessorLintTest {
+  @override
+  FixKind get kind => DartFixKind.MAKE_FINAL;
+
+  @override
+  String get lintCode => LintNames.prefer_final_in_for_each;
+
+  Future<void> test_noType() async {
+    await resolveTestUnit('''
+void fn() {
+  for (var i in [1, 2, 3]) {
+    print(i);
+  }
+}
+''');
+    await assertHasFix('''
+void fn() {
+  for (final i in [1, 2, 3]) {
+    print(i);
+  }
+}
+''');
+  }
+
+  Future<void> test_type() async {
+    await resolveTestUnit('''
+void fn() {
+  for (int i in [1, 2, 3]) {
+    print(i);
+  }
+}
+''');
+    await assertHasFix('''
+void fn() {
+  for (final int i in [1, 2, 3]) {
+    print(i);
+  }
+}
+''');
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/fix/organize_imports_test.dart b/pkg/analysis_server/test/src/services/correction/fix/organize_imports_test.dart
new file mode 100644
index 0000000..868dbab
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/fix/organize_imports_test.dart
@@ -0,0 +1,43 @@
+// Copyright (c) 2020, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analysis_server/src/services/correction/fix.dart';
+import 'package:analysis_server/src/services/linter/lint_names.dart';
+import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'fix_processor.dart';
+
+void main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(OrganizeImportsTest);
+  });
+}
+
+@reflectiveTest
+class OrganizeImportsTest extends FixProcessorLintTest {
+  @override
+  FixKind get kind => DartFixKind.ORGANIZE_IMPORTS;
+
+  @override
+  String get lintCode => LintNames.directives_ordering;
+
+  Future<void> test_organizeImports() async {
+    await resolveTestUnit('''
+//ignore_for_file: unused_import
+import 'dart:io';
+
+import 'dart:async';
+
+void main(Stream<String> args) { }
+''');
+    await assertHasFix('''
+//ignore_for_file: unused_import
+import 'dart:async';
+import 'dart:io';
+
+void main(Stream<String> args) { }
+''');
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/fix/sort_directives_test.dart b/pkg/analysis_server/test/src/services/correction/fix/sort_directives_test.dart
deleted file mode 100644
index 903e00e..0000000
--- a/pkg/analysis_server/test/src/services/correction/fix/sort_directives_test.dart
+++ /dev/null
@@ -1,43 +0,0 @@
-// Copyright (c) 2020, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-import 'package:analysis_server/src/services/correction/fix.dart';
-import 'package:analysis_server/src/services/linter/lint_names.dart';
-import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
-import 'package:test_reflective_loader/test_reflective_loader.dart';
-
-import 'fix_processor.dart';
-
-void main() {
-  defineReflectiveSuite(() {
-    defineReflectiveTests(SortDirectivesTest);
-  });
-}
-
-@reflectiveTest
-class SortDirectivesTest extends FixProcessorLintTest {
-  @override
-  FixKind get kind => DartFixKind.SORT_DIRECTIVES;
-
-  @override
-  String get lintCode => LintNames.directives_ordering;
-
-  Future<void> test_sortDirectives() async {
-    await resolveTestUnit('''
-//ignore_for_file: unused_import
-import 'dart:io';
-
-import 'dart:async';
-
-void main(Stream<String> args) { }
-''');
-    await assertHasFix('''
-//ignore_for_file: unused_import
-import 'dart:async';
-import 'dart:io';
-
-void main(Stream<String> args) { }
-''');
-  }
-}
diff --git a/pkg/analysis_server/test/src/services/correction/fix/test_all.dart b/pkg/analysis_server/test/src/services/correction/fix/test_all.dart
index 0185dd0..6e53e11 100644
--- a/pkg/analysis_server/test/src/services/correction/fix/test_all.dart
+++ b/pkg/analysis_server/test/src/services/correction/fix/test_all.dart
@@ -91,6 +91,7 @@
 import 'make_final_test.dart' as make_final;
 import 'make_variable_not_final_test.dart' as make_variable_not_final;
 import 'move_type_arguments_to_class_test.dart' as move_type_arguments_to_class;
+import 'organize_imports_test.dart' as organize_imports;
 import 'qualify_reference_test.dart' as qualify_reference;
 import 'remove_annotation_test.dart' as remove_annotation;
 import 'remove_argument_test.dart' as remove_argument;
@@ -150,7 +151,6 @@
 import 'replace_with_tear_off_test.dart' as replace_with_tear_off;
 import 'replace_with_var_test.dart' as replace_with_var;
 import 'sort_child_property_last_test.dart' as sort_properties_last;
-import 'sort_directives_test.dart' as sort_directives;
 import 'update_sdk_constraints_test.dart' as update_sdk_constraints;
 import 'use_const_test.dart' as use_const;
 import 'use_effective_integer_division_test.dart'
@@ -240,6 +240,7 @@
     make_final.main();
     make_variable_not_final.main();
     move_type_arguments_to_class.main();
+    organize_imports.main();
     qualify_reference.main();
     remove_annotation.main();
     remove_argument.main();
@@ -294,7 +295,6 @@
     replace_with_null_aware.main();
     replace_with_tear_off.main();
     replace_with_var.main();
-    sort_directives.main();
     sort_properties_last.main();
     update_sdk_constraints.main();
     use_const.main();
diff --git a/pkg/analysis_server/test/stress/completion/completion_runner.dart b/pkg/analysis_server/test/stress/completion/completion_runner.dart
index 2fb69b3..19a23db 100644
--- a/pkg/analysis_server/test/stress/completion/completion_runner.dart
+++ b/pkg/analysis_server/test/stress/completion/completion_runner.dart
@@ -61,7 +61,7 @@
         includedPaths: <String>[analysisRoot],
         resourceProvider: resourceProvider);
     var contributor = DartCompletionManager();
-    var performance = CompletionPerformance();
+    var statistics = CompletionPerformance();
     var stamp = 1;
 
     var fileCount = 0;
@@ -100,10 +100,15 @@
 
           timer.start();
           var request =
-              CompletionRequestImpl(result, offset, false, performance);
-          var suggestions = await contributor.computeSuggestions(
-            request,
-            enableUriContributor: true,
+              CompletionRequestImpl(result, offset, false, statistics);
+          var suggestions = await request.performance.runRequestOperation(
+            (performance) async {
+              return await contributor.computeSuggestions(
+                performance,
+                request,
+                enableUriContributor: true,
+              );
+            },
           );
           timer.stop();
 
diff --git a/pkg/analysis_server/tool/completion_metrics/completion_metrics.dart b/pkg/analysis_server/tool/completion_metrics/completion_metrics.dart
index f5483ea..66b4b1e 100644
--- a/pkg/analysis_server/tool/completion_metrics/completion_metrics.dart
+++ b/pkg/analysis_server/tool/completion_metrics/completion_metrics.dart
@@ -37,6 +37,8 @@
 import 'package:analyzer/src/dartdoc/dartdoc_directive_info.dart';
 import 'package:analyzer/src/generated/engine.dart';
 import 'package:analyzer/src/services/available_declarations.dart';
+import 'package:analyzer/src/util/performance/operation_performance.dart';
+import 'package:analyzer_plugin/protocol/protocol_common.dart' show ElementKind;
 import 'package:analyzer_plugin/src/utilities/completion/optype.dart';
 import 'package:args/args.dart';
 import 'package:meta/meta.dart';
@@ -168,7 +170,14 @@
 
 /// An indication of the group in which the completion falls for the purposes of
 /// subdividing the results.
-enum CompletionGroup { instanceMember, staticMember, topLevel }
+enum CompletionGroup {
+  instanceMember,
+  staticMember,
+  typeReference,
+  localReference,
+  paramReference,
+  topLevel
+}
 
 /// A wrapper for the collection of [Counter] and [MeanReciprocalRankComputer]
 /// objects for a run of [CompletionMetricsComputer].
@@ -208,6 +217,15 @@
   MeanReciprocalRankComputer staticMemberMrrComputer =
       MeanReciprocalRankComputer('static member completions');
 
+  MeanReciprocalRankComputer typeRefMrrComputer =
+      MeanReciprocalRankComputer('type reference completions');
+
+  MeanReciprocalRankComputer localRefMrrComputer =
+      MeanReciprocalRankComputer('local reference completions');
+
+  MeanReciprocalRankComputer paramRefMrrComputer =
+      MeanReciprocalRankComputer('param reference completions');
+
   MeanReciprocalRankComputer topLevelMrrComputer =
       MeanReciprocalRankComputer('non-type member completions');
 
@@ -238,6 +256,18 @@
   List<CompletionResult> staticMemberWorstResults = [];
 
   /// A list of the top [maxWorstResults] completion results with the highest
+  /// (worst) ranks for completing to type references.
+  List<CompletionResult> typeRefWorstResults = [];
+
+  /// A list of the top [maxWorstResults] completion results with the highest
+  /// (worst) ranks for completing to local references.
+  List<CompletionResult> localRefWorstResults = [];
+
+  /// A list of the top [maxWorstResults] completion results with the highest
+  /// (worst) ranks for completing to parameter references.
+  List<CompletionResult> paramRefWorstResults = [];
+
+  /// A list of the top [maxWorstResults] completion results with the highest
   /// (worst) ranks for completing to top-level declarations.
   List<CompletionResult> topLevelWorstResults = [];
 
@@ -250,6 +280,18 @@
   List<CompletionResult> staticMemberSlowestResults = [];
 
   /// A list of the top [maxSlowestResults] completion results that took the
+  /// longest top compute for type references.
+  List<CompletionResult> typeRefSlowestResults = [];
+
+  /// A list of the top [maxSlowestResults] completion results that took the
+  /// longest top compute for local references.
+  List<CompletionResult> localRefSlowestResults = [];
+
+  /// A list of the top [maxSlowestResults] completion results that took the
+  /// longest top compute for parameter references.
+  List<CompletionResult> paramRefSlowestResults = [];
+
+  /// A list of the top [maxSlowestResults] completion results that took the
   /// longest top compute for top-level declarations.
   List<CompletionResult> topLevelSlowestResults = [];
 
@@ -292,6 +334,15 @@
       case CompletionGroup.staticMember:
         staticMemberMrrComputer.addRank(rank);
         break;
+      case CompletionGroup.typeReference:
+        typeRefMrrComputer.addRank(rank);
+        break;
+      case CompletionGroup.localReference:
+        localRefMrrComputer.addRank(rank);
+        break;
+      case CompletionGroup.paramReference:
+        paramRefMrrComputer.addRank(rank);
+        break;
       case CompletionGroup.topLevel:
         topLevelMrrComputer.addRank(rank);
         break;
@@ -314,6 +365,12 @@
           return instanceMemberSlowestResults;
         case CompletionGroup.staticMember:
           return staticMemberSlowestResults;
+        case CompletionGroup.typeReference:
+          return typeRefSlowestResults;
+        case CompletionGroup.localReference:
+          return localRefSlowestResults;
+        case CompletionGroup.paramReference:
+          return paramRefSlowestResults;
         case CompletionGroup.topLevel:
           return topLevelSlowestResults;
       }
@@ -344,6 +401,12 @@
           return instanceMemberWorstResults;
         case CompletionGroup.staticMember:
           return staticMemberWorstResults;
+        case CompletionGroup.typeReference:
+          return typeRefWorstResults;
+        case CompletionGroup.localReference:
+          return localRefWorstResults;
+        case CompletionGroup.paramReference:
+          return paramRefWorstResults;
         case CompletionGroup.topLevel:
           return topLevelWorstResults;
       }
@@ -512,6 +575,15 @@
     metrics.staticMemberMrrComputer.printMean();
     print('');
 
+    metrics.typeRefMrrComputer.printMean();
+    print('');
+
+    metrics.localRefMrrComputer.printMean();
+    print('');
+
+    metrics.paramRefMrrComputer.printMean();
+    print('');
+
     metrics.topLevelMrrComputer.printMean();
     print('');
 
@@ -586,6 +658,10 @@
     _printSlowestResults(
         'Instance members', metrics.instanceMemberSlowestResults);
     _printSlowestResults('Static members', metrics.staticMemberSlowestResults);
+    _printSlowestResults('Type references', metrics.typeRefSlowestResults);
+    _printSlowestResults('Local references', metrics.localRefSlowestResults);
+    _printSlowestResults(
+        'Parameter references', metrics.paramRefSlowestResults);
     _printSlowestResults('Top level', metrics.topLevelSlowestResults);
   }
 
@@ -595,6 +671,9 @@
     print('The worst completion results');
     _printWorstResults('Instance members', metrics.instanceMemberWorstResults);
     _printWorstResults('Static members', metrics.staticMemberWorstResults);
+    _printWorstResults('Type references', metrics.topLevelWorstResults);
+    _printWorstResults('Local references', metrics.localRefWorstResults);
+    _printWorstResults('Parameter references', metrics.paramRefWorstResults);
     _printWorstResults('Top level', metrics.topLevelWorstResults);
   }
 
@@ -618,7 +697,9 @@
   }
 
   Future<List<protocol.CompletionSuggestion>> _computeCompletionSuggestions(
-      MetricsSuggestionListener listener, CompletionRequestImpl request,
+      MetricsSuggestionListener listener,
+      OperationPerformanceImpl performance,
+      CompletionRequestImpl request,
       [DeclarationsTracker declarationsTracker,
       protocol.CompletionAvailableSuggestionsParams
           availableSuggestionsParams]) async {
@@ -630,6 +711,7 @@
         dartdocDirectiveInfo: DartdocDirectiveInfo(),
         listener: listener,
       ).computeSuggestions(
+        performance,
         request,
         enableUriContributor: true,
       );
@@ -647,6 +729,7 @@
         includedSuggestionRelevanceTags: includedSuggestionRelevanceTagList,
         listener: listener,
       ).computeSuggestions(
+        performance,
         request,
         enableUriContributor: true,
       );
@@ -794,12 +877,24 @@
                 CompletionPerformance(),
               );
               var directiveInfo = DartdocDirectiveInfo();
-              var dartRequest =
-                  await DartCompletionRequestImpl.from(request, directiveInfo);
-              var opType =
-                  OpType.forCompletion(dartRequest.target, request.offset);
-              var suggestions = await _computeCompletionSuggestions(listener,
-                  request, declarationsTracker, availableSuggestionsParams);
+
+              OpType opType;
+              List<protocol.CompletionSuggestion> suggestions;
+              await request.performance.runRequestOperation(
+                (performance) async {
+                  var dartRequest = await DartCompletionRequestImpl.from(
+                      performance, request, directiveInfo);
+                  opType =
+                      OpType.forCompletion(dartRequest.target, request.offset);
+                  suggestions = await _computeCompletionSuggestions(
+                    listener,
+                    performance,
+                    request,
+                    declarationsTracker,
+                    availableSuggestionsParams,
+                  );
+                },
+              );
               stopwatch.stop();
 
               return forEachExpectedCompletion(
@@ -1012,6 +1107,15 @@
         } else {
           return CompletionGroup.instanceMember;
         }
+      } else if (expectedCompletion.elementKind == ElementKind.CLASS ||
+          expectedCompletion.elementKind == ElementKind.MIXIN ||
+          expectedCompletion.elementKind == ElementKind.ENUM ||
+          expectedCompletion.elementKind == ElementKind.TYPE_PARAMETER) {
+        return CompletionGroup.typeReference;
+      } else if (expectedCompletion.elementKind == ElementKind.LOCAL_VARIABLE) {
+        return CompletionGroup.localReference;
+      } else if (expectedCompletion.elementKind == ElementKind.PARAMETER) {
+        return CompletionGroup.paramReference;
       }
     }
     return CompletionGroup.topLevel;
diff --git a/pkg/analysis_server/tool/completion_metrics/relevance_metrics.dart b/pkg/analysis_server/tool/completion_metrics/relevance_metrics.dart
index 833a1a6..4dc6352 100644
--- a/pkg/analysis_server/tool/completion_metrics/relevance_metrics.dart
+++ b/pkg/analysis_server/tool/completion_metrics/relevance_metrics.dart
@@ -1495,72 +1495,6 @@
     return null;
   }
 
-  /// Return the distance between the [reference] and the referenced local
-  /// [variable], where the distance is defined to be the number of variable
-  /// declarations between the local variable and the reference.
-  int _localVariableDistance(AstNode reference, LocalVariableElement variable) {
-    var distance = 0;
-    var node = reference;
-    while (node != null) {
-      if (node is ForStatement || node is ForElement) {
-        var loopParts = node is ForStatement
-            ? node.forLoopParts
-            : (node as ForElement).forLoopParts;
-        if (loopParts is ForPartsWithDeclarations) {
-          for (var declaredVariable in loopParts.variables.variables.reversed) {
-            if (declaredVariable.declaredElement == variable) {
-              return distance;
-            }
-            distance++;
-          }
-        } else if (loopParts is ForEachPartsWithDeclaration) {
-          if (loopParts.loopVariable.declaredElement == variable) {
-            return distance;
-          }
-          distance++;
-        }
-      } else if (node is VariableDeclarationStatement) {
-        for (var declaredVariable in node.variables.variables.reversed) {
-          if (declaredVariable.declaredElement == variable) {
-            return distance;
-          }
-          distance++;
-        }
-      } else if (node is CatchClause) {
-        if (node.exceptionParameter?.staticElement == variable ||
-            node.stackTraceParameter?.staticElement == variable) {
-          return distance;
-        }
-      }
-      if (node is Statement) {
-        var parent = node.parent;
-        var statements = const <Statement>[];
-        if (parent is Block) {
-          statements = parent.statements;
-        } else if (parent is SwitchCase) {
-          statements = parent.statements;
-        } else if (parent is SwitchDefault) {
-          statements = parent.statements;
-        }
-        var index = statements.indexOf(node);
-        for (var i = 0; i < index; i++) {
-          var statement = statements[i];
-          if (statement is VariableDeclarationStatement) {
-            for (var declaredVariable
-                in statement.variables.variables.reversed) {
-              if (declaredVariable.declaredElement == variable) {
-                return distance;
-              }
-              distance++;
-            }
-          }
-        }
-      }
-      node = node.parent;
-    }
-    return -1;
-  }
-
   /// Return the number of functions between the [reference] and the [function]
   /// in which the referenced parameter is declared.
   int _parameterReferenceDepth(AstNode reference, Element function) {
@@ -1778,10 +1712,7 @@
       //  additionally measuring the number of function boundaries that are
       //  crossed and then reporting the distance with a label such as
       //  'local variable ($boundaryCount)'.
-      var distance = _localVariableDistance(node, element);
-      if (distance < 0) {
-        DateTime.now();
-      }
+      var distance = featureComputer.localVariableDistance(node, element);
       _recordDistance('distance to local variable', distance);
     } else if (element != null) {
       // TODO(brianwilkerson) We might want to cross reference the depth of
@@ -1913,9 +1844,6 @@
           distance = featureComputer.inheritanceDistance(
               argumentType.element, parameterType.element);
         }
-        if (distance < 0) {
-          DateTime.now();
-        }
         data.recordDistance('Subtype of context type ($descriptor)', distance);
         data.recordDistance('Subtype of context type (all)', distance);
       }
diff --git a/pkg/analysis_server/tool/lsp_spec/README.md b/pkg/analysis_server/tool/lsp_spec/README.md
index 8d41b70..d4890e4 100644
--- a/pkg/analysis_server/tool/lsp_spec/README.md
+++ b/pkg/analysis_server/tool/lsp_spec/README.md
@@ -5,6 +5,7 @@
 ## Using the Dart LSP server in editors
 
 - [Using LSP with Dart-Vim](https://github.com/dart-lang/dart-vim-plugin/blob/master/README.md#how-do-i-configure-an-lsp-plugin-to-start-the-analysis-server)
+- [Using LSP with Emacs](https://emacs-lsp.github.io/lsp-dart)
 
 ## Running the Server
 
diff --git a/pkg/analysis_server/tool/migration_runner.dart b/pkg/analysis_server/tool/migration_runner.dart
index 851885c..8b989cd 100644
--- a/pkg/analysis_server/tool/migration_runner.dart
+++ b/pkg/analysis_server/tool/migration_runner.dart
@@ -77,7 +77,7 @@
         serverChannel,
         resourceProvider,
         options,
-        DartSdkManager(sdkPath, true),
+        DartSdkManager(sdkPath),
         CrashReportingAttachmentsBuilder.empty,
         InstrumentationService.NULL_SERVICE);
   }
diff --git a/pkg/analyzer/CHANGELOG.md b/pkg/analyzer/CHANGELOG.md
index 2dfc781..ce3906e 100644
--- a/pkg/analyzer/CHANGELOG.md
+++ b/pkg/analyzer/CHANGELOG.md
@@ -1,8 +1,23 @@
-## 0.39.11-dev
+## 0.39.13-dev
+* Added 'dart/sdk/build_sdk_summary.dart' with `buildSdkSummary`.
+* Added `DynamicType`, `NeverType`, and `VoidType` interfaces.
+
+## 0.39.12
+* Deprecated `canUseSummaries` in `DartSdkManager` constructor.
+  Summaries are not supported this way for SDK.
+* Set uri for implicit dart:core import.
+* Add overrideKnownFeaturesAsync() for DartDoc testing.
+* Remove DartSdk.useSummary.
+* Move TypeSystemImpl to src/dart/element/type_system.dart
+
+## 0.39.11
 * Deprecated `ClassElement.hasReferenceToSuper`.
   It was used internally, should not be part of API.
 * Deprecated `LibraryElement.languageVersionMajor/minor`.
   Use `LibraryElement.languageVersion` to access more specific information.
+* Bug fixes: #42007, #42474, #37293, #42385, #36315, #42356, #42274, #42321,
+  #42337, #27387, #34806, #37810, #41072, #42278, #38306, #35036, #23353,
+  #42178, #42216, #42201.
 
 ## 0.39.10
 * Restored the default constructor in internal `SummaryBuilder`,
diff --git a/pkg/analyzer/analysis_options.yaml b/pkg/analyzer/analysis_options.yaml
index e6d3a7c..fe59776 100644
--- a/pkg/analyzer/analysis_options.yaml
+++ b/pkg/analyzer/analysis_options.yaml
@@ -1,27 +1,17 @@
 include: package:pedantic/analysis_options.1.9.0.yaml
 
 analyzer:
-  # This currently finds ~4,500 implicit-casts issues when enabled.
-  # strong-mode:
-  #   implicit-casts: false
   errors:
     # Increase the severity of the unused_import hint.
     unused_import: warning
-    # There are currently 140 violations in lib/.
+    # There are currently 10k violations in test/ and tool/.
     always_declare_return_types: ignore
-    # There are currently 5500 violations in lib/. This just does not fit well
+    # There are currently 5000 violations in lib/. This just does not fit well
     # with the analyzer team's style.
     omit_local_variable_types: ignore
     # There are currently 3360 violations in lib/.
     prefer_single_quotes: ignore
-    # Ignoring "style" lint rules from pedantic for now. There are pre-existing
-    # violations that need to be cleaned up. Each one can be cleaned up and
-    # enabled according to the value provided.
-    # TODO(srawlins): At the time of writing, 1700 violations in lib/. The fix
-    # is mechanical, via `dartfmt --fix-doc-comments`, but not worth the churn
-    # today.
-    slash_for_doc_comments: ignore
-    # There are currently 1980 violations in lib/.
+    # There are currently 2000 violations in lib/.
     unnecessary_this: ignore
 
 linter:
diff --git a/pkg/analyzer/lib/dart/analysis/declared_variables.dart b/pkg/analyzer/lib/dart/analysis/declared_variables.dart
index 2b80e7b..0104180 100644
--- a/pkg/analyzer/lib/dart/analysis/declared_variables.dart
+++ b/pkg/analyzer/lib/dart/analysis/declared_variables.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/dart/constant/value.dart';
 import 'package:analyzer/dart/element/type_provider.dart';
 import 'package:analyzer/src/dart/constant/from_environment_evaluator.dart';
-import 'package:analyzer/src/generated/type_system.dart';
+import 'package:analyzer/src/dart/element/type_system.dart';
 
 /// An object used to provide access to the values of variables that have been
 /// defined on the command line using the `-D` option.
diff --git a/pkg/analyzer/lib/dart/analysis/results.dart b/pkg/analyzer/lib/dart/analysis/results.dart
index fe6317d..9acd4ad 100644
--- a/pkg/analyzer/lib/dart/analysis/results.dart
+++ b/pkg/analyzer/lib/dart/analysis/results.dart
@@ -7,7 +7,7 @@
 import 'package:analyzer/dart/element/element.dart';
 import 'package:analyzer/dart/element/type_provider.dart';
 import 'package:analyzer/error/error.dart';
-import 'package:analyzer/src/generated/resolver.dart' show TypeSystem;
+import 'package:analyzer/src/dart/element/type_system.dart';
 import 'package:analyzer/src/generated/source.dart';
 
 /// The result of performing some kind of analysis on a single file. Every
diff --git a/pkg/analyzer/lib/dart/analysis/session.dart b/pkg/analyzer/lib/dart/analysis/session.dart
index 89e113b..28450cb 100644
--- a/pkg/analyzer/lib/dart/analysis/session.dart
+++ b/pkg/analyzer/lib/dart/analysis/session.dart
@@ -12,7 +12,7 @@
 import 'package:analyzer/dart/element/type_provider.dart';
 import 'package:analyzer/exception/exception.dart';
 import 'package:analyzer/file_system/file_system.dart';
-import 'package:analyzer/src/generated/resolver.dart' show TypeSystem;
+import 'package:analyzer/src/dart/element/type_system.dart';
 import 'package:analyzer/src/generated/source.dart';
 
 /// A consistent view of the results of analyzing one or more files.
diff --git a/pkg/analyzer/lib/dart/ast/ast.dart b/pkg/analyzer/lib/dart/ast/ast.dart
index 8423b11..fb1492f 100644
--- a/pkg/analyzer/lib/dart/ast/ast.dart
+++ b/pkg/analyzer/lib/dart/ast/ast.dart
@@ -4028,7 +4028,7 @@
   void operator []=(int index, E node);
 
   /// Use the given [visitor] to visit each of the nodes in this list.
-  accept(AstVisitor visitor);
+  void accept(AstVisitor visitor);
 }
 
 /// A formal parameter that is required (is not optional).
diff --git a/pkg/analyzer/lib/dart/element/element.dart b/pkg/analyzer/lib/dart/element/element.dart
index dda7250..e25a5b3 100644
--- a/pkg/analyzer/lib/dart/element/element.dart
+++ b/pkg/analyzer/lib/dart/element/element.dart
@@ -42,9 +42,9 @@
 import 'package:analyzer/dart/element/type_system.dart';
 import 'package:analyzer/error/error.dart';
 import 'package:analyzer/src/dart/constant/evaluation.dart';
+import 'package:analyzer/src/dart/resolver/scope.dart' show Namespace;
 import 'package:analyzer/src/generated/engine.dart' show AnalysisContext;
 import 'package:analyzer/src/generated/java_engine.dart';
-import 'package:analyzer/src/generated/resolver.dart' show Namespace;
 import 'package:analyzer/src/generated/source.dart';
 import 'package:analyzer/src/generated/utilities_dart.dart';
 import 'package:analyzer/src/task/api/model.dart' show AnalysisTarget;
diff --git a/pkg/analyzer/lib/dart/element/type.dart b/pkg/analyzer/lib/dart/element/type.dart
index 4adbf46..e3d864e 100644
--- a/pkg/analyzer/lib/dart/element/type.dart
+++ b/pkg/analyzer/lib/dart/element/type.dart
@@ -165,6 +165,12 @@
       List<DartType> argumentTypes, List<DartType> parameterTypes);
 }
 
+/// The type `dynamic` is a type which is a supertype of all other types, just
+/// like `Object`, with the difference that the static analysis assumes that
+/// every member access has a corresponding member with a signature that
+/// admits the given access.
+abstract class DynamicType implements DartType {}
+
 /// The type of a function, method, constructor, getter, or setter. Function
 /// types come in three variations:
 ///
@@ -551,6 +557,9 @@
       InterfaceTypeImpl.getSmartLeastUpperBound(first, second);
 }
 
+/// The type `Never` represents the uninhabited bottom type.
+abstract class NeverType implements DartType {}
+
 /// A type that can track substituted type parameters, either for itself after
 /// instantiation, or from a surrounding context.
 ///
@@ -601,3 +610,12 @@
   @override
   TypeParameterElement get element;
 }
+
+/// The special type `void` is used to indicate that the value of an
+/// expression is meaningless, and intended to be discarded.
+abstract class VoidType implements DartType {
+  @override
+  @deprecated
+  VoidType substitute2(
+      List<DartType> argumentTypes, List<DartType> parameterTypes);
+}
diff --git a/pkg/analyzer/lib/dart/element/type_provider.dart b/pkg/analyzer/lib/dart/element/type_provider.dart
index 385d302..ecc63f5 100644
--- a/pkg/analyzer/lib/dart/element/type_provider.dart
+++ b/pkg/analyzer/lib/dart/element/type_provider.dart
@@ -5,7 +5,6 @@
 import 'package:analyzer/dart/element/element.dart';
 import 'package:analyzer/dart/element/type.dart';
 import 'package:analyzer/src/dart/constant/value.dart';
-import 'package:analyzer/src/dart/element/type.dart';
 
 /// The interface `TypeProvider` defines the behavior of objects that provide
 /// access to types defined by the language.
diff --git a/pkg/analyzer/lib/dart/sdk/build_sdk_summary.dart b/pkg/analyzer/lib/dart/sdk/build_sdk_summary.dart
new file mode 100644
index 0000000..30e01ff
--- /dev/null
+++ b/pkg/analyzer/lib/dart/sdk/build_sdk_summary.dart
@@ -0,0 +1,192 @@
+// Copyright (c) 2020, the Dart project authors. Please see the AUTHORS file
+// for 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:typed_data';
+
+import 'package:_fe_analyzer_shared/src/sdk/allowed_experiments.dart';
+import 'package:analyzer/dart/analysis/features.dart';
+import 'package:analyzer/dart/analysis/utilities.dart';
+import 'package:analyzer/dart/ast/ast.dart';
+import 'package:analyzer/dart/element/element.dart';
+import 'package:analyzer/file_system/file_system.dart';
+import 'package:analyzer/src/dart/analysis/experiments.dart';
+import 'package:analyzer/src/dart/analysis/session.dart';
+import 'package:analyzer/src/dart/ast/ast.dart';
+import 'package:analyzer/src/dart/sdk/sdk.dart';
+import 'package:analyzer/src/generated/engine.dart';
+import 'package:analyzer/src/generated/source.dart';
+import 'package:analyzer/src/summary/format.dart';
+import 'package:analyzer/src/summary/summarize_elements.dart';
+import 'package:analyzer/src/summary2/link.dart';
+import 'package:analyzer/src/summary2/linked_element_factory.dart';
+import 'package:analyzer/src/summary2/reference.dart';
+import 'package:meta/meta.dart';
+import 'package:yaml/yaml.dart';
+
+/// Build summary for SDK at the given [sdkPath].
+///
+/// If [embedderYamlPath] is provided, then libraries from this file are
+/// appended to the libraries of the specified SDK.
+Uint8List buildSdkSummary({
+  @required ResourceProvider resourceProvider,
+  @required String sdkPath,
+  String embedderYamlPath,
+}) {
+  var sdk = FolderBasedDartSdk(
+    resourceProvider,
+    resourceProvider.getFolder(sdkPath),
+  );
+  sdk.analysisOptions = AnalysisOptionsImpl();
+
+  // Append libraries from the embedder.
+  if (embedderYamlPath != null) {
+    var file = resourceProvider.getFile(embedderYamlPath);
+    var content = file.readAsStringSync();
+    var map = loadYaml(content) as YamlMap;
+    var embedderSdk = EmbedderSdk(resourceProvider, {file.parent: map});
+    for (var library in embedderSdk.sdkLibraries) {
+      var uriStr = library.shortName;
+      if (sdk.libraryMap.getLibrary(uriStr) == null) {
+        sdk.libraryMap.setLibrary(uriStr, library);
+      }
+    }
+  }
+
+  var librarySources = sdk.sdkLibraries.map((e) {
+    return sdk.mapDartUri(e.shortName);
+  }).toList();
+
+  return _Builder(
+    sdk.context,
+    sdk.allowedExperimentsJson,
+    librarySources,
+  ).build();
+}
+
+class _Builder {
+  final AnalysisContext context;
+  final String allowedExperimentsJson;
+  final Iterable<Source> librarySources;
+
+  final Set<String> libraryUris = <String>{};
+  final List<LinkInputLibrary> inputLibraries = [];
+
+  AllowedExperiments allowedExperiments;
+  final PackageBundleAssembler bundleAssembler = PackageBundleAssembler();
+
+  _Builder(
+    this.context,
+    this.allowedExperimentsJson,
+    this.librarySources,
+  ) {
+    allowedExperiments = _parseAllowedExperiments(allowedExperimentsJson);
+  }
+
+  /// Build the linked bundle and return its bytes.
+  Uint8List build() {
+    librarySources.forEach(_addLibrary);
+
+    var elementFactory = LinkedElementFactory(
+      context,
+      AnalysisSessionImpl(null),
+      Reference.root(),
+    );
+
+    var linkResult = link(elementFactory, inputLibraries);
+    bundleAssembler.setBundle2(linkResult.bundle);
+
+    var buffer = PackageBundleBuilder(
+      bundle2: linkResult.bundle,
+      sdk: PackageBundleSdkBuilder(
+        allowedExperimentsJson: allowedExperimentsJson,
+      ),
+    ).toBuffer();
+
+    return buffer is Uint8List ? buffer : Uint8List.fromList(buffer);
+  }
+
+  void _addLibrary(Source source) {
+    String uriStr = source.uri.toString();
+    if (!libraryUris.add(uriStr)) {
+      return;
+    }
+
+    var inputUnits = <LinkInputUnit>[];
+
+    CompilationUnit definingUnit = _parse(source);
+    inputUnits.add(
+      LinkInputUnit(null, source, false, definingUnit),
+    );
+
+    for (Directive directive in definingUnit.directives) {
+      if (directive is NamespaceDirective) {
+        String libUri = directive.uri.stringValue;
+        Source libSource = context.sourceFactory.resolveUri(source, libUri);
+        _addLibrary(libSource);
+      } else if (directive is PartDirective) {
+        String partUri = directive.uri.stringValue;
+        Source partSource = context.sourceFactory.resolveUri(source, partUri);
+        CompilationUnit partUnit = _parse(partSource);
+        inputUnits.add(
+          LinkInputUnit(partUri, partSource, false, partUnit),
+        );
+      }
+    }
+
+    inputLibraries.add(
+      LinkInputLibrary(source, inputUnits),
+    );
+  }
+
+  /// Return the [FeatureSet] for the given [uri], must be a `dart:` URI.
+  FeatureSet _featureSet(Uri uri) {
+    if (uri.isScheme('dart')) {
+      var pathSegments = uri.pathSegments;
+      if (pathSegments.isNotEmpty) {
+        var libraryName = pathSegments.first;
+        var experiments = allowedExperiments.forSdkLibrary(libraryName);
+        return FeatureSet.fromEnableFlags(experiments);
+      }
+    }
+    throw StateError('Expected a valid dart: URI: $uri');
+  }
+
+  CompilationUnit _parse(Source source) {
+    var result = parseString(
+      content: source.contents.data,
+      featureSet: _featureSet(source.uri),
+      throwIfDiagnostics: false,
+    );
+
+    if (result.errors.isNotEmpty) {
+      var errorsStr = result.errors.map((e) {
+        var location = result.lineInfo.getLocation(e.offset);
+        return '${source.fullName}:$location - ${e.message}';
+      }).join('\n');
+      throw StateError(
+        'Unexpected diagnostics:\n$errorsStr',
+      );
+    }
+
+    var unit = result.unit as CompilationUnitImpl;
+    unit.languageVersion = LibraryLanguageVersion(
+      package: ExperimentStatus.currentVersion,
+      override: null,
+    );
+
+    return result.unit;
+  }
+
+  static AllowedExperiments _parseAllowedExperiments(String content) {
+    if (content == null) {
+      return AllowedExperiments(
+        sdkDefaultExperiments: [],
+        sdkLibraryExperiments: {},
+        packageExperiments: {},
+      );
+    }
+
+    return parseAllowedExperiments(content);
+  }
+}
diff --git a/pkg/analyzer/lib/error/error.dart b/pkg/analyzer/lib/error/error.dart
index 3e905b1..d675223 100644
--- a/pkg/analyzer/lib/error/error.dart
+++ b/pkg/analyzer/lib/error/error.dart
@@ -844,16 +844,12 @@
   TodoCode.TODO,
 ];
 
-/**
- * The lazy initialized map from [ErrorCode.uniqueName] to the [ErrorCode]
- * instance.
- */
+/// The lazy initialized map from [ErrorCode.uniqueName] to the [ErrorCode]
+/// instance.
 HashMap<String, ErrorCode> _uniqueNameToCodeMap;
 
-/**
- * Return the [ErrorCode] with the given [uniqueName], or `null` if not
- * found.
- */
+/// Return the [ErrorCode] with the given [uniqueName], or `null` if not
+/// found.
 ErrorCode errorCodeByUniqueName(String uniqueName) {
   if (_uniqueNameToCodeMap == null) {
     _uniqueNameToCodeMap = HashMap<String, ErrorCode>();
@@ -864,29 +860,21 @@
   return _uniqueNameToCodeMap[uniqueName];
 }
 
-/**
- * An error discovered during the analysis of some Dart code.
- *
- * See [AnalysisErrorListener].
- */
+/// An error discovered during the analysis of some Dart code.
+///
+/// See [AnalysisErrorListener].
 class AnalysisError implements Diagnostic {
-  /**
-   * An empty array of errors used when no errors are expected.
-   */
+  /// An empty array of errors used when no errors are expected.
   static const List<AnalysisError> NO_ERRORS = <AnalysisError>[];
 
-  /**
-   * A [Comparator] that sorts by the name of the file that the [AnalysisError]
-   * was found.
-   */
+  /// A [Comparator] that sorts by the name of the file that the [AnalysisError]
+  /// was found.
   static Comparator<AnalysisError> FILE_COMPARATOR =
       (AnalysisError o1, AnalysisError o2) =>
           o1.source.shortName.compareTo(o2.source.shortName);
 
-  /**
-   * A [Comparator] that sorts error codes first by their severity (errors
-   * first, warnings second), and then by the error code type.
-   */
+  /// A [Comparator] that sorts error codes first by their severity (errors
+  /// first, warnings second), and then by the error code type.
   static Comparator<AnalysisError> ERROR_CODE_COMPARATOR =
       (AnalysisError o1, AnalysisError o2) {
     ErrorCode errorCode1 = o1.errorCode;
@@ -902,40 +890,28 @@
     }
   };
 
-  /**
-   * The error code associated with the error.
-   */
+  /// The error code associated with the error.
   final ErrorCode errorCode;
 
-  /**
-   * The message describing the problem.
-   */
+  /// The message describing the problem.
   DiagnosticMessage _problemMessage;
 
-  /**
-   * The context messages associated with the problem. This list will be empty
-   * if there are no context messages.
-   */
+  /// The context messages associated with the problem. This list will be empty
+  /// if there are no context messages.
   List<DiagnosticMessage> _contextMessages;
 
-  /**
-   * The correction to be displayed for this error, or `null` if there is no
-   * correction information for this error.
-   */
+  /// The correction to be displayed for this error, or `null` if there is no
+  /// correction information for this error.
   String _correction;
 
-  /**
-   * The source in which the error occurred, or `null` if unknown.
-   */
+  /// The source in which the error occurred, or `null` if unknown.
   final Source source;
 
-  /**
-   * Initialize a newly created analysis error. The error is associated with the
-   * given [source] and is located at the given [offset] with the given
-   * [length]. The error will have the given [errorCode] and the list of
-   * [arguments] will be used to complete the message and correction. If any
-   * [contextMessages] are provided, they will be recorded with the error.
-   */
+  /// Initialize a newly created analysis error. The error is associated with
+  /// the given [source] and is located at the given [offset] with the given
+  /// [length]. The error will have the given [errorCode] and the list of
+  /// [arguments] will be used to complete the message and correction. If any
+  /// [contextMessages] are provided, they will be recorded with the error.
   AnalysisError(this.source, int offset, int length, this.errorCode,
       [List<Object> arguments,
       List<DiagnosticMessage> contextMessages = const []]) {
@@ -952,9 +928,7 @@
     _contextMessages = contextMessages;
   }
 
-  /**
-   * Initialize a newly created analysis error with given values.
-   */
+  /// Initialize a newly created analysis error with given values.
   AnalysisError.forValues(this.source, int offset, int length, this.errorCode,
       String message, this._correction,
       {List<DiagnosticMessage> contextMessages = const []}) {
@@ -969,11 +943,9 @@
   @override
   List<DiagnosticMessage> get contextMessages => _contextMessages;
 
-  /**
-   * Return the template used to create the correction to be displayed for this
-   * error, or `null` if there is no correction information for this error. The
-   * correction should indicate how the user can fix the error.
-   */
+  /// Return the template used to create the correction to be displayed for this
+  /// error, or `null` if there is no correction information for this error. The
+  /// correction should indicate how the user can fix the error.
   String get correction => _correction;
 
   @override
@@ -987,22 +959,16 @@
     return hashCode;
   }
 
-  /**
-   * The number of characters from the offset to the end of the source which
-   * encompasses the compilation error.
-   */
+  /// The number of characters from the offset to the end of the source which
+  /// encompasses the compilation error.
   int get length => _problemMessage.length;
 
-  /**
-   * Return the message to be displayed for this error. The message should
-   * indicate what is wrong and why it is wrong.
-   */
+  /// Return the message to be displayed for this error. The message should
+  /// indicate what is wrong and why it is wrong.
   String get message => _problemMessage.message;
 
-  /**
-   * The character offset from the beginning of the source (zero based) where
-   * the error occurred.
-   */
+  /// The character offset from the beginning of the source (zero based) where
+  /// the error occurred.
   int get offset => _problemMessage.offset;
 
   @override
@@ -1063,10 +1029,8 @@
     return buffer.toString();
   }
 
-  /**
-   * Merge all of the errors in the lists in the given list of [errorLists] into
-   * a single list of errors.
-   */
+  /// Merge all of the errors in the lists in the given list of [errorLists]
+  /// into a single list of errors.
   static List<AnalysisError> mergeLists(List<List<AnalysisError>> errorLists) {
     Set<AnalysisError> errors = HashSet<AnalysisError>();
     for (List<AnalysisError> errorList in errorLists) {
diff --git a/pkg/analyzer/lib/error/listener.dart b/pkg/analyzer/lib/error/listener.dart
index 9754408..e95548f 100644
--- a/pkg/analyzer/lib/error/listener.dart
+++ b/pkg/analyzer/lib/error/listener.dart
@@ -16,36 +16,24 @@
 import 'package:analyzer/src/generated/source.dart';
 import 'package:source_span/source_span.dart';
 
-/**
- * An object that listen for [AnalysisError]s being produced by the analysis
- * engine.
- */
+/// An object that listen for [AnalysisError]s being produced by the analysis
+/// engine.
 abstract class AnalysisErrorListener {
-  /**
-   * An error listener that ignores errors that are reported to it.
-   */
+  /// An error listener that ignores errors that are reported to it.
   static final AnalysisErrorListener NULL_LISTENER = _NullErrorListener();
 
-  /**
-   * This method is invoked when an [error] has been found by the analysis
-   * engine.
-   */
+  /// This method is invoked when an [error] has been found by the analysis
+  /// engine.
   void onError(AnalysisError error);
 }
 
-/**
- * An [AnalysisErrorListener] that keeps track of whether any error has been
- * reported to it.
- */
+/// An [AnalysisErrorListener] that keeps track of whether any error has been
+/// reported to it.
 class BooleanErrorListener implements AnalysisErrorListener {
-  /**
-   * A flag indicating whether an error has been reported to this listener.
-   */
+  /// A flag indicating whether an error has been reported to this listener.
   bool _errorReported = false;
 
-  /**
-   * Return `true` if an error has been reported to this listener.
-   */
+  /// Return `true` if an error has been reported to this listener.
   bool get errorReported => _errorReported;
 
   @override
@@ -54,36 +42,24 @@
   }
 }
 
-/**
- * An object used to create analysis errors and report then to an error
- * listener.
- */
+/// An object used to create analysis errors and report then to an error
+/// listener.
 class ErrorReporter {
-  /**
-   * The error listener to which errors will be reported.
-   */
+  /// The error listener to which errors will be reported.
   final AnalysisErrorListener _errorListener;
 
-  /**
-   * The default source to be used when reporting errors.
-   */
+  /// The default source to be used when reporting errors.
   final Source _defaultSource;
 
-  /**
-   * Is `true` if the library being analyzed is non-nullable by default.
-   */
+  /// Is `true` if the library being analyzed is non-nullable by default.
   final bool isNonNullableByDefault;
 
-  /**
-   * The source to be used when reporting errors.
-   */
+  /// The source to be used when reporting errors.
   Source _source;
 
-  /**
-   * Initialize a newly created error reporter that will report errors to the
-   * given [_errorListener]. Errors will be reported against the
-   * [_defaultSource] unless another source is provided later.
-   */
+  /// Initialize a newly created error reporter that will report errors to the
+  /// given [_errorListener]. Errors will be reported against the
+  /// [_defaultSource] unless another source is provided later.
   ErrorReporter(this._errorListener, this._defaultSource,
       {this.isNonNullableByDefault = false}) {
     if (_errorListener == null) {
@@ -96,26 +72,20 @@
 
   Source get source => _source;
 
-  /**
-   * Set the source to be used when reporting errors to the given [source].
-   * Setting the source to `null` will cause the default source to be used.
-   */
+  /// Set the source to be used when reporting errors to the given [source].
+  /// Setting the source to `null` will cause the default source to be used.
   @Deprecated('Create separate reporters for separate files')
   set source(Source source) {
     this._source = source ?? _defaultSource;
   }
 
-  /**
-   * Report the given [error].
-   */
+  /// Report the given [error].
   void reportError(AnalysisError error) {
     _errorListener.onError(error);
   }
 
-  /**
-   * Report an error with the given [errorCode] and [arguments]. The [element]
-   * is used to compute the location of the error.
-   */
+  /// Report an error with the given [errorCode] and [arguments]. The [element]
+  /// is used to compute the location of the error.
   void reportErrorForElement(ErrorCode errorCode, Element element,
       [List<Object> arguments]) {
     reportErrorForOffset(
@@ -138,19 +108,15 @@
     }
   }
 
-  /**
-   * Report an error with the given [errorCode] and [arguments].
-   * The [node] is used to compute the location of the error.
-   */
+  /// Report an error with the given [errorCode] and [arguments].
+  /// The [node] is used to compute the location of the error.
   void reportErrorForNode(ErrorCode errorCode, AstNode node,
       [List<Object> arguments]) {
     reportErrorForOffset(errorCode, node.offset, node.length, arguments);
   }
 
-  /**
-   * Report an error with the given [errorCode] and [arguments]. The location of
-   * the error is specified by the given [offset] and [length].
-   */
+  /// Report an error with the given [errorCode] and [arguments]. The location
+  /// of the error is specified by the given [offset] and [length].
   void reportErrorForOffset(ErrorCode errorCode, int offset, int length,
       [List<Object> arguments]) {
     _convertElements(arguments);
@@ -159,45 +125,37 @@
         AnalysisError(_source, offset, length, errorCode, arguments, messages));
   }
 
-  /**
-   * Report an error with the given [errorCode] and [arguments]. The location of
-   * the error is specified by the given [span].
-   */
+  /// Report an error with the given [errorCode] and [arguments]. The location
+  /// of the error is specified by the given [span].
   void reportErrorForSpan(ErrorCode errorCode, SourceSpan span,
       [List<Object> arguments]) {
     reportErrorForOffset(errorCode, span.start.offset, span.length, arguments);
   }
 
-  /**
-   * Report an error with the given [errorCode] and [arguments]. The [token] is
-   * used to compute the location of the error.
-   */
+  /// Report an error with the given [errorCode] and [arguments]. The [token] is
+  /// used to compute the location of the error.
   void reportErrorForToken(ErrorCode errorCode, Token token,
       [List<Object> arguments]) {
     reportErrorForOffset(errorCode, token.offset, token.length, arguments);
   }
 
-  /**
-   * Report an error with the given [errorCode] and [message]. The location of
-   * the error is specified by the given [offset] and [length].
-   */
+  /// Report an error with the given [errorCode] and [message]. The location of
+  /// the error is specified by the given [offset] and [length].
   void reportErrorMessage(
       ErrorCode errorCode, int offset, int length, Message message) {
     _errorListener.onError(AnalysisError.forValues(
         _source, offset, length, errorCode, message.message, message.tip));
   }
 
-  /**
-   * Report an error with the given [errorCode] and [arguments]. The [node] is
-   * used to compute the location of the error. The arguments are expected to
-   * contain two or more types. Convert the types into strings by using the
-   * display names of the types, unless there are two or more types with the
-   * same names, in which case the extended display names of the types will be
-   * used in order to clarify the message.
-   *
-   * If there are not two or more types in the argument list, the method
-   * [reportErrorForNode] should be used instead.
-   */
+  /// Report an error with the given [errorCode] and [arguments]. The [node] is
+  /// used to compute the location of the error. The arguments are expected to
+  /// contain two or more types. Convert the types into strings by using the
+  /// display names of the types, unless there are two or more types with the
+  /// same names, in which case the extended display names of the types will be
+  /// used in order to clarify the message.
+  ///
+  /// If there are not two or more types in the argument list, the method
+  /// [reportErrorForNode] should be used instead.
   @Deprecated('Use reportErrorForNode(), it will convert types as well')
   void reportTypeErrorForNode(
       ErrorCode errorCode, AstNode node, List<Object> arguments) {
@@ -220,13 +178,11 @@
     }
   }
 
-  /**
-   * Given an array of [arguments] that is expected to contain two or more
-   * types, convert the types into strings by using the display names of the
-   * types, unless there are two or more types with the same names, in which
-   * case the extended display names of the types will be used in order to
-   * clarify the message.
-   */
+  /// Given an array of [arguments] that is expected to contain two or more
+  /// types, convert the types into strings by using the display names of the
+  /// types, unless there are two or more types with the same names, in which
+  /// case the extended display names of the types will be used in order to
+  /// clarify the message.
   List<DiagnosticMessage> _convertTypeNames(List<Object> arguments) {
     var messages = <DiagnosticMessage>[];
     if (arguments == null) {
@@ -295,16 +251,12 @@
   }
 }
 
-/**
- * An error listener that will record the errors that are reported to it in a
- * way that is appropriate for caching those errors within an analysis context.
- */
+/// An error listener that will record the errors that are reported to it in a
+/// way that is appropriate for caching those errors within an analysis context.
 class RecordingErrorListener implements AnalysisErrorListener {
   Set<AnalysisError> _errors;
 
-  /**
-   * Return the errors collected by the listener.
-   */
+  /// Return the errors collected by the listener.
   List<AnalysisError> get errors {
     if (_errors == null) {
       return const <AnalysisError>[];
@@ -312,9 +264,7 @@
     return _errors.toList();
   }
 
-  /**
-   * Return the errors collected by the listener for the given [source].
-   */
+  /// Return the errors collected by the listener for the given [source].
   List<AnalysisError> getErrorsForSource(Source source) {
     if (_errors == null) {
       return const <AnalysisError>[];
@@ -329,9 +279,7 @@
   }
 }
 
-/**
- * An [AnalysisErrorListener] that ignores error.
- */
+/// An [AnalysisErrorListener] that ignores error.
 class _NullErrorListener implements AnalysisErrorListener {
   @override
   void onError(AnalysisError event) {
@@ -339,10 +287,8 @@
   }
 }
 
-/**
- * Used by `ErrorReporter._convertTypeNames` to keep track of a type that is
- * being converted.
- */
+/// Used by `ErrorReporter._convertTypeNames` to keep track of a type that is
+/// being converted.
 class _TypeToConvert {
   final int index;
   final DartType type;
diff --git a/pkg/analyzer/lib/exception/exception.dart b/pkg/analyzer/lib/exception/exception.dart
index d00c967..6a2bd6c 100644
--- a/pkg/analyzer/lib/exception/exception.dart
+++ b/pkg/analyzer/lib/exception/exception.dart
@@ -2,25 +2,17 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-/**
- * An exception that occurred during the analysis of one or more sources.
- */
+/// An exception that occurred during the analysis of one or more sources.
 class AnalysisException implements Exception {
-  /**
-   * The message that explains why the exception occurred.
-   */
+  /// The message that explains why the exception occurred.
   final String message;
 
-  /**
-   * The exception that caused this exception, or `null` if this exception was
-   * not caused by another exception.
-   */
+  /// The exception that caused this exception, or `null` if this exception was
+  /// not caused by another exception.
   final CaughtException cause;
 
-  /**
-   * Initialize a newly created exception to have the given [message] and
-   * [cause].
-   */
+  /// Initialize a newly created exception to have the given [message] and
+  /// [cause].
   AnalysisException([this.message = 'Exception', this.cause]);
 
   @override
@@ -36,45 +28,31 @@
   }
 }
 
-/**
- * An exception that was caught and has an associated stack trace.
- */
+/// An exception that was caught and has an associated stack trace.
 class CaughtException implements Exception {
-  /**
-   * The exception that was caught.
-   */
+  /// The exception that was caught.
   final Object exception;
 
-  /**
-   * The message describing where/how/why this was caught.
-   */
+  /// The message describing where/how/why this was caught.
   final String message;
 
-  /**
-   * The stack trace associated with the exception.
-   */
+  /// The stack trace associated with the exception.
   StackTrace stackTrace;
 
-  /**
-   * Initialize a newly created caught exception to have the given [exception]
-   * and [stackTrace].
-   */
+  /// Initialize a newly created caught exception to have the given [exception]
+  /// and [stackTrace].
   CaughtException(exception, stackTrace)
       : this.withMessage(null, exception, stackTrace);
 
-  /**
-   * Initialize a newly created caught exception to have the given [exception],
-   * [stackTrace], and [message].
-   */
+  /// Initialize a newly created caught exception to have the given [exception],
+  /// [stackTrace], and [message].
   CaughtException.withMessage(this.message, this.exception, stackTrace)
       : this.stackTrace = stackTrace ?? StackTrace.current;
 
-  /**
-   * Recursively unwrap this [CaughtException] if it itself contains a
-   * [CaughtException].
-   *
-   * If it does not contain a [CaughtException], simply return this instance.
-   */
+  /// Recursively unwrap this [CaughtException] if it itself contains a
+  /// [CaughtException].
+  ///
+  /// If it does not contain a [CaughtException], simply return this instance.
   CaughtException get rootCaughtException {
     if (exception is CaughtException) {
       return (exception as CaughtException).rootCaughtException;
@@ -89,10 +67,8 @@
     return buffer.toString();
   }
 
-  /**
-   * Write a textual representation of the caught exception and its associated
-   * stack trace.
-   */
+  /// Write a textual representation of the caught exception and its associated
+  /// stack trace.
   void _writeOn(StringBuffer buffer) {
     if (message != null) {
       buffer.writeln(message);
@@ -117,19 +93,16 @@
   }
 }
 
-/**
- * A form of [CaughtException] that should be silent to users.
- *
- * This is still considered an exceptional situation and will be sent to crash
- * reporting.
- */
+/// A form of [CaughtException] that should be silent to users.
+///
+/// This is still considered an exceptional situation and will be sent to crash
+/// reporting.
 class SilentException extends CaughtException {
   SilentException(String message, exception, stackTrace)
       : super.withMessage(message, exception, stackTrace);
 
-  /**
-   * Create a [SilentException] to wrap a [CaughtException], adding a [message].
-   */
+  /// Create a [SilentException] to wrap a [CaughtException], adding a
+  /// [message].
   SilentException.wrapInMessage(String message, CaughtException exception)
       : this(message, exception, null);
 }
diff --git a/pkg/analyzer/lib/file_system/file_system.dart b/pkg/analyzer/lib/file_system/file_system.dart
index 61770a1..6c8735b 100644
--- a/pkg/analyzer/lib/file_system/file_system.dart
+++ b/pkg/analyzer/lib/file_system/file_system.dart
@@ -10,79 +10,57 @@
 
 export 'package:analyzer/src/file_system/file_system.dart';
 
-/**
- * [File]s are leaf [Resource]s which contain data.
- */
+/// [File]s are leaf [Resource]s which contain data.
 abstract class File implements Resource {
-  /**
-   * Watch for changes to this file
-   */
+  /// Watch for changes to this file
   Stream<WatchEvent> get changes;
 
-  /**
-   * Synchronously get the length of the file.
-   * Throws a [FileSystemException] if the operation fails.
-   */
+  /// Synchronously get the length of the file.
+  /// Throws a [FileSystemException] if the operation fails.
   int get lengthSync;
 
-  /**
-   * Return the last-modified stamp of the file.
-   * Throws a [FileSystemException] if the file does not exist.
-   */
+  /// Return the last-modified stamp of the file.
+  /// Throws a [FileSystemException] if the file does not exist.
   int get modificationStamp;
 
   @override
   File copyTo(Folder parentFolder);
 
-  /**
-   * Create a new [Source] instance that serves this file.
-   */
+  /// Create a new [Source] instance that serves this file.
   Source createSource([Uri uri]);
 
-  /**
-   * Synchronously read the entire file contents as a list of bytes.
-   * Throws a [FileSystemException] if the operation fails.
-   */
+  /// Synchronously read the entire file contents as a list of bytes.
+  /// Throws a [FileSystemException] if the operation fails.
   List<int> readAsBytesSync();
 
-  /**
-   * Synchronously read the entire file contents as a [String].
-   * Throws [FileSystemException] if the file does not exist.
-   */
+  /// Synchronously read the entire file contents as a [String].
+  /// Throws [FileSystemException] if the file does not exist.
   String readAsStringSync();
 
-  /**
-   * Synchronously rename this file.
-   * Return a [File] instance for the renamed file.
-   *
-   * The [newPath] must be absolute and normalized.
-   *
-   * If [newPath] identifies an existing file, that file is replaced.
-   * If [newPath] identifies an existing resource the operation might fail and
-   * an exception is thrown.
-   */
+  /// Synchronously rename this file.
+  /// Return a [File] instance for the renamed file.
+  ///
+  /// The [newPath] must be absolute and normalized.
+  ///
+  /// If [newPath] identifies an existing file, that file is replaced.
+  /// If [newPath] identifies an existing resource the operation might fail and
+  /// an exception is thrown.
   File renameSync(String newPath);
 
-  /**
-   * Synchronously write the given [bytes] to the file. The new content will
-   * replace any existing content.
-   *
-   * Throws a [FileSystemException] if the operation fails.
-   */
+  /// Synchronously write the given [bytes] to the file. The new content will
+  /// replace any existing content.
+  ///
+  /// Throws a [FileSystemException] if the operation fails.
   void writeAsBytesSync(List<int> bytes);
 
-  /**
-   * Synchronously write the given [content] to the file. The new content will
-   * replace any existing content.
-   *
-   * Throws a [FileSystemException] if the operation fails.
-   */
+  /// Synchronously write the given [content] to the file. The new content will
+  /// replace any existing content.
+  ///
+  /// Throws a [FileSystemException] if the operation fails.
   void writeAsStringSync(String content);
 }
 
-/**
- * Base class for all file system exceptions.
- */
+/// Base class for all file system exceptions.
 class FileSystemException implements Exception {
   final String path;
   final String message;
@@ -93,187 +71,136 @@
   String toString() => 'FileSystemException(path=$path; message=$message)';
 }
 
-/**
- * [Folder]s are [Resource]s which may contain files and/or other folders.
- */
+/// [Folder]s are [Resource]s which may contain files and/or other folders.
 abstract class Folder implements Resource {
-  /**
-   * Watch for changes to the files inside this folder (and in any nested
-   * folders, including folders reachable via links).
-   */
+  /// Watch for changes to the files inside this folder (and in any nested
+  /// folders, including folders reachable via links).
   Stream<WatchEvent> get changes;
 
-  /**
-   * If the path [path] is a relative path, convert it to an absolute path
-   * by interpreting it relative to this folder.  If it is already an absolute
-   * path, then don't change it.
-   *
-   * However, regardless of whether [path] is relative or absolute, normalize
-   * it by removing path components of the form '.' or '..'.
-   */
+  /// If the path [path] is a relative path, convert it to an absolute path
+  /// by interpreting it relative to this folder.  If it is already an absolute
+  /// path, then don't change it.
+  ///
+  /// However, regardless of whether [path] is relative or absolute, normalize
+  /// it by removing path components of the form '.' or '..'.
   String canonicalizePath(String path);
 
-  /**
-   * Return `true` if the [path] references a resource in this folder.
-   *
-   * The [path] must be absolute and normalized.
-   */
+  /// Return `true` if the [path] references a resource in this folder.
+  ///
+  /// The [path] must be absolute and normalized.
   bool contains(String path);
 
   @override
   Folder copyTo(Folder parentFolder);
 
-  /**
-   * If this folder does not already exist, create it.
-   */
+  /// If this folder does not already exist, create it.
   void create();
 
-  /**
-   * Return an existing child [Resource] with the given [relPath].
-   * Return a not existing [File] if no such child exist.
-   */
+  /// Return an existing child [Resource] with the given [relPath].
+  /// Return a not existing [File] if no such child exist.
   Resource getChild(String relPath);
 
-  /**
-   * Return a [File] representing a child [Resource] with the given
-   * [relPath].  This call does not check whether a file with the given name
-   * exists on the filesystem - client must call the [File]'s `exists` getter
-   * to determine whether the folder actually exists.
-   */
+  /// Return a [File] representing a child [Resource] with the given
+  /// [relPath].  This call does not check whether a file with the given name
+  /// exists on the filesystem - client must call the [File]'s `exists` getter
+  /// to determine whether the folder actually exists.
   File getChildAssumingFile(String relPath);
 
-  /**
-   * Return a [Folder] representing a child [Resource] with the given
-   * [relPath].  This call does not check whether a folder with the given name
-   * exists on the filesystem--client must call the [Folder]'s `exists` getter
-   * to determine whether the folder actually exists.
-   */
+  /// Return a [Folder] representing a child [Resource] with the given
+  /// [relPath].  This call does not check whether a folder with the given name
+  /// exists on the filesystem--client must call the [Folder]'s `exists` getter
+  /// to determine whether the folder actually exists.
   Folder getChildAssumingFolder(String relPath);
 
-  /**
-   * Return a list of existing direct children [Resource]s (folders and files)
-   * in this folder, in no particular order.
-   *
-   * On I/O errors, this will throw [FileSystemException].
-   */
+  /// Return a list of existing direct children [Resource]s (folders and files)
+  /// in this folder, in no particular order.
+  ///
+  /// On I/O errors, this will throw [FileSystemException].
   List<Resource> getChildren();
 }
 
-/**
- * The abstract class [Resource] is an abstraction of file or folder.
- */
+/// The abstract class [Resource] is an abstraction of file or folder.
 abstract class Resource {
-  /**
-   * Return `true` if this resource exists.
-   */
+  /// Return `true` if this resource exists.
   bool get exists;
 
-  /**
-   * Return the [Folder] that contains this resource, or `null` if this resource
-   * is a root folder.
-   */
+  /// Return the [Folder] that contains this resource, or `null` if this
+  /// resource is a root folder.
   Folder get parent;
 
-  /**
-   * Return the full path to this resource.
-   */
+  /// Return the full path to this resource.
   String get path;
 
-  /**
-   * Return a short version of the name that can be displayed to the user to
-   * denote this resource.
-   */
+  /// Return a short version of the name that can be displayed to the user to
+  /// denote this resource.
   String get shortName;
 
-  /**
-   * Copy this resource to a child of the [parentFolder] with the same kind and
-   * [shortName] as this resource. If this resource is a folder, then all of the
-   * contents of the folder will be recursively copied.
-   *
-   * The parent folder is created if it does not already exist.
-   *
-   * Existing files and folders will be overwritten.
-   *
-   * Return the resource corresponding to this resource in the parent folder.
-   */
+  /// Copy this resource to a child of the [parentFolder] with the same kind and
+  /// [shortName] as this resource. If this resource is a folder, then all of
+  /// the contents of the folder will be recursively copied.
+  ///
+  /// The parent folder is created if it does not already exist.
+  ///
+  /// Existing files and folders will be overwritten.
+  ///
+  /// Return the resource corresponding to this resource in the parent folder.
   Resource copyTo(Folder parentFolder);
 
-  /**
-   * Synchronously deletes this resource and its children.
-   *
-   * Throws an exception if the resource cannot be deleted.
-   */
+  /// Synchronously deletes this resource and its children.
+  ///
+  /// Throws an exception if the resource cannot be deleted.
   void delete();
 
-  /**
-   * Return `true` if absolute [path] references this resource or a resource in
-   * this folder.
-   *
-   * The [path] must be absolute and normalized.
-   */
+  /// Return `true` if absolute [path] references this resource or a resource in
+  /// this folder.
+  ///
+  /// The [path] must be absolute and normalized.
   bool isOrContains(String path);
 
-  /**
-   * Return a resource that refers to the same resource as this resource, but
-   * whose path does not contain any symbolic links.
-   */
+  /// Return a resource that refers to the same resource as this resource, but
+  /// whose path does not contain any symbolic links.
   Resource resolveSymbolicLinksSync();
 
-  /**
-   * Return a Uri representing this resource.
-   */
+  /// Return a Uri representing this resource.
   Uri toUri();
 }
 
-/**
- * Instances of the class [ResourceProvider] convert [String] paths into
- * [Resource]s.
- */
+/// Instances of the class [ResourceProvider] convert [String] paths into
+/// [Resource]s.
 abstract class ResourceProvider {
-  /**
-   * Get the path context used by this resource provider.
-   */
+  /// Get the path context used by this resource provider.
   Context get pathContext;
 
-  /**
-   * Return a [File] that corresponds to the given [path].
-   *
-   * The [path] must be absolute and normalized.
-   *
-   * A file may or may not exist at this location.
-   */
+  /// Return a [File] that corresponds to the given [path].
+  ///
+  /// The [path] must be absolute and normalized.
+  ///
+  /// A file may or may not exist at this location.
   File getFile(String path);
 
-  /**
-   * Return a [Folder] that corresponds to the given [path].
-   *
-   * The [path] must be absolute and normalized.
-   *
-   * A folder may or may not exist at this location.
-   */
+  /// Return a [Folder] that corresponds to the given [path].
+  ///
+  /// The [path] must be absolute and normalized.
+  ///
+  /// A folder may or may not exist at this location.
   Folder getFolder(String path);
 
-  /**
-   * Complete with a list of modification times for the given [sources].
-   *
-   * If the file of a source is not managed by this provider, return `null`.
-   * If the file a source does not exist, return `-1`.
-   */
+  /// Complete with a list of modification times for the given [sources].
+  ///
+  /// If the file of a source is not managed by this provider, return `null`.
+  /// If the file a source does not exist, return `-1`.
   Future<List<int>> getModificationTimes(List<Source> sources);
 
-  /**
-   * Return the [Resource] that corresponds to the given [path].
-   *
-   * The [path] must be absolute and normalized.
-   */
+  /// Return the [Resource] that corresponds to the given [path].
+  ///
+  /// The [path] must be absolute and normalized.
   Resource getResource(String path);
 
-  /**
-   * Return the folder in which the plugin with the given [pluginId] can store
-   * state that will persist across sessions. The folder returned for a given id
-   * will not be returned for a different id, ensuring that plugins do not need
-   * to be concerned with file name collisions with other plugins, assuming that
-   * the plugin ids are unique. The plugin ids must be valid folder names.
-   */
+  /// Return the folder in which the plugin with the given [pluginId] can store
+  /// state that will persist across sessions. The folder returned for a given
+  /// id will not be returned for a different id, ensuring that plugins do not
+  /// need to be concerned with file name collisions with other plugins,
+  /// assuming that the plugin ids are unique. The plugin ids must be valid
+  /// folder names.
   Folder getStateLocation(String pluginId);
 }
diff --git a/pkg/analyzer/lib/file_system/memory_file_system.dart b/pkg/analyzer/lib/file_system/memory_file_system.dart
index 6d6db84..1781738 100644
--- a/pkg/analyzer/lib/file_system/memory_file_system.dart
+++ b/pkg/analyzer/lib/file_system/memory_file_system.dart
@@ -13,10 +13,8 @@
 import 'package:path/path.dart' as pathos;
 import 'package:watcher/watcher.dart';
 
-/**
- * An in-memory implementation of [ResourceProvider].
- * Use `/` as a path separator.
- */
+/// An in-memory implementation of [ResourceProvider].
+/// Use `/` as a path separator.
 class MemoryResourceProvider implements ResourceProvider {
   final Map<String, _MemoryResource> _pathToResource =
       HashMap<String, _MemoryResource>();
@@ -40,12 +38,10 @@
   @override
   pathos.Context get pathContext => _pathContext;
 
-  /**
-   * Convert the given posix [path] to conform to this provider's path context.
-   *
-   * This is a utility method for testing; paths passed in to other methods in
-   * this class are never converted automatically.
-   */
+  /// Convert the given posix [path] to conform to this provider's path context.
+  ///
+  /// This is a utility method for testing; paths passed in to other methods in
+  /// this class are never converted automatically.
   String convertPath(String path) {
     if (pathContext.style == pathos.windows.style) {
       if (path.startsWith(pathos.posix.separator)) {
@@ -56,9 +52,7 @@
     return path;
   }
 
-  /**
-   * Delete the file with the given path.
-   */
+  /// Delete the file with the given path.
   void deleteFile(String path) {
     _checkFileAtPath(path);
     _pathToResource.remove(path);
@@ -67,10 +61,8 @@
     _notifyWatchers(path, ChangeType.REMOVE);
   }
 
-  /**
-   * Delete the folder with the given path
-   * and recursively delete nested files and folders.
-   */
+  /// Delete the folder with the given path
+  /// and recursively delete nested files and folders.
   void deleteFolder(String path) {
     _checkFolderAtPath(path);
     _MemoryFolder folder = _pathToResource[path];
@@ -128,10 +120,8 @@
     _notifyWatchers(path, ChangeType.MODIFY);
   }
 
-  /**
-   * Create a resource representing a dummy link (that is, a File object which
-   * appears in its parent directory, but whose `exists` property is false)
-   */
+  /// Create a resource representing a dummy link (that is, a File object which
+  /// appears in its parent directory, but whose `exists` property is false)
   File newDummyLink(String path) {
     _ensureAbsoluteAndNormalized(path);
     newFolder(pathContext.dirname(path));
@@ -197,9 +187,7 @@
     return file;
   }
 
-  /**
-   * Write a representation of the file system on the given [sink].
-   */
+  /// Write a representation of the file system on the given [sink].
   void writeOn(StringSink sink) {
     List<String> paths = _pathToResource.keys.toList();
     paths.sort();
@@ -229,10 +217,8 @@
     }
   }
 
-  /**
-   * The file system abstraction supports only absolute and normalized paths.
-   * This method is used to validate any input paths to prevent errors later.
-   */
+  /// The file system abstraction supports only absolute and normalized paths.
+  /// This method is used to validate any input paths to prevent errors later.
   void _ensureAbsoluteAndNormalized(String path) {
     if (!pathContext.isAbsolute(path)) {
       throw ArgumentError("Path must be absolute : $path");
@@ -242,9 +228,7 @@
     }
   }
 
-  /**
-   * Create a new [_MemoryFile] without any content.
-   */
+  /// Create a new [_MemoryFile] without any content.
   _MemoryFile _newFile(String path) {
     String folderPath = pathContext.dirname(path);
     _MemoryResource folder = _pathToResource[folderPath];
@@ -301,10 +285,8 @@
   }
 }
 
-/**
- * An in-memory implementation of [File] which acts like a symbolic link to a
- * non-existent file.
- */
+/// An in-memory implementation of [File] which acts like a symbolic link to a
+/// non-existent file.
 class _MemoryDummyLink extends _MemoryResource implements File {
   _MemoryDummyLink(MemoryResourceProvider provider, String path)
       : super(provider, path);
@@ -382,9 +364,7 @@
   }
 }
 
-/**
- * An in-memory implementation of [File].
- */
+/// An in-memory implementation of [File].
 class _MemoryFile extends _MemoryResource implements File {
   _MemoryFile(MemoryResourceProvider provider, String path)
       : super(provider, path);
@@ -467,9 +447,7 @@
   }
 }
 
-/**
- * An in-memory implementation of [Folder].
- */
+/// An in-memory implementation of [Folder].
 class _MemoryFolder extends _MemoryResource implements Folder {
   _MemoryFolder(MemoryResourceProvider provider, String path)
       : super(provider, path);
@@ -566,9 +544,7 @@
   Uri toUri() => _provider.pathContext.toUri(path + '/');
 }
 
-/**
- * An in-memory implementation of [Resource].
- */
+/// An in-memory implementation of [Resource].
 abstract class _MemoryResource implements Resource {
   final MemoryResourceProvider _provider;
   @override
@@ -593,7 +569,7 @@
   }
 
   @override
-  get hashCode => path.hashCode;
+  int get hashCode => path.hashCode;
 
   @override
   Folder get parent {
diff --git a/pkg/analyzer/lib/file_system/overlay_file_system.dart b/pkg/analyzer/lib/file_system/overlay_file_system.dart
index d1e636a..601b913 100644
--- a/pkg/analyzer/lib/file_system/overlay_file_system.dart
+++ b/pkg/analyzer/lib/file_system/overlay_file_system.dart
@@ -14,38 +14,28 @@
 import 'package:path/path.dart' as pathos;
 import 'package:watcher/watcher.dart';
 
-/**
- * A resource provider that allows clients to overlay the file system provided
- * by a base resource provider. These overlays allow both the contents and
- * modification stamps of files to be different than what the base resource
- * provider would report.
- *
- * This provider does not report watch events when overlays are added, modified
- * or removed.
- */
+/// A resource provider that allows clients to overlay the file system provided
+/// by a base resource provider. These overlays allow both the contents and
+/// modification stamps of files to be different than what the base resource
+/// provider would report.
+///
+/// This provider does not report watch events when overlays are added, modified
+/// or removed.
 class OverlayResourceProvider implements ResourceProvider {
-  /**
-   * The underlying resource provider used to access files and folders that
-   * do not have an overlay.
-   */
+  /// The underlying resource provider used to access files and folders that
+  /// do not have an overlay.
   final ResourceProvider baseProvider;
 
-  /**
-   * A map from the paths of files for which there is an overlay to the contents
-   * of the files.
-   */
+  /// A map from the paths of files for which there is an overlay to the
+  /// contents of the files.
   final Map<String, String> _overlayContent = <String, String>{};
 
-  /**
-   * A map from the paths of files for which there is an overlay to the
-   * modification stamps of the files.
-   */
+  /// A map from the paths of files for which there is an overlay to the
+  /// modification stamps of the files.
   final Map<String, int> _overlayModificationStamps = <String, int>{};
 
-  /**
-   * Initialize a newly created resource provider to represent an overlay on the
-   * given [baseProvider].
-   */
+  /// Initialize a newly created resource provider to represent an overlay on
+  /// the given [baseProvider].
   OverlayResourceProvider(this.baseProvider);
 
   @override
@@ -81,16 +71,12 @@
   Folder getStateLocation(String pluginId) =>
       _OverlayFolder(this, baseProvider.getStateLocation(pluginId));
 
-  /**
-   * Return `true` if there is an overlay associated with the file at the given
-   * [path].
-   */
+  /// Return `true` if there is an overlay associated with the file at the given
+  /// [path].
   bool hasOverlay(String path) => _overlayContent.containsKey(path);
 
-  /**
-   * Remove any overlay of the file at the given [path]. The state of the file
-   * in the base resource provider will not be affected.
-   */
+  /// Remove any overlay of the file at the given [path]. The state of the file
+  /// in the base resource provider will not be affected.
   bool removeOverlay(String path) {
     bool hadOverlay = _overlayContent.containsKey(path);
     _overlayContent.remove(path);
@@ -98,11 +84,9 @@
     return hadOverlay;
   }
 
-  /**
-   * Overlay the content of the file at the given [path]. The file will appear
-   * to have the given [content] and [modificationStamp] even if the file is
-   * modified in the base resource provider.
-   */
+  /// Overlay the content of the file at the given [path]. The file will appear
+  /// to have the given [content] and [modificationStamp] even if the file is
+  /// modified in the base resource provider.
   void setOverlay(String path,
       {@required String content, @required int modificationStamp}) {
     if (content == null) {
@@ -110,16 +94,15 @@
           'OverlayResourceProvider.setOverlay: content cannot be null');
     } else if (modificationStamp == null) {
       throw ArgumentError(
-          'OverlayResourceProvider.setOverlay: modificationStamp cannot be null');
+          'OverlayResourceProvider.setOverlay: modificationStamp cannot be '
+          'null');
     }
     _overlayContent[path] = content;
     _overlayModificationStamps[path] = modificationStamp;
   }
 
-  /**
-   * Copy any overlay for the file at the [oldPath] to be an overlay for the
-   * file with the [newPath].
-   */
+  /// Copy any overlay for the file at the [oldPath] to be an overlay for the
+  /// file with the [newPath].
   void _copyOverlay(String oldPath, String newPath) {
     if (hasOverlay(oldPath)) {
       _overlayContent[newPath] = _overlayContent[oldPath];
@@ -127,45 +110,33 @@
     }
   }
 
-  /**
-   * Return the content of the overlay of the file at the given [path], or
-   * `null` if there is no overlay for the specified file.
-   */
+  /// Return the content of the overlay of the file at the given [path], or
+  /// `null` if there is no overlay for the specified file.
   String _getOverlayContent(String path) {
     return _overlayContent[path];
   }
 
-  /**
-   * Return the modification stamp of the overlay of the file at the given
-   * [path], or `null` if there is no overlay for the specified file.
-   */
+  /// Return the modification stamp of the overlay of the file at the given
+  /// [path], or `null` if there is no overlay for the specified file.
   int _getOverlayModificationStamp(String path) {
     return _overlayModificationStamps[path];
   }
 
-  /**
-   * Return `true` if there is an overlay associated with at least one file
-   * contained inside the folder with the given [folderPath].
-   */
+  /// Return `true` if there is an overlay associated with at least one file
+  /// contained inside the folder with the given [folderPath].
   bool _hasOverlayIn(String folderPath) => _overlayContent.keys
       .any((filePath) => pathContext.isWithin(folderPath, filePath));
 
-  /**
-   * Return the paths of all of the overlaid files that are children of the
-   * given [folder], either directly or indirectly.
-   */
+  /// Return the paths of all of the overlaid files that are children of the
+  /// given [folder], either directly or indirectly.
   Iterable<String> _overlaysInFolder(String folderPath) => _overlayContent.keys
       .where((filePath) => pathContext.isWithin(folderPath, filePath));
 }
 
-/**
- * A file from an [OverlayResourceProvider].
- */
+/// A file from an [OverlayResourceProvider].
 class _OverlayFile extends _OverlayResource implements File {
-  /**
-   * Initialize a newly created file to have the given [provider] and to
-   * correspond to the given [file] from the provider's base resource provider.
-   */
+  /// Initialize a newly created file to have the given [provider] and to
+  /// correspond to the given [file] from the provider's base resource provider.
   _OverlayFile(OverlayResourceProvider provider, File file)
       : super(provider, file);
 
@@ -193,10 +164,8 @@
     return _file.modificationStamp;
   }
 
-  /**
-   * Return the file from the base resource provider that corresponds to this
-   * folder.
-   */
+  /// Return the file from the base resource provider that corresponds to this
+  /// folder.
   File get _file => _resource as File;
 
   @override
@@ -271,15 +240,11 @@
   }
 }
 
-/**
- * A folder from an [OverlayResourceProvider].
- */
+/// A folder from an [OverlayResourceProvider].
 class _OverlayFolder extends _OverlayResource implements Folder {
-  /**
-   * Initialize a newly created folder to have the given [provider] and to
-   * correspond to the given [folder] from the provider's base resource
-   * provider.
-   */
+  /// Initialize a newly created folder to have the given [provider] and to
+  /// correspond to the given [folder] from the provider's base resource
+  /// provider.
   _OverlayFolder(OverlayResourceProvider provider, Folder folder)
       : super(provider, folder);
 
@@ -289,10 +254,8 @@
   @override
   bool get exists => _provider._hasOverlayIn(path) || _resource.exists;
 
-  /**
-   * Return the folder from the base resource provider that corresponds to this
-   * folder.
-   */
+  /// Return the folder from the base resource provider that corresponds to this
+  /// folder.
   Folder get _folder => _resource as Folder;
 
   @override
@@ -342,8 +305,8 @@
         children[child.path] = _OverlayResource._from(_provider, child);
       }
     } on FileSystemException {
-      // We don't want to throw if we're a folder that only exists in the overlay
-      // and not on disk.
+      // We don't want to throw if we're a folder that only exists in the
+      // overlay and not on disk.
     }
 
     for (String overlayPath in _provider._overlaysInFolder(path)) {
@@ -361,32 +324,22 @@
   }
 }
 
-/**
- * The base class for resources from an [OverlayResourceProvider].
- */
+/// The base class for resources from an [OverlayResourceProvider].
 abstract class _OverlayResource implements Resource {
-  /**
-   * The resource provider associated with this resource.
-   */
+  /// The resource provider associated with this resource.
   final OverlayResourceProvider _provider;
 
-  /**
-   * The resource from the provider's base provider that corresponds to this
-   * resource.
-   */
+  /// The resource from the provider's base provider that corresponds to this
+  /// resource.
   final Resource _resource;
 
-  /**
-   * Initialize a newly created instance of a resource to have the given
-   * [_provider] and to represent the [_resource] from the provider's base
-   * resource provider.
-   */
+  /// Initialize a newly created instance of a resource to have the given
+  /// [_provider] and to represent the [_resource] from the provider's base
+  /// resource provider.
   _OverlayResource(this._provider, this._resource);
 
-  /**
-   * Return an instance of the subclass of this class corresponding to the given
-   * [resource] that is associated with the given [provider].
-   */
+  /// Return an instance of the subclass of this class corresponding to the
+  /// given [resource] that is associated with the given [provider].
   factory _OverlayResource._from(
       OverlayResourceProvider provider, Resource resource) {
     if (resource is Folder) {
diff --git a/pkg/analyzer/lib/file_system/physical_file_system.dart b/pkg/analyzer/lib/file_system/physical_file_system.dart
index 2bd4343..bd914e2 100644
--- a/pkg/analyzer/lib/file_system/physical_file_system.dart
+++ b/pkg/analyzer/lib/file_system/physical_file_system.dart
@@ -12,19 +12,15 @@
 import 'package:path/path.dart';
 import 'package:watcher/watcher.dart';
 
-/**
- * The name of the directory containing plugin specific subfolders used to store
- * data across sessions.
- */
+/// The name of the directory containing plugin specific subfolders used to
+/// store data across sessions.
 const String _SERVER_DIR = ".dartServer";
 
-/**
- * Returns the path to default state location.
- *
- * Generally this is ~/.dartServer. It can be overridden via the
- * ANALYZER_STATE_LOCATION_OVERRIDE environment variable, in which case this
- * method will return the contents of that environment variable.
- */
+/// Returns the path to default state location.
+///
+/// Generally this is ~/.dartServer. It can be overridden via the
+/// ANALYZER_STATE_LOCATION_OVERRIDE environment variable, in which case this
+/// method will return the contents of that environment variable.
 String _getStandardStateLocation() {
   final Map<String, String> env = io.Platform.environment;
   if (env.containsKey('ANALYZER_STATE_LOCATION_OVERRIDE')) {
@@ -37,14 +33,12 @@
       : null;
 }
 
-/**
- * Return modification times for every file path in [paths].
- *
- * If a path is `null`, the modification time is also `null`.
- *
- * If any exception happens, the file is considered as a not existing and
- * `-1` is its modification time.
- */
+/// Return modification times for every file path in [paths].
+///
+/// If a path is `null`, the modification time is also `null`.
+///
+/// If any exception happens, the file is considered as a not existing and
+/// `-1` is its modification time.
 List<int> _pathsToTimes(List<String> paths) {
   return paths.map((path) {
     if (path != null) {
@@ -60,9 +54,7 @@
   }).toList();
 }
 
-/**
- * A `dart:io` based implementation of [ResourceProvider].
- */
+/// A `dart:io` based implementation of [ResourceProvider].
 class PhysicalResourceProvider implements ResourceProvider {
   static final String Function(String) NORMALIZE_EOL_ALWAYS =
       (String string) => string.replaceAll(RegExp('\r\n?'), '\n');
@@ -70,9 +62,7 @@
   static final PhysicalResourceProvider INSTANCE =
       PhysicalResourceProvider(null);
 
-  /**
-   * The path to the base folder where state is stored.
-   */
+  /// The path to the base folder where state is stored.
   final String _stateLocation;
 
   PhysicalResourceProvider(String Function(String) fileReadMode,
@@ -124,10 +114,8 @@
     return null;
   }
 
-  /**
-   * The file system abstraction supports only absolute and normalized paths.
-   * This method is used to validate any input paths to prevent errors later.
-   */
+  /// The file system abstraction supports only absolute and normalized paths.
+  /// This method is used to validate any input paths to prevent errors later.
   void _ensureAbsoluteAndNormalized(String path) {
     assert(() {
       if (!pathContext.isAbsolute(path)) {
@@ -141,9 +129,7 @@
   }
 }
 
-/**
- * A `dart:io` based implementation of [File].
- */
+/// A `dart:io` based implementation of [File].
 class _PhysicalFile extends _PhysicalResource implements File {
   _PhysicalFile(io.File file) : super(file);
 
@@ -168,9 +154,7 @@
     }
   }
 
-  /**
-   * Return the underlying file being represented by this wrapper.
-   */
+  /// Return the underlying file being represented by this wrapper.
   io.File get _file => _entry as io.File;
 
   @override
@@ -251,9 +235,7 @@
   }
 }
 
-/**
- * A `dart:io` based implementation of [Folder].
- */
+/// A `dart:io` based implementation of [Folder].
 class _PhysicalFolder extends _PhysicalResource implements Folder {
   _PhysicalFolder(io.Directory directory) : super(directory);
 
@@ -267,9 +249,7 @@
               !error.message
                   .startsWith("Directory watcher closed unexpectedly"));
 
-  /**
-   * Return the underlying file being represented by this wrapper.
-   */
+  /// Return the underlying file being represented by this wrapper.
   io.Directory get _directory => _entry as io.Directory;
 
   @override
@@ -361,9 +341,7 @@
   Uri toUri() => Uri.directory(path);
 }
 
-/**
- * A `dart:io` based implementation of [Resource].
- */
+/// A `dart:io` based implementation of [Resource].
 abstract class _PhysicalResource implements Resource {
   final io.FileSystemEntity _entry;
 
@@ -379,7 +357,7 @@
   }
 
   @override
-  get hashCode => path.hashCode;
+  int get hashCode => path.hashCode;
 
   @override
   Folder get parent {
@@ -393,9 +371,7 @@
   @override
   String get path => _entry.path;
 
-  /**
-   * Return the path context used by this resource provider.
-   */
+  /// Return the path context used by this resource provider.
   Context get pathContext => io.Platform.isWindows ? windows : posix;
 
   @override
@@ -421,12 +397,10 @@
   @override
   String toString() => path;
 
-  /**
-   * If the operating system is Windows and the resource references one of the
-   * device drivers, throw a [FileSystemException].
-   *
-   * https://support.microsoft.com/en-us/kb/74496
-   */
+  /// If the operating system is Windows and the resource references one of the
+  /// device drivers, throw a [FileSystemException].
+  ///
+  /// https://support.microsoft.com/en-us/kb/74496
   void _throwIfWindowsDeviceDriver() {
     if (io.Platform.isWindows) {
       String shortName = this.shortName.toUpperCase();
diff --git a/pkg/analyzer/lib/source/line_info.dart b/pkg/analyzer/lib/source/line_info.dart
index da03c3b..dbd0e2f 100644
--- a/pkg/analyzer/lib/source/line_info.dart
+++ b/pkg/analyzer/lib/source/line_info.dart
@@ -5,41 +5,29 @@
 import 'package:analyzer/src/generated/java_engine.dart';
 import 'package:analyzer/src/generated/source.dart';
 
-/**
- * The location of a character represented as a line and column pair.
- */
+/// The location of a character represented as a line and column pair.
 // ignore: deprecated_member_use_from_same_package
 class CharacterLocation extends LineInfo_Location {
   // TODO(brianwilkerson) Replace the body of this class with the body of
   // LineInfo_Location and remove LineInfo_Location.
-  /**
-   * Initialize a newly created location to represent the location of the
-   * character at the given [lineNumber] and [columnNumber].
-   */
+  /// Initialize a newly created location to represent the location of the
+  /// character at the given [lineNumber] and [columnNumber].
   CharacterLocation(int lineNumber, int columnNumber)
       : super(lineNumber, columnNumber);
 }
 
-/**
- * Information about line and column information within a source file.
- */
+/// Information about line and column information within a source file.
 class LineInfo {
-  /**
-   * A list containing the offsets of the first character of each line in the
-   * source code.
-   */
+  /// A list containing the offsets of the first character of each line in the
+  /// source code.
   final List<int> lineStarts;
 
-  /**
-   * The zero-based [lineStarts] index resulting from the last call to
-   * [getLocation].
-   */
+  /// The zero-based [lineStarts] index resulting from the last call to
+  /// [getLocation].
   int _previousLine = 0;
 
-  /**
-   * Initialize a newly created set of line information to represent the data
-   * encoded in the given list of [lineStarts].
-   */
+  /// Initialize a newly created set of line information to represent the data
+  /// encoded in the given list of [lineStarts].
   LineInfo(this.lineStarts) {
     if (lineStarts == null) {
       throw ArgumentError("lineStarts must be non-null");
@@ -48,25 +36,18 @@
     }
   }
 
-  /**
-   * Initialize a newly created set of line information corresponding to the
-   * given file [content].
-   */
+  /// Initialize a newly created set of line information corresponding to the
+  /// given file [content].
   factory LineInfo.fromContent(String content) =>
       LineInfo(StringUtilities.computeLineStarts(content));
 
-  /**
-   * The number of lines.
-   */
+  /// The number of lines.
   int get lineCount => lineStarts.length;
 
-  /**
-   * Return the location information for the character at the given [offset].
-   *
-   * A future version of this API will return a [CharacterLocation] rather than
-        // ignore: deprecated_member_use_from_same_package
-   * a [LineInfo_Location].
-   */
+  /// Return the location information for the character at the given [offset].
+  ///
+  /// A future version of this API will return a [CharacterLocation] rather than
+  /// a [LineInfo_Location]. // ignore: deprecated_member_use_from_same_package
   // ignore: deprecated_member_use_from_same_package
   LineInfo_Location getLocation(int offset) {
     var min = 0;
@@ -102,10 +83,8 @@
     return CharacterLocation(min + 1, offset - lineStarts[min] + 1);
   }
 
-  /**
-   * Return the offset of the first character on the line with the given
-   * [lineNumber].
-   */
+  /// Return the offset of the first character on the line with the given
+  /// [lineNumber].
   int getOffsetOfLine(int lineNumber) {
     if (lineNumber < 0 || lineNumber >= lineCount) {
       throw ArgumentError(
@@ -114,10 +93,8 @@
     return lineStarts[lineNumber];
   }
 
-  /**
-   * Return the offset of the first character on the line following the line
-   * containing the given [offset].
-   */
+  /// Return the offset of the first character on the line following the line
+  /// containing the given [offset].
   int getOffsetOfLineAfter(int offset) {
     return getOffsetOfLine(getLocation(offset).lineNumber);
   }
diff --git a/pkg/analyzer/lib/source/source_range.dart b/pkg/analyzer/lib/source/source_range.dart
index 4ac7a92..d934abd 100644
--- a/pkg/analyzer/lib/source/source_range.dart
+++ b/pkg/analyzer/lib/source/source_range.dart
@@ -4,35 +4,23 @@
 
 import "dart:math" as math;
 
-/**
- * A source range defines a range of characters within source code.
- */
+/// A source range defines a range of characters within source code.
 class SourceRange {
-  /**
-   * An empty source range (a range with offset `0` and length `0`).
-   */
+  /// An empty source range (a range with offset `0` and length `0`).
   static const SourceRange EMPTY = SourceRange(0, 0);
 
-  /**
-   * The 0-based index of the first character of the source range.
-   */
+  /// The 0-based index of the first character of the source range.
   final int offset;
 
-  /**
-   * The number of characters in the source range.
-   */
+  /// The number of characters in the source range.
   final int length;
 
-  /**
-   * Initialize a newly created source range using the given [offset] and
-   * [length].
-   */
+  /// Initialize a newly created source range using the given [offset] and
+  /// [length].
   const SourceRange(this.offset, this.length);
 
-  /**
-   * Return the 0-based index of the character immediately after this source
-   * range.
-   */
+  /// Return the 0-based index of the character immediately after this source
+  /// range.
   int get end => offset + length;
 
   @override
@@ -45,57 +33,40 @@
         other.length == length;
   }
 
-  /**
-   * Return `true` if [x] is in the interval `[offset, offset + length]`.
-   */
+  /// Return `true` if [x] is in the interval `[offset, offset + length]`.
   bool contains(int x) => offset <= x && x <= offset + length;
 
-  /**
-   * Return `true` if [x] is in the interval `(offset, offset + length)`.
-   */
+  /// Return `true` if [x] is in the interval `(offset, offset + length)`.
   bool containsExclusive(int x) => offset < x && x < offset + length;
 
-  /**
-   * Return `true` if the [otherRange] covers this source range.
-   */
+  /// Return `true` if the [otherRange] covers this source range.
   bool coveredBy(SourceRange otherRange) => otherRange.covers(this);
 
-  /**
-   * Return `true` if this source range covers the [otherRange].
-   */
+  /// Return `true` if this source range covers the [otherRange].
   bool covers(SourceRange otherRange) =>
       offset <= otherRange.offset && otherRange.end <= end;
 
-  /**
-   * Return `true` if this source range ends inside the [otherRange].
-   */
+  /// Return `true` if this source range ends inside the [otherRange].
   bool endsIn(SourceRange otherRange) {
     int thisEnd = end;
     return otherRange.contains(thisEnd);
   }
 
-  /**
-   * Return a source range covering [delta] characters before the start of this
-   * source range and [delta] characters after the end of this source range.
-   */
+  /// Return a source range covering [delta] characters before the start of this
+  /// source range and [delta] characters after the end of this source range.
   SourceRange getExpanded(int delta) =>
       SourceRange(offset - delta, delta + length + delta);
 
-  /**
-   * Return a source range with the same offset as this source range but whose
-   * length is [delta] characters longer than this source range.
-   */
+  /// Return a source range with the same offset as this source range but whose
+  /// length is [delta] characters longer than this source range.
   SourceRange getMoveEnd(int delta) => SourceRange(offset, length + delta);
 
-  /**
-   * Return a source range with the same length as this source range but whose
-   * offset is [delta] characters after the offset of this source range.
-   */
+  /// Return a source range with the same length as this source range but whose
+  /// offset is [delta] characters after the offset of this source range.
   SourceRange getTranslated(int delta) => SourceRange(offset + delta, length);
 
-  /**
-   * Return the minimal source range that covers both this and the [otherRange].
-   */
+  /// Return the minimal source range that covers both this and the
+  /// [otherRange].
   SourceRange getUnion(SourceRange otherRange) {
     int newOffset = math.min(offset, otherRange.offset);
     int newEnd =
@@ -103,9 +74,7 @@
     return SourceRange(newOffset, newEnd - newOffset);
   }
 
-  /**
-   * Return `true` if this source range intersects the [otherRange].
-   */
+  /// Return `true` if this source range intersects the [otherRange].
   bool intersects(SourceRange otherRange) {
     if (otherRange == null) {
       return false;
@@ -119,9 +88,7 @@
     return true;
   }
 
-  /**
-   * Return `true` if this source range starts in the [otherRange].
-   */
+  /// Return `true` if this source range starts in the [otherRange].
   bool startsIn(SourceRange otherRange) => otherRange.contains(offset);
 
   @override
diff --git a/pkg/analyzer/lib/src/analysis_options/error/option_codes.dart b/pkg/analyzer/lib/src/analysis_options/error/option_codes.dart
index 9977c0f..43ae068 100644
--- a/pkg/analyzer/lib/src/analysis_options/error/option_codes.dart
+++ b/pkg/analyzer/lib/src/analysis_options/error/option_codes.dart
@@ -4,39 +4,31 @@
 
 import 'package:analyzer/error/error.dart';
 
-/**
- * The error codes used for errors in analysis options files. The convention for
- * this class is for the name of the error code to indicate the problem that
- * caused the error to be generated and for the error message to explain what is
- * wrong and, when appropriate, how the problem can be corrected.
- */
+/// The error codes used for errors in analysis options files. The convention
+/// for this class is for the name of the error code to indicate the problem
+/// that caused the error to be generated and for the error message to explain
+/// what is wrong and, when appropriate, how the problem can be corrected.
 class AnalysisOptionsErrorCode extends ErrorCode {
-  /**
-   * An error code indicating that there is a syntactic error in the included
-   * file.
-   *
-   * Parameters:
-   * 0: the path of the file containing the error
-   * 1: the starting offset of the text in the file that contains the error
-   * 2: the ending offset of the text in the file that contains the error
-   * 3: the error message
-   */
+  /// An error code indicating that there is a syntactic error in the included
+  /// file.
+  ///
+  /// Parameters:
+  /// 0: the path of the file containing the error
+  /// 1: the starting offset of the text in the file that contains the error
+  /// 2: the ending offset of the text in the file that contains the error
+  /// 3: the error message
   static const AnalysisOptionsErrorCode INCLUDED_FILE_PARSE_ERROR =
       AnalysisOptionsErrorCode(
           'INCLUDED_FILE_PARSE_ERROR', '{3} in {0}({1}..{2})');
 
-  /**
-   * An error code indicating that there is a syntactic error in the file.
-   *
-   * Parameters:
-   * 0: the error message from the parse error
-   */
+  /// An error code indicating that there is a syntactic error in the file.
+  ///
+  /// Parameters:
+  /// 0: the error message from the parse error
   static const AnalysisOptionsErrorCode PARSE_ERROR =
       AnalysisOptionsErrorCode('PARSE_ERROR', '{0}');
 
-  /**
-   * Initialize a newly created error code to have the given [name].
-   */
+  /// Initialize a newly created error code to have the given [name].
   const AnalysisOptionsErrorCode(String name, String message,
       {String correction})
       : super.temporary(name, message, correction: correction);
@@ -49,48 +41,41 @@
 }
 
 class AnalysisOptionsHintCode extends ErrorCode {
-  /**
-   * An error code indicating the analysis options file name is deprecated and
-   * the file should be renamed.
-   *
-   * Parameters:
-   * 0: the uri of the file which should be renamed
-   */
+  /// An error code indicating the analysis options file name is deprecated and
+  /// the file should be renamed.
+  ///
+  /// Parameters:
+  /// 0: the uri of the file which should be renamed
   static const AnalysisOptionsHintCode DEPRECATED_ANALYSIS_OPTIONS_FILE_NAME =
       AnalysisOptionsHintCode(
           'DEPRECATED_ANALYSIS_OPTIONS_FILE_NAME',
           "The name of the analysis options file {0} is deprecated;"
               " consider renaming it to analysis_options.yaml.");
 
-  /**
-   * An error code indicating that the enablePreviewDart2 setting is deprecated.
-   */
+  /// An error code indicating that the enablePreviewDart2 setting is
+  /// deprecated.
   static const AnalysisOptionsHintCode PREVIEW_DART_2_SETTING_DEPRECATED =
       AnalysisOptionsHintCode('PREVIEW_DART_2_SETTING_DEPRECATED',
           "The 'enablePreviewDart2' setting is deprecated.",
           correction: "It is no longer necessary to explicitly enable Dart 2.");
 
-  /**
-   * An error code indicating that strong-mode: true is deprecated.
-   */
+  /// An error code indicating that strong-mode: true is deprecated.
   static const AnalysisOptionsHintCode STRONG_MODE_SETTING_DEPRECATED =
       AnalysisOptionsHintCode('STRONG_MODE_SETTING_DEPRECATED',
           "The 'strong-mode: true' setting is deprecated.",
           correction:
               "It is no longer necessary to explicitly enable strong mode.");
 
-  /**
-   * An error code indicating that the enablePreviewDart2 setting is deprecated.
-   */
+  /// An error code indicating that the enablePreviewDart2 setting is
+  /// deprecated.
   static const AnalysisOptionsHintCode SUPER_MIXINS_SETTING_DEPRECATED =
       AnalysisOptionsHintCode('SUPER_MIXINS_SETTING_DEPRECATED',
           "The 'enableSuperMixins' setting is deprecated.",
           correction:
-              "Support has been added to the language for 'mixin' based mixins.");
+              "Support has been added to the language for 'mixin' based "
+              'mixins.');
 
-  /**
-   * Initialize a newly created hint code to have the given [name].
-   */
+  /// Initialize a newly created hint code to have the given [name].
   const AnalysisOptionsHintCode(String name, String message,
       {String correction})
       : super.temporary(name, message, correction: correction);
@@ -102,65 +87,51 @@
   ErrorType get type => ErrorType.HINT;
 }
 
-/**
- * The error codes used for warnings in analysis options files. The convention
- * for this class is for the name of the error code to indicate the problem that
- * caused the error to be generated and for the error message to explain what is
- * wrong and, when appropriate, how the problem can be corrected.
- */
+/// The error codes used for warnings in analysis options files. The convention
+/// for this class is for the name of the error code to indicate the problem
+/// that caused the error to be generated and for the error message to explain
+/// what is wrong and, when appropriate, how the problem can be corrected.
 class AnalysisOptionsWarningCode extends ErrorCode {
-  /**
-   * An error code indicating that the given option is deprecated.
-   */
+  /// An error code indicating that the given option is deprecated.
   static const AnalysisOptionsWarningCode ANALYSIS_OPTION_DEPRECATED =
       AnalysisOptionsWarningCode('ANALYSIS_OPTION_DEPRECATED',
           "The option '{0}' is no longer supported.");
 
-  /**
-   * An error code indicating a specified include file could not be found.
-   *
-   * Parameters:
-   * 0: the uri of the file to be included
-   * 1: the path of the file containing the include directive
-   */
+  /// An error code indicating a specified include file could not be found.
+  ///
+  /// Parameters:
+  /// 0: the uri of the file to be included
+  /// 1: the path of the file containing the include directive
   static const AnalysisOptionsWarningCode INCLUDE_FILE_NOT_FOUND =
       AnalysisOptionsWarningCode('INCLUDE_FILE_NOT_FOUND',
           "The include file {0} in {1} cannot be found.");
 
-  /**
-   * An error code indicating a specified include file has a warning.
-   *
-   * Parameters:
-   * 0: the path of the file containing the warnings
-   * 1: the starting offset of the text in the file that contains the warning
-   * 2: the ending offset of the text in the file that contains the warning
-   * 3: the warning message
-   */
+  /// An error code indicating a specified include file has a warning.
+  ///
+  /// Parameters:
+  /// 0: the path of the file containing the warnings
+  /// 1: the starting offset of the text in the file that contains the warning
+  /// 2: the ending offset of the text in the file that contains the warning
+  /// 3: the warning message
   static const AnalysisOptionsWarningCode INCLUDED_FILE_WARNING =
       AnalysisOptionsWarningCode('INCLUDED_FILE_WARNING',
           "Warning in the included options file {0}({1}..{2}): {3}");
 
-  /**
-   * An error code indicating that a plugin is being configured with an invalid
-   * value for an option and a detail message is provided.
-   */
+  /// An error code indicating that a plugin is being configured with an invalid
+  /// value for an option and a detail message is provided.
   static const AnalysisOptionsWarningCode INVALID_OPTION =
       AnalysisOptionsWarningCode(
           'INVALID_OPTION', "Invalid option specified for '{0}': {1}");
 
-  /**
-   * An error code indicating an invalid format for an options file section.
-   *
-   * Parameters:
-   * 0: the section name
-   */
+  /// An error code indicating an invalid format for an options file section.
+  ///
+  /// Parameters:
+  /// 0: the section name
   static const AnalysisOptionsWarningCode INVALID_SECTION_FORMAT =
       AnalysisOptionsWarningCode(
           'INVALID_SECTION_FORMAT', "Invalid format for the '{0}' section.");
 
-  /**
-   * An error code indicating that strong-mode: false is has been removed.
-   */
+  /// An error code indicating that strong-mode: false is has been removed.
   static const AnalysisOptionsWarningCode SPEC_MODE_REMOVED =
       AnalysisOptionsWarningCode('SPEC_MODE_REMOVED',
           "The option 'strong-mode: false' is no longer supported.",
@@ -168,77 +139,65 @@
               "It's recommended to remove the 'strong-mode:' setting (and make "
               "your code Dart 2 compliant).");
 
-  /**
-   * An error code indicating that an unrecognized error code is being used to
-   * specify an error filter.
-   *
-   * Parameters:
-   * 0: the unrecognized error code
-   */
+  /// An error code indicating that an unrecognized error code is being used to
+  /// specify an error filter.
+  ///
+  /// Parameters:
+  /// 0: the unrecognized error code
   static const AnalysisOptionsWarningCode UNRECOGNIZED_ERROR_CODE =
       AnalysisOptionsWarningCode(
           'UNRECOGNIZED_ERROR_CODE', "'{0}' isn't a recognized error code.");
 
-  /**
-   * An error code indicating that a plugin is being configured with an
-   * unsupported option where there is just one legal value.
-   *
-   * Parameters:
-   * 0: the plugin name
-   * 1: the unsupported option key
-   * 2: the legal value
-   */
+  /// An error code indicating that a plugin is being configured with an
+  /// unsupported option where there is just one legal value.
+  ///
+  /// Parameters:
+  /// 0: the plugin name
+  /// 1: the unsupported option key
+  /// 2: the legal value
   static const AnalysisOptionsWarningCode UNSUPPORTED_OPTION_WITH_LEGAL_VALUE =
       AnalysisOptionsWarningCode(
           'UNSUPPORTED_OPTION_WITH_LEGAL_VALUE',
           "The option '{1}' isn't supported by '{0}'. "
               "Try using the only supported option: '{2}'.");
 
-  /**
-   * An error code indicating that a plugin is being configured with an
-   * unsupported option and legal options are provided.
-   *
-   * Parameters:
-   * 0: the plugin name
-   * 1: the unsupported option key
-   * 2: legal values
-   */
+  /// An error code indicating that a plugin is being configured with an
+  /// unsupported option and legal options are provided.
+  ///
+  /// Parameters:
+  /// 0: the plugin name
+  /// 1: the unsupported option key
+  /// 2: legal values
   static const AnalysisOptionsWarningCode UNSUPPORTED_OPTION_WITH_LEGAL_VALUES =
       AnalysisOptionsWarningCode('UNSUPPORTED_OPTION_WITH_LEGAL_VALUES',
           "The option '{1}' isn't supported by '{0}'.",
           correction: "Try using one of the supported options: {2}.");
 
-  /**
-   * An error code indicating that a plugin is being configured with an
-   * unsupported option and legal options are provided.
-   *
-   * Parameters:
-   * 0: the plugin name
-   * 1: the unsupported option key
-   */
+  /// An error code indicating that a plugin is being configured with an
+  /// unsupported option and legal options are provided.
+  ///
+  /// Parameters:
+  /// 0: the plugin name
+  /// 1: the unsupported option key
   static const AnalysisOptionsWarningCode UNSUPPORTED_OPTION_WITHOUT_VALUES =
       AnalysisOptionsWarningCode(
     'UNSUPPORTED_OPTION_WITHOUT_VALUES',
     "The option '{1}' isn't supported by '{0}'.",
   );
 
-  /**
-   * An error code indicating that an option entry is being configured with an
-   * unsupported value.
-   *
-   * Parameters:
-   * 0: the option name
-   * 1: the unsupported value
-   * 2: legal values
-   */
+  /// An error code indicating that an option entry is being configured with an
+  /// unsupported value.
+  ///
+  /// Parameters:
+  /// 0: the option name
+  /// 1: the unsupported value
+  /// 2: legal values
   static const AnalysisOptionsWarningCode UNSUPPORTED_VALUE =
       AnalysisOptionsWarningCode(
           'UNSUPPORTED_VALUE', "The value '{1}' isn't supported by '{0}'.",
           correction: "Try using one of the supported options: {2}.");
 
-  /**
-   * Initialize a newly created warning code to have the given [name].
-   */
+  /// Initialize a newly created warning code to have the given [name].
   const AnalysisOptionsWarningCode(String name, String message,
       {String correction})
       : super.temporary(name, message, correction: correction);
diff --git a/pkg/analyzer/lib/src/command_line/arguments.dart b/pkg/analyzer/lib/src/command_line/arguments.dart
index 6678491..f3b2c37 100644
--- a/pkg/analyzer/lib/src/command_line/arguments.dart
+++ b/pkg/analyzer/lib/src/command_line/arguments.dart
@@ -10,7 +10,6 @@
 import 'package:analyzer/src/generated/engine.dart';
 import 'package:analyzer/src/generated/sdk.dart';
 import 'package:args/args.dart';
-import 'package:path/path.dart';
 
 const String analysisOptionsFileOption = 'options';
 const String defineVariableOption = 'D';
@@ -55,9 +54,7 @@
   }
 }
 
-/**
- * Use the command-line [args] to create a context builder.
- */
+/// Use the command-line [args] to create a context builder.
 ContextBuilderOptions createContextBuilderOptions(ArgResults args) {
   ContextBuilderOptions builderOptions = ContextBuilderOptions();
   builderOptions.argResults = args;
@@ -101,34 +98,24 @@
   return builderOptions;
 }
 
-/**
- * Use the given [resourceProvider] and command-line [args] to create a Dart SDK
- * manager. The manager will use summary information if [useSummaries] is `true`
- * and if the summary information exists.
- */
+/// Use the given [resourceProvider] and command-line [args] to create a Dart
+/// SDK manager. The manager will use summary information if [useSummaries] is
+/// `true` and if the summary information exists.
 DartSdkManager createDartSdkManager(
-    ResourceProvider resourceProvider, bool useSummaries, ArgResults args) {
+    ResourceProvider resourceProvider, ArgResults args) {
   String sdkPath = args[sdkPathOption];
 
-  bool canUseSummaries = useSummaries &&
-      args.rest.every((String sourcePath) {
-        sourcePath = context.absolute(sourcePath);
-        sourcePath = context.normalize(sourcePath);
-        return !context.isWithin(sdkPath, sourcePath);
-      });
   return DartSdkManager(
-      sdkPath ?? FolderBasedDartSdk.defaultSdkDirectory(resourceProvider)?.path,
-      canUseSummaries);
+    sdkPath ?? FolderBasedDartSdk.defaultSdkDirectory(resourceProvider)?.path,
+  );
 }
 
-/**
- * Add the standard flags and options to the given [parser]. The standard flags
- * are those that are typically used to control the way in which the code is
- * analyzed.
- *
- * TODO(danrubel) Update DDC to support all the options defined in this method
- * then remove the [ddc] named argument from this method.
- */
+/// Add the standard flags and options to the given [parser]. The standard flags
+/// are those that are typically used to control the way in which the code is
+/// analyzed.
+///
+/// TODO(danrubel) Update DDC to support all the options defined in this method
+/// then remove the [ddc] named argument from this method.
 void defineAnalysisArguments(ArgParser parser,
     {bool hide = true, ddc = false}) {
   parser.addOption(sdkPathOption,
@@ -160,8 +147,8 @@
   parser.addMultiOption(defineVariableOption,
       abbr: 'D',
       help:
-          'Define an environment declaration. For example, "-Dfoo=bar" defines an '
-          'environment declaration named "foo" whose value is "bar".',
+          'Define an environment declaration. For example, "-Dfoo=bar" defines '
+          'an environment declaration named "foo" whose value is "bar".',
       hide: hide);
   parser.addOption(packagesOption,
       help: 'The path to the package resolution configuration file, which '
@@ -182,12 +169,10 @@
   }
 }
 
-/**
- * Find arguments of the form -Dkey=value
- * or argument pairs of the form -Dkey value
- * and place those key/value pairs into [definedVariables].
- * Return a list of arguments with the key/value arguments removed.
- */
+/// Find arguments of the form -Dkey=value
+/// or argument pairs of the form -Dkey value
+/// and place those key/value pairs into [definedVariables].
+/// Return a list of arguments with the key/value arguments removed.
 List<String> extractDefinedVariables(
     List<String> args, Map<String, String> definedVariables) {
   //TODO(danrubel) extracting defined variables is already handled by the
@@ -217,19 +202,17 @@
   return remainingArgs;
 }
 
-/**
- * Return a list of command-line arguments containing all of the given [args]
- * that are defined by the given [parser]. An argument is considered to be
- * defined by the parser if
- * - it starts with '--' and the rest of the argument (minus any value
- *   introduced by '=') is the name of a known option,
- * - it starts with '-' and the rest of the argument (minus any value
- *   introduced by '=') is the name of a known abbreviation, or
- * - it starts with something other than '--' or '-'.
- *
- * This function allows command-line tools to implement the
- * '--ignore-unrecognized-flags' option.
- */
+/// Return a list of command-line arguments containing all of the given [args]
+/// that are defined by the given [parser]. An argument is considered to be
+/// defined by the parser if
+/// - it starts with '--' and the rest of the argument (minus any value
+///   introduced by '=') is the name of a known option,
+/// - it starts with '-' and the rest of the argument (minus any value
+///   introduced by '=') is the name of a known abbreviation, or
+/// - it starts with something other than '--' or '-'.
+///
+/// This function allows command-line tools to implement the
+/// '--ignore-unrecognized-flags' option.
 List<String> filterUnknownArguments(List<String> args, ArgParser parser) {
   Set<String> knownOptions = HashSet<String>();
   Set<String> knownAbbreviations = HashSet<String>();
@@ -269,10 +252,8 @@
   return filtered;
 }
 
-/**
- * Use the given [parser] to parse the given command-line [args], and return the
- * result.
- */
+/// Use the given [parser] to parse the given command-line [args], and return
+/// the result.
 ArgResults parse(
     ResourceProvider provider, ArgParser parser, List<String> args) {
   args = preprocessArgs(provider, args);
@@ -282,12 +263,10 @@
   return parser.parse(args);
 }
 
-/**
- * Preprocess the given list of command line [args].
- * If the final arg is `@file_path` (Bazel worker mode),
- * then read in all the lines of that file and add those as args.
- * Always returns a new modifiable list.
- */
+/// Preprocess the given list of command line [args].
+/// If the final arg is `@file_path` (Bazel worker mode),
+/// then read in all the lines of that file and add those as args.
+/// Always returns a new modifiable list.
 List<String> preprocessArgs(ResourceProvider provider, List<String> args) {
   args = List.from(args);
   if (args.isEmpty) {
diff --git a/pkg/analyzer/lib/src/context/builder.dart b/pkg/analyzer/lib/src/context/builder.dart
index 711a930..3bcc89f 100644
--- a/pkg/analyzer/lib/src/context/builder.dart
+++ b/pkg/analyzer/lib/src/context/builder.dart
@@ -242,15 +242,13 @@
     }
 
     String sdkPath = sdkManager.defaultSdkDirectory;
-    SdkDescription description =
-        SdkDescription(<String>[sdkPath], analysisOptions);
+    SdkDescription description = SdkDescription(sdkPath);
     return sdkManager.getSdk(description, () {
       var sdk = FolderBasedDartSdk(
         resourceProvider,
         resourceProvider.getFolder(sdkPath),
       );
       sdk.analysisOptions = analysisOptions;
-      sdk.useSummary = sdkManager.canUseSummaries;
       return sdk;
     });
   }
diff --git a/pkg/analyzer/lib/src/context/context.dart b/pkg/analyzer/lib/src/context/context.dart
index dcf313e..c5bdfd4 100644
--- a/pkg/analyzer/lib/src/context/context.dart
+++ b/pkg/analyzer/lib/src/context/context.dart
@@ -5,15 +5,13 @@
 import 'package:analyzer/dart/element/type_provider.dart';
 import 'package:analyzer/src/dart/analysis/session.dart';
 import 'package:analyzer/src/dart/element/type_provider.dart';
+import 'package:analyzer/src/dart/element/type_system.dart';
 import 'package:analyzer/src/generated/constant.dart';
 import 'package:analyzer/src/generated/engine.dart';
 import 'package:analyzer/src/generated/source.dart';
-import 'package:analyzer/src/generated/type_system.dart' show TypeSystemImpl;
 import 'package:meta/meta.dart';
 
-/**
- * An [AnalysisContext] in which analysis can be performed.
- */
+/// An [AnalysisContext] in which analysis can be performed.
 class AnalysisContextImpl implements AnalysisContext {
   final SynchronousSession _synchronousSession;
 
@@ -85,15 +83,11 @@
   }
 }
 
-/**
- * An [AnalysisContext] that only contains sources for a Dart SDK.
- */
+/// An [AnalysisContext] that only contains sources for a Dart SDK.
 class SdkAnalysisContext extends AnalysisContextImpl {
-  /**
-   * Initialize a newly created SDK analysis context with the given [options].
-   * Analysis options cannot be changed afterwards.  If the given [options] are
-   * `null`, then default options are used.
-   */
+  /// Initialize a newly created SDK analysis context with the given [options].
+  /// Analysis options cannot be changed afterwards.  If the given [options] are
+  /// `null`, then default options are used.
   SdkAnalysisContext(AnalysisOptions options, SourceFactory sourceFactory)
       : super(SynchronousSession(options, DeclaredVariables()), sourceFactory);
 }
diff --git a/pkg/analyzer/lib/src/context/context_root.dart b/pkg/analyzer/lib/src/context/context_root.dart
index 55747b1..2b058e5 100644
--- a/pkg/analyzer/lib/src/context/context_root.dart
+++ b/pkg/analyzer/lib/src/context/context_root.dart
@@ -6,39 +6,27 @@
 import 'package:meta/meta.dart';
 import 'package:path/path.dart' as path;
 
-/**
- * Information about the root directory associated with an analysis context.
- *
- * Clients may not extend, implement or mix-in this class.
- */
+/// Information about the root directory associated with an analysis context.
+///
+/// Clients may not extend, implement or mix-in this class.
 class ContextRoot {
-  /**
-   * The path context to use when manipulating paths.
-   */
+  /// The path context to use when manipulating paths.
   final path.Context pathContext;
 
-  /**
-   * The absolute path of the root directory containing the files to be
-   * analyzed.
-   */
+  /// The absolute path of the root directory containing the files to be
+  /// analyzed.
   final String root;
 
-  /**
-   * A list of the absolute paths of files and directories within the root
-   * directory that should not be analyzed.
-   */
+  /// A list of the absolute paths of files and directories within the root
+  /// directory that should not be analyzed.
   final List<String> exclude;
 
-  /**
-   * An informative value for the file path that the analysis options were read
-   * from. This value can be `null` if there is no analysis options file or if
-   * the location of the file has not yet been discovered.
-   */
+  /// An informative value for the file path that the analysis options were read
+  /// from. This value can be `null` if there is no analysis options file or if
+  /// the location of the file has not yet been discovered.
   String optionsFilePath;
 
-  /**
-   * Initialize a newly created context root.
-   */
+  /// Initialize a newly created context root.
   ContextRoot(this.root, this.exclude, {@required path.Context pathContext})
       : pathContext = pathContext ?? path.context;
 
@@ -59,12 +47,10 @@
     return false;
   }
 
-  /**
-   * Return `true` if the file with the given [filePath] is contained within
-   * this context root. A file contained in a context root if it is within the
-   * context [root] neither explicitly excluded or within one of the excluded
-   * directories.
-   */
+  /// Return `true` if the file with the given [filePath] is contained within
+  /// this context root. A file contained in a context root if it is within the
+  /// context [root] neither explicitly excluded or within one of the excluded
+  /// directories.
   bool containsFile(String filePath) {
     if (!pathContext.isWithin(root, filePath)) {
       return false;
diff --git a/pkg/analyzer/lib/src/context/source.dart b/pkg/analyzer/lib/src/context/source.dart
index 8f31594..74a85dc 100644
--- a/pkg/analyzer/lib/src/context/source.dart
+++ b/pkg/analyzer/lib/src/context/source.dart
@@ -13,25 +13,17 @@
 import 'package:analyzer/src/source/package_map_resolver.dart';
 import 'package:analyzer/src/workspace/package_build.dart';
 
-/**
- * Instances of the class `SourceFactory` resolve possibly relative URI's
- * against an existing [Source].
- */
+/// Instances of the class `SourceFactory` resolve possibly relative URI's
+/// against an existing [Source].
 class SourceFactoryImpl implements SourceFactory {
-  /**
-   * The resolvers used to resolve absolute URI's.
-   */
+  /// The resolvers used to resolve absolute URI's.
   final List<UriResolver> resolvers;
 
-  /**
-   * Cache of mapping of absolute [Uri]s to [Source]s.
-   */
+  /// Cache of mapping of absolute [Uri]s to [Source]s.
   final HashMap<Uri, Source> _absoluteUriToSourceCache = HashMap<Uri, Source>();
 
-  /**
-   * Initialize a newly created source factory with the given absolute URI
-   * [resolvers].
-   */
+  /// Initialize a newly created source factory with the given absolute URI
+  /// [resolvers].
   SourceFactoryImpl(this.resolvers);
 
   @override
@@ -148,18 +140,17 @@
     return null;
   }
 
-  /**
-   * Return a source object representing the URI that results from resolving
-   * the given (possibly relative) contained URI against the URI associated
-   * with an existing source object, or `null` if the URI could not be resolved.
-   *
-   * @param containingSource the source containing the given URI
-   * @param containedUri the (possibly relative) URI to be resolved against the
-   *        containing source
-   * @return the source representing the contained URI
-   * @throws AnalysisException if either the contained URI is invalid or if it
-   *         cannot be resolved against the source object's URI
-   */
+  /// Return a source object representing the URI that results from resolving
+  /// the given (possibly relative) contained URI against the URI associated
+  /// with an existing source object, or `null` if the URI could not be
+  /// resolved.
+  ///
+  /// @param containingSource the source containing the given URI
+  /// @param containedUri the (possibly relative) URI to be resolved against the
+  ///        containing source
+  /// @return the source representing the contained URI
+  /// @throws AnalysisException if either the contained URI is invalid or if it
+  ///         cannot be resolved against the source object's URI
   Source _internalResolveUri(Source containingSource, Uri containedUri) {
     if (!containedUri.isAbsolute) {
       if (containingSource == null) {
diff --git a/pkg/analyzer/lib/src/dart/analysis/byte_store.dart b/pkg/analyzer/lib/src/dart/analysis/byte_store.dart
index b73493e..fbb5afb 100644
--- a/pkg/analyzer/lib/src/dart/analysis/byte_store.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/byte_store.dart
@@ -4,34 +4,26 @@
 
 import 'cache.dart';
 
-/**
- * Store of bytes associated with string keys.
- *
- * Each key must be not longer than 100 characters and consist of only `[a-z]`,
- * `[0-9]`, `.` and `_` characters. The key cannot be an empty string, the
- * literal `.`, or contain the sequence `..`.
- *
- * Note that associations are not guaranteed to be persistent. The value
- * associated with a key can change or become `null` at any point in time.
- *
- * TODO(scheglov) Research using asynchronous API.
- */
+/// Store of bytes associated with string keys.
+///
+/// Each key must be not longer than 100 characters and consist of only `[a-z]`,
+/// `[0-9]`, `.` and `_` characters. The key cannot be an empty string, the
+/// literal `.`, or contain the sequence `..`.
+///
+/// Note that associations are not guaranteed to be persistent. The value
+/// associated with a key can change or become `null` at any point in time.
+///
+/// TODO(scheglov) Research using asynchronous API.
 abstract class ByteStore {
-  /**
-   * Return the bytes associated with the given [key].
-   * Return `null` if the association does not exist.
-   */
+  /// Return the bytes associated with the given [key].
+  /// Return `null` if the association does not exist.
   List<int> get(String key);
 
-  /**
-   * Associate the given [bytes] with the [key].
-   */
+  /// Associate the given [bytes] with the [key].
   void put(String key, List<int> bytes);
 }
 
-/**
- * [ByteStore] which stores data only in memory.
- */
+/// [ByteStore] which stores data only in memory.
 class MemoryByteStore implements ByteStore {
   final Map<String, List<int>> _map = {};
 
@@ -46,9 +38,7 @@
   }
 }
 
-/**
- * A wrapper around [ByteStore] which adds an in-memory LRU cache to it.
- */
+/// A wrapper around [ByteStore] which adds an in-memory LRU cache to it.
 class MemoryCachingByteStore implements ByteStore {
   final ByteStore _store;
   final Cache<String, List<int>> _cache;
@@ -68,9 +58,7 @@
   }
 }
 
-/**
- * [ByteStore] which does not store any data.
- */
+/// [ByteStore] which does not store any data.
 class NullByteStore implements ByteStore {
   @override
   List<int> get(String key) => null;
diff --git a/pkg/analyzer/lib/src/dart/analysis/cache.dart b/pkg/analyzer/lib/src/dart/analysis/cache.dart
index 1a6d8e4..d7fe753 100644
--- a/pkg/analyzer/lib/src/dart/analysis/cache.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/cache.dart
@@ -2,9 +2,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-/**
- * LRU cache of objects.
- */
+/// LRU cache of objects.
 class Cache<K, V> {
   final int _maxSizeBytes;
   final int Function(V) _meter;
diff --git a/pkg/analyzer/lib/src/dart/analysis/context_builder.dart b/pkg/analyzer/lib/src/dart/analysis/context_builder.dart
index ee087db..fde460e 100644
--- a/pkg/analyzer/lib/src/dart/analysis/context_builder.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/context_builder.dart
@@ -25,28 +25,20 @@
 import 'package:analyzer/src/generated/source.dart' show ContentCache;
 import 'package:meta/meta.dart';
 
-/**
- * An implementation of a context builder.
- */
+/// An implementation of a context builder.
 class ContextBuilderImpl implements ContextBuilder {
-  /**
-   * The resource provider used to access the file system.
-   */
+  /// The resource provider used to access the file system.
   final ResourceProvider resourceProvider;
 
-  /**
-   * Initialize a newly created context builder. If a [resourceProvider] is
-   * given, then it will be used to access the file system, otherwise the
-   * default resource provider will be used.
-   */
+  /// Initialize a newly created context builder. If a [resourceProvider] is
+  /// given, then it will be used to access the file system, otherwise the
+  /// default resource provider will be used.
   ContextBuilderImpl({ResourceProvider resourceProvider})
       : resourceProvider =
             resourceProvider ?? PhysicalResourceProvider.INSTANCE;
 
-  /**
-   * Return the path to the default location of the SDK, or `null` if the sdk
-   * cannot be found.
-   */
+  /// Return the path to the default location of the SDK, or `null` if the sdk
+  /// cannot be found.
   String get _defaultSdkPath =>
       FolderBasedDartSdk.defaultSdkDirectory(resourceProvider)?.path;
 
@@ -68,7 +60,7 @@
     if (sdkPath == null) {
       throw ArgumentError('Cannot find path to the SDK');
     }
-    DartSdkManager sdkManager = DartSdkManager(sdkPath, true);
+    DartSdkManager sdkManager = DartSdkManager(sdkPath);
 
     if (scheduler == null) {
       scheduler = AnalysisDriverScheduler(performanceLog);
@@ -113,10 +105,8 @@
     return context;
   }
 
-  /**
-   * Convert the [declaredVariables] into a map for use with the old context
-   * builder.
-   */
+  /// Convert the [declaredVariables] into a map for use with the old context
+  /// builder.
   Map<String, String> _toMap(DeclaredVariables declaredVariables) {
     Map<String, String> map = <String, String>{};
     for (String name in declaredVariables.variableNames) {
diff --git a/pkg/analyzer/lib/src/dart/analysis/context_locator.dart b/pkg/analyzer/lib/src/dart/analysis/context_locator.dart
index 7bfa83f..807470c 100644
--- a/pkg/analyzer/lib/src/dart/analysis/context_locator.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/context_locator.dart
@@ -32,37 +32,25 @@
 import 'package:path/path.dart';
 import 'package:yaml/yaml.dart';
 
-/**
- * An implementation of a context locator.
- */
+/// An implementation of a context locator.
 class ContextLocatorImpl implements ContextLocator {
-  /**
-   * The name of the analysis options file.
-   */
+  /// The name of the analysis options file.
   static const String ANALYSIS_OPTIONS_NAME = 'analysis_options.yaml';
 
-  /**
-   * The name of the packages file.
-   */
+  /// The name of the packages file.
   static const String PACKAGES_FILE_NAME = '.packages';
 
-  /**
-   * The resource provider used to access the file system.
-   */
+  /// The resource provider used to access the file system.
   final ResourceProvider resourceProvider;
 
-  /**
-   * Initialize a newly created context locator. If a [resourceProvider] is
-   * supplied, it will be used to access the file system. Otherwise the default
-   * resource provider will be used.
-   */
+  /// Initialize a newly created context locator. If a [resourceProvider] is
+  /// supplied, it will be used to access the file system. Otherwise the default
+  /// resource provider will be used.
   ContextLocatorImpl({ResourceProvider resourceProvider})
       : this.resourceProvider =
             resourceProvider ?? PhysicalResourceProvider.INSTANCE;
 
-  /**
-   * Return the path to the default location of the SDK.
-   */
+  /// Return the path to the default location of the SDK.
   String get _defaultSdkPath =>
       FolderBasedDartSdk.defaultSdkDirectory(resourceProvider).path;
 
@@ -84,8 +72,7 @@
     }
     PerformanceLog performanceLog = PerformanceLog(StringBuffer());
     AnalysisDriverScheduler scheduler = AnalysisDriverScheduler(performanceLog);
-    DartSdkManager sdkManager =
-        DartSdkManager(sdkPath ?? _defaultSdkPath, true);
+    DartSdkManager sdkManager = DartSdkManager(sdkPath ?? _defaultSdkPath);
     scheduler.start();
     ContextBuilderOptions options = ContextBuilderOptions();
     ContextBuilder builder =
@@ -189,26 +176,23 @@
     return roots;
   }
 
-  /**
-   * Return `true` if the given [resource] is contained in one or more of the
-   * given [folders].
-   */
+  /// Return `true` if the given [resource] is contained in one or more of the
+  /// given [folders].
   bool _containedInAny(Iterable<Folder> folders, Resource resource) =>
       folders.any((Folder folder) => folder.contains(resource.path));
 
-  /**
-   * If the given [folder] should be the root of a new analysis context, then
-   * create a new context root for it and add it to the list of context [roots].
-   * The [containingRoot] is the context root from an enclosing directory and is
-   * used to inherit configuration information that isn't overridden.
-   *
-   * If either the [optionsFile] or [packagesFile] is non-`null` then the given
-   * file will be used even if there is a local version of the file.
-   *
-   * For each directory within the given [folder] that is neither in the list of
-   * [excludedFolders] nor excluded by the [excludedFilePatterns], recursively
-   * search for nested context roots.
-   */
+  /// If the given [folder] should be the root of a new analysis context, then
+  /// create a new context root for it and add it to the list of context
+  /// [roots]. The [containingRoot] is the context root from an enclosing
+  /// directory and is used to inherit configuration information that isn't
+  /// overridden.
+  ///
+  /// If either the [optionsFile] or [packagesFile] is non-`null` then the given
+  /// file will be used even if there is a local version of the file.
+  ///
+  /// For each directory within the given [folder] that is neither in the list
+  /// of [excludedFolders] nor excluded by the [excludedFilePatterns],
+  /// recursively search for nested context roots.
   void _createContextRoots(
       List<ContextRoot> roots,
       Folder folder,
@@ -253,14 +237,13 @@
         excludedFilePatterns, optionsFile, packagesFile);
   }
 
-  /**
-   * For each directory within the given [folder] that is neither in the list of
-   * [excludedFolders] nor excluded by the [excludedFilePatterns], recursively
-   * search for nested context roots and add them to the list of [roots].
-   *
-   * If either the [optionsFile] or [packagesFile] is non-`null` then the given
-   * file will be used even if there is a local version of the file.
-   */
+  /// For each directory within the given [folder] that is neither in the list
+  /// of [excludedFolders] nor excluded by the [excludedFilePatterns],
+  /// recursively search for nested context roots and add them to the list of
+  /// [roots].
+  ///
+  /// If either the [optionsFile] or [packagesFile] is non-`null` then the given
+  /// file will be used even if there is a local version of the file.
   void _createContextRootsIn(
       List<ContextRoot> roots,
       Folder folder,
@@ -303,11 +286,9 @@
     }
   }
 
-  /**
-   * Return the analysis options file to be used to analyze files in the given
-   * [folder], or `null` if there is no analysis options file in the given
-   * folder or any parent folder.
-   */
+  /// Return the analysis options file to be used to analyze files in the given
+  /// [folder], or `null` if there is no analysis options file in the given
+  /// folder or any parent folder.
   File _findOptionsFile(Folder folder) {
     while (folder != null) {
       File packagesFile = _getOptionsFile(folder);
@@ -319,11 +300,9 @@
     return null;
   }
 
-  /**
-   * Return the packages file to be used to analyze files in the given [folder],
-   * or `null` if there is no packages file in the given folder or any parent
-   * folder.
-   */
+  /// Return the packages file to be used to analyze files in the given
+  /// [folder], or `null` if there is no packages file in the given folder or
+  /// any parent folder.
   File _findPackagesFile(Folder folder) {
     while (folder != null) {
       File packagesFile = _getPackagesFile(folder);
@@ -375,10 +354,8 @@
     return patterns;
   }
 
-  /**
-   * If the given [directory] contains a file with the given [name], then return
-   * the file. Otherwise, return `null`.
-   */
+  /// If the given [directory] contains a file with the given [name], then
+  /// return the file. Otherwise, return `null`.
   File _getFile(Folder directory, String name) {
     Resource resource = directory.getChild(name);
     if (resource is File && resource.exists) {
@@ -387,24 +364,18 @@
     return null;
   }
 
-  /**
-   * Return the analysis options file in the given [folder], or `null` if the
-   * folder does not contain an analysis options file.
-   */
+  /// Return the analysis options file in the given [folder], or `null` if the
+  /// folder does not contain an analysis options file.
   File _getOptionsFile(Folder folder) =>
       _getFile(folder, ANALYSIS_OPTIONS_NAME);
 
-  /**
-   * Return the packages file in the given [folder], or `null` if the folder
-   * does not contain a packages file.
-   */
+  /// Return the packages file in the given [folder], or `null` if the folder
+  /// does not contain a packages file.
   File _getPackagesFile(Folder folder) => _getFile(folder, PACKAGES_FILE_NAME);
 
-  /**
-   * Add to the given lists of [folders] and [files] all of the resources in the
-   * given list of [paths] that exist and are not contained within one of the
-   * folders.
-   */
+  /// Add to the given lists of [folders] and [files] all of the resources in
+  /// the given list of [paths] that exist and are not contained within one of
+  /// the folders.
   void _resourcesFromPaths(
       List<String> paths, List<Folder> folders, List<File> files) {
     for (String path in _uniqueSortedPaths(paths)) {
@@ -421,10 +392,8 @@
     }
   }
 
-  /**
-   * Return a list of paths that contains all of the unique elements from the
-   * given list of [paths], sorted such that shorter paths are first.
-   */
+  /// Return a list of paths that contains all of the unique elements from the
+  /// given list of [paths], sorted such that shorter paths are first.
   List<String> _uniqueSortedPaths(List<String> paths) {
     Set<String> uniquePaths = HashSet<String>.from(paths);
     List<String> sortedPaths = uniquePaths.toList();
diff --git a/pkg/analyzer/lib/src/dart/analysis/context_root.dart b/pkg/analyzer/lib/src/dart/analysis/context_root.dart
index 88d085a..e652710 100644
--- a/pkg/analyzer/lib/src/dart/analysis/context_root.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/context_root.dart
@@ -6,9 +6,7 @@
 import 'package:analyzer/file_system/file_system.dart';
 import 'package:path/path.dart';
 
-/**
- * An implementation of a context root.
- */
+/// An implementation of a context root.
 class ContextRootImpl implements ContextRoot {
   @override
   final ResourceProvider resourceProvider;
@@ -28,9 +26,7 @@
   @override
   File packagesFile;
 
-  /**
-   * Initialize a newly created context root.
-   */
+  /// Initialize a newly created context root.
   ContextRootImpl(this.resourceProvider, this.root);
 
   @override
@@ -71,10 +67,8 @@
     return _isIncluded(path) && !_isExcluded(path);
   }
 
-  /**
-   * Return the absolute paths of all of the files that are included in the
-   * given [folder].
-   */
+  /// Return the absolute paths of all of the files that are included in the
+  /// given [folder].
   Iterable<String> _includedFilesInFolder(Folder folder) sync* {
     for (Resource resource in folder.getChildren()) {
       String path = resource.path;
@@ -91,10 +85,8 @@
     }
   }
 
-  /**
-   * Return `true` if the given [path] is either the same as or inside of one of
-   * the [excludedPaths].
-   */
+  /// Return `true` if the given [path] is either the same as or inside of one
+  /// of the [excludedPaths].
   bool _isExcluded(String path) {
     Context context = resourceProvider.pathContext;
     String name = context.basename(path);
@@ -120,10 +112,8 @@
     return false;
   }
 
-  /**
-   * Return `true` if the given [path] is either the same as or inside of one of
-   * the [includedPaths].
-   */
+  /// Return `true` if the given [path] is either the same as or inside of one
+  /// of the [includedPaths].
   bool _isIncluded(String path) {
     Context context = resourceProvider.pathContext;
     for (String includedPath in includedPaths) {
diff --git a/pkg/analyzer/lib/src/dart/analysis/crc32.dart b/pkg/analyzer/lib/src/dart/analysis/crc32.dart
index 2f2d504..374097c 100644
--- a/pkg/analyzer/lib/src/dart/analysis/crc32.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/crc32.dart
@@ -261,10 +261,8 @@
   0x2D02EF8D
 ];
 
-/**
- * Get the CRC-32 checksum of the given array. You can append bytes to an
- * already computed crc by specifying the previous [crc] value.
- */
+/// Get the CRC-32 checksum of the given array. You can append bytes to an
+/// already computed crc by specifying the previous [crc] value.
 int getCrc32(List<int> array, [int crc = 0]) {
   int len = array.length;
   crc = crc ^ 0xffffffff;
diff --git a/pkg/analyzer/lib/src/dart/analysis/defined_names.dart b/pkg/analyzer/lib/src/dart/analysis/defined_names.dart
index d76631a..ed3cfb7 100644
--- a/pkg/analyzer/lib/src/dart/analysis/defined_names.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/defined_names.dart
@@ -4,9 +4,7 @@
 
 import 'package:analyzer/dart/ast/ast.dart';
 
-/**
- * Compute the [DefinedNames] for the given [unit].
- */
+/// Compute the [DefinedNames] for the given [unit].
 DefinedNames computeDefinedNames(CompilationUnit unit) {
   DefinedNames names = DefinedNames();
 
@@ -47,9 +45,7 @@
   return names;
 }
 
-/**
- * Defined top-level and class member names.
- */
+/// Defined top-level and class member names.
 class DefinedNames {
   final Set<String> topLevelNames = <String>{};
   final Set<String> classMemberNames = <String>{};
diff --git a/pkg/analyzer/lib/src/dart/analysis/driver.dart b/pkg/analyzer/lib/src/dart/analysis/driver.dart
index 3ec888a..f711628 100644
--- a/pkg/analyzer/lib/src/dart/analysis/driver.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/driver.dart
@@ -91,7 +91,7 @@
 /// TODO(scheglov) Clean up the list of implicitly analyzed files.
 class AnalysisDriver implements AnalysisDriverGeneric {
   /// The version of data format, should be incremented on every format change.
-  static const int DATA_VERSION = 103;
+  static const int DATA_VERSION = 104;
 
   /// The length of the list returned by [_computeDeclaredVariablesSignature].
   static const int _declaredVariablesSignatureLength = 4;
@@ -144,12 +144,18 @@
   api.AnalysisContext analysisContext;
 
   /// The salt to mix into all hashes used as keys for unlinked data.
-  final Uint32List _unlinkedSalt =
-      Uint32List(2 + AnalysisOptionsImpl.unlinkedSignatureLength);
+  final Uint32List _saltForUnlinked =
+      Uint32List(2 + AnalysisOptionsImpl.signatureLength);
+
+  /// The salt to mix into all hashes used as keys for elements.
+  final Uint32List _saltForElements = Uint32List(1 +
+      AnalysisOptionsImpl.signatureLength +
+      _declaredVariablesSignatureLength);
 
   /// The salt to mix into all hashes used as keys for linked data.
-  final Uint32List _linkedSalt = Uint32List(
-      2 + AnalysisOptions.signatureLength + _declaredVariablesSignatureLength);
+  final Uint32List _saltForResolution = Uint32List(2 +
+      AnalysisOptionsImpl.signatureLength +
+      _declaredVariablesSignatureLength);
 
   /// The set of priority files, that should be analyzed sooner.
   final _priorityFiles = <String>{};
@@ -235,28 +241,9 @@
   /// The [FileTracker] used by this driver.
   FileTracker _fileTracker;
 
-  /// When this flag is set to `true`, the set of analyzed files must not change,
-  /// and all [AnalysisResult]s are cached infinitely.
-  ///
-  /// The flag is intended to be used for non-interactive clients, like DDC,
-  /// which start a new analysis session, load a set of files, resolve all of
-  /// them, process the resolved units, and then throw away that whole session.
-  ///
-  /// The key problem that this flag is solving is that the driver analyzes the
-  /// whole library when the result for a unit of the library is requested. So,
-  /// when the client requests sequentially the defining unit, then the first
-  /// part, then the second part, the driver has to perform analysis of the
-  /// library three times and every time throw away all the units except the one
-  /// which was requested. With this flag set to `true`, the driver can analyze
-  /// once and cache all the resolved units.
-  final bool disableChangesAndCacheAllResults;
-
   /// Whether resolved units should be indexed.
   final bool enableIndex;
 
-  /// The cache to use with [disableChangesAndCacheAllResults].
-  final Map<String, AnalysisResult> _allCachedResults = {};
-
   /// The current analysis session.
   AnalysisSessionImpl _currentSession;
 
@@ -288,7 +275,6 @@
       SourceFactory sourceFactory,
       this._analysisOptions,
       {Packages packages,
-      this.disableChangesAndCacheAllResults = false,
       this.enableIndex = false,
       SummaryDataStore externalSummaries,
       bool retainDataForTesting = false})
@@ -482,7 +468,6 @@
   /// [changeFile] invocation.
   void changeFile(String path) {
     _throwIfNotAbsolutePath(path);
-    _throwIfChangesAreNotAllowed();
     _changeFile(path);
   }
 
@@ -547,11 +532,7 @@
   /// The [path] can be any file - explicitly or implicitly analyzed, or neither.
   ResolvedUnitResult getCachedResult(String path) {
     _throwIfNotAbsolutePath(path);
-    ResolvedUnitResult result = _priorityResults[path];
-    if (disableChangesAndCacheAllResults) {
-      result ??= _allCachedResults[path];
-    }
-    return result;
+    return _priorityResults[path];
   }
 
   /// Return a [Future] that completes with the [ErrorsResult] for the Dart
@@ -885,7 +866,7 @@
     _throwIfNotAbsolutePath(path);
     var file = fsState.getFileForPath(path);
     ApiSignature signature = ApiSignature();
-    signature.addUint32List(_linkedSalt);
+    signature.addUint32List(_saltForResolution);
     signature.addString(file.transitiveSignature);
     return signature;
   }
@@ -1179,7 +1160,6 @@
   /// but does not guarantee this.
   void removeFile(String path) {
     _throwIfNotAbsolutePath(path);
-    _throwIfChangesAreNotAllowed();
     _fileTracker.removeFile(path);
     clearLibraryContext();
     _priorityResults.clear();
@@ -1323,12 +1303,6 @@
             bytes = unitBytes;
             resolvedUnit = unitResult.unit;
           }
-          if (disableChangesAndCacheAllResults) {
-            AnalysisResult result = _getAnalysisResultFromBytes(
-                unitFile, unitSignature, unitBytes,
-                content: unitFile.content, resolvedUnit: unitResult.unit);
-            _allCachedResults[unitFile.path] = result;
-          }
         }
 
         // Return the result, full or partial.
@@ -1493,8 +1467,8 @@
       sourceFactory,
       analysisOptions,
       declaredVariables,
-      _unlinkedSalt,
-      _linkedSalt,
+      _saltForUnlinked,
+      _saltForElements,
       featureSetProvider,
       externalSummaries: _externalSummaries,
     );
@@ -1512,6 +1486,7 @@
     NullSafetyUnderstandingFlag.enableNullSafetyTypes(() {
       if (_libraryContext == null) {
         _libraryContext = LibraryContext(
+          testView: _testView.libraryContext,
           session: currentSession,
           logger: _logger,
           byteStore: _byteStore,
@@ -1543,31 +1518,47 @@
     _discoverAvailableFilesTask ??= _DiscoverAvailableFilesTask(this);
   }
 
-  /// Fill [_unlinkedSalt] and [_linkedSalt] with data.
   void _fillSalt() {
-    _unlinkedSalt[0] = DATA_VERSION;
-    _unlinkedSalt[1] = enableIndex ? 1 : 0;
-    _unlinkedSalt.setAll(2, _analysisOptions.unlinkedSignature);
-
-    _fillSaltLinked();
+    _fillSaltForUnlinked();
+    _fillSaltForElements();
+    _fillSaltForResolution();
   }
 
-  void _fillSaltLinked() {
+  void _fillSaltForElements() {
     var index = 0;
 
-    _linkedSalt[index] = DATA_VERSION;
+    _saltForElements[index] = DATA_VERSION;
     index++;
 
-    _linkedSalt[index] = enableIndex ? 1 : 0;
-    index++;
+    _saltForElements.setAll(index, _analysisOptions.signatureForElements);
+    index += AnalysisOptionsImpl.signatureLength;
 
-    _linkedSalt.setAll(index, _analysisOptions.signature);
-    index += AnalysisOptionsImpl.unlinkedSignatureLength;
-
-    _linkedSalt.setAll(index, _computeDeclaredVariablesSignature());
+    _saltForResolution.setAll(index, _computeDeclaredVariablesSignature());
     index += _declaredVariablesSignatureLength;
   }
 
+  void _fillSaltForResolution() {
+    var index = 0;
+
+    _saltForResolution[index] = DATA_VERSION;
+    index++;
+
+    _saltForResolution[index] = enableIndex ? 1 : 0;
+    index++;
+
+    _saltForResolution.setAll(index, _analysisOptions.signature);
+    index += AnalysisOptionsImpl.signatureLength;
+
+    _saltForResolution.setAll(index, _computeDeclaredVariablesSignature());
+    index += _declaredVariablesSignatureLength;
+  }
+
+  void _fillSaltForUnlinked() {
+    _saltForUnlinked[0] = DATA_VERSION;
+    _saltForUnlinked[1] = enableIndex ? 1 : 0;
+    _saltForUnlinked.setAll(2, _analysisOptions.unlinkedSignature);
+  }
+
   /// Load the [AnalysisResult] for the given [file] from the [bytes]. Set
   /// optional [content] and [resolvedUnit].
   AnalysisResult _getAnalysisResultFromBytes(
@@ -1612,7 +1603,7 @@
   /// in the [library], e.g. element model, errors, index, etc.
   String _getResolvedUnitSignature(FileState library, FileState file) {
     ApiSignature signature = ApiSignature();
-    signature.addUint32List(_linkedSalt);
+    signature.addUint32List(_saltForResolution);
     signature.addString(library.transitiveSignature);
     signature.addString(file.contentHash);
     return signature.toHex();
@@ -1723,14 +1714,6 @@
     }
   }
 
-  /// If the driver is used in the read-only mode with infinite cache,
-  /// we should not allow invocations that change files.
-  void _throwIfChangesAreNotAllowed() {
-    if (disableChangesAndCacheAllResults) {
-      throw StateError('Changing files is not allowed for this driver.');
-    }
-  }
-
   /// The driver supports only absolute paths, this method is used to validate
   /// any input paths to prevent errors later.
   void _throwIfNotAbsolutePath(String path) {
@@ -1989,6 +1972,7 @@
 @visibleForTesting
 class AnalysisDriverTestView {
   final AnalysisDriver driver;
+  final LibraryContextTestView libraryContext = LibraryContextTestView();
 
   int numOfAnalyzedLibraries = 0;
 
diff --git a/pkg/analyzer/lib/src/dart/analysis/driver_based_analysis_context.dart b/pkg/analyzer/lib/src/dart/analysis/driver_based_analysis_context.dart
index 1ca44d2..582a366 100644
--- a/pkg/analyzer/lib/src/dart/analysis/driver_based_analysis_context.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/driver_based_analysis_context.dart
@@ -11,32 +11,23 @@
 import 'package:analyzer/src/generated/engine.dart' show AnalysisOptions;
 import 'package:analyzer/src/workspace/workspace.dart';
 
-/**
- * An analysis context whose implementation is based on an analysis driver.
- */
+/// An analysis context whose implementation is based on an analysis driver.
 class DriverBasedAnalysisContext implements AnalysisContext {
-  /**
-   * The resource provider used to access the file system.
-   */
+  /// The resource provider used to access the file system.
   final ResourceProvider resourceProvider;
 
   @override
   final ContextRoot contextRoot;
 
-  /**
-   * The driver on which this context is based.
-   */
+  /// The driver on which this context is based.
   final AnalysisDriver driver;
 
-  /**
-   * The [Workspace] for this context, `null` if not yet created.
-   */
+  /// The [Workspace] for this context, `null` if not yet created.
   Workspace _workspace;
 
-  /**
-   * Initialize a newly created context that uses the given [resourceProvider]
-   * to access the file system and that is based on the given analysis [driver].
-   */
+  /// Initialize a newly created context that uses the given [resourceProvider]
+  /// to access the file system and that is based on the given analysis
+  /// [driver].
   DriverBasedAnalysisContext(
       this.resourceProvider, this.contextRoot, this.driver) {
     driver.analysisContext = this;
diff --git a/pkg/analyzer/lib/src/dart/analysis/experiments.dart b/pkg/analyzer/lib/src/dart/analysis/experiments.dart
index 3253f4e..55d1a34 100644
--- a/pkg/analyzer/lib/src/dart/analysis/experiments.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/experiments.dart
@@ -33,7 +33,7 @@
   static final Version currentVersion = Version.parse(_currentVersion);
 
   /// A map containing information about all known experimental flags.
-  static const knownFeatures = _knownFeatures;
+  static const Map<String, ExperimentalFeature> knownFeatures = _knownFeatures;
 
   final List<bool> _enableFlags;
 
@@ -72,7 +72,7 @@
   }
 
   @override
-  operator ==(Object other) {
+  bool operator ==(Object other) {
     if (other is ExperimentStatus) {
       if (_enableFlags.length != other._enableFlags.length) return false;
       for (int i = 0; i < _enableFlags.length; i++) {
diff --git a/pkg/analyzer/lib/src/dart/analysis/experiments.g.dart b/pkg/analyzer/lib/src/dart/analysis/experiments.g.dart
index aad02df..98663d9 100644
--- a/pkg/analyzer/lib/src/dart/analysis/experiments.g.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/experiments.g.dart
@@ -85,83 +85,107 @@
 
 class ExperimentalFeatures {
   static const constant_update_2018 = ExperimentalFeature(
-      0,
-      EnableString.constant_update_2018,
-      IsEnabledByDefault.constant_update_2018,
-      IsExpired.constant_update_2018,
-      'Enhanced constant expressions',
-      firstSupportedVersion: '2.4.1');
+    index: 0,
+    enableString: EnableString.constant_update_2018,
+    isEnabledByDefault: IsEnabledByDefault.constant_update_2018,
+    isExpired: IsExpired.constant_update_2018,
+    documentation: 'Enhanced constant expressions',
+    firstSupportedVersion: '2.4.1',
+  );
 
   static const control_flow_collections = ExperimentalFeature(
-      1,
-      EnableString.control_flow_collections,
-      IsEnabledByDefault.control_flow_collections,
-      IsExpired.control_flow_collections,
-      'Control Flow Collections',
-      firstSupportedVersion: '2.2.2');
+    index: 1,
+    enableString: EnableString.control_flow_collections,
+    isEnabledByDefault: IsEnabledByDefault.control_flow_collections,
+    isExpired: IsExpired.control_flow_collections,
+    documentation: 'Control Flow Collections',
+    firstSupportedVersion: '2.2.2',
+  );
 
   static const extension_methods = ExperimentalFeature(
-      2,
-      EnableString.extension_methods,
-      IsEnabledByDefault.extension_methods,
-      IsExpired.extension_methods,
-      'Extension Methods',
-      firstSupportedVersion: '2.6.0');
+    index: 2,
+    enableString: EnableString.extension_methods,
+    isEnabledByDefault: IsEnabledByDefault.extension_methods,
+    isExpired: IsExpired.extension_methods,
+    documentation: 'Extension Methods',
+    firstSupportedVersion: '2.6.0',
+  );
 
   static const non_nullable = ExperimentalFeature(
-      3,
-      EnableString.non_nullable,
-      IsEnabledByDefault.non_nullable,
-      IsExpired.non_nullable,
-      'Non Nullable by default');
+    index: 3,
+    enableString: EnableString.non_nullable,
+    isEnabledByDefault: IsEnabledByDefault.non_nullable,
+    isExpired: IsExpired.non_nullable,
+    documentation: 'Non Nullable by default',
+    firstSupportedVersion: null,
+  );
 
   static const nonfunction_type_aliases = ExperimentalFeature(
-      4,
-      EnableString.nonfunction_type_aliases,
-      IsEnabledByDefault.nonfunction_type_aliases,
-      IsExpired.nonfunction_type_aliases,
-      'Type aliases define a <type>, not just a <functionType>.');
+    index: 4,
+    enableString: EnableString.nonfunction_type_aliases,
+    isEnabledByDefault: IsEnabledByDefault.nonfunction_type_aliases,
+    isExpired: IsExpired.nonfunction_type_aliases,
+    documentation: 'Type aliases define a <type>, not just a <functionType>',
+    firstSupportedVersion: null,
+  );
 
-  static const set_literals = ExperimentalFeature(5, EnableString.set_literals,
-      IsEnabledByDefault.set_literals, IsExpired.set_literals, 'Set Literals',
-      firstSupportedVersion: '2.2.0');
+  static const set_literals = ExperimentalFeature(
+    index: 5,
+    enableString: EnableString.set_literals,
+    isEnabledByDefault: IsEnabledByDefault.set_literals,
+    isExpired: IsExpired.set_literals,
+    documentation: 'Set Literals',
+    firstSupportedVersion: '2.2.0',
+  );
 
   static const spread_collections = ExperimentalFeature(
-      6,
-      EnableString.spread_collections,
-      IsEnabledByDefault.spread_collections,
-      IsExpired.spread_collections,
-      'Spread Collections',
-      firstSupportedVersion: '2.2.2');
+    index: 6,
+    enableString: EnableString.spread_collections,
+    isEnabledByDefault: IsEnabledByDefault.spread_collections,
+    isExpired: IsExpired.spread_collections,
+    documentation: 'Spread Collections',
+    firstSupportedVersion: '2.2.2',
+  );
 
   static const triple_shift = ExperimentalFeature(
-      7,
-      EnableString.triple_shift,
-      IsEnabledByDefault.triple_shift,
-      IsExpired.triple_shift,
-      'Triple-shift operator');
+    index: 7,
+    enableString: EnableString.triple_shift,
+    isEnabledByDefault: IsEnabledByDefault.triple_shift,
+    isExpired: IsExpired.triple_shift,
+    documentation: 'Triple-shift operator',
+    firstSupportedVersion: null,
+  );
 
-  static const variance = ExperimentalFeature(8, EnableString.variance,
-      IsEnabledByDefault.variance, IsExpired.variance, 'Sound variance.');
+  static const variance = ExperimentalFeature(
+    index: 8,
+    enableString: EnableString.variance,
+    isEnabledByDefault: IsEnabledByDefault.variance,
+    isExpired: IsExpired.variance,
+    documentation: 'Sound variance',
+    firstSupportedVersion: null,
+  );
 
   @deprecated
   static const bogus_disabled = ExperimentalFeature(
-      9,
-      // ignore: deprecated_member_use_from_same_package
-      EnableString.bogus_disabled,
-      IsEnabledByDefault.bogus_disabled,
-      IsExpired.bogus_disabled,
-      null);
+    index: 9,
+    // ignore: deprecated_member_use_from_same_package
+    enableString: EnableString.bogus_disabled,
+    isEnabledByDefault: IsEnabledByDefault.bogus_disabled,
+    isExpired: IsExpired.bogus_disabled,
+    documentation: null,
+    firstSupportedVersion: null,
+  );
 
   @deprecated
   static const bogus_enabled = ExperimentalFeature(
-      10,
-      // ignore: deprecated_member_use_from_same_package
-      EnableString.bogus_enabled,
-      IsEnabledByDefault.bogus_enabled,
-      IsExpired.bogus_enabled,
-      null,
-      firstSupportedVersion: '1.0.0');
+    index: 10,
+    // ignore: deprecated_member_use_from_same_package
+    enableString: EnableString.bogus_enabled,
+    isEnabledByDefault: IsEnabledByDefault.bogus_enabled,
+    isExpired: IsExpired.bogus_enabled,
+    documentation: null,
+    firstSupportedVersion: '1.0.0',
+  );
 }
 
 /// Constant bools indicating whether each experimental flag is currently
diff --git a/pkg/analyzer/lib/src/dart/analysis/experiments_impl.dart b/pkg/analyzer/lib/src/dart/analysis/experiments_impl.dart
index ca5b993..7b32e40 100644
--- a/pkg/analyzer/lib/src/dart/analysis/experiments_impl.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/experiments_impl.dart
@@ -12,6 +12,9 @@
 Map<String, ExperimentalFeature> _knownFeatures =
     ExperimentStatus.knownFeatures;
 
+/// This flag is `true` while [overrideKnownFeaturesAsync] is executing.
+bool _overrideKnownFeaturesAsyncExecuting = false;
+
 /// Decodes the strings given in [flags] into a list of booleans representing
 /// experiments that should be enabled.
 ///
@@ -76,10 +79,12 @@
 ///
 /// It isn't safe to call this method with an asynchronous callback, because it
 /// only changes the set of known features during the time that [callback] is
-/// (synchronously) executing.
+/// (synchronously) executing. Use [overrideKnownFeaturesAsync] instead.
 @visibleForTesting
 T overrideKnownFeatures<T>(
-    Map<String, ExperimentalFeature> knownFeatures, T Function() callback) {
+  Map<String, ExperimentalFeature> knownFeatures,
+  T Function() callback,
+) {
   var oldKnownFeatures = _knownFeatures;
   try {
     _knownFeatures = knownFeatures;
@@ -89,6 +94,30 @@
   }
 }
 
+/// Execute the callback, pretending that the given [knownFeatures] take the
+/// place of [ExperimentStatus.knownFeatures].
+///
+/// This function cannot be invoked before its previous invocation completes.
+@visibleForTesting
+Future<T> overrideKnownFeaturesAsync<T>(
+  Map<String, ExperimentalFeature> knownFeatures,
+  Future<T> Function() callback,
+) async {
+  if (_overrideKnownFeaturesAsyncExecuting) {
+    throw StateError('overrideKnownFeaturesAsync is not reentrant');
+  }
+
+  _overrideKnownFeaturesAsyncExecuting = true;
+  var oldKnownFeatures = _knownFeatures;
+  try {
+    _knownFeatures = knownFeatures;
+    return await callback();
+  } finally {
+    _knownFeatures = oldKnownFeatures;
+    _overrideKnownFeaturesAsyncExecuting = false;
+  }
+}
+
 /// Computes a new set of enable flags based on [flags], but with any features
 /// that are not present in the language [version] set to `false`.
 List<bool> restrictEnableFlagsToVersion(List<bool> flags, Version version) {
@@ -272,10 +301,14 @@
 
   final String _firstSupportedVersion;
 
-  const ExperimentalFeature(this.index, this.enableString,
-      this.isEnabledByDefault, this.isExpired, this.documentation,
-      {String firstSupportedVersion})
-      : _firstSupportedVersion = firstSupportedVersion,
+  const ExperimentalFeature({
+    @required this.index,
+    @required this.enableString,
+    @required this.isEnabledByDefault,
+    @required this.isExpired,
+    @required this.documentation,
+    @required String firstSupportedVersion,
+  })  : _firstSupportedVersion = firstSupportedVersion,
         assert(index != null),
         assert(isEnabledByDefault
             ? firstSupportedVersion != null
diff --git a/pkg/analyzer/lib/src/dart/analysis/file_byte_store.dart b/pkg/analyzer/lib/src/dart/analysis/file_byte_store.dart
index a5652ec..b93a6c8 100644
--- a/pkg/analyzer/lib/src/dart/analysis/file_byte_store.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/file_byte_store.dart
@@ -12,9 +12,7 @@
 import 'byte_store.dart';
 import 'fletcher16.dart';
 
-/**
- * The request that is sent from the main isolate to the clean-up isolate.
- */
+/// The request that is sent from the main isolate to the clean-up isolate.
 class CacheCleanUpRequest {
   final String cachePath;
   final int maxSizeBytes;
@@ -23,13 +21,11 @@
   CacheCleanUpRequest(this.cachePath, this.maxSizeBytes, this.replyTo);
 }
 
-/**
- * [ByteStore] that stores values as files and performs cache eviction.
- *
- * Only the process that manages the cache, e.g. Analysis Server, should use
- * this class. Other processes, e.g. Analysis Server plugins, should use
- * [FileByteStore] instead and let the main process to perform eviction.
- */
+/// [ByteStore] that stores values as files and performs cache eviction.
+///
+/// Only the process that manages the cache, e.g. Analysis Server, should use
+/// this class. Other processes, e.g. Analysis Server plugins, should use
+/// [FileByteStore] instead and let the main process to perform eviction.
 class EvictingFileByteStore implements ByteStore {
   static bool _cleanUpSendPortShouldBePrepared = true;
   static SendPort _cleanUpSendPort;
@@ -59,9 +55,7 @@
     }
   }
 
-  /**
-   * If the cache clean up process has not been requested yet, request it.
-   */
+  /// If the cache clean up process has not been requested yet, request it.
   Future<void> _requestCacheCleanUp() async {
     if (_cleanUpSendPortShouldBePrepared) {
       _cleanUpSendPortShouldBePrepared = false;
@@ -88,10 +82,8 @@
     }
   }
 
-  /**
-   * This function is started in a new isolate, receives cache folder clean up
-   * requests and evicts older files from the folder.
-   */
+  /// This function is started in a new isolate, receives cache folder clean up
+  /// requests and evicts older files from the folder.
   static void _cacheCleanUpFunction(message) {
     SendPort initialReplyTo = message;
     ReceivePort port = ReceivePort();
@@ -149,9 +141,7 @@
   }
 }
 
-/**
- * [ByteStore] that stores values as files.
- */
+/// [ByteStore] that stores values as files.
 class FileByteStore implements ByteStore {
   static final FileByteStoreValidator _validator = FileByteStoreValidator();
   static final _dotCodeUnit = '.'.codeUnitAt(0);
@@ -161,10 +151,8 @@
   final Map<String, List<int>> _writeInProgress = {};
   final FuturePool _pool = FuturePool(20);
 
-  /**
-   * If the same cache path is used from more than one isolate of the same
-   * process, then a unique [tempNameSuffix] must be provided for each isolate.
-   */
+  /// If the same cache path is used from more than one isolate of the same
+  /// process, then a unique [tempNameSuffix] must be provided for each isolate.
   FileByteStore(this._cachePath, {String tempNameSuffix = ''})
       : _tempSuffix =
             '-temp-$pid${tempNameSuffix.isEmpty ? '' : '-$tempNameSuffix'}';
@@ -229,21 +217,17 @@
   }
 }
 
-/**
- * Generally speaking, we cannot guarantee that any data written into a file
- * will stay the same - there is always a chance of a hardware problem, file
- * system problem, truncated data, etc.
- *
- * So, we need to embed some validation into data itself. This class append the
- * version and the checksum to data.
- */
+/// Generally speaking, we cannot guarantee that any data written into a file
+/// will stay the same - there is always a chance of a hardware problem, file
+/// system problem, truncated data, etc.
+///
+/// So, we need to embed some validation into data itself. This class append the
+/// version and the checksum to data.
 class FileByteStoreValidator {
   static const List<int> _VERSION = [0x01, 0x00];
 
-  /**
-   * If the [rawBytes] have the valid version and checksum, extract and
-   * return the data from it. Otherwise return `null`.
-   */
+  /// If the [rawBytes] have the valid version and checksum, extract and
+  /// return the data from it. Otherwise return `null`.
   List<int> getData(List<int> rawBytes) {
     // There must be at least the version and the checksum in the raw bytes.
     if (rawBytes.length < 4) {
@@ -268,10 +252,8 @@
     return data;
   }
 
-  /**
-   * Return bytes that include the given [data] plus the current version and
-   * the checksum of the [data].
-   */
+  /// Return bytes that include the given [data] plus the current version and
+  /// the checksum of the [data].
   List<int> wrapData(List<int> data) {
     int len = data.length;
     var bytes = Uint8List(len + 4);
diff --git a/pkg/analyzer/lib/src/dart/analysis/file_state.dart b/pkg/analyzer/lib/src/dart/analysis/file_state.dart
index 0e00b63..8d47e14 100644
--- a/pkg/analyzer/lib/src/dart/analysis/file_state.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/file_state.dart
@@ -47,30 +47,22 @@
 var counterUnlinkedLinkedBytes = 0;
 var timerFileStateRefresh = Stopwatch();
 
-/**
- * [FileContentOverlay] is used to temporary override content of files.
- */
+/// [FileContentOverlay] is used to temporary override content of files.
 class FileContentOverlay {
   final _map = <String, String>{};
 
-  /**
-   * Return the paths currently being overridden.
-   */
+  /// Return the paths currently being overridden.
   Iterable<String> get paths => _map.keys;
 
-  /**
-   * Return the content of the file with the given [path], or `null` the
-   * overlay does not override the content of the file.
-   *
-   * The [path] must be absolute and normalized.
-   */
+  /// Return the content of the file with the given [path], or `null` the
+  /// overlay does not override the content of the file.
+  ///
+  /// The [path] must be absolute and normalized.
   String operator [](String path) => _map[path];
 
-  /**
-   * Return the new [content] of the file with the given [path].
-   *
-   * The [path] must be absolute and normalized.
-   */
+  /// Return the new [content] of the file with the given [path].
+  ///
+  /// The [path] must be absolute and normalized.
   void operator []=(String path, String content) {
     if (content == null) {
       _map.remove(path);
@@ -80,56 +72,42 @@
   }
 }
 
-/**
- * Information about a file being analyzed, explicitly or implicitly.
- *
- * It provides a consistent view on its properties.
- *
- * The properties are not guaranteed to represent the most recent state
- * of the file system. To update the file to the most recent state, [refresh]
- * should be called.
- */
+/// Information about a file being analyzed, explicitly or implicitly.
+///
+/// It provides a consistent view on its properties.
+///
+/// The properties are not guaranteed to represent the most recent state
+/// of the file system. To update the file to the most recent state, [refresh]
+/// should be called.
 class FileState {
   final FileSystemState _fsState;
 
-  /**
-   * The absolute path of the file.
-   */
+  /// The absolute path of the file.
   final String path;
 
-  /**
-   * The absolute URI of the file.
-   */
+  /// The absolute URI of the file.
   final Uri uri;
 
-  /**
-   * The [Source] of the file with the [uri].
-   */
+  /// The [Source] of the file with the [uri].
   final Source source;
 
-  /**
-   * Return `true` if this file is a stub created for a file in the provided
-   * external summary store. The values of most properties are not the same
-   * as they would be if the file were actually read from the file system.
-   * The value of the property [uri] is correct.
-   */
+  /// Return `true` if this file is a stub created for a file in the provided
+  /// external summary store. The values of most properties are not the same
+  /// as they would be if the file were actually read from the file system.
+  /// The value of the property [uri] is correct.
   final bool isInExternalSummaries;
 
-  /**
-   * The [FeatureSet] for all files in the analysis context.
-   *
-   * Usually it is the feature set of the latest language version, plus
-   * possibly additional enabled experiments (from the analysis options file,
-   * or from SDK allowed experiments).
-   *
-   * This feature set is then restricted, with the [_packageLanguageVersion],
-   * or with a `@dart` language override token in the file header.
-   */
+  /// The [FeatureSet] for all files in the analysis context.
+  ///
+  /// Usually it is the feature set of the latest language version, plus
+  /// possibly additional enabled experiments (from the analysis options file,
+  /// or from SDK allowed experiments).
+  ///
+  /// This feature set is then restricted, with the [_packageLanguageVersion],
+  /// or with a `@dart` language override token in the file header.
   final FeatureSet _contextFeatureSet;
 
-  /**
-   * The language version for the package that contains this file.
-   */
+  /// The language version for the package that contains this file.
   final Version _packageLanguageVersion;
 
   bool _exists;
@@ -157,10 +135,8 @@
   String _transitiveSignature;
   String _transitiveSignatureLinked;
 
-  /**
-   * The flag that shows whether the file has an error or warning that
-   * might be fixed by a change to another file.
-   */
+  /// The flag that shows whether the file has an error or warning that
+  /// might be fixed by a change to another file.
   bool hasErrorOrWarning = false;
 
   FileState._(
@@ -183,81 +159,58 @@
     _libraryCycle = LibraryCycle.external();
   }
 
-  /**
-   * The unlinked API signature of the file.
-   */
+  /// The unlinked API signature of the file.
   List<int> get apiSignature => _apiSignature;
 
-  /**
-   * The content of the file.
-   */
+  /// The content of the file.
   String get content => _content;
 
-  /**
-   * The MD5 hash of the [content].
-   */
+  /// The MD5 hash of the [content].
   String get contentHash => _contentHash;
 
-  /**
-   * The class member names defined by the file.
-   */
+  /// The class member names defined by the file.
   Set<String> get definedClassMemberNames {
     return _definedClassMemberNames ??=
         _driverUnlinkedUnit.definedClassMemberNames.toSet();
   }
 
-  /**
-   * The top-level names defined by the file.
-   */
+  /// The top-level names defined by the file.
   Set<String> get definedTopLevelNames {
     return _definedTopLevelNames ??=
         _driverUnlinkedUnit.definedTopLevelNames.toSet();
   }
 
-  /**
-   * Return the set of all directly referenced files - imported, exported or
-   * parted.
-   */
+  /// Return the set of all directly referenced files - imported, exported or
+  /// parted.
   Set<FileState> get directReferencedFiles => _directReferencedFiles;
 
-  /**
-   * Return the set of all directly referenced libraries - imported or exported.
-   */
+  /// Return the set of all directly referenced libraries - imported or
+  /// exported.
   Set<FileState> get directReferencedLibraries => _directReferencedLibraries;
 
-  /**
-   * Return `true` if the file exists.
-   */
+  /// Return `true` if the file exists.
   bool get exists => _exists;
 
-  /**
-   * The list of files this file exports.
-   */
+  /// The list of files this file exports.
   List<FileState> get exportedFiles => _exportedFiles;
 
   @override
   int get hashCode => uri.hashCode;
 
-  /**
-   * The list of files this file imports.
-   */
+  /// The list of files this file imports.
   List<FileState> get importedFiles => _importedFiles;
 
   LibraryCycle get internal_libraryCycle => _libraryCycle;
 
-  /**
-   * Return `true` if the file is a stub created for a library in the provided
-   * external summary store.
-   */
+  /// Return `true` if the file is a stub created for a library in the provided
+  /// external summary store.
   bool get isExternalLibrary {
     return _fsState.externalSummaries != null &&
         _fsState.externalSummaries.hasLinkedLibrary(uriStr);
   }
 
-  /**
-   * Return `true` if the file does not have a `library` directive, and has a
-   * `part of` directive, so is probably a part.
-   */
+  /// Return `true` if the file does not have a `library` directive, and has a
+  /// `part of` directive, so is probably a part.
   bool get isPart {
     if (_fsState.externalSummaries != null &&
         _fsState.externalSummaries.hasUnlinkedUnit(uriStr)) {
@@ -266,17 +219,13 @@
     return !_unlinked2.hasLibraryDirective && _unlinked2.hasPartOfDirective;
   }
 
-  /**
-   * Return `true` if the file is the "unresolved" file, which does not have
-   * neither a valid URI, nor a path.
-   */
+  /// Return `true` if the file is the "unresolved" file, which does not have
+  /// neither a valid URI, nor a path.
   bool get isUnresolved => uri == null;
 
-  /**
-   * If the file [isPart], return a currently know library the file is a part
-   * of. Return `null` if a library is not known, for example because we have
-   * not processed a library file yet.
-   */
+  /// If the file [isPart], return a currently know library the file is a part
+  /// of. Return `null` if a library is not known, for example because we have
+  /// not processed a library file yet.
   FileState get library {
     List<FileState> libraries = _fsState._partToLibraries[this];
     if (libraries == null || libraries.isEmpty) {
@@ -297,31 +246,23 @@
     }
 
     if (_libraryCycle == null) {
-      computeLibraryCycle(_fsState._linkedSalt, this);
+      computeLibraryCycle(_fsState._saltForElements, this);
     }
 
     return _libraryCycle;
   }
 
-  /**
-   * The list of files files that this library consists of, i.e. this library
-   * file itself and its [partedFiles].
-   */
+  /// The list of files files that this library consists of, i.e. this library
+  /// file itself and its [partedFiles].
   List<FileState> get libraryFiles => _libraryFiles;
 
-  /**
-   * Return information about line in the file.
-   */
+  /// Return information about line in the file.
   LineInfo get lineInfo => _lineInfo;
 
-  /**
-   * The list of files this library file references as parts.
-   */
+  /// The list of files this library file references as parts.
   List<FileState> get partedFiles => _partedFiles;
 
-  /**
-   * The external names referenced by the file.
-   */
+  /// The external names referenced by the file.
   Set<String> get referencedNames {
     return _referencedNames ??= _driverUnlinkedUnit.referencedNames.toSet();
   }
@@ -329,10 +270,8 @@
   @visibleForTesting
   FileStateTestView get test => FileStateTestView(this);
 
-  /**
-   * Return the set of transitive files - the file itself and all of the
-   * directly or indirectly referenced files.
-   */
+  /// Return the set of transitive files - the file itself and all of the
+  /// directly or indirectly referenced files.
   Set<FileState> get transitiveFiles {
     var transitiveFiles = <FileState>{};
 
@@ -346,30 +285,22 @@
     return transitiveFiles;
   }
 
-  /**
-   * Return the signature of the file, based on API signatures of the
-   * transitive closure of imported / exported files.
-   */
+  /// Return the signature of the file, based on API signatures of the
+  /// transitive closure of imported / exported files.
   String get transitiveSignature {
     this.libraryCycle; // sets _transitiveSignature
     return _transitiveSignature;
   }
 
-  /**
-   * The value `transitiveSignature.linked` is used often, so we cache it.
-   */
+  /// The value `transitiveSignature.linked` is used often, so we cache it.
   String get transitiveSignatureLinked {
     return _transitiveSignatureLinked ??= '$transitiveSignature.linked';
   }
 
-  /**
-   * The [UnlinkedUnit2] of the file.
-   */
+  /// The [UnlinkedUnit2] of the file.
   UnlinkedUnit2 get unlinked2 => _unlinked2;
 
-  /**
-   * Return the [uri] string.
-   */
+  /// Return the [uri] string.
   String get uriStr => uri.toString();
 
   @override
@@ -388,11 +319,9 @@
     }
   }
 
-  /**
-   * Return a new parsed unresolved [CompilationUnit].
-   *
-   * If an exception happens during parsing, an empty unit is returned.
-   */
+  /// Return a new parsed unresolved [CompilationUnit].
+  ///
+  /// If an exception happens during parsing, an empty unit is returned.
   CompilationUnit parse([AnalysisErrorListener errorListener]) {
     errorListener ??= AnalysisErrorListener.NULL_LISTENER;
     try {
@@ -404,16 +333,14 @@
     }
   }
 
-  /**
-   * Read the file content and ensure that all of the file properties are
-   * consistent with the read content, including API signature.
-   *
-   * If [allowCached] is `true`, don't read the content of the file if it
-   * is already cached (in another [FileSystemState], because otherwise we
-   * would not create this new instance of [FileState] and refresh it).
-   *
-   * Return `true` if the API signature changed since the last refresh.
-   */
+  /// Read the file content and ensure that all of the file properties are
+  /// consistent with the read content, including API signature.
+  ///
+  /// If [allowCached] is `true`, don't read the content of the file if it
+  /// is already cached (in another [FileSystemState], because otherwise we
+  /// would not create this new instance of [FileState] and refresh it).
+  ///
+  /// Return `true` if the API signature changed since the last refresh.
   bool refresh({bool allowCached = false}) {
     counterFileStateRefresh++;
 
@@ -435,7 +362,7 @@
     List<int> contentSignature;
     {
       var signature = ApiSignature();
-      signature.addUint32List(_fsState._unlinkedSalt);
+      signature.addUint32List(_fsState._saltForUnlinked);
       signature.addFeatureSet(_contextFeatureSet);
       signature.addLanguageVersion(_packageLanguageVersion);
       signature.addString(_contentHash);
@@ -579,10 +506,8 @@
     return unit;
   }
 
-  /**
-   * Return the [FileState] for the given [relativeUri], maybe "unresolved"
-   * file if the URI cannot be parsed, cannot correspond any file, etc.
-   */
+  /// Return the [FileState] for the given [relativeUri], maybe "unresolved"
+  /// file if the URI cannot be parsed, cannot correspond any file, etc.
   FileState _fileForRelativeUri(String relativeUri) {
     if (relativeUri.isEmpty) {
       return _fsState.unresolvedFile;
@@ -598,10 +523,8 @@
     return _fsState.getFileForUri(absoluteUri);
   }
 
-  /**
-   * Invalidate any data that depends on the current unlinked data of the file,
-   * because [refresh] is going to recompute the unlinked data.
-   */
+  /// Invalidate any data that depends on the current unlinked data of the file,
+  /// because [refresh] is going to recompute the unlinked data.
   void _invalidateCurrentUnresolvedData() {
     // Invalidate unlinked information.
     _definedTopLevelNames = null;
@@ -759,9 +682,7 @@
     );
   }
 
-  /**
-   * Return `true` if the given byte lists are equal.
-   */
+  /// Return `true` if the given byte lists are equal.
   static bool _equalByteLists(List<int> a, List<int> b) {
     if (a == null) {
       return b == null;
@@ -805,9 +726,7 @@
   String get unlinkedKey => file._unlinkedKey;
 }
 
-/**
- * Information about known file system state.
- */
+/// Information about known file system state.
 class FileSystemState {
   final PerformanceLog _logger;
   final ResourceProvider _resourceProvider;
@@ -817,76 +736,52 @@
   final SourceFactory _sourceFactory;
   final AnalysisOptions _analysisOptions;
   final DeclaredVariables _declaredVariables;
-  final Uint32List _unlinkedSalt;
-  final Uint32List _linkedSalt;
+  final Uint32List _saltForUnlinked;
+  final Uint32List _saltForElements;
 
   final FeatureSetProvider featureSetProvider;
 
-  /**
-   * The optional store with externally provided unlinked and corresponding
-   * linked summaries. These summaries are always added to the store for any
-   * file analysis.
-   *
-   * While walking the file graph, when we reach a file that exists in the
-   * external store, we add a stub [FileState], but don't attempt to read its
-   * content, or its unlinked unit, or imported libraries, etc.
-   */
+  /// The optional store with externally provided unlinked and corresponding
+  /// linked summaries. These summaries are always added to the store for any
+  /// file analysis.
+  ///
+  /// While walking the file graph, when we reach a file that exists in the
+  /// external store, we add a stub [FileState], but don't attempt to read its
+  /// content, or its unlinked unit, or imported libraries, etc.
   final SummaryDataStore externalSummaries;
 
-  /**
-   * Mapping from a URI to the corresponding [FileState].
-   */
+  /// Mapping from a URI to the corresponding [FileState].
   final Map<Uri, FileState> _uriToFile = {};
 
-  /**
-   * All known file paths.
-   */
+  /// All known file paths.
   final Set<String> knownFilePaths = <String>{};
 
-  /**
-   * All known files.
-   */
+  /// All known files.
   final List<FileState> knownFiles = [];
 
-  /**
-   * Mapping from a path to the flag whether there is a URI for the path.
-   */
+  /// Mapping from a path to the flag whether there is a URI for the path.
   final Map<String, bool> _hasUriForPath = {};
 
-  /**
-   * Mapping from a path to the corresponding [FileState]s, canonical or not.
-   */
+  /// Mapping from a path to the corresponding [FileState]s, canonical or not.
   final Map<String, List<FileState>> _pathToFiles = {};
 
-  /**
-   * Mapping from a path to the corresponding canonical [FileState].
-   */
+  /// Mapping from a path to the corresponding canonical [FileState].
   final Map<String, FileState> _pathToCanonicalFile = {};
 
-  /**
-   * Mapping from a part to the libraries it is a part of.
-   */
+  /// Mapping from a part to the libraries it is a part of.
   final Map<FileState, List<FileState>> _partToLibraries = {};
 
-  /**
-   * The map of subtyped names to files where these names are subtyped.
-   */
+  /// The map of subtyped names to files where these names are subtyped.
   final Map<String, Set<FileState>> _subtypedNameToFiles = {};
 
-  /**
-   * The value of this field is incremented when the set of files is updated.
-   */
+  /// The value of this field is incremented when the set of files is updated.
   int fileStamp = 0;
 
-  /**
-   * The [FileState] instance that correspond to an unresolved URI.
-   */
+  /// The [FileState] instance that correspond to an unresolved URI.
   FileState _unresolvedFile;
 
-  /**
-   * The cache of content of files, possibly shared with other file system
-   * states with the same resource provider and the content overlay.
-   */
+  /// The cache of content of files, possibly shared with other file system
+  /// states with the same resource provider and the content overlay.
   _FileContentCache _fileContentCache;
 
   FileSystemStateTestView _testView;
@@ -900,8 +795,8 @@
     this._sourceFactory,
     this._analysisOptions,
     this._declaredVariables,
-    this._unlinkedSalt,
-    this._linkedSalt,
+    this._saltForUnlinked,
+    this._saltForElements,
     this.featureSetProvider, {
     this.externalSummaries,
   }) {
@@ -915,9 +810,7 @@
   @visibleForTesting
   FileSystemStateTestView get test => _testView;
 
-  /**
-   * Return the [FileState] instance that correspond to an unresolved URI.
-   */
+  /// Return the [FileState] instance that correspond to an unresolved URI.
   FileState get unresolvedFile {
     if (_unresolvedFile == null) {
       var featureSet = FeatureSet.fromEnableFlags([]);
@@ -928,13 +821,11 @@
     return _unresolvedFile;
   }
 
-  /**
-   * Return the canonical [FileState] for the given absolute [path]. The
-   * returned file has the last known state since if was last refreshed.
-   *
-   * Here "canonical" means that if the [path] is in a package `lib` then the
-   * returned file will have the `package:` style URI.
-   */
+  /// Return the canonical [FileState] for the given absolute [path]. The
+  /// returned file has the last known state since if was last refreshed.
+  ///
+  /// Here "canonical" means that if the [path] is in a package `lib` then the
+  /// returned file will have the `package:` style URI.
   FileState getFileForPath(String path) {
     FileState file = _pathToCanonicalFile[path];
     if (file == null) {
@@ -963,12 +854,10 @@
     return file;
   }
 
-  /**
-   * Return the [FileState] for the given absolute [uri]. May return the
-   * "unresolved" file if the [uri] is invalid, e.g. a `package:` URI without
-   * a package name. The returned file has the last known state since if was
-   * last refreshed.
-   */
+  /// Return the [FileState] for the given absolute [uri]. May return the
+  /// "unresolved" file if the [uri] is invalid, e.g. a `package:` URI without
+  /// a package name. The returned file has the last known state since if was
+  /// last refreshed.
   FileState getFileForUri(Uri uri) {
     FileState file = _uriToFile[uri];
     if (file == null) {
@@ -1007,10 +896,8 @@
     return file;
   }
 
-  /**
-   * Return the list of all [FileState]s corresponding to the given [path]. The
-   * list has at least one item, and the first item is the canonical file.
-   */
+  /// Return the list of all [FileState]s corresponding to the given [path]. The
+  /// list has at least one item, and the first item is the canonical file.
   List<FileState> getFilesForPath(String path) {
     FileState canonicalFile = getFileForPath(path);
     List<FileState> allFiles = _pathToFiles[path].toList();
@@ -1022,21 +909,17 @@
       ..insert(0, canonicalFile);
   }
 
-  /**
-   * Return files where the given [name] is subtyped, i.e. used in `extends`,
-   * `with` or `implements` clauses.
-   */
+  /// Return files where the given [name] is subtyped, i.e. used in `extends`,
+  /// `with` or `implements` clauses.
   Set<FileState> getFilesSubtypingName(String name) {
     return _subtypedNameToFiles[name];
   }
 
-  /**
-   * Return `true` if there is a URI that can be resolved to the [path].
-   *
-   * When a file exists, but for the URI that corresponds to the file is
-   * resolved to another file, e.g. a generated one in Bazel, Gn, etc, we
-   * cannot analyze the original file.
-   */
+  /// Return `true` if there is a URI that can be resolved to the [path].
+  ///
+  /// When a file exists, but for the URI that corresponds to the file is
+  /// resolved to another file, e.g. a generated one in Bazel, Gn, etc, we
+  /// cannot analyze the original file.
   bool hasUri(String path) {
     bool flag = _hasUriForPath[path];
     if (flag == null) {
@@ -1050,27 +933,21 @@
     return flag;
   }
 
-  /**
-   * The file with the given [path] might have changed, so ensure that it is
-   * read the next time it is refreshed.
-   */
+  /// The file with the given [path] might have changed, so ensure that it is
+  /// read the next time it is refreshed.
   void markFileForReading(String path) {
     _fileContentCache.remove(path);
   }
 
-  /**
-   * Remove the file with the given [path].
-   */
+  /// Remove the file with the given [path].
   void removeFile(String path) {
     markFileForReading(path);
     _clearFiles();
   }
 
-  /**
-   * Reset URI resolution, and forget all files. So, the next time any file is
-   * requested, it will be read, and its whole (potentially different) graph
-   * will be built.
-   */
+  /// Reset URI resolution, and forget all files. So, the next time any file is
+  /// requested, it will be read, and its whole (potentially different) graph
+  /// will be built.
   void resetUriResolution() {
     _sourceFactory.clearCache();
     _fileContentCache.clear();
@@ -1114,9 +991,7 @@
   }
 }
 
-/**
- * Information about the content of a file.
- */
+/// Information about the content of a file.
 class _FileContent {
   final String path;
   final bool exists;
@@ -1126,23 +1001,17 @@
   _FileContent(this.path, this.exists, this.content, this.contentHash);
 }
 
-/**
- * The cache of information about content of files.
- */
+/// The cache of information about content of files.
 class _FileContentCache {
-  /**
-   * Weak map of cache instances.
-   *
-   * Outer key is a [FileContentOverlay].
-   * Inner key is a [ResourceProvider].
-   */
+  /// Weak map of cache instances.
+  ///
+  /// Outer key is a [FileContentOverlay].
+  /// Inner key is a [ResourceProvider].
   static final _instances = Expando<Expando<_FileContentCache>>();
 
-  /**
-   * Weak map of cache instances.
-   *
-   * Key is a [ResourceProvider].
-   */
+  /// Weak map of cache instances.
+  ///
+  /// Key is a [ResourceProvider].
   static final _instances2 = Expando<_FileContentCache>();
 
   final ResourceProvider _resourceProvider;
@@ -1155,12 +1024,10 @@
     _pathToFile.clear();
   }
 
-  /**
-   * Return the content of the file with the given [path].
-   *
-   * If [allowCached] is `true`, and the file is in the cache, return the
-   * cached data. Otherwise read the file, compute and cache the data.
-   */
+  /// Return the content of the file with the given [path].
+  ///
+  /// If [allowCached] is `true`, and the file is in the cache, return the
+  /// cached data. Otherwise read the file, compute and cache the data.
   _FileContent get(String path, bool allowCached) {
     var file = allowCached ? _pathToFile[path] : null;
     if (file == null) {
@@ -1188,9 +1055,7 @@
     return file;
   }
 
-  /**
-   * Remove the file with the given [path] from the cache.
-   */
+  /// Remove the file with the given [path] from the cache.
   void remove(String path) {
     _pathToFile.remove(path);
   }
diff --git a/pkg/analyzer/lib/src/dart/analysis/file_tracker.dart b/pkg/analyzer/lib/src/dart/analysis/file_tracker.dart
index 57eaa06..abd28a5 100644
--- a/pkg/analyzer/lib/src/dart/analysis/file_tracker.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/file_tracker.dart
@@ -11,76 +11,54 @@
 /// `null` if multiple files were added, changed, or removed.
 typedef FileTrackerChangeHook = void Function(String path);
 
-/**
- * Maintains the file system state needed by the analysis driver, as well as
- * information about files that have changed and the impact of those changes.
- *
- * Three related sets of files are tracked: "added files" is the set of files
- * for which the client would like analysis.  "changed files" is the set of
- * files which is known to have changed, but for which we have not yet measured
- * the impact of the change.  "pending files" is the subset of "added files"
- * which might have been impacted by a change, and thus need analysis.
- *
- * Provides methods for updating the file system state in response to changes.
- */
+/// Maintains the file system state needed by the analysis driver, as well as
+/// information about files that have changed and the impact of those changes.
+///
+/// Three related sets of files are tracked: "added files" is the set of files
+/// for which the client would like analysis.  "changed files" is the set of
+/// files which is known to have changed, but for which we have not yet measured
+/// the impact of the change.  "pending files" is the subset of "added files"
+/// which might have been impacted by a change, and thus need analysis.
+///
+/// Provides methods for updating the file system state in response to changes.
 class FileTracker {
-  /**
-   * Callback invoked whenever a change occurs that may require the client to
-   * perform analysis.
-   */
+  /// Callback invoked whenever a change occurs that may require the client to
+  /// perform analysis.
   final FileTrackerChangeHook _changeHook;
 
-  /**
-   * The logger to write performed operations and performance to.
-   */
+  /// The logger to write performed operations and performance to.
   final PerformanceLog _logger;
 
-  /**
-   * The current file system state.
-   */
+  /// The current file system state.
   final FileSystemState _fsState;
 
-  /**
-   * The set of added files.
-   */
+  /// The set of added files.
   final addedFiles = <String>{};
 
-  /**
-   * The set of files were reported as changed through [changeFile] and not
-   * checked for actual changes yet.
-   */
+  /// The set of files were reported as changed through [changeFile] and not
+  /// checked for actual changes yet.
   final _changedFiles = <String>{};
 
-  /**
-   * The set of files that are currently scheduled for analysis, which were
-   * reported as changed through [changeFile].
-   */
+  /// The set of files that are currently scheduled for analysis, which were
+  /// reported as changed through [changeFile].
   var _pendingChangedFiles = <String>{};
 
-  /**
-   * The set of files that are currently scheduled for analysis, which directly
-   * import a changed file.
-   */
+  /// The set of files that are currently scheduled for analysis, which directly
+  /// import a changed file.
   var _pendingImportFiles = <String>{};
 
-  /**
-   * The set of files that are currently scheduled for analysis, which have an
-   * error or a warning, which might be fixed by a changed file.
-   */
+  /// The set of files that are currently scheduled for analysis, which have an
+  /// error or a warning, which might be fixed by a changed file.
   var _pendingErrorFiles = <String>{};
 
-  /**
-   * The set of files that are currently scheduled for analysis, and don't
-   * have any special relation with changed files.
-   */
+  /// The set of files that are currently scheduled for analysis, and don't
+  /// have any special relation with changed files.
   var _pendingFiles = <String>{};
 
   FileTracker(this._logger, this._fsState, this._changeHook);
 
-  /**
-   * Returns the path to exactly one that needs analysis.  Throws a [StateError]
-   * if no files need analysis.
-   */
+  /// Returns the path to exactly one that needs analysis.  Throws a
+  /// [StateError] if no files need analysis.
   String get anyPendingFile {
     if (_pendingChangedFiles.isNotEmpty) {
       return _pendingChangedFiles.first;
@@ -94,27 +72,19 @@
     return _pendingFiles.first;
   }
 
-  /**
-   * Returns a boolean indicating whether there are any files that have changed,
-   * but for which the impact of the changes hasn't been measured.
-   */
+  /// Returns a boolean indicating whether there are any files that have
+  /// changed, but for which the impact of the changes hasn't been measured.
   bool get hasChangedFiles => _changedFiles.isNotEmpty;
 
-  /**
-   * Return `true` if there are changed files that need analysis.
-   */
+  /// Return `true` if there are changed files that need analysis.
   bool get hasPendingChangedFiles => _pendingChangedFiles.isNotEmpty;
 
-  /**
-   * Return `true` if there are files that have an error or warning, and that
-   * need analysis.
-   */
+  /// Return `true` if there are files that have an error or warning, and that
+  /// need analysis.
   bool get hasPendingErrorFiles => _pendingErrorFiles.isNotEmpty;
 
-  /**
-   * Returns a boolean indicating whether there are any files that need
-   * analysis.
-   */
+  /// Returns a boolean indicating whether there are any files that need
+  /// analysis.
   bool get hasPendingFiles {
     return hasPendingChangedFiles ||
         hasPendingImportFiles ||
@@ -122,15 +92,11 @@
         _pendingFiles.isNotEmpty;
   }
 
-  /**
-   * Return `true` if there are files that directly import a changed file that
-   * need analysis.
-   */
+  /// Return `true` if there are files that directly import a changed file that
+  /// need analysis.
   bool get hasPendingImportFiles => _pendingImportFiles.isNotEmpty;
 
-  /**
-   * Returns a count of how many files need analysis.
-   */
+  /// Returns a count of how many files need analysis.
   int get numberOfPendingFiles {
     return _pendingChangedFiles.length +
         _pendingImportFiles.length +
@@ -138,9 +104,7 @@
         _pendingFiles.length;
   }
 
-  /**
-   * Adds the given [path] to the set of "added files".
-   */
+  /// Adds the given [path] to the set of "added files".
   void addFile(String path) {
     _fsState.markFileForReading(path);
     addedFiles.add(path);
@@ -148,18 +112,14 @@
     _changeHook(path);
   }
 
-  /**
-   * Adds the given [paths] to the set of "added files".
-   */
+  /// Adds the given [paths] to the set of "added files".
   void addFiles(Iterable<String> paths) {
     addedFiles.addAll(paths);
     _pendingFiles.addAll(paths);
     _changeHook(null);
   }
 
-  /**
-   * Adds the given [path] to the set of "changed files".
-   */
+  /// Adds the given [path] to the set of "changed files".
   void changeFile(String path) {
     _changedFiles.add(path);
     if (addedFiles.contains(path)) {
@@ -169,11 +129,9 @@
     _changeHook(path);
   }
 
-  /**
-   * Removes the given [path] from the set of "pending files".
-   *
-   * Should be called after the client has analyzed a file.
-   */
+  /// Removes the given [path] from the set of "pending files".
+  ///
+  /// Should be called after the client has analyzed a file.
   void fileWasAnalyzed(String path) {
     _pendingChangedFiles.remove(path);
     _pendingImportFiles.remove(path);
@@ -181,10 +139,8 @@
     _pendingFiles.remove(path);
   }
 
-  /**
-   * Returns a boolean indicating whether the given [path] points to a file that
-   * requires analysis.
-   */
+  /// Returns a boolean indicating whether the given [path] points to a file
+  /// that requires analysis.
   bool isFilePending(String path) {
     return _pendingChangedFiles.contains(path) ||
         _pendingImportFiles.contains(path) ||
@@ -192,9 +148,7 @@
         _pendingFiles.contains(path);
   }
 
-  /**
-   * Removes the given [path] from the set of "added files".
-   */
+  /// Removes the given [path] from the set of "added files".
   void removeFile(String path) {
     addedFiles.remove(path);
     _pendingChangedFiles.remove(path);
@@ -208,17 +162,13 @@
     _changeHook(path);
   }
 
-  /**
-   * Schedule all added files for analysis.
-   */
+  /// Schedule all added files for analysis.
   void scheduleAllAddedFiles() {
     _pendingFiles.addAll(addedFiles);
   }
 
-  /**
-   * Verify the API signature for the file with the given [path], and decide
-   * which linked libraries should be invalidated, and files reanalyzed.
-   */
+  /// Verify the API signature for the file with the given [path], and decide
+  /// which linked libraries should be invalidated, and files reanalyzed.
   FileState verifyApiSignature(String path) {
     return _logger.run('Verify API signature of $path', () {
       _logger.writeln('Work in ${_fsState.contextName}');
@@ -286,12 +236,10 @@
     });
   }
 
-  /**
-   * If at least one file is in the "changed files" set, determines the impact
-   * of the change, updates the set of pending files, and returns `true`.
-   *
-   * If no files are in the "changed files" set, returns `false`.
-   */
+  /// If at least one file is in the "changed files" set, determines the impact
+  /// of the change, updates the set of pending files, and returns `true`.
+  ///
+  /// If no files are in the "changed files" set, returns `false`.
   bool verifyChangedFilesIfNeeded() {
     // Verify all changed files one at a time.
     if (_changedFiles.isNotEmpty) {
diff --git a/pkg/analyzer/lib/src/dart/analysis/index.dart b/pkg/analyzer/lib/src/dart/analysis/index.dart
index 816685d..630e395 100644
--- a/pkg/analyzer/lib/src/dart/analysis/index.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/index.dart
@@ -57,10 +57,8 @@
   return element;
 }
 
-/**
- * Return the [CompilationUnitElement] that should be used for [element].
- * Throw [StateError] if the [element] is not linked into a unit.
- */
+/// Return the [CompilationUnitElement] that should be used for [element].
+/// Throw [StateError] if the [element] is not linked into a unit.
 CompilationUnitElement getUnitElement(Element element) {
   for (Element e = element; e != null; e = e.enclosingElement) {
     if (e is CompilationUnitElement) {
@@ -73,9 +71,7 @@
   throw StateError('Element not contained in compilation unit: $element');
 }
 
-/**
- * Index the [unit] into a new [AnalysisDriverUnitIndexBuilder].
- */
+/// Index the [unit] into a new [AnalysisDriverUnitIndexBuilder].
 AnalysisDriverUnitIndexBuilder indexUnit(CompilationUnit unit) {
   return _IndexAssembler().assemble(unit);
 }
@@ -123,11 +119,10 @@
   });
 }
 
-/**
- * Information about an element that is actually put into index for some other
- * related element. For example for a synthetic getter this is the corresponding
- * non-synthetic field and [IndexSyntheticElementKind.getter] as the [kind].
- */
+/// Information about an element that is actually put into index for some other
+/// related element. For example for a synthetic getter this is the
+/// corresponding non-synthetic field and [IndexSyntheticElementKind.getter] as
+/// the [kind].
 class IndexElementInfo {
   final Element element;
   final IndexSyntheticElementKind kind;
@@ -189,51 +184,35 @@
   IndexElementInfo._(this.element, this.kind);
 }
 
-/**
- * Information about an element referenced in index.
- */
+/// Information about an element referenced in index.
 class _ElementInfo {
-  /**
-   * The identifier of the [CompilationUnitElement] containing this element.
-   */
+  /// The identifier of the [CompilationUnitElement] containing this element.
   final int unitId;
 
-  /**
-   * The identifier of the top-level name, or `null` if the element is a
-   * reference to the unit.
-   */
+  /// The identifier of the top-level name, or `null` if the element is a
+  /// reference to the unit.
   final _StringInfo nameIdUnitMember;
 
-  /**
-   * The identifier of the class member name, or `null` if the element is not a
-   * class member or a named parameter of a class member.
-   */
+  /// The identifier of the class member name, or `null` if the element is not a
+  /// class member or a named parameter of a class member.
   final _StringInfo nameIdClassMember;
 
-  /**
-   * The identifier of the named parameter name, or `null` if the element is not
-   * a named parameter.
-   */
+  /// The identifier of the named parameter name, or `null` if the element is
+  /// not a named parameter.
   final _StringInfo nameIdParameter;
 
-  /**
-   * The kind of the element.
-   */
+  /// The kind of the element.
   final IndexSyntheticElementKind kind;
 
-  /**
-   * The unique id of the element.  It is set after indexing of the whole
-   * package is done and we are assembling the full package index.
-   */
+  /// The unique id of the element.  It is set after indexing of the whole
+  /// package is done and we are assembling the full package index.
   int id;
 
   _ElementInfo(this.unitId, this.nameIdUnitMember, this.nameIdClassMember,
       this.nameIdParameter, this.kind);
 }
 
-/**
- * Information about a single relation in a single compilation unit.
- */
+/// Information about a single relation in a single compilation unit.
 class _ElementRelationInfo {
   final _ElementInfo elementInfo;
   final IndexRelationKind kind;
@@ -245,73 +224,51 @@
       this.elementInfo, this.kind, this.offset, this.length, this.isQualified);
 }
 
-/**
- * Assembler of a single [CompilationUnit] index.
- *
- * The intended usage sequence:
- *
- *  - Call [addElementRelation] for each element relation found in the unit.
- *  - Call [addNameRelation] for each name relation found in the unit.
- *  - Assign ids to all the [_ElementInfo] in [elementRelations].
- *  - Call [assemble] to produce the final unit index.
- */
+/// Assembler of a single [CompilationUnit] index.
+///
+/// The intended usage sequence:
+///
+///  - Call [addElementRelation] for each element relation found in the unit.
+///  - Call [addNameRelation] for each name relation found in the unit.
+///  - Assign ids to all the [_ElementInfo] in [elementRelations].
+///  - Call [assemble] to produce the final unit index.
 class _IndexAssembler {
-  /**
-   * The string to use in place of the `null` string.
-   */
+  /// The string to use in place of the `null` string.
   static const NULL_STRING = '--nullString--';
 
-  /**
-   * Map associating referenced elements with their [_ElementInfo]s.
-   */
+  /// Map associating referenced elements with their [_ElementInfo]s.
   final Map<Element, _ElementInfo> elementMap = {};
 
-  /**
-   * Map associating [CompilationUnitElement]s with their identifiers, which
-   * are indices into [unitLibraryUris] and [unitUnitUris].
-   */
+  /// Map associating [CompilationUnitElement]s with their identifiers, which
+  /// are indices into [unitLibraryUris] and [unitUnitUris].
   final Map<CompilationUnitElement, int> unitMap = {};
 
-  /**
-   * The fields [unitLibraryUris] and [unitUnitUris] are used together to
-   * describe each unique [CompilationUnitElement].
-   *
-   * This field contains the library URI of a unit.
-   */
+  /// The fields [unitLibraryUris] and [unitUnitUris] are used together to
+  /// describe each unique [CompilationUnitElement].
+  ///
+  /// This field contains the library URI of a unit.
   final List<_StringInfo> unitLibraryUris = [];
 
-  /**
-   * The fields [unitLibraryUris] and [unitUnitUris] are used together to
-   * describe each unique [CompilationUnitElement].
-   *
-   * This field contains the unit URI of a unit, which might be the same as
-   * the library URI for the defining unit, or a different one for a part.
-   */
+  /// The fields [unitLibraryUris] and [unitUnitUris] are used together to
+  /// describe each unique [CompilationUnitElement].
+  ///
+  /// This field contains the unit URI of a unit, which might be the same as
+  /// the library URI for the defining unit, or a different one for a part.
   final List<_StringInfo> unitUnitUris = [];
 
-  /**
-   * Map associating strings with their [_StringInfo]s.
-   */
+  /// Map associating strings with their [_StringInfo]s.
   final Map<String, _StringInfo> stringMap = {};
 
-  /**
-   * All element relations.
-   */
+  /// All element relations.
   final List<_ElementRelationInfo> elementRelations = [];
 
-  /**
-   * All unresolved name relations.
-   */
+  /// All unresolved name relations.
   final List<_NameRelationInfo> nameRelations = [];
 
-  /**
-   * All subtypes declared in the unit.
-   */
+  /// All subtypes declared in the unit.
   final List<_SubtypeInfo> subtypes = [];
 
-  /**
-   * The [_StringInfo] to use for `null` strings.
-   */
+  /// The [_StringInfo] to use for `null` strings.
   _StringInfo nullString;
 
   _IndexAssembler() {
@@ -343,9 +300,7 @@
     }
   }
 
-  /**
-   * Index the [unit] and assemble a new [AnalysisDriverUnitIndexBuilder].
-   */
+  /// Index the [unit] and assemble a new [AnalysisDriverUnitIndexBuilder].
   AnalysisDriverUnitIndexBuilder assemble(CompilationUnit unit) {
     unit.accept(_IndexContributor(this));
 
@@ -422,10 +377,8 @@
         }).toList());
   }
 
-  /**
-   * Return the unique [_ElementInfo] corresponding the [element].  The field
-   * [_ElementInfo.id] is filled by [assemble] during final sorting.
-   */
+  /// Return the unique [_ElementInfo] corresponding the [element].  The field
+  /// [_ElementInfo.id] is filled by [assemble] during final sorting.
   _ElementInfo _getElementInfo(Element element) {
     element = element.declaration;
     return elementMap.putIfAbsent(element, () {
@@ -435,10 +388,8 @@
     });
   }
 
-  /**
-   * Return the unique [_StringInfo] corresponding the given [string].  The
-   * field [_StringInfo.id] is filled by [assemble] during final sorting.
-   */
+  /// Return the unique [_StringInfo] corresponding the given [string].  The
+  /// field [_StringInfo.id] is filled by [assemble] during final sorting.
   _StringInfo _getStringInfo(String string) {
     if (string == null) {
       return nullString;
@@ -449,11 +400,9 @@
     });
   }
 
-  /**
-   * Add information about [unitElement] to [unitUnitUris] and
-   * [unitLibraryUris] if necessary, and return the location in those
-   * arrays representing [unitElement].
-   */
+  /// Add information about [unitElement] to [unitUnitUris] and
+  /// [unitLibraryUris] if necessary, and return the location in those
+  /// arrays representing [unitElement].
   int _getUnitId(CompilationUnitElement unitElement) {
     return unitMap.putIfAbsent(unitElement, () {
       assert(unitLibraryUris.length == unitUnitUris.length);
@@ -464,19 +413,15 @@
     });
   }
 
-  /**
-   * Return the unique [_StringInfo] corresponding [uri].  The field
-   * [_StringInfo.id] is filled by [assemble] during final sorting.
-   */
+  /// Return the unique [_StringInfo] corresponding [uri].  The field
+  /// [_StringInfo.id] is filled by [assemble] during final sorting.
   _StringInfo _getUriInfo(Uri uri) {
     String str = uri.toString();
     return _getStringInfo(str);
   }
 
-  /**
-   * Return a new [_ElementInfo] for the given [element] in the given [unitId].
-   * This method is static, so it cannot add any information to the index.
-   */
+  /// Return a new [_ElementInfo] for the given [element] in the given [unitId].
+  /// This method is static, so it cannot add any information to the index.
   _ElementInfo _newElementInfo(int unitId, Element element) {
     IndexElementInfo info = IndexElementInfo(element);
     element = info.element;
@@ -492,9 +437,7 @@
   }
 }
 
-/**
- * Visits a resolved AST and adds relationships into the [assembler].
- */
+/// Visits a resolved AST and adds relationships into the [assembler].
 class _IndexContributor extends GeneralizingAstVisitor {
   final _IndexAssembler assembler;
 
@@ -504,9 +447,7 @@
     _recordIsAncestorOf(descendant, descendant, false, <ClassElement>[]);
   }
 
-  /**
-   * Record that the name [node] has a relation of the given [kind].
-   */
+  /// Record that the name [node] has a relation of the given [kind].
   void recordNameRelation(
       SimpleIdentifier node, IndexRelationKind kind, bool isQualified) {
     if (node != null) {
@@ -514,19 +455,15 @@
     }
   }
 
-  /**
-   * Record reference to the given operator [Element].
-   */
+  /// Record reference to the given operator [Element].
   void recordOperatorReference(Token operator, Element element) {
     recordRelationToken(element, IndexRelationKind.IS_INVOKED_BY, operator);
   }
 
-  /**
-   * Record that [element] has a relation of the given [kind] at the location
-   * of the given [node].  The flag [isQualified] is `true` if [node] has an
-   * explicit or implicit qualifier, so cannot be shadowed by a local
-   * declaration.
-   */
+  /// Record that [element] has a relation of the given [kind] at the location
+  /// of the given [node].  The flag [isQualified] is `true` if [node] has an
+  /// explicit or implicit qualifier, so cannot be shadowed by a local
+  /// declaration.
   void recordRelation(
       Element element, IndexRelationKind kind, AstNode node, bool isQualified) {
     if (element != null && node != null) {
@@ -535,12 +472,10 @@
     }
   }
 
-  /**
-   * Record that [element] has a relation of the given [kind] at the given
-   * [offset] and [length].  The flag [isQualified] is `true` if the relation
-   * has an explicit or implicit qualifier, so [element] cannot be shadowed by
-   * a local declaration.
-   */
+  /// Record that [element] has a relation of the given [kind] at the given
+  /// [offset] and [length].  The flag [isQualified] is `true` if the relation
+  /// has an explicit or implicit qualifier, so [element] cannot be shadowed by
+  /// a local declaration.
   void recordRelationOffset(Element element, IndexRelationKind kind, int offset,
       int length, bool isQualified) {
     // Ignore elements that can't be referenced outside of the unit.
@@ -582,10 +517,8 @@
     assembler.addElementRelation(element, kind, offset, length, isQualified);
   }
 
-  /**
-   * Record that [element] has a relation of the given [kind] at the location
-   * of the given [token].
-   */
+  /// Record that [element] has a relation of the given [kind] at the location
+  /// of the given [token].
   void recordRelationToken(
       Element element, IndexRelationKind kind, Token token) {
     if (element != null && token != null) {
@@ -593,9 +526,7 @@
     }
   }
 
-  /**
-   * Record a relation between a super [typeName] and its [Element].
-   */
+  /// Record a relation between a super [typeName] and its [Element].
   void recordSuperType(TypeName typeName, IndexRelationKind kind) {
     Identifier name = typeName?.name;
     if (name != null) {
@@ -621,19 +552,19 @@
   }
 
   @override
-  visitAssignmentExpression(AssignmentExpression node) {
+  void visitAssignmentExpression(AssignmentExpression node) {
     recordOperatorReference(node.operator, node.staticElement);
     super.visitAssignmentExpression(node);
   }
 
   @override
-  visitBinaryExpression(BinaryExpression node) {
+  void visitBinaryExpression(BinaryExpression node) {
     recordOperatorReference(node.operator, node.staticElement);
     super.visitBinaryExpression(node);
   }
 
   @override
-  visitClassDeclaration(ClassDeclaration node) {
+  void visitClassDeclaration(ClassDeclaration node) {
     _addSubtypeForClassDeclaration(node);
     if (node.extendsClause == null) {
       ClassElement objectElement = node.declaredElement.supertype?.element;
@@ -645,14 +576,14 @@
   }
 
   @override
-  visitClassTypeAlias(ClassTypeAlias node) {
+  void visitClassTypeAlias(ClassTypeAlias node) {
     _addSubtypeForClassTypeAlis(node);
     recordIsAncestorOf(node.declaredElement);
     super.visitClassTypeAlias(node);
   }
 
   @override
-  visitConstructorFieldInitializer(ConstructorFieldInitializer node) {
+  void visitConstructorFieldInitializer(ConstructorFieldInitializer node) {
     SimpleIdentifier fieldName = node.fieldName;
     if (fieldName != null) {
       Element element = fieldName.staticElement;
@@ -662,7 +593,7 @@
   }
 
   @override
-  visitConstructorName(ConstructorName node) {
+  void visitConstructorName(ConstructorName node) {
     ConstructorElement element = node.staticElement;
     element = _getActualConstructorElement(element);
     // record relation
@@ -680,14 +611,14 @@
   }
 
   @override
-  visitExportDirective(ExportDirective node) {
+  void visitExportDirective(ExportDirective node) {
     ExportElement element = node.element;
     recordUriReference(element?.exportedLibrary, node.uri);
     super.visitExportDirective(node);
   }
 
   @override
-  visitExpression(Expression node) {
+  void visitExpression(Expression node) {
     ParameterElement parameterElement = node.staticParameterElement;
     if (parameterElement != null && parameterElement.isOptionalPositional) {
       recordRelationOffset(parameterElement, IndexRelationKind.IS_REFERENCED_BY,
@@ -697,26 +628,26 @@
   }
 
   @override
-  visitExtendsClause(ExtendsClause node) {
+  void visitExtendsClause(ExtendsClause node) {
     recordSuperType(node.superclass, IndexRelationKind.IS_EXTENDED_BY);
   }
 
   @override
-  visitImplementsClause(ImplementsClause node) {
+  void visitImplementsClause(ImplementsClause node) {
     for (TypeName typeName in node.interfaces) {
       recordSuperType(typeName, IndexRelationKind.IS_IMPLEMENTED_BY);
     }
   }
 
   @override
-  visitImportDirective(ImportDirective node) {
+  void visitImportDirective(ImportDirective node) {
     ImportElement element = node.element;
     recordUriReference(element?.importedLibrary, node.uri);
     super.visitImportDirective(node);
   }
 
   @override
-  visitIndexExpression(IndexExpression node) {
+  void visitIndexExpression(IndexExpression node) {
     MethodElement element = node.staticElement;
     if (element is MethodElement) {
       Token operator = node.leftBracket;
@@ -726,10 +657,10 @@
   }
 
   @override
-  visitLibraryIdentifier(LibraryIdentifier node) {}
+  void visitLibraryIdentifier(LibraryIdentifier node) {}
 
   @override
-  visitMethodInvocation(MethodInvocation node) {
+  void visitMethodInvocation(MethodInvocation node) {
     SimpleIdentifier name = node.methodName;
     Element element = name.staticElement;
     // unresolved name invocation
@@ -748,21 +679,21 @@
   }
 
   @override
-  visitMixinDeclaration(MixinDeclaration node) {
+  void visitMixinDeclaration(MixinDeclaration node) {
     _addSubtypeForMixinDeclaration(node);
     recordIsAncestorOf(node.declaredElement);
     super.visitMixinDeclaration(node);
   }
 
   @override
-  visitOnClause(OnClause node) {
+  void visitOnClause(OnClause node) {
     for (TypeName typeName in node.superclassConstraints) {
       recordSuperType(typeName, IndexRelationKind.IS_IMPLEMENTED_BY);
     }
   }
 
   @override
-  visitPartDirective(PartDirective node) {
+  void visitPartDirective(PartDirective node) {
     CompilationUnitElement element = node.element;
     if (element?.source != null) {
       recordUriReference(element, node.uri);
@@ -771,19 +702,20 @@
   }
 
   @override
-  visitPostfixExpression(PostfixExpression node) {
+  void visitPostfixExpression(PostfixExpression node) {
     recordOperatorReference(node.operator, node.staticElement);
     super.visitPostfixExpression(node);
   }
 
   @override
-  visitPrefixExpression(PrefixExpression node) {
+  void visitPrefixExpression(PrefixExpression node) {
     recordOperatorReference(node.operator, node.staticElement);
     super.visitPrefixExpression(node);
   }
 
   @override
-  visitRedirectingConstructorInvocation(RedirectingConstructorInvocation node) {
+  void visitRedirectingConstructorInvocation(
+      RedirectingConstructorInvocation node) {
     ConstructorElement element = node.staticElement;
     if (node.constructorName != null) {
       int offset = node.period.offset;
@@ -799,7 +731,7 @@
   }
 
   @override
-  visitSimpleIdentifier(SimpleIdentifier node) {
+  void visitSimpleIdentifier(SimpleIdentifier node) {
     // name in declaration
     if (node.inDeclarationContext()) {
       return;
@@ -845,7 +777,7 @@
   }
 
   @override
-  visitSuperConstructorInvocation(SuperConstructorInvocation node) {
+  void visitSuperConstructorInvocation(SuperConstructorInvocation node) {
     ConstructorElement element = node.staticElement;
     if (node.constructorName != null) {
       int offset = node.period.offset;
@@ -861,7 +793,7 @@
   }
 
   @override
-  visitTypeName(TypeName node) {
+  void visitTypeName(TypeName node) {
     AstNode parent = node.parent;
     if (parent is ClassTypeAlias && parent.superclass == node) {
       recordSuperType(node, IndexRelationKind.IS_EXTENDED_BY);
@@ -871,15 +803,13 @@
   }
 
   @override
-  visitWithClause(WithClause node) {
+  void visitWithClause(WithClause node) {
     for (TypeName typeName in node.mixinTypes) {
       recordSuperType(typeName, IndexRelationKind.IS_MIXED_IN_BY);
     }
   }
 
-  /**
-   * Record the given class as a subclass of its direct superclasses.
-   */
+  /// Record the given class as a subclass of its direct superclasses.
   void _addSubtype(String name,
       {TypeName superclass,
       WithClause withClause,
@@ -935,9 +865,7 @@
     assembler.addSubtype(name, members, supertypes);
   }
 
-  /**
-   * Record the given class as a subclass of its direct superclasses.
-   */
+  /// Record the given class as a subclass of its direct superclasses.
   void _addSubtypeForClassDeclaration(ClassDeclaration node) {
     _addSubtype(node.name.name,
         superclass: node.extendsClause?.superclass,
@@ -946,9 +874,7 @@
         memberNodes: node.members);
   }
 
-  /**
-   * Record the given class as a subclass of its direct superclasses.
-   */
+  /// Record the given class as a subclass of its direct superclasses.
   void _addSubtypeForClassTypeAlis(ClassTypeAlias node) {
     _addSubtype(node.name.name,
         superclass: node.superclass,
@@ -957,9 +883,7 @@
         memberNodes: const []);
   }
 
-  /**
-   * Record the given mixin as a subclass of its direct superclasses.
-   */
+  /// Record the given mixin as a subclass of its direct superclasses.
   void _addSubtypeForMixinDeclaration(MixinDeclaration node) {
     _addSubtype(node.name.name,
         onClause: node.onClause,
@@ -967,11 +891,9 @@
         memberNodes: node.members);
   }
 
-  /**
-   * If the given [constructor] is a synthetic constructor created for a
-   * [ClassTypeAlias], return the actual constructor of a [ClassDeclaration]
-   * which is invoked.  Return `null` if a redirection cycle is detected.
-   */
+  /// If the given [constructor] is a synthetic constructor created for a
+  /// [ClassTypeAlias], return the actual constructor of a [ClassDeclaration]
+  /// which is invoked.  Return `null` if a redirection cycle is detected.
   ConstructorElement _getActualConstructorElement(
       ConstructorElement constructor) {
     Set<ConstructorElement> seenConstructors = <ConstructorElement>{};
@@ -987,10 +909,8 @@
     return constructor;
   }
 
-  /**
-   * Return `true` if [node] has an explicit or implicit qualifier, so that it
-   * cannot be shadowed by a local declaration.
-   */
+  /// Return `true` if [node] has an explicit or implicit qualifier, so that it
+  /// cannot be shadowed by a local declaration.
   bool _isQualified(SimpleIdentifier node) {
     if (node.isQualified) {
       return true;
@@ -1034,9 +954,7 @@
   }
 }
 
-/**
- * Information about a single name relation in single compilation unit.
- */
+/// Information about a single name relation in single compilation unit.
 class _NameRelationInfo {
   final _StringInfo nameInfo;
   final IndexRelationKind kind;
@@ -1046,41 +964,27 @@
   _NameRelationInfo(this.nameInfo, this.kind, this.offset, this.isQualified);
 }
 
-/**
- * Information about a string referenced in the index.
- */
+/// Information about a string referenced in the index.
 class _StringInfo {
-  /**
-   * The value of the string.
-   */
+  /// The value of the string.
   final String value;
 
-  /**
-   * The unique id of the string.  It is set after indexing of the whole
-   * package is done and we are assembling the full package index.
-   */
+  /// The unique id of the string.  It is set after indexing of the whole
+  /// package is done and we are assembling the full package index.
   int id;
 
   _StringInfo(this.value);
 }
 
-/**
- * Information about a subtype in the index.
- */
+/// Information about a subtype in the index.
 class _SubtypeInfo {
-  /**
-   * The identifier of a direct supertype.
-   */
+  /// The identifier of a direct supertype.
   final _StringInfo supertype;
 
-  /**
-   * The name of the class.
-   */
+  /// The name of the class.
   final _StringInfo name;
 
-  /**
-   * The names of defined instance members.
-   */
+  /// The names of defined instance members.
   final List<_StringInfo> members;
 
   _SubtypeInfo(this.supertype, this.name, this.members);
diff --git a/pkg/analyzer/lib/src/dart/analysis/library_analyzer.dart b/pkg/analyzer/lib/src/dart/analysis/library_analyzer.dart
index 4361edf..4aad110 100644
--- a/pkg/analyzer/lib/src/dart/analysis/library_analyzer.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/library_analyzer.dart
@@ -21,10 +21,12 @@
 import 'package:analyzer/src/dart/element/element.dart';
 import 'package:analyzer/src/dart/element/inheritance_manager3.dart';
 import 'package:analyzer/src/dart/element/type_provider.dart';
+import 'package:analyzer/src/dart/element/type_system.dart';
 import 'package:analyzer/src/dart/error/syntactic_errors.dart';
 import 'package:analyzer/src/dart/resolver/flow_analysis_visitor.dart';
 import 'package:analyzer/src/dart/resolver/legacy_type_asserter.dart';
 import 'package:analyzer/src/dart/resolver/resolution_visitor.dart';
+import 'package:analyzer/src/dart/resolver/scope.dart' show LibraryScope;
 import 'package:analyzer/src/error/best_practices_verifier.dart';
 import 'package:analyzer/src/error/codes.dart';
 import 'package:analyzer/src/error/dart2js_verifier.dart';
@@ -58,9 +60,7 @@
 var timerLibraryAnalyzerSplicer = Stopwatch();
 var timerLibraryAnalyzerVerify = Stopwatch();
 
-/**
- * Analyzer of a single library.
- */
+/// Analyzer of a single library.
 class LibraryAnalyzer {
   /// A marker object used to prevent the initialization of
   /// [_versionConstraintFromPubspec] when the previous initialization attempt
@@ -108,18 +108,14 @@
 
   TypeSystemImpl get _typeSystem => _libraryElement.typeSystem;
 
-  /**
-   * Compute analysis results for all units of the library.
-   */
+  /// Compute analysis results for all units of the library.
   Map<FileState, UnitAnalysisResult> analyze() {
     return PerformanceStatistics.analysis.makeCurrentWhile(() {
       return analyzeSync();
     });
   }
 
-  /**
-   * Compute analysis results for all units of the library.
-   */
+  /// Compute analysis results for all units of the library.
   Map<FileState, UnitAnalysisResult> analyzeSync() {
     timerLibraryAnalyzer.start();
     Map<FileState, CompilationUnit> units = {};
@@ -215,9 +211,7 @@
     unit.accept(constantVerifier);
   }
 
-  /**
-   * Compute [_constants] in all units.
-   */
+  /// Compute [_constants] in all units.
   void _computeConstants() {
     computeConstants(_typeProvider, _typeSystem, _declaredVariables,
         _constants.toList(), _analysisOptions.experimentStatus);
@@ -390,10 +384,8 @@
     unit.accept(FfiVerifier(_typeSystem, errorReporter));
   }
 
-  /**
-   * Return a subset of the given [errors] that are not marked as ignored in
-   * the [file].
-   */
+  /// Return a subset of the given [errors] that are not marked as ignored in
+  /// the [file].
   List<AnalysisError> _filterIgnoredErrors(
       FileState file, List<AnalysisError> errors) {
     if (errors.isEmpty) {
@@ -504,10 +496,8 @@
     return workspace?.findPackageFor(libraryPath);
   }
 
-  /**
-   * Return the name of the library that the given part is declared to be a
-   * part of, or `null` if the part does not contain a part-of directive.
-   */
+  /// Return the name of the library that the given part is declared to be a
+  /// part of, or `null` if the part does not contain a part-of directive.
   _NameOrSource _getPartLibraryNameOrUri(Source partSource,
       CompilationUnit partUnit, List<Directive> directivesToResolve) {
     for (Directive directive in partUnit.directives) {
@@ -539,16 +529,12 @@
     return source == _library.source;
   }
 
-  /**
-   * Return `true` if the given [source] is a library.
-   */
+  /// Return `true` if the given [source] is a library.
   bool _isLibrarySource(Source source) {
     return _isLibraryUri(source.uri);
   }
 
-  /**
-   * Return a new parsed unresolved [CompilationUnit].
-   */
+  /// Return a new parsed unresolved [CompilationUnit].
   CompilationUnit _parse(FileState file) {
     AnalysisErrorListener errorListener = _getErrorListener(file);
     String content = file.content;
@@ -734,10 +720,8 @@
         featureSet: unit.featureSet, flowAnalysisHelper: flowAnalysisHelper));
   }
 
-  /**
-   * Return the result of resolve the given [uriContent], reporting errors
-   * against the [uriLiteral].
-   */
+  /// Return the result of resolve the given [uriContent], reporting errors
+  /// against the [uriLiteral].
   Source _resolveUri(FileState file, bool isImport, StringLiteral uriLiteral,
       String uriContent) {
     UriValidationCode code =
@@ -811,10 +795,8 @@
     }
   }
 
-  /**
-   * Check the given [directive] to see if the referenced source exists and
-   * report an error if it does not.
-   */
+  /// Check the given [directive] to see if the referenced source exists and
+  /// report an error if it does not.
   void _validateUriBasedDirective(
       FileState file, UriBasedDirectiveImpl directive) {
     String uriContent;
@@ -846,10 +828,8 @@
         .reportErrorForNode(errorCode, uriLiteral, [uriContent]);
   }
 
-  /**
-   * Check each directive in the given [unit] to see if the referenced source
-   * exists and report an error if it does not.
-   */
+  /// Check each directive in the given [unit] to see if the referenced source
+  /// exists and report an error if it does not.
   void _validateUriBasedDirectives(FileState file, CompilationUnit unit) {
     for (Directive directive in unit.directives) {
       if (directive is UriBasedDirective) {
@@ -858,10 +838,8 @@
     }
   }
 
-  /**
-   * Return `true` if the given [source] refers to a file that is assumed to be
-   * generated.
-   */
+  /// Return `true` if the given [source] refers to a file that is assumed to be
+  /// generated.
   static bool _isGenerated(Source source) {
     if (source == null) {
       return false;
@@ -885,9 +863,7 @@
   }
 }
 
-/**
- * Analysis result for single file.
- */
+/// Analysis result for single file.
 class UnitAnalysisResult {
   final FileState file;
   final CompilationUnit unit;
@@ -896,9 +872,7 @@
   UnitAnalysisResult(this.file, this.unit, this.errors);
 }
 
-/**
- * Either the name or the source associated with a part-of directive.
- */
+/// Either the name or the source associated with a part-of directive.
 class _NameOrSource {
   final String name;
   final Source source;
diff --git a/pkg/analyzer/lib/src/dart/analysis/library_context.dart b/pkg/analyzer/lib/src/dart/analysis/library_context.dart
index 86fdc7f..dfb0e07 100644
--- a/pkg/analyzer/lib/src/dart/analysis/library_context.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/library_context.dart
@@ -31,15 +31,14 @@
 var timerLinking = Stopwatch();
 var timerLoad2 = Stopwatch();
 
-/**
- * Context information necessary to analyze one or more libraries within an
- * [AnalysisDriver].
- *
- * Currently this is implemented as a wrapper around [AnalysisContext].
- */
+/// Context information necessary to analyze one or more libraries within an
+/// [AnalysisDriver].
+///
+/// Currently this is implemented as a wrapper around [AnalysisContext].
 class LibraryContext {
   static const _maxLinkedDataInBytes = 64 * 1024 * 1024;
 
+  final LibraryContextTestView testView;
   final PerformanceLog logger;
   final ByteStore byteStore;
   final AnalysisSessionImpl analysisSession;
@@ -57,6 +56,7 @@
   Set<LibraryCycle> loadedBundles = Set<LibraryCycle>.identity();
 
   LibraryContext({
+    @required this.testView,
     @required AnalysisSessionImpl session,
     @required PerformanceLog logger,
     @required ByteStore byteStore,
@@ -76,9 +76,7 @@
     load2(targetLibrary);
   }
 
-  /**
-   * Computes a [CompilationUnitElement] for the given library/unit pair.
-   */
+  /// Computes a [CompilationUnitElement] for the given library/unit pair.
   CompilationUnitElement computeUnitElement(FileState library, FileState unit) {
     var reference = elementFactory.rootReference
         .getChild(library.uriStr)
@@ -87,16 +85,12 @@
     return elementFactory.elementOfReference(reference);
   }
 
-  /**
-   * Get the [LibraryElement] for the given library.
-   */
+  /// Get the [LibraryElement] for the given library.
   LibraryElement getLibraryElement(FileState library) {
     return elementFactory.libraryOfUri(library.uriStr);
   }
 
-  /**
-   * Return `true` if the given [uri] is known to be a library.
-   */
+  /// Return `true` if the given [uri] is known to be a library.
   bool isLibraryUri(Uri uri) {
     String uriStr = uri.toString();
     return elementFactory.isLibraryUri(uriStr);
@@ -128,6 +122,10 @@
       if (bytes == null) {
         librariesLinkedTimer.start();
 
+        testView.linkedCycles.add(
+          cycle.libraries.map((e) => e.path).toSet(),
+        );
+
         timerInputLibraries.start();
         inputsTimer.start();
         var inputLibraries = <link2.LinkInputLibrary>[];
@@ -320,6 +318,10 @@
   }
 }
 
+class LibraryContextTestView {
+  final List<Set<String>> linkedCycles = [];
+}
+
 /// TODO(scheglov) replace in the internal patch
 class LibraryCycleLinkException extends CaughtExceptionWithFiles {
   LibraryCycleLinkException(
diff --git a/pkg/analyzer/lib/src/dart/analysis/library_graph.dart b/pkg/analyzer/lib/src/dart/analysis/library_graph.dart
index 2db8ac6..f8bc2dd 100644
--- a/pkg/analyzer/lib/src/dart/analysis/library_graph.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/library_graph.dart
@@ -11,8 +11,8 @@
 
 /// Ensure that the [FileState.libraryCycle] for the [file] and anything it
 /// depends on is computed.
-void computeLibraryCycle(Uint32List linkedSalt, FileState file) {
-  var libraryWalker = _LibraryWalker(linkedSalt);
+void computeLibraryCycle(Uint32List salt, FileState file) {
+  var libraryWalker = _LibraryWalker(salt);
   libraryWalker.walk(libraryWalker.getNode(file));
 }
 
@@ -88,10 +88,10 @@
 /// Helper that organizes dependencies of a library into topologically
 /// sorted [LibraryCycle]s.
 class _LibraryWalker extends graph.DependencyWalker<_LibraryNode> {
-  final Uint32List _linkedSalt;
+  final Uint32List _salt;
   final Map<FileState, _LibraryNode> nodesOfFiles = {};
 
-  _LibraryWalker(this._linkedSalt);
+  _LibraryWalker(this._salt);
 
   @override
   void evaluate(_LibraryNode v) {
@@ -103,7 +103,7 @@
     var cycle = LibraryCycle();
 
     var signature = ApiSignature();
-    signature.addUint32List(_linkedSalt);
+    signature.addUint32List(_salt);
 
     // Sort libraries to produce stable signatures.
     scc.sort((first, second) {
diff --git a/pkg/analyzer/lib/src/dart/analysis/performance_logger.dart b/pkg/analyzer/lib/src/dart/analysis/performance_logger.dart
index 6e3caaa..4f25fe1 100644
--- a/pkg/analyzer/lib/src/dart/analysis/performance_logger.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/performance_logger.dart
@@ -66,12 +66,10 @@
   }
 }
 
-/**
- * The performance measurement section for operations that start and end
- * at different place in code, so cannot be run using [PerformanceLog.run].
- *
- * The client must call [exit] for every [PerformanceLog.enter].
- */
+/// The performance measurement section for operations that start and end
+/// at different place in code, so cannot be run using [PerformanceLog.run].
+///
+/// The client must call [exit] for every [PerformanceLog.enter].
 class PerformanceLogSection {
   final PerformanceLog _logger;
   final String _msg;
@@ -79,9 +77,7 @@
 
   PerformanceLogSection(this._logger, this._msg);
 
-  /**
-   * Stop the timer, log the time.
-   */
+  /// Stop the timer, log the time.
   void exit() {
     _timer.stop();
     _logger._level--;
diff --git a/pkg/analyzer/lib/src/dart/analysis/referenced_names.dart b/pkg/analyzer/lib/src/dart/analysis/referenced_names.dart
index 9f5f250..7c05adf 100644
--- a/pkg/analyzer/lib/src/dart/analysis/referenced_names.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/referenced_names.dart
@@ -5,19 +5,15 @@
 import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/ast/visitor.dart';
 
-/**
- * Compute the set of external names referenced in the [unit].
- */
+/// Compute the set of external names referenced in the [unit].
 Set<String> computeReferencedNames(CompilationUnit unit) {
   _ReferencedNamesComputer computer = _ReferencedNamesComputer();
   unit.accept(computer);
   return computer.names;
 }
 
-/**
- * Compute the set of names which are used in `extends`, `with` or `implements`
- * clauses in the file. Import prefixes and type arguments are not included.
- */
+/// Compute the set of names which are used in `extends`, `with` or `implements`
+/// clauses in the file. Import prefixes and type arguments are not included.
 Set<String> computeSubtypedNames(CompilationUnit unit) {
   Set<String> subtypedNames = <String>{};
 
@@ -54,9 +50,7 @@
   return subtypedNames;
 }
 
-/**
- * Chained set of local names, that hide corresponding external names.
- */
+/// Chained set of local names, that hide corresponding external names.
 class _LocalNameScope {
   final _LocalNameScope enclosing;
   Set<String> names;
@@ -176,14 +170,14 @@
   }
 }
 
-class _ReferencedNamesComputer extends GeneralizingAstVisitor {
+class _ReferencedNamesComputer extends GeneralizingAstVisitor<void> {
   final Set<String> names = <String>{};
   final Set<String> importPrefixNames = <String>{};
 
   _LocalNameScope localScope = _LocalNameScope(null);
 
   @override
-  visitBlock(Block node) {
+  void visitBlock(Block node) {
     _LocalNameScope outerScope = localScope;
     try {
       localScope = _LocalNameScope.forBlock(localScope, node);
@@ -194,7 +188,7 @@
   }
 
   @override
-  visitClassDeclaration(ClassDeclaration node) {
+  void visitClassDeclaration(ClassDeclaration node) {
     _LocalNameScope outerScope = localScope;
     try {
       localScope = _LocalNameScope.forClass(localScope, node);
@@ -205,7 +199,7 @@
   }
 
   @override
-  visitClassTypeAlias(ClassTypeAlias node) {
+  void visitClassTypeAlias(ClassTypeAlias node) {
     _LocalNameScope outerScope = localScope;
     try {
       localScope = _LocalNameScope.forClassTypeAlias(localScope, node);
@@ -216,13 +210,13 @@
   }
 
   @override
-  visitCompilationUnit(CompilationUnit node) {
+  void visitCompilationUnit(CompilationUnit node) {
     localScope = _LocalNameScope.forUnit(node);
     super.visitCompilationUnit(node);
   }
 
   @override
-  visitConstructorDeclaration(ConstructorDeclaration node) {
+  void visitConstructorDeclaration(ConstructorDeclaration node) {
     _LocalNameScope outerScope = localScope;
     try {
       localScope = _LocalNameScope.forConstructor(localScope, node);
@@ -233,14 +227,14 @@
   }
 
   @override
-  visitConstructorName(ConstructorName node) {
+  void visitConstructorName(ConstructorName node) {
     if (node.parent is! ConstructorDeclaration) {
       super.visitConstructorName(node);
     }
   }
 
   @override
-  visitFunctionDeclaration(FunctionDeclaration node) {
+  void visitFunctionDeclaration(FunctionDeclaration node) {
     _LocalNameScope outerScope = localScope;
     try {
       localScope = _LocalNameScope.forFunction(localScope, node);
@@ -251,7 +245,7 @@
   }
 
   @override
-  visitFunctionTypeAlias(FunctionTypeAlias node) {
+  void visitFunctionTypeAlias(FunctionTypeAlias node) {
     _LocalNameScope outerScope = localScope;
     try {
       localScope = _LocalNameScope.forFunctionTypeAlias(localScope, node);
@@ -262,7 +256,7 @@
   }
 
   @override
-  visitImportDirective(ImportDirective node) {
+  void visitImportDirective(ImportDirective node) {
     if (node.prefix != null) {
       importPrefixNames.add(node.prefix.name);
     }
@@ -270,7 +264,7 @@
   }
 
   @override
-  visitMethodDeclaration(MethodDeclaration node) {
+  void visitMethodDeclaration(MethodDeclaration node) {
     _LocalNameScope outerScope = localScope;
     try {
       localScope = _LocalNameScope.forMethod(localScope, node);
@@ -281,7 +275,7 @@
   }
 
   @override
-  visitSimpleIdentifier(SimpleIdentifier node) {
+  void visitSimpleIdentifier(SimpleIdentifier node) {
     // Ignore all declarations.
     if (node.inDeclarationContext()) {
       return;
diff --git a/pkg/analyzer/lib/src/dart/analysis/results.dart b/pkg/analyzer/lib/src/dart/analysis/results.dart
index 6e2d503..d16c22d 100644
--- a/pkg/analyzer/lib/src/dart/analysis/results.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/results.dart
@@ -10,7 +10,7 @@
 import 'package:analyzer/dart/element/type_provider.dart';
 import 'package:analyzer/error/error.dart';
 import 'package:analyzer/source/line_info.dart';
-import 'package:analyzer/src/generated/resolver.dart' show TypeSystemImpl;
+import 'package:analyzer/src/dart/element/type_system.dart';
 
 abstract class AnalysisResultImpl implements AnalysisResult {
   @override
diff --git a/pkg/analyzer/lib/src/dart/analysis/search.dart b/pkg/analyzer/lib/src/dart/analysis/search.dart
index 2f263d9..028e54c 100644
--- a/pkg/analyzer/lib/src/dart/analysis/search.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/search.dart
@@ -26,17 +26,13 @@
   return element;
 }
 
-/**
- * Search support for an [AnalysisDriver].
- */
+/// Search support for an [AnalysisDriver].
 class Search {
   final AnalysisDriver _driver;
 
   Search(this._driver);
 
-  /**
-   * Returns class or mixin members with the given [name].
-   */
+  /// Returns class or mixin members with the given [name].
   Future<List<Element>> classMembers(String name) async {
     List<Element> elements = <Element>[];
 
@@ -63,9 +59,7 @@
     return elements;
   }
 
-  /**
-   * Returns references to the [element].
-   */
+  /// Returns references to the [element].
   Future<List<SearchResult>> references(
       Element element, SearchedFiles searchedFiles) async {
     if (element == null) {
@@ -110,13 +104,11 @@
     return const <SearchResult>[];
   }
 
-  /**
-   * Returns subtypes of the given [type].
-   *
-   * The [searchedFiles] are consulted to see if a file is "owned" by this
-   * [Search] object, so should be only searched by it to avoid duplicate
-   * results; and updated to take ownership if the file is not owned yet.
-   */
+  /// Returns subtypes of the given [type].
+  ///
+  /// The [searchedFiles] are consulted to see if a file is "owned" by this
+  /// [Search] object, so should be only searched by it to avoid duplicate
+  /// results; and updated to take ownership if the file is not owned yet.
   Future<List<SearchResult>> subTypes(
       ClassElement type, SearchedFiles searchedFiles) async {
     if (type == null) {
@@ -131,9 +123,7 @@
     return results;
   }
 
-  /**
-   * Return direct [SubtypeResult]s for either the [type] or [subtype].
-   */
+  /// Return direct [SubtypeResult]s for either the [type] or [subtype].
   Future<List<SubtypeResult>> subtypes(SearchedFiles searchedFiles,
       {ClassElement type, SubtypeResult subtype}) async {
     String name;
@@ -168,9 +158,7 @@
     return results;
   }
 
-  /**
-   * Returns top-level elements with names matching the given [regExp].
-   */
+  /// Returns top-level elements with names matching the given [regExp].
   Future<List<Element>> topLevelElements(RegExp regExp) async {
     List<Element> elements = <Element>[];
 
@@ -198,9 +186,7 @@
     return elements;
   }
 
-  /**
-   * Returns unresolved references to the given [name].
-   */
+  /// Returns unresolved references to the given [name].
   Future<List<SearchResult>> unresolvedMemberReferences(
       String name, SearchedFiles searchedFiles) async {
     if (name == null) {
@@ -274,9 +260,7 @@
     }
   }
 
-  /**
-   * Add results for [element] usage in the given [file].
-   */
+  /// Add results for [element] usage in the given [file].
   Future<void> _addResultsInFile(
       List<SearchResult> results,
       Element element,
@@ -497,9 +481,7 @@
   }
 }
 
-/**
- * Container that keeps track of file owners.
- */
+/// Container that keeps track of file owners.
 class SearchedFiles {
   final Map<String, Search> pathOwners = {};
   final Map<Uri, Search> uriOwners = {};
@@ -523,38 +505,24 @@
   }
 }
 
-/**
- * A single search result.
- */
+/// A single search result.
 class SearchResult {
-  /**
-   * The deep most element that contains this result.
-   */
+  /// The deep most element that contains this result.
   final Element enclosingElement;
 
-  /**
-   * The kind of the [element] usage.
-   */
+  /// The kind of the [element] usage.
   final SearchResultKind kind;
 
-  /**
-   * The offset relative to the beginning of the containing file.
-   */
+  /// The offset relative to the beginning of the containing file.
   final int offset;
 
-  /**
-   * The length of the usage in the containing file context.
-   */
+  /// The length of the usage in the containing file context.
   final int length;
 
-  /**
-   * Is `true` if a field or a method is using with a qualifier.
-   */
+  /// Is `true` if a field or a method is using with a qualifier.
   final bool isResolved;
 
-  /**
-   * Is `true` if the result is a resolved reference to [element].
-   */
+  /// Is `true` if the result is a resolved reference to [element].
   final bool isQualified;
 
   SearchResult._(this.enclosingElement, this.kind, this.offset, this.length,
@@ -581,33 +549,21 @@
   }
 }
 
-/**
- * The kind of reference in a [SearchResult].
- */
+/// The kind of reference in a [SearchResult].
 enum SearchResultKind { READ, READ_WRITE, WRITE, INVOCATION, REFERENCE }
 
-/**
- * A single subtype of a type.
- */
+/// A single subtype of a type.
 class SubtypeResult {
-  /**
-   * The URI of the library.
-   */
+  /// The URI of the library.
   final String libraryUri;
 
-  /**
-   * The identifier of the subtype.
-   */
+  /// The identifier of the subtype.
   final String id;
 
-  /**
-   * The name of the subtype.
-   */
+  /// The name of the subtype.
   final String name;
 
-  /**
-   * The names of instance members declared in the class.
-   */
+  /// The names of instance members declared in the class.
   final List<String> members;
 
   SubtypeResult(this.libraryUri, this.id, this.name, this.members);
@@ -616,17 +572,15 @@
   String toString() => id;
 }
 
-/**
- * A visitor that finds the deep-most [Element] that contains the [offset].
- */
-class _ContainingElementFinder extends GeneralizingElementVisitor {
+/// A visitor that finds the deep-most [Element] that contains the [offset].
+class _ContainingElementFinder extends GeneralizingElementVisitor<void> {
   final int offset;
   Element containingElement;
 
   _ContainingElementFinder(this.offset);
 
   @override
-  visitElement(Element element) {
+  void visitElement(Element element) {
     if (element is ElementImpl) {
       if (element.codeOffset != null &&
           element.codeOffset <= offset &&
@@ -638,10 +592,8 @@
   }
 }
 
-/**
- * Visitor that adds [SearchResult]s for references to the [importElement].
- */
-class _ImportElementReferencesVisitor extends RecursiveAstVisitor {
+/// Visitor that adds [SearchResult]s for references to the [importElement].
+class _ImportElementReferencesVisitor extends RecursiveAstVisitor<void> {
   final List<SearchResult> results = <SearchResult>[];
 
   final ImportElement importElement;
@@ -656,13 +608,13 @@
   }
 
   @override
-  visitExportDirective(ExportDirective node) {}
+  void visitExportDirective(ExportDirective node) {}
 
   @override
-  visitImportDirective(ImportDirective node) {}
+  void visitImportDirective(ImportDirective node) {}
 
   @override
-  visitSimpleIdentifier(SimpleIdentifier node) {
+  void visitSimpleIdentifier(SimpleIdentifier node) {
     if (node.inDeclarationContext()) {
       return;
     }
@@ -734,10 +686,8 @@
     }
   }
 
-  /**
-   * Return the [element]'s identifier in the [index] or `-1` if the
-   * [element] is not referenced in the [index].
-   */
+  /// Return the [element]'s identifier in the [index] or `-1` if the
+  /// [element] is not referenced in the [index].
   int findElementId(Element element) {
     IndexElementInfo info = IndexElementInfo(element);
     element = info.element;
@@ -781,14 +731,12 @@
     return -1;
   }
 
-  /**
-   * Return a list of results where an element with the given [elementId] has
-   * a relation with the kind from [relationToResultKind].
-   *
-   * The function [getEnclosingUnitElement] is used to lazily compute the
-   * enclosing [CompilationUnitElement] if there is a relation of an
-   * interesting kind.
-   */
+  /// Return a list of results where an element with the given [elementId] has
+  /// a relation with the kind from [relationToResultKind].
+  ///
+  /// The function [getEnclosingUnitElement] is used to lazily compute the
+  /// enclosing [CompilationUnitElement] if there is a relation of an
+  /// interesting kind.
   Future<List<SearchResult>> getRelations(
       int elementId,
       Map<IndexRelationKind, SearchResultKind> relationToResultKind,
@@ -825,10 +773,8 @@
     return results;
   }
 
-  /**
-   * Return the identifier of [str] in the [index] or `-1` if [str] is not
-   * used in the [index].
-   */
+  /// Return the identifier of [str] in the [index] or `-1` if [str] is not
+  /// used in the [index].
   int getStringId(String str) {
     if (str == null) {
       return index.nullStringId;
@@ -837,10 +783,8 @@
     return binarySearch(index.strings, str);
   }
 
-  /**
-   * Return the identifier of the [CompilationUnitElement] containing the
-   * [element] in the [index] or `-1` if not found.
-   */
+  /// Return the identifier of the [CompilationUnitElement] containing the
+  /// [element] in the [index] or `-1` if not found.
   int getUnitId(Element element) {
     CompilationUnitElement unitElement = getUnitElement(element);
     int libraryUriId = getUriId(unitElement.library.source.uri);
@@ -860,10 +804,8 @@
     return -1;
   }
 
-  /**
-   * Return a list of results where a class members with the given [name] is
-   * referenced with a qualifier, but is not resolved.
-   */
+  /// Return a list of results where a class members with the given [name] is
+  /// referenced with a qualifier, but is not resolved.
   Future<List<SearchResult>> getUnresolvedMemberReferences(
       String name,
       Map<IndexRelationKind, SearchResultKind> relationToResultKind,
@@ -901,19 +843,15 @@
     return results;
   }
 
-  /**
-   * Return the identifier of the [uri] in the [index] or `-1` if the [uri] is
-   * not used in the [index].
-   */
+  /// Return the identifier of the [uri] in the [index] or `-1` if the [uri] is
+  /// not used in the [index].
   int getUriId(Uri uri) {
     String str = uri.toString();
     return getStringId(str);
   }
 
-  /**
-   * Return the index of the first occurrence of the [value] in the [sortedList],
-   * or `-1` if the [value] is not in the list.
-   */
+  /// Return the index of the first occurrence of the [value] in the
+  /// [sortedList], or `-1` if the [value] is not in the list.
   int _findFirstOccurrence(List<int> sortedList, int value) {
     // Find an occurrence.
     int i = binarySearch(sortedList, value);
@@ -928,12 +866,10 @@
   }
 }
 
-/**
- * Visitor that adds [SearchResult]s for local elements of a block, method,
- * class or a library - labels, local functions, local variables and parameters,
- * type parameters, import prefixes.
- */
-class _LocalReferencesVisitor extends RecursiveAstVisitor {
+/// Visitor that adds [SearchResult]s for local elements of a block, method,
+/// class or a library - labels, local functions, local variables and
+/// parameters, type parameters, import prefixes.
+class _LocalReferencesVisitor extends RecursiveAstVisitor<void> {
   final List<SearchResult> results = <SearchResult>[];
 
   final Element element;
@@ -942,7 +878,7 @@
   _LocalReferencesVisitor(this.element, this.enclosingUnitElement);
 
   @override
-  visitSimpleIdentifier(SimpleIdentifier node) {
+  void visitSimpleIdentifier(SimpleIdentifier node) {
     if (node.inDeclarationContext()) {
       return;
     }
diff --git a/pkg/analyzer/lib/src/dart/analysis/session.dart b/pkg/analyzer/lib/src/dart/analysis/session.dart
index 7c1dc5c..055f715 100644
--- a/pkg/analyzer/lib/src/dart/analysis/session.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/session.dart
@@ -17,8 +17,8 @@
 import 'package:analyzer/src/dart/element/class_hierarchy.dart';
 import 'package:analyzer/src/dart/element/inheritance_manager3.dart';
 import 'package:analyzer/src/dart/element/type_provider.dart';
+import 'package:analyzer/src/dart/element/type_system.dart';
 import 'package:analyzer/src/generated/engine.dart' show AnalysisOptionsImpl;
-import 'package:analyzer/src/generated/resolver.dart' show TypeSystemImpl;
 import 'package:analyzer/src/generated/source.dart';
 import 'package:meta/meta.dart';
 
diff --git a/pkg/analyzer/lib/src/dart/analysis/status.dart b/pkg/analyzer/lib/src/dart/analysis/status.dart
index c6fd7a7..af6c6b8 100644
--- a/pkg/analyzer/lib/src/dart/analysis/status.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/status.dart
@@ -4,9 +4,7 @@
 
 import 'dart:async';
 
-/**
- * The status of analysis.
- */
+/// The status of analysis.
 class AnalysisStatus {
   static const IDLE = AnalysisStatus._(false);
   static const ANALYZING = AnalysisStatus._(true);
@@ -15,42 +13,32 @@
 
   const AnalysisStatus._(this._analyzing);
 
-  /**
-   * Return `true` if the scheduler is analyzing.
-   */
+  /// Return `true` if the scheduler is analyzing.
   bool get isAnalyzing => _analyzing;
 
-  /**
-   * Return `true` if the scheduler is idle.
-   */
+  /// Return `true` if the scheduler is idle.
   bool get isIdle => !_analyzing;
 
   @override
   String toString() => _analyzing ? 'analyzing' : 'idle';
 }
 
-/**
- * [Monitor] can be used to wait for a signal.
- *
- * Signals are not queued, the client will receive exactly one signal
- * regardless of the number of [notify] invocations. The [signal] is reset
- * after completion and will not complete until [notify] is called next time.
- */
+/// [Monitor] can be used to wait for a signal.
+///
+/// Signals are not queued, the client will receive exactly one signal
+/// regardless of the number of [notify] invocations. The [signal] is reset
+/// after completion and will not complete until [notify] is called next time.
 class Monitor {
   Completer<void> _completer = Completer<void>();
 
-  /**
-   * Return a [Future] that completes when [notify] is called at least once.
-   */
+  /// Return a [Future] that completes when [notify] is called at least once.
   Future<void> get signal async {
     await _completer.future;
     _completer = Completer<void>();
   }
 
-  /**
-   * Complete the [signal] future if it is not completed yet. It is safe to
-   * call this method multiple times, but the [signal] will complete only once.
-   */
+  /// Complete the [signal] future if it is not completed yet. It is safe to
+  /// call this method multiple times, but the [signal] will complete only once.
   void notify() {
     if (!_completer.isCompleted) {
       _completer.complete(null);
@@ -58,50 +46,35 @@
   }
 }
 
-/**
- * Helper for managing transitioning [AnalysisStatus].
- */
+/// Helper for managing transitioning [AnalysisStatus].
 class StatusSupport {
-  /**
-   * The controller for the [stream].
-   */
+  /// The controller for the [stream].
   final _statusController = StreamController<AnalysisStatus>();
 
-  /**
-   * The last status sent to the [stream].
-   */
+  /// The last status sent to the [stream].
   AnalysisStatus _currentStatus = AnalysisStatus.IDLE;
 
-  /**
-   * If non-null, a completer which should be completed on the next transition
-   * to idle.
-   */
+  /// If non-null, a completer which should be completed on the next transition
+  /// to idle.
   Completer<void> _idleCompleter;
 
-  /**
-   * Return the last status sent to the [stream].
-   */
+  /// Return the last status sent to the [stream].
   AnalysisStatus get currentStatus => _currentStatus;
 
-  /**
-   * Return the stream that produces [AnalysisStatus] events.
-   */
+  /// Return the stream that produces [AnalysisStatus] events.
   Stream<AnalysisStatus> get stream => _statusController.stream;
 
-  /**
-   * Prepare for the scheduler to start analyzing, but do not notify the
-   * [stream] yet.
-   *
-   * A call to [preTransitionToAnalyzing] has the same effect on [waitForIdle]
-   * as a call to [transitionToAnalyzing], but it has no effect on the [stream].
-   */
+  /// Prepare for the scheduler to start analyzing, but do not notify the
+  /// [stream] yet.
+  ///
+  /// A call to [preTransitionToAnalyzing] has the same effect on [waitForIdle]
+  /// as a call to [transitionToAnalyzing], but it has no effect on the
+  /// [stream].
   void preTransitionToAnalyzing() {
     _idleCompleter ??= Completer<void>();
   }
 
-  /**
-   * Send a notification to the [stream] that the scheduler started analyzing.
-   */
+  /// Send a notification to the [stream] that the scheduler started analyzing.
   void transitionToAnalyzing() {
     if (_currentStatus != AnalysisStatus.ANALYZING) {
       preTransitionToAnalyzing();
@@ -110,9 +83,7 @@
     }
   }
 
-  /**
-   * Send a notification to the [stream] stream that the scheduler is idle.
-   */
+  /// Send a notification to the [stream] stream that the scheduler is idle.
   void transitionToIdle() {
     if (_currentStatus != AnalysisStatus.IDLE) {
       _currentStatus = AnalysisStatus.IDLE;
@@ -122,12 +93,10 @@
     _idleCompleter = null;
   }
 
-  /**
-   * Return a future that will be completed the next time the status is idle.
-   *
-   * If the status is currently idle, the returned future will be signaled
-   * immediately.
-   */
+  /// Return a future that will be completed the next time the status is idle.
+  ///
+  /// If the status is currently idle, the returned future will be signaled
+  /// immediately.
   Future<void> waitForIdle() {
     return _idleCompleter?.future ?? Future<void>.value();
   }
diff --git a/pkg/analyzer/lib/src/dart/analysis/uri_converter.dart b/pkg/analyzer/lib/src/dart/analysis/uri_converter.dart
index 04e200b..da5f7e4 100644
--- a/pkg/analyzer/lib/src/dart/analysis/uri_converter.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/uri_converter.dart
@@ -8,19 +8,13 @@
 import 'package:analyzer/src/generated/source.dart';
 import 'package:path/src/context.dart';
 
-/**
- * An implementation of a URI converter based on an analysis driver.
- */
+/// An implementation of a URI converter based on an analysis driver.
 class DriverBasedUriConverter implements UriConverter {
-  /**
-   * The driver associated with the context in which the conversion will occur.
-   */
+  /// The driver associated with the context in which the conversion will occur.
   final AnalysisDriver driver;
 
-  /**
-   * Initialize a newly created URI converter to use the given [driver] to =
-   * perform the conversions.
-   */
+  /// Initialize a newly created URI converter to use the given [driver] to =
+  /// perform the conversions.
   DriverBasedUriConverter(this.driver);
 
   @override
diff --git a/pkg/analyzer/lib/src/dart/ast/ast.dart b/pkg/analyzer/lib/src/dart/ast/ast.dart
index ab4cd9e..89a1d3f 100644
--- a/pkg/analyzer/lib/src/dart/ast/ast.dart
+++ b/pkg/analyzer/lib/src/dart/ast/ast.dart
@@ -7554,7 +7554,7 @@
   }
 
   @override
-  accept(AstVisitor visitor) {
+  void accept(AstVisitor visitor) {
     int length = _elements.length;
     for (var i = 0; i < length; i++) {
       _elements[i].accept(visitor);
diff --git a/pkg/analyzer/lib/src/dart/ast/ast_factory.dart b/pkg/analyzer/lib/src/dart/ast/ast_factory.dart
index 90ee4ec..f60676c 100644
--- a/pkg/analyzer/lib/src/dart/ast/ast_factory.dart
+++ b/pkg/analyzer/lib/src/dart/ast/ast_factory.dart
@@ -10,10 +10,8 @@
 import 'package:analyzer/src/generated/utilities_dart.dart';
 import 'package:meta/meta.dart';
 
-/**
- * Concrete implementation of [AstFactory] based on the standard AST
- * implementation.
- */
+/// Concrete implementation of [AstFactory] based on the standard AST
+/// implementation.
 class AstFactoryImpl extends AstFactory {
   @override
   AdjacentStrings adjacentStrings(List<StringLiteral> strings) =>
diff --git a/pkg/analyzer/lib/src/dart/ast/constant_evaluator.dart b/pkg/analyzer/lib/src/dart/ast/constant_evaluator.dart
index 897d795..b1da5de 100644
--- a/pkg/analyzer/lib/src/dart/ast/constant_evaluator.dart
+++ b/pkg/analyzer/lib/src/dart/ast/constant_evaluator.dart
@@ -9,95 +9,92 @@
 import 'package:analyzer/dart/ast/visitor.dart';
 import 'package:analyzer/dart/element/element.dart';
 
-/**
- * Instances of the class [ConstantEvaluator] evaluate constant expressions to
- * produce their compile-time value.
- *
- * According to the Dart Language Specification:
- *
- * > A constant expression is one of the following:
- * >
- * > * A literal number.
- * > * A literal boolean.
- * > * A literal string where any interpolated expression is a compile-time
- * >   constant that evaluates to a numeric, string or boolean value or to
- * >   **null**.
- * > * A literal symbol.
- * > * **null**.
- * > * A qualified reference to a static constant variable.
- * > * An identifier expression that denotes a constant variable, class or type
- * >   alias.
- * > * A constant constructor invocation.
- * > * A constant list literal.
- * > * A constant map literal.
- * > * A simple or qualified identifier denoting a top-level function or a
- * >   static method.
- * > * A parenthesized expression _(e)_ where _e_ is a constant expression.
- * > * <span>
- * >   An expression of the form <i>identical(e<sub>1</sub>, e<sub>2</sub>)</i>
- * >   where <i>e<sub>1</sub></i> and <i>e<sub>2</sub></i> are constant
- * >   expressions and <i>identical()</i> is statically bound to the predefined
- * >   dart function <i>identical()</i> discussed above.
- * >   </span>
- * > * <span>
- * >   An expression of one of the forms <i>e<sub>1</sub> == e<sub>2</sub></i>
- * >   or <i>e<sub>1</sub> != e<sub>2</sub></i> where <i>e<sub>1</sub></i> and
- * >   <i>e<sub>2</sub></i> are constant expressions that evaluate to a
- * >   numeric, string or boolean value.
- * >   </span>
- * > * <span>
- * >   An expression of one of the forms <i>!e</i>, <i>e<sub>1</sub> &amp;&amp;
- * >   e<sub>2</sub></i> or <i>e<sub>1</sub> || e<sub>2</sub></i>, where
- * >   <i>e</i>, <i>e<sub>1</sub></i> and <i>e<sub>2</sub></i> are constant
- * >   expressions that evaluate to a boolean value.
- * >   </span>
- * > * <span>
- * >   An expression of one of the forms <i>~e</i>, <i>e<sub>1</sub> ^
- * >   e<sub>2</sub></i>, <i>e<sub>1</sub> &amp; e<sub>2</sub></i>,
- * >   <i>e<sub>1</sub> | e<sub>2</sub></i>, <i>e<sub>1</sub> &gt;&gt;
- * >   e<sub>2</sub></i> or <i>e<sub>1</sub> &lt;&lt; e<sub>2</sub></i>, where
- * >   <i>e</i>, <i>e<sub>1</sub></i> and <i>e<sub>2</sub></i> are constant
- * >   expressions that evaluate to an integer value or to <b>null</b>.
- * >   </span>
- * > * <span>
- * >   An expression of one of the forms <i>-e</i>, <i>e<sub>1</sub>
- * >   -e<sub>2</sub></i>, <i>e<sub>1</sub> * e<sub>2</sub></i>,
- * >   <i>e<sub>1</sub> / e<sub>2</sub></i>, <i>e<sub>1</sub> ~/
- * >   e<sub>2</sub></i>, <i>e<sub>1</sub> &gt; e<sub>2</sub></i>,
- * >   <i>e<sub>1</sub> &lt; e<sub>2</sub></i>, <i>e<sub>1</sub> &gt;=
- * >   e<sub>2</sub></i>, <i>e<sub>1</sub> &lt;= e<sub>2</sub></i> or
- * >   <i>e<sub>1</sub> % e<sub>2</sub></i>, where <i>e</i>,
- * >   <i>e<sub>1</sub></i> and <i>e<sub>2</sub></i> are constant expressions
- * >   that evaluate to a numeric value or to <b>null</b>.
- * >   </span>
- * > * <span>
- * >   An expression of one the form <i>e<sub>1</sub> + e<sub>2</sub></i>,
- * >   <i>e<sub>1</sub> -e<sub>2</sub></i> where <i>e<sub>1</sub> and
- * >   e<sub>2</sub></i> are constant expressions that evaluate to a numeric or
- * >   string value or to <b>null</b>.
- * >   </span>
- * > * <span>
- * >   An expression of the form <i>e<sub>1</sub> ? e<sub>2</sub> :
- * >   e<sub>3</sub></i> where <i>e<sub>1</sub></i>, <i>e<sub>2</sub></i> and
- * >   <i>e<sub>3</sub></i> are constant expressions, and <i>e<sub>1</sub></i>
- * >   evaluates to a boolean value.
- * >   </span>
- *
- * However, this comment is now at least a little bit out of sync with the spec.
- *
- * The values returned by instances of this class are therefore `null` and
- * instances of the classes `Boolean`, `BigInteger`, `Double`, `String`, and
- * `DartObject`.
- *
- * In addition, this class defines several values that can be returned to
- * indicate various conditions encountered during evaluation. These are
- * documented with the static fields that define those values.
- */
+/// Instances of the class [ConstantEvaluator] evaluate constant expressions to
+/// produce their compile-time value.
+///
+/// According to the Dart Language Specification:
+///
+/// > A constant expression is one of the following:
+/// >
+/// > * A literal number.
+/// > * A literal boolean.
+/// > * A literal string where any interpolated expression is a compile-time
+/// >   constant that evaluates to a numeric, string or boolean value or to
+/// >   **null**.
+/// > * A literal symbol.
+/// > * **null**.
+/// > * A qualified reference to a static constant variable.
+/// > * An identifier expression that denotes a constant variable, class or type
+/// >   alias.
+/// > * A constant constructor invocation.
+/// > * A constant list literal.
+/// > * A constant map literal.
+/// > * A simple or qualified identifier denoting a top-level function or a
+/// >   static method.
+/// > * A parenthesized expression _(e)_ where _e_ is a constant expression.
+/// > * <span>
+/// >   An expression of the form <i>identical(e<sub>1</sub>, e<sub>2</sub>)</i>
+/// >   where <i>e<sub>1</sub></i> and <i>e<sub>2</sub></i> are constant
+/// >   expressions and <i>identical()</i> is statically bound to the predefined
+/// >   dart function <i>identical()</i> discussed above.
+/// >   </span>
+/// > * <span>
+/// >   An expression of one of the forms <i>e<sub>1</sub> == e<sub>2</sub></i>
+/// >   or <i>e<sub>1</sub> != e<sub>2</sub></i> where <i>e<sub>1</sub></i> and
+/// >   <i>e<sub>2</sub></i> are constant expressions that evaluate to a
+/// >   numeric, string or boolean value.
+/// >   </span>
+/// > * <span>
+/// >   An expression of one of the forms <i>!e</i>, <i>e<sub>1</sub> &amp;&amp;
+/// >   e<sub>2</sub></i> or <i>e<sub>1</sub> || e<sub>2</sub></i>, where
+/// >   <i>e</i>, <i>e<sub>1</sub></i> and <i>e<sub>2</sub></i> are constant
+/// >   expressions that evaluate to a boolean value.
+/// >   </span>
+/// > * <span>
+/// >   An expression of one of the forms <i>~e</i>, <i>e<sub>1</sub> ^
+/// >   e<sub>2</sub></i>, <i>e<sub>1</sub> &amp; e<sub>2</sub></i>,
+/// >   <i>e<sub>1</sub> | e<sub>2</sub></i>, <i>e<sub>1</sub> &gt;&gt;
+/// >   e<sub>2</sub></i> or <i>e<sub>1</sub> &lt;&lt; e<sub>2</sub></i>, where
+/// >   <i>e</i>, <i>e<sub>1</sub></i> and <i>e<sub>2</sub></i> are constant
+/// >   expressions that evaluate to an integer value or to <b>null</b>.
+/// >   </span>
+/// > * <span>
+/// >   An expression of one of the forms <i>-e</i>, <i>e<sub>1</sub>
+/// >   -e<sub>2</sub></i>, <i>e<sub>1</sub> * e<sub>2</sub></i>,
+/// >   <i>e<sub>1</sub> / e<sub>2</sub></i>, <i>e<sub>1</sub> ~/
+/// >   e<sub>2</sub></i>, <i>e<sub>1</sub> &gt; e<sub>2</sub></i>,
+/// >   <i>e<sub>1</sub> &lt; e<sub>2</sub></i>, <i>e<sub>1</sub> &gt;=
+/// >   e<sub>2</sub></i>, <i>e<sub>1</sub> &lt;= e<sub>2</sub></i> or
+/// >   <i>e<sub>1</sub> % e<sub>2</sub></i>, where <i>e</i>,
+/// >   <i>e<sub>1</sub></i> and <i>e<sub>2</sub></i> are constant expressions
+/// >   that evaluate to a numeric value or to <b>null</b>.
+/// >   </span>
+/// > * <span>
+/// >   An expression of one the form <i>e<sub>1</sub> + e<sub>2</sub></i>,
+/// >   <i>e<sub>1</sub> -e<sub>2</sub></i> where <i>e<sub>1</sub> and
+/// >   e<sub>2</sub></i> are constant expressions that evaluate to a numeric or
+/// >   string value or to <b>null</b>.
+/// >   </span>
+/// > * <span>
+/// >   An expression of the form <i>e<sub>1</sub> ? e<sub>2</sub> :
+/// >   e<sub>3</sub></i> where <i>e<sub>1</sub></i>, <i>e<sub>2</sub></i> and
+/// >   <i>e<sub>3</sub></i> are constant expressions, and <i>e<sub>1</sub></i>
+/// >   evaluates to a boolean value.
+/// >   </span>
+///
+/// However, this comment is now at least a little bit out of sync with the
+/// spec.
+///
+/// The values returned by instances of this class are therefore `null` and
+/// instances of the classes `Boolean`, `BigInteger`, `Double`, `String`, and
+/// `DartObject`.
+///
+/// In addition, this class defines several values that can be returned to
+/// indicate various conditions encountered during evaluation. These are
+/// documented with the static fields that define those values.
 class ConstantEvaluator extends GeneralizingAstVisitor<Object> {
-  /**
-   * The value returned for expressions (or non-expression nodes) that are not
-   * compile-time constant expressions.
-   */
+  /// The value returned for expressions (or non-expression nodes) that are not
+  /// compile-time constant expressions.
   static Object NOT_A_CONSTANT = Object();
 
   @override
@@ -383,10 +380,8 @@
     return buffer.toString();
   }
 
-  /**
-   * Return the constant value of the static constant represented by the given
-   * [element].
-   */
+  /// Return the constant value of the static constant represented by the given
+  /// [element].
   Object _getConstantValue(Element element) {
     // TODO(brianwilkerson) Implement this
 //    if (element is FieldElement) {
diff --git a/pkg/analyzer/lib/src/dart/ast/to_source_visitor.dart b/pkg/analyzer/lib/src/dart/ast/to_source_visitor.dart
index 81188ae..adf8d2b 100644
--- a/pkg/analyzer/lib/src/dart/ast/to_source_visitor.dart
+++ b/pkg/analyzer/lib/src/dart/ast/to_source_visitor.dart
@@ -7,27 +7,19 @@
 import 'package:analyzer/src/dart/ast/ast.dart';
 import 'package:meta/meta.dart';
 
-/**
- * A visitor used to write a source representation of a visited AST node (and
- * all of it's children) to a sink.
- */
+/// A visitor used to write a source representation of a visited AST node (and
+/// all of it's children) to a sink.
 class ToSourceVisitor implements AstVisitor<void> {
-  /**
-   * The sink to which the source is to be written.
-   */
+  /// The sink to which the source is to be written.
   @protected
   final StringSink sink;
 
-  /**
-   * Initialize a newly created visitor to write source code representing the
-   * visited nodes to the given [sink].
-   */
+  /// Initialize a newly created visitor to write source code representing the
+  /// visited nodes to the given [sink].
   ToSourceVisitor(this.sink);
 
-  /**
-   * Visit the given function [body], printing the [prefix] before if the body
-   * is not empty.
-   */
+  /// Visit the given function [body], printing the [prefix] before if the body
+  /// is not empty.
   @protected
   void safelyVisitFunctionWithPrefix(String prefix, FunctionBody body) {
     if (body is! EmptyFunctionBody) {
@@ -36,9 +28,7 @@
     safelyVisitNode(body);
   }
 
-  /**
-   * Safely visit the given [node].
-   */
+  /// Safely visit the given [node].
   @protected
   void safelyVisitNode(AstNode node) {
     if (node != null) {
@@ -46,17 +36,13 @@
     }
   }
 
-  /**
-   * Print a list of [nodes] without any separation.
-   */
+  /// Print a list of [nodes] without any separation.
   @protected
   void safelyVisitNodeList(NodeList<AstNode> nodes) {
     safelyVisitNodeListWithSeparator(nodes, "");
   }
 
-  /**
-   * Print a list of [nodes], separated by the given [separator].
-   */
+  /// Print a list of [nodes], separated by the given [separator].
   @protected
   void safelyVisitNodeListWithSeparator(
       NodeList<AstNode> nodes, String separator) {
@@ -76,10 +62,8 @@
     }
   }
 
-  /**
-   * Print a list of [nodes], prefixed by the given [prefix] if the list is not
-   * empty, and separated by the given [separator].
-   */
+  /// Print a list of [nodes], prefixed by the given [prefix] if the list is not
+  /// empty, and separated by the given [separator].
   @protected
   void safelyVisitNodeListWithSeparatorAndPrefix(
       String prefix, NodeList<AstNode> nodes, String separator) {
@@ -97,10 +81,8 @@
     }
   }
 
-  /**
-   * Print a list of [nodes], separated by the given [separator], followed by
-   * the given [suffix] if the list is not empty.
-   */
+  /// Print a list of [nodes], separated by the given [separator], followed by
+  /// the given [suffix] if the list is not empty.
   @protected
   void safelyVisitNodeListWithSeparatorAndSuffix(
       NodeList<AstNode> nodes, String separator, String suffix) {
@@ -118,10 +100,8 @@
     }
   }
 
-  /**
-   * Safely visit the given [node], printing the [prefix] before the node if it
-   * is non-`null`.
-   */
+  /// Safely visit the given [node], printing the [prefix] before the node if it
+  /// is non-`null`.
   @protected
   void safelyVisitNodeWithPrefix(String prefix, AstNode node) {
     if (node != null) {
@@ -130,10 +110,8 @@
     }
   }
 
-  /**
-   * Safely visit the given [node], printing the [suffix] after the node if it
-   * is non-`null`.
-   */
+  /// Safely visit the given [node], printing the [suffix] after the node if it
+  /// is non-`null`.
   @protected
   void safelyVisitNodeWithSuffix(AstNode node, String suffix) {
     if (node != null) {
@@ -142,9 +120,7 @@
     }
   }
 
-  /**
-   * Safely visit the given [token].
-   */
+  /// Safely visit the given [token].
   @protected
   void safelyVisitToken(Token token) {
     if (token != null) {
@@ -152,10 +128,8 @@
     }
   }
 
-  /**
-   * Safely visit the given [token], printing the [suffix] after the token if it
-   * is non-`null`.
-   */
+  /// Safely visit the given [token], printing the [suffix] after the token if
+  /// it is non-`null`.
   @protected
   void safelyVisitTokenWithSuffix(Token token, String suffix) {
     if (token != null) {
diff --git a/pkg/analyzer/lib/src/dart/ast/token.dart b/pkg/analyzer/lib/src/dart/ast/token.dart
index 0833eb5..d1753398 100644
--- a/pkg/analyzer/lib/src/dart/ast/token.dart
+++ b/pkg/analyzer/lib/src/dart/ast/token.dart
@@ -18,11 +18,9 @@
         SyntheticToken,
         TokenClass;
 
-/**
- * Return the binary operator that is invoked by the given compound assignment
- * [operator]. Throw [StateError] if the assignment [operator] does not
- * correspond to a binary operator.
- */
+/// Return the binary operator that is invoked by the given compound assignment
+/// [operator]. Throw [StateError] if the assignment [operator] does not
+/// correspond to a binary operator.
 TokenType operatorFromCompoundAssignment(TokenType operator) {
   if (operator == TokenType.AMPERSAND_EQ) {
     return TokenType.AMPERSAND;
diff --git a/pkg/analyzer/lib/src/dart/ast/utilities.dart b/pkg/analyzer/lib/src/dart/ast/utilities.dart
index 27b83c1..250c38e 100644
--- a/pkg/analyzer/lib/src/dart/ast/utilities.dart
+++ b/pkg/analyzer/lib/src/dart/ast/utilities.dart
@@ -22,49 +22,33 @@
 typedef ExceptionInDelegateHandler = void Function(
     AstNode node, AstVisitor visitor, dynamic exception, StackTrace stackTrace);
 
-/**
- * An AST visitor that will clone any AST structure that it visits. The cloner
- * will only clone the structure, it will not preserve any resolution results or
- * properties associated with the nodes.
- */
+/// An AST visitor that will clone any AST structure that it visits. The cloner
+/// will only clone the structure, it will not preserve any resolution results
+/// or properties associated with the nodes.
 class AstCloner implements AstVisitor<AstNode> {
-  /**
-   * A flag indicating whether tokens should be cloned while cloning an AST
-   * structure.
-   */
+  /// A flag indicating whether tokens should be cloned while cloning an AST
+  /// structure.
   final bool cloneTokens;
 
-  /**
-   * Mapping from original tokes to cloned.
-   */
+  /// Mapping from original tokes to cloned.
   final Map<Token, Token> _clonedTokens = Map<Token, Token>.identity();
 
-  /**
-   * The next original token to clone.
-   */
+  /// The next original token to clone.
   Token _nextToClone;
 
-  /**
-   * The last cloned token.
-   */
+  /// The last cloned token.
   Token _lastCloned;
 
-  /**
-   * The offset of the last cloned token.
-   */
+  /// The offset of the last cloned token.
   int _lastClonedOffset = -1;
 
-  /**
-   * Initialize a newly created AST cloner to optionally clone tokens while
-   * cloning AST nodes if [cloneTokens] is `true`.
-   *
-   * TODO(brianwilkerson) Change this to be a named parameter.
-   */
+  /// Initialize a newly created AST cloner to optionally clone tokens while
+  /// cloning AST nodes if [cloneTokens] is `true`.
+  ///
+  /// TODO(brianwilkerson) Change this to be a named parameter.
   AstCloner([this.cloneTokens = false]);
 
-  /**
-   * Return a clone of the given [node].
-   */
+  /// Return a clone of the given [node].
   E cloneNode<E extends AstNode>(E node) {
     if (node == null) {
       return null;
@@ -72,10 +56,8 @@
     return node.accept(this) as E;
   }
 
-  /**
-   * Return a list containing cloned versions of the nodes in the given list of
-   * [nodes].
-   */
+  /// Return a list containing cloned versions of the nodes in the given list of
+  /// [nodes].
   List<E> cloneNodeList<E extends AstNode>(List<E> nodes) {
     int count = nodes.length;
     List<E> clonedNodes = <E>[];
@@ -85,9 +67,7 @@
     return clonedNodes;
   }
 
-  /**
-   * Clone the given [token] if tokens are supposed to be cloned.
-   */
+  /// Clone the given [token] if tokens are supposed to be cloned.
   Token cloneToken(Token token) {
     if (cloneTokens) {
       if (token == null) {
@@ -104,9 +84,7 @@
     }
   }
 
-  /**
-   * Clone the given [tokens] if tokens are supposed to be cloned.
-   */
+  /// Clone the given [tokens] if tokens are supposed to be cloned.
   List<Token> cloneTokenList(List<Token> tokens) {
     if (cloneTokens) {
       return tokens.map(cloneToken).toList();
@@ -1076,15 +1054,13 @@
           cloneNode(node.expression),
           cloneToken(node.semicolon));
 
-  /**
-   * Clone all token starting from the given [token] up to a token that has
-   * offset greater then [stopAfter], and put mapping from originals to clones
-   * into [_clonedTokens].
-   *
-   * We cannot clone tokens as we visit nodes because not every token is a part
-   * of a node, E.g. commas in argument lists are not represented in AST. But
-   * we need to the sequence of tokens that is identical to the original one.
-   */
+  /// Clone all token starting from the given [token] up to a token that has
+  /// offset greater then [stopAfter], and put mapping from originals to clones
+  /// into [_clonedTokens].
+  ///
+  /// We cannot clone tokens as we visit nodes because not every token is a part
+  /// of a node, E.g. commas in argument lists are not represented in AST. But
+  /// we need to the sequence of tokens that is identical to the original one.
   void _cloneTokens(Token token, int stopAfter) {
     if (token == null) {
       return;
@@ -1121,73 +1097,55 @@
     }
   }
 
-  /**
-   * Return a clone of the given [node].
-   */
+  /// Return a clone of the given [node].
   static AstNode clone(AstNode node) {
     return node.accept(AstCloner());
   }
 }
 
-/**
- * An AstVisitor that compares the structure of two AstNodes to see whether they
- * are equal.
- */
+/// An AstVisitor that compares the structure of two AstNodes to see whether
+/// they are equal.
 class AstComparator implements AstVisitor<bool> {
-  /**
-   * The AST node with which the node being visited is to be compared. This is
-   * only valid at the beginning of each visit method (until [isEqualNodes] is
-   * invoked).
-   */
+  /// The AST node with which the node being visited is to be compared. This is
+  /// only valid at the beginning of each visit method (until [isEqualNodes] is
+  /// invoked).
   AstNode _other;
 
-  /**
-   * Notify that [first] and second have different length.
-   * This implementation returns `false`. Subclasses can override and throw.
-   */
+  /// Notify that [first] and second have different length.
+  /// This implementation returns `false`. Subclasses can override and throw.
   bool failDifferentLength(List first, List second) {
     return false;
   }
 
-  /**
-   * Check whether the values of the [first] and [second] nodes are [equal].
-   * Subclasses can override to throw.
-   */
+  /// Check whether the values of the [first] and [second] nodes are [equal].
+  /// Subclasses can override to throw.
   bool failIfNotEqual(
       AstNode first, Object firstValue, AstNode second, Object secondValue) {
     return firstValue == secondValue;
   }
 
-  /**
-   * Check whether [second] is null. Subclasses can override to throw.
-   */
+  /// Check whether [second] is null. Subclasses can override to throw.
   bool failIfNotNull(Object first, Object second) {
     return second == null;
   }
 
-  /**
-   * Notify that [first] is not `null` while [second] one is `null`.
-   * This implementation returns `false`. Subclasses can override and throw.
-   */
+  /// Notify that [first] is not `null` while [second] one is `null`.
+  /// This implementation returns `false`. Subclasses can override and throw.
   bool failIsNull(Object first, Object second) {
     return false;
   }
 
-  /**
-   * Notify that [first] and [second] have different types.
-   * This implementation returns `false`. Subclasses can override and throw.
-   */
+  /// Notify that [first] and [second] have different types.
+  /// This implementation returns `false`. Subclasses can override and throw.
   bool failRuntimeType(Object first, Object second) {
     return false;
   }
 
-  /**
-   * Return `true` if the [first] node and the [second] node have the same
-   * structure.
-   *
-   * *Note:* This method is only visible for testing purposes and should not be
-   * used by clients.
-   */
+  /// Return `true` if the [first] node and the [second] node have the same
+  /// structure.
+  ///
+  /// *Note:* This method is only visible for testing purposes and should not be
+  /// used by clients.
   bool isEqualNodes(AstNode first, AstNode second) {
     if (first == null) {
       return failIfNotNull(first, second);
@@ -1200,13 +1158,11 @@
     return first.accept(this);
   }
 
-  /**
-   * Return `true` if the [first] token and the [second] token have the same
-   * structure.
-   *
-   * *Note:* This method is only visible for testing purposes and should not be
-   * used by clients.
-   */
+  /// Return `true` if the [first] token and the [second] token have the same
+  /// structure.
+  ///
+  /// *Note:* This method is only visible for testing purposes and should not be
+  /// used by clients.
   bool isEqualTokens(Token first, Token second) {
     if (first == null) {
       return failIfNotNull(first, second);
@@ -1218,10 +1174,8 @@
     return isEqualTokensNotNull(first, second);
   }
 
-  /**
-   * Return `true` if the [first] token and the [second] token have the same
-   * structure.  Both [first] and [second] are not `null`.
-   */
+  /// Return `true` if the [first] token and the [second] token have the same
+  /// structure.  Both [first] and [second] are not `null`.
   bool isEqualTokensNotNull(Token first, Token second) =>
       first.offset == second.offset &&
       first.length == second.length &&
@@ -2344,10 +2298,8 @@
         isEqualTokens(node.semicolon, other.semicolon);
   }
 
-  /**
-   * Return `true` if the [first] and [second] lists of AST nodes have the same
-   * size and corresponding elements are equal.
-   */
+  /// Return `true` if the [first] and [second] lists of AST nodes have the same
+  /// size and corresponding elements are equal.
   bool _isEqualNodeLists(NodeList first, NodeList second) {
     if (first == null) {
       return failIfNotNull(first, second);
@@ -2366,10 +2318,8 @@
     return true;
   }
 
-  /**
-   * Return `true` if the [first] and [second] lists of tokens have the same
-   * length and corresponding elements are equal.
-   */
+  /// Return `true` if the [first] and [second] lists of tokens have the same
+  /// length and corresponding elements are equal.
   bool _isEqualTokenLists(List<Token> first, List<Token> second) {
     int length = first.length;
     if (second.length != length) {
@@ -2383,33 +2333,25 @@
     return true;
   }
 
-  /**
-   * Return `true` if the [first] and [second] nodes are equal.
-   */
+  /// Return `true` if the [first] and [second] nodes are equal.
   static bool equalNodes(AstNode first, AstNode second) {
     AstComparator comparator = AstComparator();
     return comparator.isEqualNodes(first, second);
   }
 }
 
-/**
- * A recursive AST visitor that is used to run over [Expression]s to determine
- * whether the expression is composed by at least one deferred
- * [PrefixedIdentifier].
- *
- * See [PrefixedIdentifier.isDeferred].
- */
+/// A recursive AST visitor that is used to run over [Expression]s to determine
+/// whether the expression is composed by at least one deferred
+/// [PrefixedIdentifier].
+///
+/// See [PrefixedIdentifier.isDeferred].
 class DeferredLibraryReferenceDetector extends RecursiveAstVisitor<void> {
-  /**
-   * A flag indicating whether an identifier from a deferred library has been
-   * found.
-   */
+  /// A flag indicating whether an identifier from a deferred library has been
+  /// found.
   bool _result = false;
 
-  /**
-   * Return `true` if the visitor found a [PrefixedIdentifier] that returned
-   * `true` to the [PrefixedIdentifier.isDeferred] query.
-   */
+  /// Return `true` if the visitor found a [PrefixedIdentifier] that returned
+  /// `true` to the [PrefixedIdentifier.isDeferred] query.
   bool get result => _result;
 
   @override
@@ -2422,24 +2364,18 @@
   }
 }
 
-/**
- * A [DelegatingAstVisitor] that will additionally catch all exceptions from the
- * delegates without stopping the visiting. A function must be provided that
- * will be invoked for each such exception.
- *
- * Clients may not extend, implement or mix-in this class.
- */
+/// A [DelegatingAstVisitor] that will additionally catch all exceptions from
+/// the delegates without stopping the visiting. A function must be provided
+/// that will be invoked for each such exception.
+///
+/// Clients may not extend, implement or mix-in this class.
 class ExceptionHandlingDelegatingAstVisitor<T> extends DelegatingAstVisitor<T> {
-  /**
-   * The function that will be executed for each exception that is thrown by one
-   * of the visit methods on the delegate.
-   */
+  /// The function that will be executed for each exception that is thrown by
+  /// one of the visit methods on the delegate.
   final ExceptionInDelegateHandler handler;
 
-  /**
-   * Initialize a newly created visitor to use each of the given delegate
-   * visitors to visit the nodes of an AST structure.
-   */
+  /// Initialize a newly created visitor to use each of the given delegate
+  /// visitors to visit the nodes of an AST structure.
   ExceptionHandlingDelegatingAstVisitor(
       Iterable<AstVisitor<T>> delegates, this.handler)
       : super(delegates) {
@@ -2461,10 +2397,8 @@
     return null;
   }
 
-  /**
-   * A function that can be used with instances of this class to log and then
-   * ignore any exceptions that are thrown by any of the delegates.
-   */
+  /// A function that can be used with instances of this class to log and then
+  /// ignore any exceptions that are thrown by any of the delegates.
   static void logException(
       AstNode node, Object visitor, dynamic exception, StackTrace stackTrace) {
     StringBuffer buffer = StringBuffer();
@@ -2486,49 +2420,35 @@
   }
 }
 
-/**
- * An object used to locate the [AstNode] associated with a source range, given
- * the AST structure built from the source. More specifically, they will return
- * the [AstNode] with the shortest length whose source range completely
- * encompasses the specified range.
- */
+/// An object used to locate the [AstNode] associated with a source range, given
+/// the AST structure built from the source. More specifically, they will return
+/// the [AstNode] with the shortest length whose source range completely
+/// encompasses the specified range.
 class NodeLocator extends UnifyingAstVisitor<void> {
-  /**
-   * The start offset of the range used to identify the node.
-   */
+  /// The start offset of the range used to identify the node.
   final int _startOffset;
 
-  /**
-   * The end offset of the range used to identify the node.
-   */
+  /// The end offset of the range used to identify the node.
   final int _endOffset;
 
-  /**
-   * The element that was found that corresponds to the given source range, or
-   * `null` if there is no such element.
-   */
+  /// The element that was found that corresponds to the given source range, or
+  /// `null` if there is no such element.
   AstNode _foundNode;
 
-  /**
-   * Initialize a newly created locator to locate an [AstNode] by locating the
-   * node within an AST structure that corresponds to the given range of
-   * characters (between the [startOffset] and [endOffset] in the source.
-   */
+  /// Initialize a newly created locator to locate an [AstNode] by locating the
+  /// node within an AST structure that corresponds to the given range of
+  /// characters (between the [startOffset] and [endOffset] in the source.
   NodeLocator(int startOffset, [int endOffset])
       : this._startOffset = startOffset,
         this._endOffset = endOffset ?? startOffset;
 
-  /**
-   * Return the node that was found that corresponds to the given source range
-   * or `null` if there is no such node.
-   */
+  /// Return the node that was found that corresponds to the given source range
+  /// or `null` if there is no such node.
   AstNode get foundNode => _foundNode;
 
-  /**
-   * Search within the given AST [node] for an identifier representing an
-   * element in the specified source range. Return the element that was found,
-   * or `null` if no element was found.
-   */
+  /// Search within the given AST [node] for an identifier representing an
+  /// element in the specified source range. Return the element that was found,
+  /// or `null` if no element was found.
   AstNode searchWithin(AstNode node) {
     if (node == null) {
       return null;
@@ -2593,11 +2513,9 @@
   }
 }
 
-/**
- * An object used to locate the [AstNode] associated with a source range.
- * More specifically, they will return the deepest [AstNode] which completely
- * encompasses the specified range.
- */
+/// An object used to locate the [AstNode] associated with a source range.
+/// More specifically, they will return the deepest [AstNode] which completely
+/// encompasses the specified range.
 class NodeLocator2 extends UnifyingAstVisitor<void> {
   /// The inclusive start offset of the range used to identify the node.
   final int _startOffset;
@@ -2605,26 +2523,20 @@
   /// The inclusive end offset of the range used to identify the node.
   final int _endOffset;
 
-  /**
-   * The found node or `null` if there is no such node.
-   */
+  /// The found node or `null` if there is no such node.
   AstNode _foundNode;
 
-  /**
-   * Initialize a newly created locator to locate the deepest [AstNode] for
-   * which `node.offset <= [startOffset]` and `[endOffset] < node.end`.
-   *
-   * If [endOffset] is not provided, then it is considered the same as the
-   * given [startOffset].
-   */
+  /// Initialize a newly created locator to locate the deepest [AstNode] for
+  /// which `node.offset <= [startOffset]` and `[endOffset] < node.end`.
+  ///
+  /// If [endOffset] is not provided, then it is considered the same as the
+  /// given [startOffset].
   NodeLocator2(int startOffset, [int endOffset])
       : this._startOffset = startOffset,
         this._endOffset = endOffset ?? startOffset;
 
-  /**
-   * Search within the given AST [node] and return the node that was found,
-   * or `null` if no node was found.
-   */
+  /// Search within the given AST [node] and return the node that was found,
+  /// or `null` if no node was found.
   AstNode searchWithin(AstNode node) {
     if (node == null) {
       return null;
@@ -2633,9 +2545,10 @@
       node.accept(this);
     } catch (exception, stackTrace) {
       // TODO(39284): should this exception be silent?
-      AnalysisEngine.instance.instrumentationService.logException(
-          SilentException(
-              "Unable to locate element at offset ($_startOffset - $_endOffset)",
+      AnalysisEngine.instance.instrumentationService
+          .logException(SilentException(
+              'Unable to locate element at offset '
+              '($_startOffset - $_endOffset)',
               exception,
               stackTrace));
       return null;
@@ -2689,24 +2602,16 @@
   }
 }
 
-/**
- * An object that will replace one child node in an AST node with another node.
- */
+/// An object that will replace one child node in an AST node with another node.
 class NodeReplacer implements AstVisitor<bool> {
-  /**
-   * The node being replaced.
-   */
+  /// The node being replaced.
   final AstNode _oldNode;
 
-  /**
-   * The node that is replacing the old node.
-   */
+  /// The node that is replacing the old node.
   final AstNode _newNode;
 
-  /**
-   * Initialize a newly created node locator to replace the [_oldNode] with the
-   * [_newNode].
-   */
+  /// Initialize a newly created node locator to replace the [_oldNode] with the
+  /// [_newNode].
   NodeReplacer(this._oldNode, this._newNode);
 
   @override
@@ -4044,13 +3949,11 @@
     return false;
   }
 
-  /**
-   * Replace the [oldNode] with the [newNode] in the AST structure containing
-   * the old node. Return `true` if the replacement was successful.
-   *
-   * Throws an [ArgumentError] if either node is `null`, if the old node does
-   * not have a parent node, or if the AST structure has been corrupted.
-   */
+  /// Replace the [oldNode] with the [newNode] in the AST structure containing
+  /// the old node. Return `true` if the replacement was successful.
+  ///
+  /// Throws an [ArgumentError] if either node is `null`, if the old node does
+  /// not have a parent node, or if the AST structure has been corrupted.
   static bool replace(AstNode oldNode, AstNode newNode) {
     if (oldNode == null || newNode == null) {
       throw ArgumentError("The old and new nodes must be non-null");
@@ -4066,17 +3969,13 @@
   }
 }
 
-/**
- * An object that copies resolution information from one AST structure to
- * another as long as the structures of the corresponding children of a pair of
- * nodes are the same.
- */
+/// An object that copies resolution information from one AST structure to
+/// another as long as the structures of the corresponding children of a pair of
+/// nodes are the same.
 class ResolutionCopier implements AstVisitor<bool> {
-  /**
-   * The AST node with which the node being visited is to be compared. This is
-   * only valid at the beginning of each visit method (until [isEqualNodes] is
-   * invoked).
-   */
+  /// The AST node with which the node being visited is to be compared. This is
+  /// only valid at the beginning of each visit method (until [isEqualNodes] is
+  /// invoked).
   AstNode _toNode;
 
   @override
@@ -5488,9 +5387,7 @@
         _isEqualTokens(node.semicolon, toNode.semicolon));
   }
 
-  /**
-   * Return `true` if all of the parameters are `true`.
-   */
+  /// Return `true` if all of the parameters are `true`.
   bool _and(bool b1, bool b2,
       [bool b3 = true,
       bool b4 = true,
@@ -5519,10 +5416,8 @@
         b13;
   }
 
-  /**
-   * Return `true` if the [first] and [second] lists of AST nodes have the same
-   * size and corresponding elements are equal.
-   */
+  /// Return `true` if the [first] and [second] lists of AST nodes have the same
+  /// size and corresponding elements are equal.
   bool _isEqualNodeLists(NodeList first, NodeList second) {
     if (first == null) {
       return second == null;
@@ -5542,11 +5437,9 @@
     return equal;
   }
 
-  /**
-   * Return `true` if the [fromNode] and [toNode] have the same structure. As a
-   * side-effect, if the nodes do have the same structure, any resolution data
-   * from the first node will be copied to the second node.
-   */
+  /// Return `true` if the [fromNode] and [toNode] have the same structure. As a
+  /// side-effect, if the nodes do have the same structure, any resolution data
+  /// from the first node will be copied to the second node.
   bool _isEqualNodes(AstNode fromNode, AstNode toNode) {
     if (fromNode == null) {
       return toNode == null;
@@ -5575,10 +5468,8 @@
     return false;
   }
 
-  /**
-   * Return `true` if the [first] and [second] arrays of tokens have the same
-   * length and corresponding elements are equal.
-   */
+  /// Return `true` if the [first] and [second] arrays of tokens have the same
+  /// length and corresponding elements are equal.
   bool _isEqualTokenLists(List<Token> first, List<Token> second) {
     int length = first.length;
     if (second.length != length) {
@@ -5592,9 +5483,7 @@
     return true;
   }
 
-  /**
-   * Return `true` if the [first] and [second] tokens have the same structure.
-   */
+  /// Return `true` if the [first] and [second] tokens have the same structure.
   bool _isEqualTokens(Token first, Token second) {
     if (first == null) {
       return second == null;
@@ -5604,24 +5493,20 @@
     return first.lexeme == second.lexeme;
   }
 
-  /**
-   * Copy resolution data from the [fromNode] to the [toNode].
-   */
+  /// Copy resolution data from the [fromNode] to the [toNode].
   static void copyResolutionData(AstNode fromNode, AstNode toNode) {
     ResolutionCopier copier = ResolutionCopier();
     copier._isEqualNodes(fromNode, toNode);
   }
 }
 
-/**
- * Traverse the AST from initial child node to successive parents, building a
- * collection of local variable and parameter names visible to the initial child
- * node. In case of name shadowing, the first name seen is the most specific one
- * so names are not redefined.
- *
- * Completion test code coverage is 95%. The two basic blocks that are not
- * executed cannot be executed. They are included for future reference.
- */
+/// Traverse the AST from initial child node to successive parents, building a
+/// collection of local variable and parameter names visible to the initial
+/// child node. In case of name shadowing, the first name seen is the most
+/// specific one so names are not redefined.
+///
+/// Completion test code coverage is 95%. The two basic blocks that are not
+/// executed cannot be executed. They are included for future reference.
 class ScopedNameFinder extends GeneralizingAstVisitor<void> {
   Declaration _declarationNode;
 
@@ -5757,10 +5642,9 @@
     }
   }
 
-  /**
-   * Check the given list of [statements] for any that come before the immediate
-   * child and that define a name that would be visible to the immediate child.
-   */
+  /// Check the given list of [statements] for any that come before the
+  /// immediate child and that define a name that would be visible to the
+  /// immediate child.
   void _checkStatements(List<Statement> statements) {
     for (Statement statement in statements) {
       if (identical(statement, _immediateChild)) {
@@ -5785,10 +5669,8 @@
   }
 }
 
-/**
- * A visitor used to write a source representation of a visited AST node (and
- * all of it's children) to a sink.
- */
+/// A visitor used to write a source representation of a visited AST node (and
+/// all of it's children) to a sink.
 @Deprecated('Use ToSourceVisitor')
 class ToSourceVisitor2 extends ToSourceVisitor {
   ToSourceVisitor2(StringSink sink) : super(sink);
diff --git a/pkg/analyzer/lib/src/dart/constant/compute.dart b/pkg/analyzer/lib/src/dart/constant/compute.dart
index 072014a..81df16c 100644
--- a/pkg/analyzer/lib/src/dart/constant/compute.dart
+++ b/pkg/analyzer/lib/src/dart/constant/compute.dart
@@ -7,7 +7,7 @@
 import 'package:analyzer/src/dart/analysis/experiments.dart';
 import 'package:analyzer/src/dart/constant/evaluation.dart';
 import 'package:analyzer/src/dart/element/element.dart';
-import 'package:analyzer/src/generated/type_system.dart' show TypeSystemImpl;
+import 'package:analyzer/src/dart/element/type_system.dart';
 import 'package:analyzer/src/summary/link.dart' as graph
     show DependencyWalker, Node;
 
diff --git a/pkg/analyzer/lib/src/dart/constant/constant_verifier.dart b/pkg/analyzer/lib/src/dart/constant/constant_verifier.dart
index 325c71a..881e523 100644
--- a/pkg/analyzer/lib/src/dart/constant/constant_verifier.dart
+++ b/pkg/analyzer/lib/src/dart/constant/constant_verifier.dart
@@ -18,10 +18,10 @@
 import 'package:analyzer/src/dart/constant/potentially_constant.dart';
 import 'package:analyzer/src/dart/constant/value.dart';
 import 'package:analyzer/src/dart/element/element.dart';
+import 'package:analyzer/src/dart/element/type_system.dart';
 import 'package:analyzer/src/diagnostic/diagnostic_factory.dart';
 import 'package:analyzer/src/error/codes.dart';
 import 'package:analyzer/src/generated/engine.dart';
-import 'package:analyzer/src/generated/type_system.dart';
 
 /// Instances of the class `ConstantVerifier` traverse an AST structure looking
 /// for additional errors and warnings not covered by the parser and resolver.
@@ -527,10 +527,10 @@
             DartObjectImpl result = initializer
                 .accept(ConstantVisitor(_evaluationEngine, subErrorReporter));
             if (result == null) {
-              _errorReporter.reportErrorForNode(
+              _errorReporter.reportErrorForToken(
                   CompileTimeErrorCode
                       .CONST_CONSTRUCTOR_WITH_FIELD_INITIALIZED_BY_NON_CONST,
-                  errorSite,
+                  errorSite.constKeyword,
                   [variableDeclaration.name.name]);
             }
           }
diff --git a/pkg/analyzer/lib/src/dart/constant/evaluation.dart b/pkg/analyzer/lib/src/dart/constant/evaluation.dart
index 9cd7292..40da2ac 100644
--- a/pkg/analyzer/lib/src/dart/constant/evaluation.dart
+++ b/pkg/analyzer/lib/src/dart/constant/evaluation.dart
@@ -26,12 +26,12 @@
 import 'package:analyzer/src/dart/element/element.dart';
 import 'package:analyzer/src/dart/element/member.dart';
 import 'package:analyzer/src/dart/element/type_algebra.dart';
+import 'package:analyzer/src/dart/element/type_system.dart' show TypeSystemImpl;
 import 'package:analyzer/src/error/codes.dart';
 import 'package:analyzer/src/generated/constant.dart';
 import 'package:analyzer/src/generated/engine.dart';
 import 'package:analyzer/src/generated/engine.dart'
     show AnalysisEngine, RecordingErrorListener;
-import 'package:analyzer/src/generated/type_system.dart' show TypeSystemImpl;
 import 'package:analyzer/src/task/api/model.dart';
 
 /// Helper class encapsulating the methods for evaluating constants and
diff --git a/pkg/analyzer/lib/src/dart/constant/from_environment_evaluator.dart b/pkg/analyzer/lib/src/dart/constant/from_environment_evaluator.dart
index a16a260..9ee0a70 100644
--- a/pkg/analyzer/lib/src/dart/constant/from_environment_evaluator.dart
+++ b/pkg/analyzer/lib/src/dart/constant/from_environment_evaluator.dart
@@ -6,7 +6,7 @@
 import 'package:analyzer/dart/constant/value.dart';
 import 'package:analyzer/dart/element/element.dart';
 import 'package:analyzer/src/dart/constant/value.dart';
-import 'package:analyzer/src/generated/type_system.dart';
+import 'package:analyzer/src/dart/element/type_system.dart';
 
 class FromEnvironmentEvaluator {
   /// Parameter to "fromEnvironment" methods that denotes the default value.
diff --git a/pkg/analyzer/lib/src/dart/constant/potentially_constant.dart b/pkg/analyzer/lib/src/dart/constant/potentially_constant.dart
index 95fb86e..3060c8f 100644
--- a/pkg/analyzer/lib/src/dart/constant/potentially_constant.dart
+++ b/pkg/analyzer/lib/src/dart/constant/potentially_constant.dart
@@ -5,6 +5,7 @@
 import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/ast/token.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:meta/meta.dart';
 
diff --git a/pkg/analyzer/lib/src/dart/constant/value.dart b/pkg/analyzer/lib/src/dart/constant/value.dart
index 44e894c..e1529fc 100644
--- a/pkg/analyzer/lib/src/dart/constant/value.dart
+++ b/pkg/analyzer/lib/src/dart/constant/value.dart
@@ -11,8 +11,8 @@
 import 'package:analyzer/dart/element/type_provider.dart';
 import 'package:analyzer/error/error.dart';
 import 'package:analyzer/src/dart/constant/has_type_parameter_reference.dart';
+import 'package:analyzer/src/dart/element/type_system.dart';
 import 'package:analyzer/src/error/codes.dart';
-import 'package:analyzer/src/generated/type_system.dart';
 import 'package:analyzer/src/generated/utilities_general.dart';
 
 /// The state of an object representing a boolean value.
diff --git a/pkg/analyzer/lib/src/dart/element/class_hierarchy.dart b/pkg/analyzer/lib/src/dart/element/class_hierarchy.dart
index f14f835..d5b6933 100644
--- a/pkg/analyzer/lib/src/dart/element/class_hierarchy.dart
+++ b/pkg/analyzer/lib/src/dart/element/class_hierarchy.dart
@@ -6,7 +6,7 @@
 import 'package:analyzer/dart/element/type.dart';
 import 'package:analyzer/src/dart/element/element.dart';
 import 'package:analyzer/src/dart/element/type_algebra.dart';
-import 'package:analyzer/src/generated/resolver.dart';
+import 'package:analyzer/src/dart/element/type_system.dart';
 import 'package:meta/meta.dart';
 
 class ClassHierarchy {
diff --git a/pkg/analyzer/lib/src/dart/element/element.dart b/pkg/analyzer/lib/src/dart/element/element.dart
index c840b35..50d892a 100644
--- a/pkg/analyzer/lib/src/dart/element/element.dart
+++ b/pkg/analyzer/lib/src/dart/element/element.dart
@@ -23,13 +23,14 @@
 import 'package:analyzer/src/dart/element/type.dart';
 import 'package:analyzer/src/dart/element/type_algebra.dart';
 import 'package:analyzer/src/dart/element/type_provider.dart';
+import 'package:analyzer/src/dart/element/type_system.dart';
+import 'package:analyzer/src/dart/resolver/scope.dart';
 import 'package:analyzer/src/dart/resolver/variance.dart';
 import 'package:analyzer/src/generated/constant.dart' show EvaluationResultImpl;
 import 'package:analyzer/src/generated/element_type_provider.dart';
 import 'package:analyzer/src/generated/engine.dart'
     show AnalysisContext, AnalysisOptionsImpl;
 import 'package:analyzer/src/generated/java_engine.dart';
-import 'package:analyzer/src/generated/resolver.dart';
 import 'package:analyzer/src/generated/sdk.dart' show DartSdk;
 import 'package:analyzer/src/generated/source.dart';
 import 'package:analyzer/src/generated/utilities_collection.dart';
@@ -3991,7 +3992,14 @@
   }
 
   @override
-  DartType get extendedType {
+  DartType get extendedType =>
+      ElementTypeProvider.current.getExtendedType(this);
+
+  set extendedType(DartType extendedType) {
+    _extendedType = extendedType;
+  }
+
+  DartType get extendedTypeInternal {
     if (_extendedType != null) return _extendedType;
 
     if (linkedNode != null) {
@@ -4001,10 +4009,6 @@
     return _extendedType;
   }
 
-  set extendedType(DartType extendedType) {
-    _extendedType = extendedType;
-  }
-
   @override
   List<FieldElement> get fields {
     if (_fields != null) {
@@ -5414,9 +5418,12 @@
       });
       if (!hasCore) {
         var elements = linkedContext.bundleContext.elementFactory;
-        _imports.add(ImportElementImpl(-1)
-          ..importedLibrary = elements.libraryOfUri('dart:core')
-          ..isSynthetic = true);
+        _imports.add(
+          ImportElementImpl(-1)
+            ..importedLibrary = elements.libraryOfUri('dart:core')
+            ..isSynthetic = true
+            ..uri = 'dart:core',
+        );
       }
       return _imports;
     }
diff --git a/pkg/analyzer/lib/src/dart/element/generic_inferrer.dart b/pkg/analyzer/lib/src/dart/element/generic_inferrer.dart
index 1964682..908d87c 100644
--- a/pkg/analyzer/lib/src/dart/element/generic_inferrer.dart
+++ b/pkg/analyzer/lib/src/dart/element/generic_inferrer.dart
@@ -16,8 +16,8 @@
 import 'package:analyzer/src/dart/element/type_constraint_gatherer.dart';
 import 'package:analyzer/src/dart/element/type_demotion.dart';
 import 'package:analyzer/src/dart/element/type_schema.dart';
+import 'package:analyzer/src/dart/element/type_system.dart';
 import 'package:analyzer/src/error/codes.dart' show HintCode, StrongModeCode;
-import 'package:analyzer/src/generated/type_system.dart';
 import 'package:meta/meta.dart';
 
 /// Tracks upper and lower type bounds for a set of type parameters.
@@ -558,7 +558,7 @@
       : super(isNonNullableByDefault: isNonNullableByDefault);
 
   @override
-  formatError() {
+  List<String> formatError() {
     // TODO(jmesserly): we should highlight the span. That would be more useful.
     // However in summary code it doesn't look like the AST node with span is
     // available.
@@ -592,7 +592,7 @@
       : super(isNonNullableByDefault: isNonNullableByDefault);
 
   @override
-  formatError() {
+  List<String> formatError() {
     return [
       "Type parameter '${typeParam.name}'",
       "declared to extend '${_typeStr(extendsType)}'."
@@ -609,7 +609,7 @@
       : super(isNonNullableByDefault: isNonNullableByDefault);
 
   @override
-  formatError() {
+  List<String> formatError() {
     return [
       "Function type",
       "declared as '${_typeStr(functionType)}'",
@@ -627,7 +627,7 @@
       : super(isNonNullableByDefault: isNonNullableByDefault);
 
   @override
-  formatError() {
+  List<String> formatError() {
     return [
       "Return type",
       "declared as '${_typeStr(declaredType)}'",
diff --git a/pkg/analyzer/lib/src/dart/element/greatest_lower_bound.dart b/pkg/analyzer/lib/src/dart/element/greatest_lower_bound.dart
index 96dab6b..6998a82 100644
--- a/pkg/analyzer/lib/src/dart/element/greatest_lower_bound.dart
+++ b/pkg/analyzer/lib/src/dart/element/greatest_lower_bound.dart
@@ -9,7 +9,7 @@
 import 'package:analyzer/src/dart/element/type.dart';
 import 'package:analyzer/src/dart/element/type_provider.dart';
 import 'package:analyzer/src/dart/element/type_schema.dart';
-import 'package:analyzer/src/generated/type_system.dart';
+import 'package:analyzer/src/dart/element/type_system.dart';
 import 'package:analyzer/src/generated/utilities_dart.dart';
 
 class GreatestLowerBoundHelper {
@@ -257,12 +257,10 @@
     return NeverTypeImpl.instance;
   }
 
-  /**
-   * Compute the greatest lower bound of function types [f] and [g].
-   *
-   * https://github.com/dart-lang/language
-   * See `resources/type-system/upper-lower-bounds.md`
-   */
+  /// Compute the greatest lower bound of function types [f] and [g].
+  ///
+  /// https://github.com/dart-lang/language
+  /// See `resources/type-system/upper-lower-bounds.md`
   DartType _functionType(FunctionType f, FunctionType g) {
     var fTypeFormals = f.typeFormals;
     var gTypeFormals = g.typeFormals;
diff --git a/pkg/analyzer/lib/src/dart/element/inheritance_manager3.dart b/pkg/analyzer/lib/src/dart/element/inheritance_manager3.dart
index 071fa1b..16cb851 100644
--- a/pkg/analyzer/lib/src/dart/element/inheritance_manager3.dart
+++ b/pkg/analyzer/lib/src/dart/element/inheritance_manager3.dart
@@ -7,8 +7,8 @@
 import 'package:analyzer/src/dart/element/element.dart';
 import 'package:analyzer/src/dart/element/member.dart';
 import 'package:analyzer/src/dart/element/type_algebra.dart';
+import 'package:analyzer/src/dart/element/type_system.dart';
 import 'package:analyzer/src/error/correct_override.dart';
-import 'package:analyzer/src/generated/type_system.dart' show TypeSystemImpl;
 import 'package:analyzer/src/generated/utilities_general.dart';
 import 'package:meta/meta.dart';
 
diff --git a/pkg/analyzer/lib/src/dart/element/least_upper_bound.dart b/pkg/analyzer/lib/src/dart/element/least_upper_bound.dart
index 173c8c4..c3720e9 100644
--- a/pkg/analyzer/lib/src/dart/element/least_upper_bound.dart
+++ b/pkg/analyzer/lib/src/dart/element/least_upper_bound.dart
@@ -10,8 +10,8 @@
 import 'package:analyzer/src/dart/element/type.dart';
 import 'package:analyzer/src/dart/element/type_algebra.dart';
 import 'package:analyzer/src/dart/element/type_schema.dart';
+import 'package:analyzer/src/dart/element/type_system.dart';
 import 'package:analyzer/src/dart/resolver/variance.dart';
-import 'package:analyzer/src/generated/type_system.dart';
 import 'package:analyzer/src/generated/utilities_dart.dart';
 import 'package:meta/meta.dart';
 
@@ -254,10 +254,8 @@
     return _computeTypeAtMaxUniqueDepth(s);
   }
 
-  /**
-   * Return the length of the longest inheritance path from the [element] to
-   * Object.
-   */
+  /// Return the length of the longest inheritance path from the [element] to
+  /// Object.
   @visibleForTesting
   static int computeLongestInheritancePathToObject(ClassElement element) {
     return _computeLongestInheritancePathToObject(
@@ -407,10 +405,8 @@
     return null;
   }
 
-  /**
-   * Return the intersection of the [first] and [second] sets of types, where
-   * intersection is based on the equality of the types themselves.
-   */
+  /// Return the intersection of the [first] and [second] sets of types, where
+  /// intersection is based on the equality of the types themselves.
   static List<InstantiatedClass> _intersection(
     Set<InstantiatedClass> first,
     Set<InstantiatedClass> second,
@@ -435,12 +431,10 @@
 
   InterfaceType get _objectType => _typeSystem.typeProvider.objectType;
 
-  /**
-   * Compute the least upper bound of two types.
-   *
-   * https://github.com/dart-lang/language
-   * See `resources/type-system/upper-lower-bounds.md`
-   */
+  /// Compute the least upper bound of two types.
+  ///
+  /// https://github.com/dart-lang/language
+  /// See `resources/type-system/upper-lower-bounds.md`
   DartType getLeastUpperBound(DartType T1, DartType T2) {
     // UP(T, T) = T
     if (identical(T1, T2)) {
@@ -678,12 +672,10 @@
     return helper.compute(T1, T2);
   }
 
-  /**
-   * Compute the least upper bound of function types [f] and [g].
-   *
-   * https://github.com/dart-lang/language
-   * See `resources/type-system/upper-lower-bounds.md`
-   */
+  /// Compute the least upper bound of function types [f] and [g].
+  ///
+  /// https://github.com/dart-lang/language
+  /// See `resources/type-system/upper-lower-bounds.md`
   DartType _functionType(FunctionType f, FunctionType g) {
     var fTypeFormals = f.typeFormals;
     var gTypeFormals = g.typeFormals;
diff --git a/pkg/analyzer/lib/src/dart/element/member.dart b/pkg/analyzer/lib/src/dart/element/member.dart
index c4ceea2..7fccac1 100644
--- a/pkg/analyzer/lib/src/dart/element/member.dart
+++ b/pkg/analyzer/lib/src/dart/element/member.dart
@@ -17,15 +17,11 @@
 import 'package:analyzer/src/generated/utilities_dart.dart';
 import 'package:meta/meta.dart';
 
-/**
- * A constructor element defined in a parameterized type where the values of the
- * type parameters are known.
- */
+/// A constructor element defined in a parameterized type where the values of
+/// the type parameters are known.
 class ConstructorMember extends ExecutableMember implements ConstructorElement {
-  /**
-   * Initialize a newly created element to represent a constructor, based on
-   * the [declaration], and applied [substitution].
-   */
+  /// Initialize a newly created element to represent a constructor, based on
+  /// the [declaration], and applied [substitution].
   ConstructorMember(
     ConstructorElement declaration,
     MapSubstitution substitution,
@@ -96,13 +92,11 @@
     builder.writeConstructorElement(this);
   }
 
-  /**
-   * If the given [constructor]'s type is different when any type parameters
-   * from the defining type's declaration are replaced with the actual type
-   * arguments from the [definingType], create a constructor member representing
-   * the given constructor. Return the member that was created, or the original
-   * constructor if no member was created.
-   */
+  /// If the given [constructor]'s type is different when any type parameters
+  /// from the defining type's declaration are replaced with the actual type
+  /// arguments from the [definingType], create a constructor member
+  /// representing the given constructor. Return the member that was created, or
+  /// the original constructor if no member was created.
   static ConstructorElement from(
       ConstructorElement constructor, InterfaceType definingType) {
     if (constructor == null || definingType.typeArguments.isEmpty) {
@@ -129,25 +123,21 @@
   }
 }
 
-/**
- * An executable element defined in a parameterized type where the values of the
- * type parameters are known.
- */
+/// An executable element defined in a parameterized type where the values of
+/// the type parameters are known.
 abstract class ExecutableMember extends Member implements ExecutableElement {
   @override
   final List<TypeParameterElement> typeParameters;
 
   FunctionType _type;
 
-  /**
-   * Initialize a newly created element to represent a callable element (like a
-   * method or function or property), based on the [declaration], and applied
-   * [substitution].
-   *
-   * The [typeParameters] are fresh, and [substitution] is already applied to
-   * their bounds.  The [substitution] includes replacing [declaration] type
-   * parameters with the provided fresh [typeParameters].
-   */
+  /// Initialize a newly created element to represent a callable element (like a
+  /// method or function or property), based on the [declaration], and applied
+  /// [substitution].
+  ///
+  /// The [typeParameters] are fresh, and [substitution] is already applied to
+  /// their bounds.  The [substitution] includes replacing [declaration] type
+  /// parameters with the provided fresh [typeParameters].
   ExecutableMember(
     ExecutableElement declaration,
     MapSubstitution substitution,
@@ -264,10 +254,8 @@
   }
 }
 
-/**
- * A parameter element defined in a parameterized type where the values of the
- * type parameters are known.
- */
+/// A parameter element defined in a parameterized type where the values of the
+/// type parameters are known.
 class FieldFormalParameterMember extends ParameterMember
     implements FieldFormalParameterElement {
   factory FieldFormalParameterMember(
@@ -312,15 +300,11 @@
       visitor.visitFieldFormalParameterElement(this);
 }
 
-/**
- * A field element defined in a parameterized type where the values of the type
- * parameters are known.
- */
+/// A field element defined in a parameterized type where the values of the type
+/// parameters are known.
 class FieldMember extends VariableMember implements FieldElement {
-  /**
-   * Initialize a newly created element to represent a field, based on the
-   * [declaration], with applied [substitution].
-   */
+  /// Initialize a newly created element to represent a field, based on the
+  /// [declaration], with applied [substitution].
   FieldMember(
     FieldElement declaration,
     MapSubstitution substitution,
@@ -364,13 +348,11 @@
   @override
   T accept<T>(ElementVisitor<T> visitor) => visitor.visitFieldElement(this);
 
-  /**
-   * If the given [field]'s type is different when any type parameters from the
-   * defining type's declaration are replaced with the actual type arguments
-   * from the [definingType], create a field member representing the given
-   * field. Return the member that was created, or the base field if no member
-   * was created.
-   */
+  /// If the given [field]'s type is different when any type parameters from the
+  /// defining type's declaration are replaced with the actual type arguments
+  /// from the [definingType], create a field member representing the given
+  /// field. Return the member that was created, or the base field if no member
+  /// was created.
   static FieldElement from(FieldElement field, InterfaceType definingType) {
     if (field == null || definingType.typeArguments.isEmpty) {
       return field;
@@ -414,39 +396,27 @@
   }
 }
 
-/**
- * An element defined in a parameterized type where the values of the type
- * parameters are known.
- */
+/// An element defined in a parameterized type where the values of the type
+/// parameters are known.
 abstract class Member implements Element {
-  /**
-   * The element on which the parameterized element was created.
-   */
+  /// The element on which the parameterized element was created.
   final Element _declaration;
 
-  /**
-   * The substitution for type parameters referenced in the base element.
-   */
+  /// The substitution for type parameters referenced in the base element.
   final MapSubstitution _substitution;
 
-  /**
-   * If `true`, then this is a legacy view on a NNBD element.
-   */
+  /// If `true`, then this is a legacy view on a NNBD element.
   final bool isLegacy;
 
-  /**
-   * Initialize a newly created element to represent a member, based on the
-   * [declaration], and applied [_substitution].
-   */
+  /// Initialize a newly created element to represent a member, based on the
+  /// [declaration], and applied [_substitution].
   Member(this._declaration, this._substitution, this.isLegacy) {
     if (_declaration is Member) {
       throw StateError('Members must be created from a declarations.');
     }
   }
 
-  /**
-   * Return the element on which the parameterized element was created.
-   */
+  /// Return the element on which the parameterized element was created.
   @Deprecated('Use Element.declaration instead')
   Element get baseElement => _declaration;
 
@@ -555,9 +525,7 @@
   @override
   Source get source => _declaration.source;
 
-  /**
-   * The substitution for type parameters referenced in the base element.
-   */
+  /// The substitution for type parameters referenced in the base element.
   MapSubstitution get substitution => _substitution;
 
   /// Append a textual representation of this element to the given [builder].
@@ -586,9 +554,7 @@
   bool isAccessibleIn(LibraryElement library) =>
       _declaration.isAccessibleIn(library);
 
-  /**
-   * Use the given [visitor] to visit all of the [children].
-   */
+  /// Use the given [visitor] to visit all of the [children].
   void safelyVisitChildren(List<Element> children, ElementVisitor visitor) {
     // TODO(brianwilkerson) Make this private
     if (children != null) {
@@ -683,10 +649,8 @@
   }
 }
 
-/**
- * A method element defined in a parameterized type where the values of the type
- * parameters are known.
- */
+/// A method element defined in a parameterized type where the values of the
+/// type parameters are known.
 class MethodMember extends ExecutableMember implements MethodElement {
   factory MethodMember(
     MethodElement declaration,
@@ -725,13 +689,11 @@
   @override
   T accept<T>(ElementVisitor<T> visitor) => visitor.visitMethodElement(this);
 
-  /**
-   * If the given [method]'s type is different when any type parameters from the
-   * defining type's declaration are replaced with the actual type arguments
-   * from the [definingType], create a method member representing the given
-   * method. Return the member that was created, or the base method if no member
-   * was created.
-   */
+  /// If the given [method]'s type is different when any type parameters from
+  /// the defining type's declaration are replaced with the actual type
+  /// arguments from the [definingType], create a method member representing the
+  /// given method. Return the member that was created, or the base method if no
+  /// member was created.
   static MethodElement from(MethodElement method, InterfaceType definingType) {
     if (method == null || definingType.typeArguments.isEmpty) {
       return method;
@@ -755,10 +717,8 @@
   }
 }
 
-/**
- * A parameter element defined in a parameterized type where the values of the
- * type parameters are known.
- */
+/// A parameter element defined in a parameterized type where the values of the
+/// type parameters are known.
 class ParameterMember extends VariableMember
     with ParameterElementMixin
     implements ParameterElement {
@@ -782,10 +742,8 @@
     );
   }
 
-  /**
-   * Initialize a newly created element to represent a parameter, based on the
-   * [declaration], with applied [substitution].
-   */
+  /// Initialize a newly created element to represent a parameter, based on the
+  /// [declaration], with applied [substitution].
   ParameterMember._(
     ParameterElement declaration,
     MapSubstitution substitution,
@@ -861,10 +819,8 @@
   }
 }
 
-/**
- * A property accessor element defined in a parameterized type where the values
- * of the type parameters are known.
- */
+/// A property accessor element defined in a parameterized type where the values
+/// of the type parameters are known.
 class PropertyAccessorMember extends ExecutableMember
     implements PropertyAccessorElement {
   factory PropertyAccessorMember(
@@ -950,13 +906,11 @@
     );
   }
 
-  /**
-   * If the given [accessor]'s type is different when any type parameters from
-   * the defining type's declaration are replaced with the actual type
-   * arguments from the [definingType], create an accessor member representing
-   * the given accessor. Return the member that was created, or the base
-   * accessor if no member was created.
-   */
+  /// If the given [accessor]'s type is different when any type parameters from
+  /// the defining type's declaration are replaced with the actual type
+  /// arguments from the [definingType], create an accessor member representing
+  /// the given accessor. Return the member that was created, or the base
+  /// accessor if no member was created.
   static PropertyAccessorElement from(
       PropertyAccessorElement accessor, InterfaceType definingType) {
     if (accessor == null || definingType.typeArguments.isEmpty) {
@@ -1006,17 +960,13 @@
   }
 }
 
-/**
- * A variable element defined in a parameterized type where the values of the
- * type parameters are known.
- */
+/// A variable element defined in a parameterized type where the values of the
+/// type parameters are known.
 abstract class VariableMember extends Member implements VariableElement {
   DartType _type;
 
-  /**
-   * Initialize a newly created element to represent a variable, based on the
-   * [declaration], with applied [substitution].
-   */
+  /// Initialize a newly created element to represent a variable, based on the
+  /// [declaration], with applied [substitution].
   VariableMember(
     VariableElement declaration,
     MapSubstitution substitution,
diff --git a/pkg/analyzer/lib/src/dart/element/normalize.dart b/pkg/analyzer/lib/src/dart/element/normalize.dart
index 97086d0..4f00b3f 100644
--- a/pkg/analyzer/lib/src/dart/element/normalize.dart
+++ b/pkg/analyzer/lib/src/dart/element/normalize.dart
@@ -10,7 +10,7 @@
 import 'package:analyzer/src/dart/element/type.dart';
 import 'package:analyzer/src/dart/element/type_algebra.dart';
 import 'package:analyzer/src/dart/element/type_provider.dart';
-import 'package:analyzer/src/generated/type_system.dart';
+import 'package:analyzer/src/dart/element/type_system.dart';
 
 /// Helper for computing canonical presentation of types.
 ///
diff --git a/pkg/analyzer/lib/src/dart/element/runtime_type_equality.dart b/pkg/analyzer/lib/src/dart/element/runtime_type_equality.dart
index e49bcc5..3f54b89 100644
--- a/pkg/analyzer/lib/src/dart/element/runtime_type_equality.dart
+++ b/pkg/analyzer/lib/src/dart/element/runtime_type_equality.dart
@@ -8,8 +8,8 @@
 import 'package:analyzer/src/dart/element/element.dart';
 import 'package:analyzer/src/dart/element/type.dart';
 import 'package:analyzer/src/dart/element/type_algebra.dart';
+import 'package:analyzer/src/dart/element/type_system.dart';
 import 'package:analyzer/src/dart/element/type_visitor.dart';
-import 'package:analyzer/src/generated/type_system.dart';
 
 class RuntimeTypeEqualityHelper {
   final TypeSystemImpl _typeSystem;
diff --git a/pkg/analyzer/lib/src/dart/element/subtype.dart b/pkg/analyzer/lib/src/dart/element/subtype.dart
index 7663496..80b0c80 100644
--- a/pkg/analyzer/lib/src/dart/element/subtype.dart
+++ b/pkg/analyzer/lib/src/dart/element/subtype.dart
@@ -11,8 +11,8 @@
 import 'package:analyzer/src/dart/element/type_algebra.dart';
 import 'package:analyzer/src/dart/element/type_provider.dart';
 import 'package:analyzer/src/dart/element/type_schema.dart';
+import 'package:analyzer/src/dart/element/type_system.dart';
 import 'package:analyzer/src/dart/resolver/variance.dart';
-import 'package:analyzer/src/generated/type_system.dart';
 import 'package:analyzer/src/generated/utilities_dart.dart';
 
 /// Helper for checking the subtype relation.
diff --git a/pkg/analyzer/lib/src/dart/element/top_merge.dart b/pkg/analyzer/lib/src/dart/element/top_merge.dart
index e89ffb1..78714ea 100644
--- a/pkg/analyzer/lib/src/dart/element/top_merge.dart
+++ b/pkg/analyzer/lib/src/dart/element/top_merge.dart
@@ -9,7 +9,7 @@
 import 'package:analyzer/src/dart/element/extensions.dart';
 import 'package:analyzer/src/dart/element/type.dart';
 import 'package:analyzer/src/dart/element/type_algebra.dart';
-import 'package:analyzer/src/generated/type_system.dart';
+import 'package:analyzer/src/dart/element/type_system.dart';
 import 'package:analyzer/src/generated/utilities_dart.dart';
 
 class TopMergeHelper {
@@ -17,14 +17,12 @@
 
   TopMergeHelper(this.typeSystem);
 
-  /**
-   * Merges two types into a single type.
-   * Compute the canonical representation of [T].
-   *
-   * https://github.com/dart-lang/language/
-   * See `accepted/future-releases/nnbd/feature-specification.md`
-   * See `#classes-defined-in-opted-in-libraries`
-   */
+  /// Merges two types into a single type.
+  /// Compute the canonical representation of [T].
+  ///
+  /// https://github.com/dart-lang/language/
+  /// See `accepted/future-releases/nnbd/feature-specification.md`
+  /// See `#classes-defined-in-opted-in-libraries`
   DartType topMerge(DartType T, DartType S) {
     var T_nullability = T.nullabilitySuffix;
     var S_nullability = S.nullabilitySuffix;
diff --git a/pkg/analyzer/lib/src/dart/element/type.dart b/pkg/analyzer/lib/src/dart/element/type.dart
index 04d8359..8fd0cf4 100644
--- a/pkg/analyzer/lib/src/dart/element/type.dart
+++ b/pkg/analyzer/lib/src/dart/element/type.dart
@@ -17,9 +17,9 @@
 import 'package:analyzer/src/dart/element/inheritance_manager3.dart';
 import 'package:analyzer/src/dart/element/member.dart';
 import 'package:analyzer/src/dart/element/type_algebra.dart';
+import 'package:analyzer/src/dart/element/type_system.dart';
 import 'package:analyzer/src/generated/element_type_provider.dart';
 import 'package:analyzer/src/generated/engine.dart' show AnalysisEngine;
-import 'package:analyzer/src/generated/type_system.dart';
 import 'package:analyzer/src/generated/utilities_dart.dart';
 import 'package:meta/meta.dart';
 
@@ -44,18 +44,12 @@
   return list;
 }
 
-/**
- * The [Type] representing the type `dynamic`.
- */
-class DynamicTypeImpl extends TypeImpl {
-  /**
-   * The unique instance of this class.
-   */
+/// The [Type] representing the type `dynamic`.
+class DynamicTypeImpl extends TypeImpl implements DynamicType {
+  /// The unique instance of this class.
   static final DynamicTypeImpl instance = DynamicTypeImpl._();
 
-  /**
-   * Prevent the creation of instances of this class.
-   */
+  /// Prevent the creation of instances of this class.
   DynamicTypeImpl._() : super(DynamicElementImpl());
 
   @override
@@ -109,9 +103,7 @@
   }
 }
 
-/**
- * The type of a function, method, constructor, getter, or setter.
- */
+/// The type of a function, method, constructor, getter, or setter.
 class FunctionTypeImpl extends TypeImpl implements FunctionType {
   @override
   final DartType returnType;
@@ -378,21 +370,19 @@
     }
   }
 
-  /**
-   * Compares two function types [t] and [s] to see if their corresponding
-   * parameter types match [parameterRelation], return types match
-   * [returnRelation], and type parameter bounds match [boundsRelation].
-   *
-   * Used for the various relations on function types which have the same
-   * structural rules for handling optional parameters and arity, but use their
-   * own relation for comparing corresponding parameters or return types.
-   *
-   * If [parameterRelation] is omitted, uses [returnRelation] for both. This
-   * is convenient for Dart 1 type system methods.
-   *
-   * If [boundsRelation] is omitted, uses [returnRelation]. This is for
-   * backwards compatibility, and convenience for Dart 1 type system methods.
-   */
+  /// Compares two function types [t] and [s] to see if their corresponding
+  /// parameter types match [parameterRelation], return types match
+  /// [returnRelation], and type parameter bounds match [boundsRelation].
+  ///
+  /// Used for the various relations on function types which have the same
+  /// structural rules for handling optional parameters and arity, but use their
+  /// own relation for comparing corresponding parameters or return types.
+  ///
+  /// If [parameterRelation] is omitted, uses [returnRelation] for both. This
+  /// is convenient for Dart 1 type system methods.
+  ///
+  /// If [boundsRelation] is omitted, uses [returnRelation]. This is for
+  /// backwards compatibility, and convenience for Dart 1 type system methods.
   static bool relate(FunctionType t, DartType other,
       bool Function(DartType t, DartType s) returnRelation,
       {bool Function(ParameterElement t, ParameterElement s) parameterRelation,
@@ -542,17 +532,15 @@
     return true;
   }
 
-  /**
-   * Given two functions [f1] and [f2] where f1 and f2 are known to be
-   * generic function types (both have type formals), this checks that they
-   * have the same number of formals, and that those formals have bounds
-   * (e.g. `<T extends LowerBound>`) that satisfy [relation].
-   *
-   * The return value will be a new list of fresh type variables, that can be
-   * used to instantiate both function types, allowing further comparison.
-   * For example, given `<T>T -> T` and `<U>U -> U` we can instantiate them with
-   * `F` to get `F -> F` and `F -> F`, which we can see are equal.
-   */
+  /// Given two functions [f1] and [f2] where f1 and f2 are known to be
+  /// generic function types (both have type formals), this checks that they
+  /// have the same number of formals, and that those formals have bounds
+  /// (e.g. `<T extends LowerBound>`) that satisfy [relation].
+  ///
+  /// The return value will be a new list of fresh type variables, that can be
+  /// used to instantiate both function types, allowing further comparison.
+  /// For example, given `<T>T -> T` and `<U>U -> U` we can instantiate them
+  /// with `F` to get `F -> F` and `F -> F`, which we can see are equal.
   static List<DartType> relateTypeFormals(
       FunctionType f1,
       FunctionType f2,
@@ -680,9 +668,7 @@
   }
 }
 
-/**
- * A concrete implementation of an [InterfaceType].
- */
+/// A concrete implementation of an [InterfaceType].
 class InterfaceTypeImpl extends TypeImpl implements InterfaceType {
   @override
   final List<DartType> typeArguments;
@@ -690,19 +676,13 @@
   @override
   final NullabilitySuffix nullabilitySuffix;
 
-  /**
-   * Cached [ConstructorElement]s - members or raw elements.
-   */
+  /// Cached [ConstructorElement]s - members or raw elements.
   List<ConstructorElement> _constructors;
 
-  /**
-   * Cached [PropertyAccessorElement]s - members or raw elements.
-   */
+  /// Cached [PropertyAccessorElement]s - members or raw elements.
   List<PropertyAccessorElement> _accessors;
 
-  /**
-   * Cached [MethodElement]s - members or raw elements.
-   */
+  /// Cached [MethodElement]s - members or raw elements.
   List<MethodElement> _methods;
 
   InterfaceTypeImpl({
@@ -898,22 +878,20 @@
     builder.writeInterfaceType(this);
   }
 
-  /**
-   * Return either this type or a supertype of this type that is defined by the
-   * [targetElement], or `null` if such a type does not exist. If this type
-   * inherits from the target element along multiple paths, then the returned type
-   * is arbitrary.
-   *
-   * For example, given the following definitions
-   * ```
-   * class A<E> {}
-   * class B<E> implements A<E> {}
-   * class C implements A<String> {}
-   * ```
-   * Asking the type `B<int>` for the type associated with `A` will return the
-   * type `A<int>`. Asking the type `C` for the type associated with `A` will
-   * return the type `A<String>`.
-   */
+  /// Return either this type or a supertype of this type that is defined by the
+  /// [targetElement], or `null` if such a type does not exist. If this type
+  /// inherits from the target element along multiple paths, then the returned
+  /// type is arbitrary.
+  ///
+  /// For example, given the following definitions
+  /// ```
+  /// class A<E> {}
+  /// class B<E> implements A<E> {}
+  /// class C implements A<String> {}
+  /// ```
+  /// Asking the type `B<int>` for the type associated with `A` will return the
+  /// type `A<int>`. Asking the type `C` for the type associated with `A` will
+  /// return the type `A<String>`.
   InterfaceType asInstanceOf(ClassElement targetElement) {
     if (element == targetElement) {
       return this;
@@ -1462,10 +1440,8 @@
     return result;
   }
 
-  /**
-   * If there is a single type which is at least as specific as all of the
-   * types in [types], return it.  Otherwise return `null`.
-   */
+  /// If there is a single type which is at least as specific as all of the
+  /// types in [types], return it.  Otherwise return `null`.
   static DartType findMostSpecificType(
       List<DartType> types, TypeSystemImpl typeSystem) {
     // The << relation ("more specific than") is a partial ordering on types,
@@ -1518,14 +1494,12 @@
     return null;
   }
 
-  /**
-   * Returns a "smart" version of the "least upper bound" of the given types.
-   *
-   * If these types have the same element and differ only in terms of the type
-   * arguments, attempts to find a compatible set of type arguments.
-   *
-   * Otherwise, calls [DartType.getLeastUpperBound].
-   */
+  /// Returns a "smart" version of the "least upper bound" of the given types.
+  ///
+  /// If these types have the same element and differ only in terms of the type
+  /// arguments, attempts to find a compatible set of type arguments.
+  ///
+  /// Otherwise, calls [DartType.getLeastUpperBound].
   static InterfaceType getSmartLeastUpperBound(
       InterfaceType first, InterfaceType second) {
     // TODO(paulberry): this needs to be deprecated and replaced with a method
@@ -1538,15 +1512,13 @@
     return typeSystem.getLeastUpperBound(first, second);
   }
 
-  /**
-   * Return the "least upper bound" of the given types under the assumption that
-   * the types have the same element and differ only in terms of the type
-   * arguments.
-   *
-   * The resulting type is composed by comparing the corresponding type
-   * arguments, keeping those that are the same, and using 'dynamic' for those
-   * that are different.
-   */
+  /// Return the "least upper bound" of the given types under the assumption
+  /// that the types have the same element and differ only in terms of the type
+  /// arguments.
+  ///
+  /// The resulting type is composed by comparing the corresponding type
+  /// arguments, keeping those that are the same, and using 'dynamic' for those
+  /// that are different.
   static InterfaceType _leastUpperBound(
       InterfaceType firstType, InterfaceType secondType) {
     ClassElement firstElement = firstType.element;
@@ -1656,45 +1628,35 @@
   }
 }
 
-/**
- * The type `Never` represents the uninhabited bottom type.
- */
-class NeverTypeImpl extends TypeImpl {
-  /**
-   * The unique instance of this class, nullable.
-   *
-   * This behaves equivalently to the `Null` type, but we distinguish it for two
-   * reasons: (1) there are circumstances where we need access to this type, but
-   * we don't have access to the type provider, so using `Never?` is a
-   * convenient solution.  (2) we may decide that the distinction is convenient
-   * in diagnostic messages (this is TBD).
-   */
+/// The type `Never` represents the uninhabited bottom type.
+class NeverTypeImpl extends TypeImpl implements NeverType {
+  /// The unique instance of this class, nullable.
+  ///
+  /// This behaves equivalently to the `Null` type, but we distinguish it for
+  /// two reasons: (1) there are circumstances where we need access to this
+  /// type, but we don't have access to the type provider, so using `Never?` is
+  /// a convenient solution.  (2) we may decide that the distinction is
+  /// convenient in diagnostic messages (this is TBD).
   static final NeverTypeImpl instanceNullable =
       NeverTypeImpl._(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.
-   */
+  /// 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 NeverTypeImpl instanceLegacy =
       NeverTypeImpl._(NullabilitySuffix.star);
 
-  /**
-   * The unique instance of this class, non-nullable.
-   */
+  /// The unique instance of this class, non-nullable.
   static final NeverTypeImpl instance = NeverTypeImpl._(NullabilitySuffix.none);
 
   @override
   final NullabilitySuffix nullabilitySuffix;
 
-  /**
-   * Prevent the creation of instances of this class.
-   */
+  /// Prevent the creation of instances of this class.
   NeverTypeImpl._(this.nullabilitySuffix) : super(NeverElementImpl());
 
   @override
@@ -1759,20 +1721,14 @@
   }
 }
 
-/**
- * The abstract class `TypeImpl` implements the behavior common to objects
- * representing the declared type of elements in the element model.
- */
+/// The abstract class `TypeImpl` implements the behavior common to objects
+/// representing the declared type of elements in the element model.
 abstract class TypeImpl implements DartType {
-  /**
-   * The element representing the declaration of this type, or `null` if the
-   * type has not, or cannot, be associated with an element.
-   */
+  /// The element representing the declaration of this type, or `null` if the
+  /// type has not, or cannot, be associated with an element.
   final Element _element;
 
-  /**
-   * Initialize a newly created type to be declared by the given [element].
-   */
+  /// Initialize a newly created type to be declared by the given [element].
   TypeImpl(this._element);
 
   @deprecated
@@ -1848,9 +1804,7 @@
   @override
   NullabilitySuffix get nullabilitySuffix;
 
-  /**
-   * Append a textual representation of this type to the given [builder].
-   */
+  /// Append a textual representation of this type to the given [builder].
   void appendTo(ElementDisplayStringBuilder builder);
 
   @override
@@ -1877,10 +1831,8 @@
   @override
   DartType resolveToBound(DartType objectType) => this;
 
-  /**
-   * Return the type resulting from substituting the given [argumentTypes] for
-   * the given [parameterTypes] in this type.
-   */
+  /// Return the type resulting from substituting the given [argumentTypes] for
+  /// the given [parameterTypes] in this type.
   @override
   @deprecated
   DartType substitute2(
@@ -1891,24 +1843,20 @@
     return getDisplayString(withNullability: false);
   }
 
-  /**
-   * Return the same type, but with the given [nullabilitySuffix].
-   *
-   * If the nullability of `this` already matches [nullabilitySuffix], `this`
-   * is returned.
-   *
-   * Note: this method just does low-level manipulations of the underlying type,
-   * so it is what you want if you are constructing a fresh type and want it to
-   * have the correct nullability suffix, but it is generally *not* what you
-   * want if you're manipulating existing types.  For manipulating existing
-   * types, please use the methods in [TypeSystemImpl].
-   */
+  /// Return the same type, but with the given [nullabilitySuffix].
+  ///
+  /// If the nullability of `this` already matches [nullabilitySuffix], `this`
+  /// is returned.
+  ///
+  /// Note: this method just does low-level manipulations of the underlying
+  /// type, so it is what you want if you are constructing a fresh type and want
+  /// it to have the correct nullability suffix, but it is generally *not* what
+  /// you want if you're manipulating existing types.  For manipulating existing
+  /// types, please use the methods in [TypeSystemImpl].
   TypeImpl withNullability(NullabilitySuffix nullabilitySuffix);
 
-  /**
-   * Return `true` if corresponding elements of the [first] and [second] lists
-   * of type arguments are all equal.
-   */
+  /// Return `true` if corresponding elements of the [first] and [second] lists
+  /// of type arguments are all equal.
   static bool equalArrays(List<DartType> first, List<DartType> second) {
     if (first.length != second.length) {
       return false;
@@ -1930,10 +1878,9 @@
     return true;
   }
 
-  /**
-   * Return a list containing the results of using the given [argumentTypes] and
-   * [parameterTypes] to perform a substitution on all of the given [types].
-   */
+  /// Return a list containing the results of using the given [argumentTypes]
+  /// and [parameterTypes] to perform a substitution on all of the given
+  /// [types].
   @deprecated
   static List<DartType> substitute(List<DartType> types,
       List<DartType> argumentTypes, List<DartType> parameterTypes) {
@@ -1949,9 +1896,7 @@
   }
 }
 
-/**
- * A concrete implementation of a [TypeParameterType].
- */
+/// A concrete implementation of a [TypeParameterType].
 class TypeParameterTypeImpl extends TypeImpl implements TypeParameterType {
   @override
   final NullabilitySuffix nullabilitySuffix;
@@ -1962,10 +1907,8 @@
   /// is therefore the same as the bound of [element].
   final DartType promotedBound;
 
-  /**
-   * Initialize a newly created type parameter type to be declared by the given
-   * [element] and to have the given name.
-   */
+  /// Initialize a newly created type parameter type to be declared by the given
+  /// [element] and to have the given name.
   TypeParameterTypeImpl({
     @required TypeParameterElement element,
     @required this.nullabilitySuffix,
@@ -2053,7 +1996,8 @@
       if (parameterType is TypeParameterTypeImpl && parameterType == this) {
         TypeImpl argumentType = argumentTypes[i];
 
-        // TODO(scheglov) It should not happen, but sometimes arguments are null.
+        // TODO(scheglov) It should not happen, but sometimes arguments are
+        //  null.
         if (argumentType == null) {
           return argumentType;
         }
@@ -2101,10 +2045,8 @@
     );
   }
 
-  /**
-   * Return a list containing the type parameter types defined by the given
-   * array of type parameter elements ([typeParameters]).
-   */
+  /// Return a list containing the type parameter types defined by the given
+  /// array of type parameter elements ([typeParameters]).
   @deprecated
   static List<TypeParameterType> getTypes(
       List<TypeParameterElement> typeParameters) {
@@ -2120,28 +2062,12 @@
   }
 }
 
-/**
- * The type `void`.
- */
-abstract class VoidType implements DartType {
-  @override
-  @deprecated
-  VoidType substitute2(
-      List<DartType> argumentTypes, List<DartType> parameterTypes);
-}
-
-/**
- * A concrete implementation of a [VoidType].
- */
+/// A concrete implementation of a [VoidType].
 class VoidTypeImpl extends TypeImpl implements VoidType {
-  /**
-   * The unique instance of this class, with indeterminate nullability.
-   */
+  /// The unique instance of this class, with indeterminate nullability.
   static final VoidTypeImpl instance = VoidTypeImpl._();
 
-  /**
-   * Prevent the creation of instances of this class.
-   */
+  /// Prevent the creation of instances of this class.
   VoidTypeImpl._() : super(null);
 
   @override
diff --git a/pkg/analyzer/lib/src/dart/element/type_constraint_gatherer.dart b/pkg/analyzer/lib/src/dart/element/type_constraint_gatherer.dart
index f4d6a54..21cdd9c 100644
--- a/pkg/analyzer/lib/src/dart/element/type_constraint_gatherer.dart
+++ b/pkg/analyzer/lib/src/dart/element/type_constraint_gatherer.dart
@@ -9,7 +9,7 @@
 import 'package:analyzer/src/dart/element/type.dart';
 import 'package:analyzer/src/dart/element/type_algebra.dart';
 import 'package:analyzer/src/dart/element/type_schema.dart';
-import 'package:analyzer/src/generated/type_system.dart';
+import 'package:analyzer/src/dart/element/type_system.dart';
 import 'package:meta/meta.dart';
 
 /// A constraint on the type [parameter] that we're inferring.
diff --git a/pkg/analyzer/lib/src/dart/element/type_demotion.dart b/pkg/analyzer/lib/src/dart/element/type_demotion.dart
index 3ec8097..41a9e17 100644
--- a/pkg/analyzer/lib/src/dart/element/type_demotion.dart
+++ b/pkg/analyzer/lib/src/dart/element/type_demotion.dart
@@ -7,8 +7,8 @@
 import 'package:analyzer/dart/element/type.dart';
 import 'package:analyzer/src/dart/element/replacement_visitor.dart';
 import 'package:analyzer/src/dart/element/type.dart';
+import 'package:analyzer/src/dart/element/type_system.dart';
 import 'package:analyzer/src/dart/element/type_visitor.dart';
-import 'package:analyzer/src/generated/type_system.dart';
 
 /// Returns [type] in which all promoted type variables have been replace with
 /// their unpromoted equivalents, and, if [library] is non-nullable by default,
diff --git a/pkg/analyzer/lib/src/dart/element/type_provider.dart b/pkg/analyzer/lib/src/dart/element/type_provider.dart
index 0f67958..724e63b 100644
--- a/pkg/analyzer/lib/src/dart/element/type_provider.dart
+++ b/pkg/analyzer/lib/src/dart/element/type_provider.dart
@@ -8,7 +8,7 @@
 import 'package:analyzer/dart/element/type_provider.dart';
 import 'package:analyzer/src/dart/constant/value.dart';
 import 'package:analyzer/src/dart/element/type.dart';
-import 'package:analyzer/src/generated/type_system.dart';
+import 'package:analyzer/src/dart/element/type_system.dart';
 import 'package:meta/meta.dart';
 
 /// Provide common functionality shared by the various TypeProvider
diff --git a/pkg/analyzer/lib/src/dart/element/type_system.dart b/pkg/analyzer/lib/src/dart/element/type_system.dart
new file mode 100644
index 0000000..27bef03
--- /dev/null
+++ b/pkg/analyzer/lib/src/dart/element/type_system.dart
@@ -0,0 +1,1507 @@
+// Copyright (c) 2020, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'dart:collection';
+
+import 'package:analyzer/dart/ast/ast.dart' show AstNode;
+import 'package:analyzer/dart/ast/token.dart' show TokenType;
+import 'package:analyzer/dart/element/element.dart';
+import 'package:analyzer/dart/element/null_safety_understanding_flag.dart';
+import 'package:analyzer/dart/element/nullability_suffix.dart';
+import 'package:analyzer/dart/element/type.dart';
+import 'package:analyzer/dart/element/type_provider.dart';
+import 'package:analyzer/dart/element/type_system.dart' as public;
+import 'package:analyzer/error/listener.dart' show ErrorReporter;
+import 'package:analyzer/src/dart/element/element.dart';
+import 'package:analyzer/src/dart/element/generic_inferrer.dart';
+import 'package:analyzer/src/dart/element/greatest_lower_bound.dart';
+import 'package:analyzer/src/dart/element/least_upper_bound.dart';
+import 'package:analyzer/src/dart/element/normalize.dart';
+import 'package:analyzer/src/dart/element/nullability_eliminator.dart';
+import 'package:analyzer/src/dart/element/runtime_type_equality.dart';
+import 'package:analyzer/src/dart/element/subtype.dart';
+import 'package:analyzer/src/dart/element/top_merge.dart';
+import 'package:analyzer/src/dart/element/type.dart';
+import 'package:analyzer/src/dart/element/type_algebra.dart';
+import 'package:analyzer/src/dart/element/type_schema.dart';
+import 'package:analyzer/src/dart/element/type_schema_elimination.dart';
+import 'package:meta/meta.dart';
+
+/// The interface `TypeSystem` defines the behavior of an object representing
+/// the type system.  This provides a common location to put methods that act on
+/// types but may need access to more global data structures, and it paves the
+/// way for a possible future where we may wish to make the type system
+/// pluggable.
+// TODO(brianwilkerson) Rename this class to TypeSystemImpl.
+abstract class TypeSystem implements public.TypeSystem {
+  /// If `true`, then NNBD type rules should be used.
+  /// If `false`, then legacy type rules should be used.
+  final bool isNonNullableByDefault;
+
+  TypeSystem({@required this.isNonNullableByDefault});
+
+  /// The provider of types for the system
+  TypeProvider get typeProvider;
+
+  @override
+  TypeImpl flatten(DartType type) {
+    if (identical(type, UnknownInferredType.instance)) {
+      return type;
+    }
+
+    // if T is S? then flatten(T) = flatten(S)?
+    // if T is S* then flatten(T) = flatten(S)*
+    NullabilitySuffix nullabilitySuffix = type.nullabilitySuffix;
+    if (nullabilitySuffix != NullabilitySuffix.none) {
+      var S = (type as TypeImpl).withNullability(NullabilitySuffix.none);
+      return flatten(S).withNullability(nullabilitySuffix);
+    }
+
+    if (type is InterfaceType) {
+      // Implement the cases:
+      //  - "If T = FutureOr<S> then flatten(T) = S."
+      //  - "If T = Future<S> then flatten(T) = S."
+      if (type.isDartAsyncFutureOr || type.isDartAsyncFuture) {
+        return type.typeArguments.isNotEmpty
+            ? type.typeArguments[0]
+            : DynamicTypeImpl.instance;
+      }
+      // Implement the case: "Otherwise if T <: Future then let S be a type
+      // such that T << Future<S> and for all R, if T << Future<R> then S << R.
+      // Then flatten(T) = S."
+      //
+      // In other words, given the set of all types R such that T << Future<R>,
+      // let S be the most specific of those types, if any such S exists.
+      //
+      // Since we only care about the most specific type, it is sufficient to
+      // look at the types appearing as a parameter to Future in the type
+      // hierarchy of T.  We don't need to consider the supertypes of those
+      // types, since they are by definition less specific.
+      List<DartType> candidateTypes =
+          _searchTypeHierarchyForFutureTypeParameters(type);
+      DartType flattenResult =
+          InterfaceTypeImpl.findMostSpecificType(candidateTypes, this);
+      if (flattenResult != null) {
+        return flattenResult;
+      }
+    }
+    // Implement the case: "In any other circumstance, flatten(T) = T."
+    return type;
+  }
+
+  List<InterfaceType> gatherMixinSupertypeConstraintsForInference(
+      ClassElement mixinElement) {
+    List<InterfaceType> candidates;
+    if (mixinElement.isMixin) {
+      candidates = mixinElement.superclassConstraints;
+    } else {
+      candidates = [mixinElement.supertype];
+      candidates.addAll(mixinElement.mixins);
+      if (mixinElement.isMixinApplication) {
+        candidates.removeLast();
+      }
+    }
+    return candidates
+        .where((type) => type.element.typeParameters.isNotEmpty)
+        .toList();
+  }
+
+  /// Compute the least upper bound of two types.
+  DartType getLeastUpperBound(DartType type1, DartType type2);
+
+  /// Given a [DartType] [type], instantiate it with its bounds.
+  ///
+  /// The behavior of this method depends on the type system, for example, in
+  /// classic Dart `dynamic` will be used for all type arguments, whereas
+  /// strong mode prefers the actual bound type if it was specified.
+  DartType instantiateToBounds(DartType type, {List<bool> hasError});
+
+  /// Given a [DartType] [type] and a list of types
+  /// [typeArguments], instantiate the type formals with the
+  /// provided actuals.  If [type] is not a parameterized type,
+  /// no instantiation is done.
+  DartType instantiateType(DartType type, List<DartType> typeArguments) {
+    if (type is FunctionType) {
+      return type.instantiate(typeArguments);
+    } else if (type is InterfaceTypeImpl) {
+      // TODO(scheglov) Use `ClassElement.instantiate()`, don't use raw types.
+      return type.element.instantiate(
+        typeArguments: typeArguments,
+        nullabilitySuffix: type.nullabilitySuffix,
+      );
+    } else {
+      return type;
+    }
+  }
+
+  /// Given uninstantiated [typeFormals], instantiate them to their bounds.
+  List<DartType> instantiateTypeFormalsToBounds(
+      List<TypeParameterElement> typeFormals,
+      {List<bool> hasError});
+
+  /// Return `true` if the [leftType] is assignable to the [rightType] (that is,
+  /// if leftType <==> rightType).
+  @override
+  bool isAssignableTo(DartType leftType, DartType rightType);
+
+  /// Return `true` if the [leftType] is more specific than the [rightType]
+  /// (that is, if leftType << rightType), as defined in the Dart language spec.
+  ///
+  /// In strong mode, this is equivalent to [isSubtypeOf].
+  @Deprecated('Use isSubtypeOf() instead.')
+  bool isMoreSpecificThan(DartType leftType, DartType rightType);
+
+  @override
+  bool isNonNullable(DartType type) {
+    if (type.isDynamic || type.isVoid || type.isDartCoreNull) {
+      return false;
+    } else if (type.nullabilitySuffix == NullabilitySuffix.question) {
+      return false;
+    } else if (type.isDartAsyncFutureOr) {
+      return isNonNullable((type as InterfaceType).typeArguments[0]);
+    } else if (type is TypeParameterType) {
+      return isNonNullable(type.bound);
+    }
+    return true;
+  }
+
+  @override
+  bool isNullable(DartType type) {
+    if (type.isDynamic || type.isVoid || type.isDartCoreNull) {
+      return true;
+    } else if (type.nullabilitySuffix == NullabilitySuffix.question) {
+      return true;
+    } else if (type.isDartAsyncFutureOr) {
+      return isNullable((type as InterfaceType).typeArguments[0]);
+    }
+    return false;
+  }
+
+  @override
+  bool isPotentiallyNonNullable(DartType type) => !isNullable(type);
+
+  @override
+  bool isPotentiallyNullable(DartType type) => !isNonNullable(type);
+
+  @override
+  bool isStrictlyNonNullable(DartType type) {
+    if (type.isDynamic || type.isVoid || type.isDartCoreNull) {
+      return false;
+    } else if (type.nullabilitySuffix != NullabilitySuffix.none) {
+      return false;
+    } else if (type is InterfaceType && type.isDartAsyncFutureOr) {
+      return isStrictlyNonNullable(type.typeArguments[0]);
+    } else if (type is TypeParameterType) {
+      return isStrictlyNonNullable(type.bound);
+    }
+    return true;
+  }
+
+  /// Return `true` if the [leftType] is a subtype of the [rightType] (that is,
+  /// if leftType <: rightType).
+  @override
+  bool isSubtypeOf(DartType leftType, DartType rightType);
+
+  @override
+  DartType leastUpperBound(DartType leftType, DartType rightType) {
+    if (!NullSafetyUnderstandingFlag.isEnabled) {
+      leftType = NullabilityEliminator.perform(typeProvider, leftType);
+      rightType = NullabilityEliminator.perform(typeProvider, rightType);
+    }
+    return getLeastUpperBound(leftType, rightType);
+  }
+
+  /// Returns a nullable version of [type].  The result would be equivalent to
+  /// the union `type | Null` (if we supported union types).
+  DartType makeNullable(TypeImpl type) {
+    // TODO(paulberry): handle type parameter types
+    return type.withNullability(NullabilitySuffix.question);
+  }
+
+  /// Attempts to find the appropriate substitution for the [mixinElement]
+  /// type parameters that can be applied to [srcTypes] to make it equal to
+  /// [destTypes].  If no such substitution can be found, `null` is returned.
+  List<DartType> matchSupertypeConstraints(
+    ClassElement mixinElement,
+    List<DartType> srcTypes,
+    List<DartType> destTypes,
+  ) {
+    var typeParameters = mixinElement.typeParameters;
+    var inferrer = GenericInferrer(this, typeParameters);
+    for (int i = 0; i < srcTypes.length; i++) {
+      inferrer.constrainReturnType(srcTypes[i], destTypes[i]);
+      inferrer.constrainReturnType(destTypes[i], srcTypes[i]);
+    }
+
+    var inferredTypes = inferrer.infer(
+      typeParameters,
+      considerExtendsClause: false,
+    );
+    var substitution = Substitution.fromPairs(typeParameters, inferredTypes);
+
+    for (int i = 0; i < srcTypes.length; i++) {
+      if (substitution.substituteType(srcTypes[i]) != destTypes[i]) {
+        // Failed to find an appropriate substitution
+        return null;
+      }
+    }
+
+    return inferredTypes;
+  }
+
+  /// Searches the superinterfaces of [type] for implementations of
+  /// [genericType] and returns the most specific type argument used for that
+  /// generic type.
+  ///
+  /// For a more general/robust solution, use [InterfaceTypeImpl.asInstanceOf].
+  ///
+  /// For example, given [type] `List<int>` and [genericType] `Iterable<T>`,
+  /// returns [int].
+  ///
+  /// Returns `null` if [type] does not implement [genericType].
+  DartType mostSpecificTypeArgument(DartType type, DartType genericType) {
+    if (type is! InterfaceType) return null;
+    if (genericType is! InterfaceType) return null;
+
+    var asInstanceOf = (type as InterfaceTypeImpl)
+        .asInstanceOf((genericType as InterfaceType).element);
+
+    if (asInstanceOf != null) {
+      return asInstanceOf.typeArguments[0];
+    }
+
+    return null;
+  }
+
+  /// Returns a non-nullable version of [type].  This is equivalent to the
+  /// operation `NonNull` defined in the spec.
+  @override
+  DartType promoteToNonNull(DartType type) {
+    if (type.isDartCoreNull) return NeverTypeImpl.instance;
+
+    if (type is TypeParameterTypeImpl) {
+      var element = type.element;
+
+      // NonNull(X & T) = X & NonNull(T)
+      if (type.promotedBound != null) {
+        var promotedBound = promoteToNonNull(type.promotedBound);
+        return TypeParameterTypeImpl(
+          element: element,
+          nullabilitySuffix: NullabilitySuffix.none,
+          promotedBound: promotedBound,
+        );
+      }
+
+      // NonNull(X) = X & NonNull(B), where B is the bound of X
+      var promotedBound = element.bound != null
+          ? promoteToNonNull(element.bound)
+          : typeProvider.objectType;
+      if (identical(promotedBound, element.bound)) {
+        promotedBound = null;
+      }
+      return TypeParameterTypeImpl(
+        element: element,
+        nullabilitySuffix: NullabilitySuffix.none,
+        promotedBound: promotedBound,
+      );
+    }
+
+    return (type as TypeImpl).withNullability(NullabilitySuffix.none);
+  }
+
+  /// Determine the type of a binary expression with the given [operator] whose
+  /// left operand has the type [leftType] and whose right operand has the type
+  /// [rightType], given that resolution has so far produced the [currentType].
+  DartType refineBinaryExpressionType(DartType leftType, TokenType operator,
+      DartType rightType, DartType currentType);
+
+  @override
+  DartType resolveToBound(DartType type) {
+    if (type is TypeParameterTypeImpl) {
+      var element = type.element;
+
+      var bound = element.bound;
+      if (bound == null) {
+        return typeProvider.objectType;
+      }
+
+      NullabilitySuffix nullabilitySuffix = type.nullabilitySuffix;
+      NullabilitySuffix newNullabilitySuffix;
+      if (nullabilitySuffix == NullabilitySuffix.question ||
+          bound.nullabilitySuffix == NullabilitySuffix.question) {
+        newNullabilitySuffix = NullabilitySuffix.question;
+      } else if (nullabilitySuffix == NullabilitySuffix.star ||
+          bound.nullabilitySuffix == NullabilitySuffix.star) {
+        newNullabilitySuffix = NullabilitySuffix.star;
+      } else {
+        newNullabilitySuffix = NullabilitySuffix.none;
+      }
+
+      var resolved = resolveToBound(bound) as TypeImpl;
+      return resolved.withNullability(newNullabilitySuffix);
+    }
+
+    return type;
+  }
+
+  /// Tries to promote from the first type from the second type, and returns the
+  /// promoted type if it succeeds, otherwise null.
+  DartType tryPromoteToType(DartType to, DartType from);
+
+  /// Given a [DartType] type, return the [TypeParameterElement]s corresponding
+  /// to its formal type parameters (if any).
+  ///
+  /// @param type the type whose type arguments are to be returned
+  /// @return the type arguments associated with the given type
+  List<TypeParameterElement> typeFormalsAsElements(DartType type) {
+    if (type is FunctionType) {
+      return type.typeFormals;
+    } else if (type is InterfaceType) {
+      return type.element.typeParameters;
+    } else {
+      return const <TypeParameterElement>[];
+    }
+  }
+
+  /// Starting from the given [type], search its class hierarchy for types of
+  /// the form Future<R>, and return a list of the resulting R's.
+  List<DartType> _searchTypeHierarchyForFutureTypeParameters(DartType type) {
+    List<DartType> result = <DartType>[];
+    HashSet<ClassElement> visitedClasses = HashSet<ClassElement>();
+    void recurse(InterfaceTypeImpl type) {
+      if (type.isDartAsyncFuture && type.typeArguments.isNotEmpty) {
+        result.add(type.typeArguments[0]);
+      }
+      if (visitedClasses.add(type.element)) {
+        if (type.superclass != null) {
+          recurse(type.superclass);
+        }
+        for (InterfaceType interface in type.interfaces) {
+          recurse(interface);
+        }
+        visitedClasses.remove(type.element);
+      }
+    }
+
+    recurse(type);
+    return result;
+  }
+}
+
+/// The [public.TypeSystem] implementation.
+class TypeSystemImpl extends TypeSystem {
+  /// False if implicit casts should always be disallowed.
+  ///
+  /// This affects the behavior of [isAssignableTo].
+  bool implicitCasts;
+
+  /// A flag indicating whether inference failures are allowed, off by default.
+  ///
+  /// This option is experimental and subject to change.
+  bool strictInference;
+
+  @override
+  final TypeProvider typeProvider;
+
+  /// The cached instance of `Object?`.
+  InterfaceTypeImpl _objectQuestion;
+
+  /// The cached instance of `Object*`.
+  InterfaceTypeImpl _objectStar;
+
+  /// The cached instance of `Object!`.
+  InterfaceTypeImpl _objectNone;
+
+  /// The cached instance of `Null!`.
+  InterfaceTypeImpl _nullNone;
+
+  GreatestLowerBoundHelper _greatestLowerBoundHelper;
+  LeastUpperBoundHelper _leastUpperBoundHelper;
+
+  /// The implementation of the subtyping relation.
+  SubtypeHelper _subtypeHelper;
+
+  TypeSystemImpl({
+    @required this.implicitCasts,
+    @required bool isNonNullableByDefault,
+    @required this.strictInference,
+    @required this.typeProvider,
+  }) : super(isNonNullableByDefault: isNonNullableByDefault) {
+    _greatestLowerBoundHelper = GreatestLowerBoundHelper(this);
+    _leastUpperBoundHelper = LeastUpperBoundHelper(this);
+    _subtypeHelper = SubtypeHelper(this);
+  }
+
+  InterfaceTypeImpl get nullNone =>
+      _nullNone ??= (typeProvider.nullType as TypeImpl)
+          .withNullability(NullabilitySuffix.none);
+
+  InterfaceTypeImpl get objectNone =>
+      _objectNone ??= (typeProvider.objectType as TypeImpl)
+          .withNullability(NullabilitySuffix.none);
+
+  InterfaceTypeImpl get objectQuestion =>
+      _objectQuestion ??= (typeProvider.objectType as TypeImpl)
+          .withNullability(NullabilitySuffix.question);
+
+  InterfaceTypeImpl get objectStar =>
+      _objectStar ??= (typeProvider.objectType as TypeImpl)
+          .withNullability(NullabilitySuffix.star);
+
+  /// Returns true iff the type [t] accepts function types, and requires an
+  /// implicit coercion if interface types with a `call` method are passed in.
+  ///
+  /// This is true for:
+  /// - all function types
+  /// - the special type `Function` that is a supertype of all function types
+  /// - `FutureOr<T>` where T is one of the two cases above.
+  ///
+  /// Note that this returns false if [t] is a top type such as Object.
+  bool acceptsFunctionType(DartType t) {
+    if (t == null) return false;
+    if (t.isDartAsyncFutureOr) {
+      return acceptsFunctionType((t as InterfaceType).typeArguments[0]);
+    }
+    return t is FunctionType || t.isDartCoreFunction;
+  }
+
+  bool anyParameterType(FunctionType ft, bool Function(DartType t) predicate) {
+    return ft.parameters.any((p) => predicate(p.type));
+  }
+
+  /// Eliminates type variables from the context [type], replacing them with
+  /// `Null` or `Object` as appropriate.
+  ///
+  /// For example in `List<T> list = const []`, the context type for inferring
+  /// the list should be changed from `List<T>` to `List<Null>` so the constant
+  /// doesn't depend on the type variables `T` (because it can't be
+  /// canonicalized at compile time, as `T` is unknown).
+  ///
+  /// Conceptually this is similar to the "least closure", except instead of
+  /// eliminating `_` ([UnknownInferredType]) it eliminates all type variables
+  /// ([TypeParameterType]).
+  ///
+  /// The equivalent CFE code can be found in the `TypeVariableEliminator`
+  /// class.
+  DartType eliminateTypeVariables(DartType type) {
+    if (isNonNullableByDefault) {
+      return _TypeVariableEliminator(
+        objectQuestion,
+        NeverTypeImpl.instance,
+      ).substituteType(type);
+    } else {
+      return _TypeVariableEliminator(
+        objectNone,
+        typeProvider.nullType,
+      ).substituteType(type);
+    }
+  }
+
+  /// Defines the "remainder" of `T` when `S` has been removed from
+  /// consideration by an instance check.  This operation is used for type
+  /// promotion during flow analysis.
+  DartType factor(DartType T, DartType S) {
+    // * If T <: S then Never
+    if (isSubtypeOf2(T, S)) {
+      return NeverTypeImpl.instance;
+    }
+
+    var T_nullability = T.nullabilitySuffix;
+
+    // * Else if T is R? and Null <: S then factor(R, S)
+    // * Else if T is R? then factor(R, S)?
+    if (T_nullability == NullabilitySuffix.question) {
+      var R = (T as TypeImpl).withNullability(NullabilitySuffix.none);
+      var factor_RS = factor(R, S) as TypeImpl;
+      if (isSubtypeOf2(nullNone, S)) {
+        return factor_RS;
+      } else {
+        return factor_RS.withNullability(NullabilitySuffix.question);
+      }
+    }
+
+    // * Else if T is R* and Null <: S then factor(R, S)
+    // * Else if T is R* then factor(R, S)*
+    if (T_nullability == NullabilitySuffix.star) {
+      var R = (T as TypeImpl).withNullability(NullabilitySuffix.none);
+      var factor_RS = factor(R, S) as TypeImpl;
+      if (isSubtypeOf2(nullNone, S)) {
+        return factor_RS;
+      } else {
+        return factor_RS.withNullability(NullabilitySuffix.star);
+      }
+    }
+
+    // * Else if T is FutureOr<R> and Future<R> <: S then factor(R, S)
+    // * Else if T is FutureOr<R> and R <: S then factor(Future<R>, S)
+    if (T is InterfaceType && T.isDartAsyncFutureOr) {
+      var R = T.typeArguments[0];
+      var future_R = typeProvider.futureType2(R);
+      if (isSubtypeOf2(future_R, S)) {
+        return factor(R, S);
+      }
+      if (isSubtypeOf2(R, S)) {
+        return factor(future_R, S);
+      }
+    }
+
+    return T;
+  }
+
+  /// Compute "future value type" of [T].
+  ///
+  /// https://github.com/dart-lang/language/
+  /// See `nnbd/feature-specification.md`
+  /// See `#the-future-value-type-of-an-asynchronous-non-generator-function`
+  DartType futureValueType(DartType T) {
+    // futureValueType(`S?`) = futureValueType(`S`), for all `S`.
+    // futureValueType(`S*`) = futureValueType(`S`), for all `S`.
+    if (T.nullabilitySuffix != NullabilitySuffix.none) {
+      var S = (T as TypeImpl).withNullability(NullabilitySuffix.none);
+      return futureValueType(S);
+    }
+
+    // futureValueType(Future<`S`>) = `S`, for all `S`.
+    // futureValueType(FutureOr<`S`>) = `S`, for all `S`.
+    if (T is InterfaceType) {
+      if (T.isDartAsyncFuture || T.isDartAsyncFutureOr) {
+        return T.typeArguments[0];
+      }
+    }
+
+    // futureValueType(`dynamic`) = `dynamic`.
+    if (identical(T, DynamicTypeImpl.instance)) {
+      return T;
+    }
+
+    // futureValueType(`void`) = `void`.
+    if (identical(T, VoidTypeImpl.instance)) {
+      return T;
+    }
+
+    // Otherwise, for all `S`, futureValueType(`S`) = `Object?`.
+    return objectQuestion;
+  }
+
+  /// Given a type t, if t is an interface type with a call method defined,
+  /// return the function type for the call method, otherwise return null.
+  FunctionType getCallMethodType(DartType t) {
+    if (t is InterfaceType) {
+      return t.lookUpMethod2('call', t.element.library)?.type;
+    }
+    return null;
+  }
+
+  /// Computes the greatest lower bound of [T1] and [T2].
+  DartType getGreatestLowerBound(DartType T1, DartType T2) {
+    return _greatestLowerBoundHelper.getGreatestLowerBound(T1, T2);
+  }
+
+  /// Compute the least upper bound of two types.
+  ///
+  /// https://github.com/dart-lang/language
+  /// See `resources/type-system/upper-lower-bounds.md`
+  @override
+  DartType getLeastUpperBound(DartType T1, DartType T2) {
+    return _leastUpperBoundHelper.getLeastUpperBound(T1, T2);
+  }
+
+  /// Returns the greatest closure of the given type [schema] with respect to
+  /// `_`.
+  ///
+  /// The greatest closure of a type schema `P` with respect to `_` is defined
+  /// as `P` with every covariant occurrence of `_` replaced with `Null`, and
+  /// every contravariant occurrence of `_` replaced with `Object`.
+  ///
+  /// If the schema contains no instances of `_`, the original schema object is
+  /// returned to avoid unnecessary allocation.
+  ///
+  /// Note that the closure of a type schema is a proper type.
+  ///
+  /// Note that the greatest closure of a type schema is always a supertype of
+  /// any type which matches the schema.
+  DartType greatestClosure(DartType schema) {
+    if (isNonNullableByDefault) {
+      return TypeSchemaEliminationVisitor.run(
+        topType: objectQuestion,
+        bottomType: NeverTypeImpl.instance,
+        isLeastClosure: false,
+        schema: schema,
+      );
+    } else {
+      return TypeSchemaEliminationVisitor.run(
+        topType: DynamicTypeImpl.instance,
+        bottomType: typeProvider.nullType,
+        isLeastClosure: false,
+        schema: schema,
+      );
+    }
+  }
+
+  /// Given a generic function type `F<T0, T1, ... Tn>` and a context type C,
+  /// infer an instantiation of F, such that `F<S0, S1, ..., Sn>` <: C.
+  ///
+  /// This is similar to [inferGenericFunctionOrType], but the return type is
+  /// also considered as part of the solution.
+  ///
+  /// If this function is called with a [contextType] that is also
+  /// uninstantiated, or a [fnType] that is already instantiated, it will have
+  /// no effect and return `null`.
+  List<DartType> inferFunctionTypeInstantiation(
+      FunctionType contextType, FunctionType fnType,
+      {ErrorReporter errorReporter, AstNode errorNode}) {
+    if (contextType.typeFormals.isNotEmpty || fnType.typeFormals.isEmpty) {
+      return const <DartType>[];
+    }
+
+    // Create a TypeSystem that will allow certain type parameters to be
+    // inferred. It will optimistically assume these type parameters can be
+    // subtypes (or supertypes) as necessary, and track the constraints that
+    // are implied by this.
+    var inferrer = GenericInferrer(this, fnType.typeFormals);
+    inferrer.constrainGenericFunctionInContext(fnType, contextType);
+
+    // Infer and instantiate the resulting type.
+    return inferrer.infer(
+      fnType.typeFormals,
+      errorReporter: errorReporter,
+      errorNode: errorNode,
+    );
+  }
+
+  /// Infers type arguments for a generic type, function, method, or
+  /// list/map literal, using the downward context type as well as the
+  /// argument types if available.
+  ///
+  /// For example, given a function type with generic type parameters, this
+  /// infers the type parameters from the actual argument types, and returns the
+  /// instantiated function type.
+  ///
+  /// Concretely, given a function type with parameter types P0, P1, ... Pn,
+  /// result type R, and generic type parameters T0, T1, ... Tm, use the
+  /// argument types A0, A1, ... An to solve for the type parameters.
+  ///
+  /// For each parameter Pi, we want to ensure that Ai <: Pi. We can do this by
+  /// running the subtype algorithm, and when we reach a type parameter Tj,
+  /// recording the lower or upper bound it must satisfy. At the end, all
+  /// constraints can be combined to determine the type.
+  ///
+  /// All constraints on each type parameter Tj are tracked, as well as where
+  /// they originated, so we can issue an error message tracing back to the
+  /// argument values, type parameter "extends" clause, or the return type
+  /// context.
+  List<DartType> inferGenericFunctionOrType({
+    ClassElement genericClass,
+    @required List<TypeParameterElement> typeParameters,
+    @required List<ParameterElement> parameters,
+    @required DartType declaredReturnType,
+    @required List<DartType> argumentTypes,
+    @required DartType contextReturnType,
+    ErrorReporter errorReporter,
+    AstNode errorNode,
+    bool downwards = false,
+    bool isConst = false,
+  }) {
+    if (typeParameters.isEmpty) {
+      return null;
+    }
+
+    // Create a TypeSystem that will allow certain type parameters to be
+    // inferred. It will optimistically assume these type parameters can be
+    // subtypes (or supertypes) as necessary, and track the constraints that
+    // are implied by this.
+    var inferrer = GenericInferrer(this, typeParameters);
+
+    if (contextReturnType != null) {
+      if (isConst) {
+        contextReturnType = eliminateTypeVariables(contextReturnType);
+      }
+      inferrer.constrainReturnType(declaredReturnType, contextReturnType);
+    }
+
+    for (int i = 0; i < argumentTypes.length; i++) {
+      // Try to pass each argument to each parameter, recording any type
+      // parameter bounds that were implied by this assignment.
+      inferrer.constrainArgument(
+        argumentTypes[i],
+        parameters[i].type,
+        parameters[i].name,
+        genericClass: genericClass,
+      );
+    }
+
+    return inferrer.infer(
+      typeParameters,
+      errorReporter: errorReporter,
+      errorNode: errorNode,
+      downwardsInferPhase: downwards,
+    );
+  }
+
+  /// Given a [DartType] [type], if [type] is an uninstantiated
+  /// parameterized type then instantiate the parameters to their
+  /// bounds. See the issue for the algorithm description.
+  ///
+  /// https://github.com/dart-lang/sdk/issues/27526#issuecomment-260021397
+  // TODO(scheglov) Move this method to elements for classes, typedefs,
+  //  and generic functions; compute lazily and cache.
+  @override
+  DartType instantiateToBounds(DartType type,
+      {List<bool> hasError, Map<TypeParameterElement, DartType> knownTypes}) {
+    List<TypeParameterElement> typeFormals = typeFormalsAsElements(type);
+    List<DartType> arguments = instantiateTypeFormalsToBounds(typeFormals,
+        hasError: hasError, knownTypes: knownTypes);
+    if (arguments == null) {
+      return type;
+    }
+
+    return instantiateType(type, arguments);
+  }
+
+  @override
+  DartType instantiateToBounds2({
+    ClassElement classElement,
+    FunctionTypeAliasElement functionTypeAliasElement,
+    @required NullabilitySuffix nullabilitySuffix,
+  }) {
+    if (classElement != null) {
+      var typeParameters = classElement.typeParameters;
+      var typeArguments = _defaultTypeArguments(typeParameters);
+      var type = classElement.instantiate(
+        typeArguments: typeArguments,
+        nullabilitySuffix: nullabilitySuffix,
+      );
+      type = toLegacyType(type);
+      return type;
+    } else if (functionTypeAliasElement != null) {
+      var typeParameters = functionTypeAliasElement.typeParameters;
+      var typeArguments = _defaultTypeArguments(typeParameters);
+      var type = functionTypeAliasElement.instantiate(
+        typeArguments: typeArguments,
+        nullabilitySuffix: nullabilitySuffix,
+      );
+      type = toLegacyType(type);
+      return type;
+    } else {
+      throw ArgumentError('Missing element');
+    }
+  }
+
+  /// Given uninstantiated [typeFormals], instantiate them to their bounds.
+  /// See the issue for the algorithm description.
+  ///
+  /// https://github.com/dart-lang/sdk/issues/27526#issuecomment-260021397
+  @override
+  List<DartType> instantiateTypeFormalsToBounds(
+      List<TypeParameterElement> typeFormals,
+      {List<bool> hasError,
+      Map<TypeParameterElement, DartType> knownTypes}) {
+    int count = typeFormals.length;
+    if (count == 0) {
+      return const <DartType>[];
+    }
+
+    Set<TypeParameterElement> all = <TypeParameterElement>{};
+    // all ground
+    Map<TypeParameterElement, DartType> defaults = knownTypes ?? {};
+    // not ground
+    Map<TypeParameterElement, DartType> partials = {};
+
+    for (TypeParameterElement typeParameter in typeFormals) {
+      all.add(typeParameter);
+      if (!defaults.containsKey(typeParameter)) {
+        if (typeParameter.bound == null) {
+          defaults[typeParameter] = DynamicTypeImpl.instance;
+        } else {
+          partials[typeParameter] = typeParameter.bound;
+        }
+      }
+    }
+
+    List<TypeParameterElement> getFreeParameters(DartType rootType) {
+      List<TypeParameterElement> parameters;
+      Set<DartType> visitedTypes = HashSet<DartType>();
+
+      void appendParameters(DartType type) {
+        if (type == null) {
+          return;
+        }
+        if (visitedTypes.contains(type)) {
+          return;
+        }
+        visitedTypes.add(type);
+        if (type is TypeParameterType) {
+          var element = type.element;
+          if (all.contains(element)) {
+            parameters ??= <TypeParameterElement>[];
+            parameters.add(element);
+          }
+        } else {
+          if (type is FunctionType) {
+            appendParameters(type.returnType);
+            type.parameters.map((p) => p.type).forEach(appendParameters);
+          } else if (type is InterfaceType) {
+            type.typeArguments.forEach(appendParameters);
+          }
+        }
+      }
+
+      appendParameters(rootType);
+      return parameters;
+    }
+
+    bool hasProgress = true;
+    while (hasProgress) {
+      hasProgress = false;
+      for (TypeParameterElement parameter in partials.keys) {
+        DartType value = partials[parameter];
+        List<TypeParameterElement> freeParameters = getFreeParameters(value);
+        if (freeParameters == null) {
+          defaults[parameter] = value;
+          partials.remove(parameter);
+          hasProgress = true;
+          break;
+        } else if (freeParameters.every(defaults.containsKey)) {
+          defaults[parameter] =
+              Substitution.fromMap(defaults).substituteType(value);
+          partials.remove(parameter);
+          hasProgress = true;
+          break;
+        }
+      }
+    }
+
+    // If we stopped making progress, and not all types are ground,
+    // then the whole type is malbounded and an error should be reported
+    // if errors are requested, and a partially completed type should
+    // be returned.
+    if (partials.isNotEmpty) {
+      if (hasError != null) {
+        hasError[0] = true;
+      }
+      var domain = defaults.keys.toList();
+      var range = defaults.values.toList();
+      // Build a substitution Phi mapping each uncompleted type variable to
+      // dynamic, and each completed type variable to its default.
+      for (TypeParameterElement parameter in partials.keys) {
+        domain.add(parameter);
+        range.add(DynamicTypeImpl.instance);
+      }
+      // Set the default for an uncompleted type variable (T extends B)
+      // to be Phi(B)
+      for (TypeParameterElement parameter in partials.keys) {
+        defaults[parameter] = Substitution.fromPairs(domain, range)
+            .substituteType(partials[parameter]);
+      }
+    }
+
+    List<DartType> orderedArguments =
+        typeFormals.map((p) => defaults[p]).toList();
+    return orderedArguments;
+  }
+
+  @override
+  bool isAssignableTo(DartType fromType, DartType toType) {
+    if (!NullSafetyUnderstandingFlag.isEnabled) {
+      fromType = NullabilityEliminator.perform(typeProvider, fromType);
+      toType = NullabilityEliminator.perform(typeProvider, toType);
+    }
+    return isAssignableTo2(fromType, toType);
+  }
+
+  bool isAssignableTo2(DartType fromType, DartType toType) {
+    // An actual subtype
+    if (isSubtypeOf2(fromType, toType)) {
+      return true;
+    }
+
+    // A call method tearoff
+    if (fromType is InterfaceType &&
+        !isNullable(fromType) &&
+        acceptsFunctionType(toType)) {
+      var callMethodType = getCallMethodType(fromType);
+      if (callMethodType != null && isAssignableTo2(callMethodType, toType)) {
+        return true;
+      }
+    }
+
+    // First make sure --no-implicit-casts disables all downcasts, including
+    // dynamic casts.
+    if (!implicitCasts) {
+      return false;
+    }
+
+    // Now handle NNBD default behavior, where we disable non-dynamic downcasts.
+    if (isNonNullableByDefault) {
+      return fromType.isDynamic;
+    }
+
+    // Don't allow implicit downcasts between function types
+    // and call method objects, as these will almost always fail.
+    if (fromType is FunctionType && getCallMethodType(toType) != null) {
+      return false;
+    }
+
+    // Don't allow a non-generic function where a generic one is expected. The
+    // former wouldn't know how to handle type arguments being passed to it.
+    // TODO(rnystrom): This same check also exists in FunctionTypeImpl.relate()
+    // but we don't always reliably go through that code path. This should be
+    // cleaned up to avoid the redundancy.
+    if (fromType is FunctionType &&
+        toType is FunctionType &&
+        fromType.typeFormals.isEmpty &&
+        toType.typeFormals.isNotEmpty) {
+      return false;
+    }
+
+    // If the subtype relation goes the other way, allow the implicit downcast.
+    if (isSubtypeOf2(toType, fromType)) {
+      // TODO(leafp,jmesserly): we emit warnings/hints for these in
+      // src/task/strong/checker.dart, which is a bit inconsistent. That
+      // code should be handled into places that use isAssignableTo, such as
+      // ErrorVerifier.
+      return true;
+    }
+
+    return false;
+  }
+
+  /// Return `true`  for things in the equivalence class of `Never`.
+  bool isBottom(DartType type) {
+    // BOTTOM(Never) is true
+    if (identical(type, NeverTypeImpl.instance)) {
+      return true;
+    }
+
+    // BOTTOM(X&T) is true iff BOTTOM(T)
+    // BOTTOM(X extends T) is true iff BOTTOM(T)
+    if (type is TypeParameterTypeImpl) {
+      var T = type.promotedBound;
+      if (T != null) {
+        return isBottom(T);
+      }
+
+      T = type.element.bound;
+      if (T != null) {
+        return isBottom(T);
+      }
+    }
+
+    // BOTTOM(T) is false otherwise
+    return false;
+  }
+
+  /// Defines an (almost) total order on bottom and `Null` types. This does not
+  /// currently consistently order two different type variables with the same
+  /// bound.
+  bool isMoreBottom(DartType T, DartType S) {
+    var T_impl = T as TypeImpl;
+    var S_impl = S as TypeImpl;
+
+    var T_nullability = T_impl.nullabilitySuffix;
+    var S_nullability = S_impl.nullabilitySuffix;
+
+    // MOREBOTTOM(Never, T) = true
+    if (identical(T, NeverTypeImpl.instance)) {
+      return true;
+    }
+
+    // MOREBOTTOM(T, Never) = false
+    if (identical(S, NeverTypeImpl.instance)) {
+      return false;
+    }
+
+    // MOREBOTTOM(Null, T) = true
+    if (T_nullability == NullabilitySuffix.none && T.isDartCoreNull) {
+      return true;
+    }
+
+    // MOREBOTTOM(T, Null) = false
+    if (S_nullability == NullabilitySuffix.none && S.isDartCoreNull) {
+      return false;
+    }
+
+    // MOREBOTTOM(T?, S?) = MOREBOTTOM(T, S)
+    if (T_nullability == NullabilitySuffix.question &&
+        S_nullability == NullabilitySuffix.question) {
+      var T2 = T_impl.withNullability(NullabilitySuffix.none);
+      var S2 = S_impl.withNullability(NullabilitySuffix.none);
+      return isMoreBottom(T2, S2);
+    }
+
+    // MOREBOTTOM(T, S?) = true
+    if (S_nullability == NullabilitySuffix.question) {
+      return true;
+    }
+
+    // MOREBOTTOM(T?, S) = false
+    if (T_nullability == NullabilitySuffix.question) {
+      return false;
+    }
+
+    // MOREBOTTOM(T*, S*) = MOREBOTTOM(T, S)
+    if (T_nullability == NullabilitySuffix.star &&
+        S_nullability == NullabilitySuffix.star) {
+      var T2 = T_impl.withNullability(NullabilitySuffix.none);
+      var S2 = S_impl.withNullability(NullabilitySuffix.none);
+      return isMoreBottom(T2, S2);
+    }
+
+    // MOREBOTTOM(T, S*) = true
+    if (S_nullability == NullabilitySuffix.star) {
+      return true;
+    }
+
+    // MOREBOTTOM(T*, S) = false
+    if (T_nullability == NullabilitySuffix.star) {
+      return false;
+    }
+
+    // Type parameters.
+    if (T is TypeParameterTypeImpl && S is TypeParameterTypeImpl) {
+      // We have eliminated the possibility that T_nullability or S_nullability
+      // is anything except none by this point.
+      assert(T_nullability == NullabilitySuffix.none);
+      assert(S_nullability == NullabilitySuffix.none);
+      var T_element = T.element;
+      var S_element = S.element;
+
+      // MOREBOTTOM(X&T, Y&S) = MOREBOTTOM(T, S)
+      var T_promotedBound = T.promotedBound;
+      var S_promotedBound = S.promotedBound;
+      if (T_promotedBound != null && S_promotedBound != null) {
+        return isMoreBottom(T_promotedBound, S_promotedBound);
+      }
+
+      // MOREBOTTOM(X&T, S) = true
+      if (T_promotedBound != null) {
+        return true;
+      }
+
+      // MOREBOTTOM(T, Y&S) = false
+      if (S_promotedBound != null) {
+        return false;
+      }
+
+      // MOREBOTTOM(X extends T, Y extends S) = MOREBOTTOM(T, S)
+      var T_bound = T_element.bound;
+      var S_bound = S_element.bound;
+      // The invariant of the larger algorithm that this is only called with
+      // types that satisfy `BOTTOM(T)` or `NULL(T)`, and all such types, if
+      // they are type variables, have bounds which themselves are
+      // `BOTTOM` or `NULL` types.
+      assert(T_bound != null);
+      assert(S_bound != null);
+      return isMoreBottom(T_bound, S_bound);
+    }
+
+    return false;
+  }
+
+  @override
+  bool isMoreSpecificThan(DartType t1, DartType t2) => isSubtypeOf2(t1, t2);
+
+  /// Defines a total order on top and Object types.
+  bool isMoreTop(DartType T, DartType S) {
+    var T_impl = T as TypeImpl;
+    var S_impl = S as TypeImpl;
+
+    var T_nullability = T_impl.nullabilitySuffix;
+    var S_nullability = S_impl.nullabilitySuffix;
+
+    // MORETOP(void, S) = true
+    if (identical(T, VoidTypeImpl.instance)) {
+      return true;
+    }
+
+    // MORETOP(T, void) = false
+    if (identical(S, VoidTypeImpl.instance)) {
+      return false;
+    }
+
+    // MORETOP(dynamic, S) = true
+    if (identical(T, DynamicTypeImpl.instance)) {
+      return true;
+    }
+
+    // MORETOP(T, dynamic) = false
+    if (identical(S, DynamicTypeImpl.instance)) {
+      return false;
+    }
+
+    // MORETOP(Object, S) = true
+    if (T_nullability == NullabilitySuffix.none && T.isDartCoreObject) {
+      return true;
+    }
+
+    // MORETOP(T, Object) = false
+    if (S_nullability == NullabilitySuffix.none && S.isDartCoreObject) {
+      return false;
+    }
+
+    // MORETOP(T*, S*) = MORETOP(T, S)
+    if (T_nullability == NullabilitySuffix.star &&
+        S_nullability == NullabilitySuffix.star) {
+      var T2 = T_impl.withNullability(NullabilitySuffix.none);
+      var S2 = S_impl.withNullability(NullabilitySuffix.none);
+      return isMoreTop(T2, S2);
+    }
+
+    // MORETOP(T, S*) = true
+    if (S_nullability == NullabilitySuffix.star) {
+      return true;
+    }
+
+    // MORETOP(T*, S) = false
+    if (T_nullability == NullabilitySuffix.star) {
+      return false;
+    }
+
+    // MORETOP(T?, S?) = MORETOP(T, S)
+    if (T_nullability == NullabilitySuffix.question &&
+        S_nullability == NullabilitySuffix.question) {
+      var T2 = T_impl.withNullability(NullabilitySuffix.none);
+      var S2 = S_impl.withNullability(NullabilitySuffix.none);
+      return isMoreTop(T2, S2);
+    }
+
+    // MORETOP(T, S?) = true
+    if (S_nullability == NullabilitySuffix.question) {
+      return true;
+    }
+
+    // MORETOP(T?, S) = false
+    if (T_nullability == NullabilitySuffix.question) {
+      return false;
+    }
+
+    // MORETOP(FutureOr<T>, FutureOr<S>) = MORETOP(T, S)
+    if (T is InterfaceType &&
+        T.isDartAsyncFutureOr &&
+        S is InterfaceType &&
+        S.isDartAsyncFutureOr) {
+      assert(T_nullability == NullabilitySuffix.none);
+      assert(S_nullability == NullabilitySuffix.none);
+      var T2 = T.typeArguments[0];
+      var S2 = S.typeArguments[0];
+      return isMoreTop(T2, S2);
+    }
+
+    return false;
+  }
+
+  /// Return `true` for things in the equivalence class of `Null`.
+  bool isNull(DartType type) {
+    var typeImpl = type as TypeImpl;
+    var nullabilitySuffix = typeImpl.nullabilitySuffix;
+
+    // NULL(Null) is true
+    // Also includes `Null?` and `Null*` from the rules below.
+    if (type.isDartCoreNull) {
+      return true;
+    }
+
+    // NULL(T?) is true iff NULL(T) or BOTTOM(T)
+    // NULL(T*) is true iff NULL(T) or BOTTOM(T)
+    // Cases for `Null?` and `Null*` are already checked above.
+    if (nullabilitySuffix == NullabilitySuffix.question ||
+        nullabilitySuffix == NullabilitySuffix.star) {
+      var T = typeImpl.withNullability(NullabilitySuffix.none);
+      return isBottom(T);
+    }
+
+    // NULL(T) is false otherwise
+    return false;
+  }
+
+  /// Return `true` for any type which is in the equivalence class of `Object`.
+  bool isObject(DartType type) {
+    TypeImpl typeImpl = type;
+    if (typeImpl.nullabilitySuffix != NullabilitySuffix.none) {
+      return false;
+    }
+
+    // OBJECT(Object) is true
+    if (type.isDartCoreObject) {
+      return true;
+    }
+
+    // OBJECT(FutureOr<T>) is OBJECT(T)
+    if (type is InterfaceType && type.isDartAsyncFutureOr) {
+      var T = type.typeArguments[0];
+      return isObject(T);
+    }
+
+    // OBJECT(T) is false otherwise
+    return false;
+  }
+
+  /// Check if [leftType] is a subtype of [rightType].
+  ///
+  /// Implements:
+  /// https://github.com/dart-lang/language
+  /// See `resources/type-system/subtyping.md`
+  @override
+  bool isSubtypeOf(DartType leftType, DartType rightType) {
+    if (!NullSafetyUnderstandingFlag.isEnabled) {
+      leftType = NullabilityEliminator.perform(typeProvider, leftType);
+      rightType = NullabilityEliminator.perform(typeProvider, rightType);
+    }
+    return isSubtypeOf2(leftType, rightType);
+  }
+
+  bool isSubtypeOf2(DartType leftType, DartType rightType) {
+    return _subtypeHelper.isSubtypeOf(leftType, rightType);
+  }
+
+  /// Return `true` for any type which is in the equivalence class of top types.
+  bool isTop(DartType type) {
+    // TOP(?) is true
+    if (identical(type, UnknownInferredType.instance)) {
+      return true;
+    }
+
+    // TOP(dynamic) is true
+    if (identical(type, DynamicTypeImpl.instance)) {
+      return true;
+    }
+
+    // TOP(void) is true
+    if (identical(type, VoidTypeImpl.instance)) {
+      return true;
+    }
+
+    var typeImpl = type as TypeImpl;
+    var nullabilitySuffix = typeImpl.nullabilitySuffix;
+
+    // TOP(T?) is true iff TOP(T) or OBJECT(T)
+    // TOP(T*) is true iff TOP(T) or OBJECT(T)
+    if (nullabilitySuffix == NullabilitySuffix.question ||
+        nullabilitySuffix == NullabilitySuffix.star) {
+      var T = typeImpl.withNullability(NullabilitySuffix.none);
+      return isTop(T) || isObject(T);
+    }
+
+    // TOP(FutureOr<T>) is TOP(T)
+    if (type is InterfaceType && type.isDartAsyncFutureOr) {
+      assert(nullabilitySuffix == NullabilitySuffix.none);
+      var T = type.typeArguments[0];
+      return isTop(T);
+    }
+
+    // TOP(T) is false otherwise
+    return false;
+  }
+
+  /// Returns the least closure of the given type [schema] with respect to `_`.
+  ///
+  /// The least closure of a type schema `P` with respect to `_` is defined as
+  /// `P` with every covariant occurrence of `_` replaced with `Object`, an
+  /// every contravariant occurrence of `_` replaced with `Null`.
+  ///
+  /// If the schema contains no instances of `_`, the original schema object is
+  /// returned to avoid unnecessary allocation.
+  ///
+  /// Note that the closure of a type schema is a proper type.
+  ///
+  /// Note that the least closure of a type schema is always a subtype of any
+  /// type which matches the schema.
+  DartType leastClosure(DartType schema) {
+    if (isNonNullableByDefault) {
+      return TypeSchemaEliminationVisitor.run(
+        topType: objectQuestion,
+        bottomType: NeverTypeImpl.instance,
+        isLeastClosure: true,
+        schema: schema,
+      );
+    } else {
+      return TypeSchemaEliminationVisitor.run(
+        topType: DynamicTypeImpl.instance,
+        bottomType: typeProvider.nullType,
+        isLeastClosure: true,
+        schema: schema,
+      );
+    }
+  }
+
+  /// Compute the canonical representation of [T].
+  ///
+  /// https://github.com/dart-lang/language
+  /// See `resources/type-system/normalization.md`
+  DartType normalize(DartType T) {
+    return NormalizeHelper(this).normalize(T);
+  }
+
+  @override
+  DartType refineBinaryExpressionType(DartType leftType, TokenType operator,
+      DartType rightType, DartType currentType) {
+    if (leftType is TypeParameterType && leftType.bound.isDartCoreNum) {
+      if (rightType == leftType || rightType.isDartCoreInt) {
+        if (operator == TokenType.PLUS ||
+            operator == TokenType.MINUS ||
+            operator == TokenType.STAR ||
+            operator == TokenType.PLUS_EQ ||
+            operator == TokenType.MINUS_EQ ||
+            operator == TokenType.STAR_EQ ||
+            operator == TokenType.PLUS_PLUS ||
+            operator == TokenType.MINUS_MINUS) {
+          if (isNonNullableByDefault) {
+            return promoteToNonNull(leftType as TypeImpl);
+          }
+          return leftType;
+        }
+      }
+      if (rightType.isDartCoreDouble) {
+        if (operator == TokenType.PLUS ||
+            operator == TokenType.MINUS ||
+            operator == TokenType.STAR ||
+            operator == TokenType.SLASH) {
+          InterfaceTypeImpl doubleType = typeProvider.doubleType;
+          if (isNonNullableByDefault) {
+            return promoteToNonNull(doubleType);
+          }
+          return doubleType;
+        }
+      }
+      return currentType;
+    }
+    // bool
+    if (operator == TokenType.AMPERSAND_AMPERSAND ||
+        operator == TokenType.BAR_BAR ||
+        operator == TokenType.EQ_EQ ||
+        operator == TokenType.BANG_EQ) {
+      if (isNonNullableByDefault) {
+        return promoteToNonNull(typeProvider.boolType);
+      }
+      return typeProvider.boolType;
+    }
+    if (leftType.isDartCoreInt) {
+      // int op double
+      if (operator == TokenType.MINUS ||
+          operator == TokenType.PERCENT ||
+          operator == TokenType.PLUS ||
+          operator == TokenType.STAR ||
+          operator == TokenType.MINUS_EQ ||
+          operator == TokenType.PERCENT_EQ ||
+          operator == TokenType.PLUS_EQ ||
+          operator == TokenType.STAR_EQ) {
+        if (rightType.isDartCoreDouble) {
+          InterfaceTypeImpl doubleType = typeProvider.doubleType;
+          if (isNonNullableByDefault) {
+            return promoteToNonNull(doubleType);
+          }
+          return doubleType;
+        }
+      }
+      // int op int
+      if (operator == TokenType.MINUS ||
+          operator == TokenType.PERCENT ||
+          operator == TokenType.PLUS ||
+          operator == TokenType.STAR ||
+          operator == TokenType.TILDE_SLASH ||
+          operator == TokenType.MINUS_EQ ||
+          operator == TokenType.PERCENT_EQ ||
+          operator == TokenType.PLUS_EQ ||
+          operator == TokenType.STAR_EQ ||
+          operator == TokenType.TILDE_SLASH_EQ ||
+          operator == TokenType.PLUS_PLUS ||
+          operator == TokenType.MINUS_MINUS) {
+        if (rightType.isDartCoreInt) {
+          InterfaceTypeImpl intType = typeProvider.intType;
+          if (isNonNullableByDefault) {
+            return promoteToNonNull(intType);
+          }
+          return intType;
+        }
+      }
+    }
+    // default
+    return currentType;
+  }
+
+  /// Return `true` if runtime types [T1] and [T2] are equal.
+  ///
+  /// nnbd/feature-specification.md#runtime-type-equality-operator
+  bool runtimeTypesEqual(DartType T1, DartType T2) {
+    return RuntimeTypeEqualityHelper(this).equal(T1, T2);
+  }
+
+  DartType toLegacyType(DartType type) {
+    if (isNonNullableByDefault) return type;
+    return NullabilityEliminator.perform(typeProvider, type);
+  }
+
+  /// Merges two types into a single type.
+  /// Compute the canonical representation of [T].
+  ///
+  /// https://github.com/dart-lang/language/
+  /// See `accepted/future-releases/nnbd/feature-specification.md`
+  /// See `#classes-defined-in-opted-in-libraries`
+  DartType topMerge(DartType T, DartType S) {
+    return TopMergeHelper(this).topMerge(T, S);
+  }
+
+  @override
+  DartType tryPromoteToType(DartType to, DartType from) {
+    // Allow promoting to a subtype, for example:
+    //
+    //     f(Base b) {
+    //       if (b is SubTypeOfBase) {
+    //         // promote `b` to SubTypeOfBase for this block
+    //       }
+    //     }
+    //
+    // This allows the variable to be used wherever the supertype (here `Base`)
+    // is expected, while gaining a more precise type.
+    if (isSubtypeOf2(to, from)) {
+      return to;
+    }
+    // For a type parameter `T extends U`, allow promoting the upper bound
+    // `U` to `S` where `S <: U`, yielding a type parameter `T extends S`.
+    if (from is TypeParameterType) {
+      if (isSubtypeOf2(to, from.bound ?? DynamicTypeImpl.instance)) {
+        var declaration = from.element.declaration;
+        return TypeParameterTypeImpl(
+          element: declaration,
+          nullabilitySuffix: from.nullabilitySuffix,
+          promotedBound: to,
+        );
+      }
+    }
+
+    return null;
+  }
+
+  void updateOptions({
+    @required bool implicitCasts,
+    @required bool strictInference,
+  }) {
+    this.implicitCasts = implicitCasts;
+    this.strictInference = strictInference;
+  }
+
+  List<DartType> _defaultTypeArguments(
+    List<TypeParameterElement> typeParameters,
+  ) {
+    return typeParameters.map((typeParameter) {
+      var typeParameterImpl = typeParameter as TypeParameterElementImpl;
+      return typeParameterImpl.defaultType;
+    }).toList();
+  }
+}
+
+class _TypeVariableEliminator extends Substitution {
+  final DartType _topType;
+  final DartType _bottomType;
+
+  _TypeVariableEliminator(
+    this._topType,
+    this._bottomType,
+  );
+
+  @override
+  DartType getSubstitute(TypeParameterElement parameter, bool upperBound) {
+    return upperBound ? _bottomType : _topType;
+  }
+}
diff --git a/pkg/analyzer/lib/src/dart/error/ffi_code.dart b/pkg/analyzer/lib/src/dart/error/ffi_code.dart
index 6020ed5..f2711d9 100644
--- a/pkg/analyzer/lib/src/dart/error/ffi_code.dart
+++ b/pkg/analyzer/lib/src/dart/error/ffi_code.dart
@@ -6,6 +6,10 @@
 import 'package:analyzer/src/error/analyzer_error_code.dart';
 import 'package:meta/meta.dart';
 
+// It is hard to visually separate each code's _doc comment_ from its published
+// _documentation comment_ when each is written as an end-of-line comment.
+// ignore_for_file: slash_for_doc_comments
+
 /// The diagnostic codes associated with `dart:ffi`.
 class FfiCode extends AnalyzerErrorCode {
   /**
diff --git a/pkg/analyzer/lib/src/dart/error/hint_codes.dart b/pkg/analyzer/lib/src/dart/error/hint_codes.dart
index 586a0a1..e96b66e 100644
--- a/pkg/analyzer/lib/src/dart/error/hint_codes.dart
+++ b/pkg/analyzer/lib/src/dart/error/hint_codes.dart
@@ -5,6 +5,10 @@
 import 'package:analyzer/error/error.dart';
 import 'package:analyzer/src/error/analyzer_error_code.dart';
 
+// It is hard to visually separate each code's _doc comment_ from its published
+// _documentation comment_ when each is written as an end-of-line comment.
+// ignore_for_file: slash_for_doc_comments
+
 /**
  * The hints and coding recommendations for best practices which are not
  * mentioned in the Dart Language Specification.
@@ -85,11 +89,11 @@
    */
   // #### Description
   //
-  // The analyzer produces this diagnostic when a catch clause is found that
-  // can't be executed because it’s after a catch clause of the form `catch (e)`
-  // or `on Object catch (e)`. The first catch clause that matches the thrown
-  // object is selected, and both of those forms will match any object, so no
-  // catch clauses that follow them will be selected.
+  // The analyzer produces this diagnostic when a `catch` clause is found that
+  // can't be executed because it’s after a `catch` clause of the form
+  // `catch (e)` or `on Object catch (e)`. The first `catch` clause that matches
+  // the thrown object is selected, and both of those forms will match any
+  // object, so no `catch` clauses that follow them will be selected.
   //
   // #### Examples
   //
@@ -147,10 +151,10 @@
    */
   // #### Description
   //
-  // The analyzer produces this diagnostic when a catch clause is found that
-  // can't be executed because it is after a catch clause that catches either
-  // the same type or a supertype of the clause's type. The first catch clause
-  // that matches the thrown object is selected, and the earlier clause l always
+  // The analyzer produces this diagnostic when a `catch` clause is found that
+  // can't be executed because it is after a `catch` clause that catches either
+  // the same type or a supertype of the clause's type. The first `catch` clause
+  // that matches the thrown object is selected, and the earlier clause always
   // matches anything matchable by the highlighted clause, so the highlighted
   // clause will never be selected.
   //
@@ -377,7 +381,7 @@
   //
   // The analyzer produces this diagnostic when an element in a non-constant set
   // is the same as a previous element in the same set. If two elements are the
-  // same, then the second value is  ignored, which makes having both elements
+  // same, then the second value is ignored, which makes having both elements
   // pointless and likely signals a bug.
   //
   // #### Example
@@ -416,7 +420,8 @@
   static const HintCode EQUAL_ELEMENTS_IN_SET = HintCode(
       'EQUAL_ELEMENTS_IN_SET',
       "Two elements in a set literal shouldn't be equal.",
-      correction: "Change or remove the duplicate element.");
+      correction: "Change or remove the duplicate element.",
+      hasPublishedDocs: true);
 
   /**
    * No parameters.
@@ -462,7 +467,8 @@
   // values are returned by an iterator.
   static const HintCode EQUAL_KEYS_IN_MAP = HintCode(
       'EQUAL_KEYS_IN_MAP', "Two keys in a map literal shouldn't be equal.",
-      correction: "Change or remove the duplicate key.");
+      correction: "Change or remove the duplicate key.",
+      hasPublishedDocs: true);
 
   /**
    * It is a bad practice for a source file in a package "lib" directory
@@ -599,7 +605,7 @@
   //
   // #### Examples
   //
-  // The following code produces this diagnostic because the constructor is not
+  // The following code produces this diagnostic because the constructor isn't
   // a `const` constructor:
   //
   // ```dart
@@ -1123,8 +1129,8 @@
   //
   // #### Common fixes
   //
-  // Add a return statement that makes the return value explicit, even if `null`
-  // is the appropriate value.
+  // Add a `return` statement that makes the return value explicit, even if
+  // `null` is the appropriate value.
   static const HintCode MISSING_RETURN = HintCode(
       'MISSING_RETURN',
       "This function has a return type of '{0}', but doesn't end with a "
@@ -1399,9 +1405,9 @@
   // #### Description
   //
   // The analyzer produces this diagnostic when the type following `on` in a
-  // catch clause is a nullable type. It isn't valid to specify a nullable type
-  // because it isn't possible to catch `null` (because it's a runtime error to
-  // throw `null`).
+  // `catch` clause is a nullable type. It isn't valid to specify a nullable
+  // type because it isn't possible to catch `null` (because it's a runtime
+  // error to throw `null`).
   //
   // #### Example
   //
@@ -1435,7 +1441,8 @@
       'NULLABLE_TYPE_IN_CATCH_CLAUSE',
       "A potentially nullable type can't be used in an 'on' clause because it "
           "isn't valid to throw a nullable expression.",
-      correction: "Try using a non-nullable type.");
+      correction: "Try using a non-nullable type.",
+      hasPublishedDocs: true);
 
   /**
    * Hint for classes that override equals, but not hashCode.
@@ -1631,10 +1638,10 @@
    */
   // #### Description
   //
-  // The analyzer produces this diagnostic when an as expression inside a
+  // The analyzer produces this diagnostic when an `as` expression inside a
   // [constant context](#constant-context) is found in code that has an SDK
-  // constraint whose lower bound is less than 2.3.2. Using an as expression in
-  // a [constant context](#constant-context) wasn't supported in earlier
+  // constraint whose lower bound is less than 2.3.2. Using an `as` expression
+  // in a [constant context](#constant-context) wasn't supported in earlier
   // versions, so this code won't be able to run against earlier versions of the
   // SDK.
   //
@@ -1668,8 +1675,8 @@
   // ```
   //
   // If you need to support older versions of the SDK, then either rewrite the
-  // code to not use an as expression, or change the code so that the as
-  // expression is not in a [constant context](#constant-context).:
+  // code to not use an `as` expression, or change the code so that the `as`
+  // expression isn't in a [constant context](#constant-context):
   //
   // ```dart
   // num x = 3;
@@ -1688,7 +1695,7 @@
    */
   // #### Description
   //
-  // The analyzer produces this diagnostic when any use of the `&`, `|` or `^`
+  // The analyzer produces this diagnostic when any use of the `&`, `|`, or `^`
   // operators on the class `bool` inside a
   // [constant context](#constant-context) is found in code that has an SDK
   // constraint whose lower bound is less than 2.3.2. Using these operators in a
@@ -1727,7 +1734,7 @@
   //
   // If you need to support older versions of the SDK, then either rewrite the
   // code to not use these operators, or change the code so that the expression
-  // is not in a [constant context](#constant-context).:
+  // isn't in a [constant context](#constant-context):
   //
   // ```dart
   // const bool a = true;
@@ -1787,7 +1794,7 @@
   //
   // If you need to support older versions of the SDK, then either rewrite the
   // code to not use the `==` operator, or change the code so that the
-  // expression is not in a [constant context](#constant-context).:
+  // expression isn't in a [constant context](#constant-context):
   //
   // ```dart
   // class C {}
@@ -1926,10 +1933,10 @@
    */
   // #### Description
   //
-  // The analyzer produces this diagnostic when an is expression inside a
+  // The analyzer produces this diagnostic when an `is` expression inside a
   // [constant context](#constant-context) is found in code that has an SDK
-  // constraint whose lower bound is less than 2.3.2. Using an is expression in
-  // a [constant context](#constant-context) wasn't supported in earlier
+  // constraint whose lower bound is less than 2.3.2. Using an `is` expression
+  // in a [constant context](#constant-context) wasn't supported in earlier
   // versions, so this code won't be able to run against earlier versions of the
   // SDK.
   //
@@ -1963,9 +1970,9 @@
   // ```
   //
   // If you need to support older versions of the SDK, then either rewrite the
-  // code to not use the is operator, or, if that's not possible, change the
-  // code so that the is expression is not in a
-  // [constant context](#constant-context).:
+  // code to not use the `is` operator, or, if that isn't possible, change the
+  // code so that the `is` expression isn't in a
+  // [constant context](#constant-context):
   //
   // ```dart
   // const x = 4;
@@ -2080,7 +2087,7 @@
       //    The type 'Never' wasn't supported until version 2.X.0, but this code
       //    is required to be able to run on earlier versions.
       'SDK_VERSION_NEVER',
-      "The type Never is not yet supported.");
+      "The type Never isn't yet supported.");
 
   /**
    * No parameters.
@@ -2191,8 +2198,8 @@
   // const b = [1, 2];
   // ```
   //
-  // If that's not possible, change the code so that the element is not in a
-  // [constant context](#constant-context).:
+  // If that isn't possible, change the code so that the element isn't in a
+  // [constant context](#constant-context):
   //
   // ```dart
   // const a = [1, 2];
@@ -2421,7 +2428,8 @@
           'UNNECESSARY_NULL_COMPARISON_FALSE',
           "The operand can't be null, so the condition is always false.",
           correction: "Try removing the condition, an enclosing condition, "
-              "or the whole conditional statement.");
+              "or the whole conditional statement.",
+          hasPublishedDocs: true);
 
   /**
    * No parameters.
@@ -2431,7 +2439,8 @@
           'UNNECESSARY_NULL_COMPARISON',
           'UNNECESSARY_NULL_COMPARISON_TRUE',
           "The operand can't be null, so the condition is always true.",
-          correction: "Remove the condition.");
+          correction: "Remove the condition.",
+          hasPublishedDocs: true);
 
   /**
    * Unnecessary type checks, the result is always false.
@@ -2461,9 +2470,9 @@
    */
   // #### Description
   //
-  // The analyzer produces this diagnostic when a catch clause is found, and
+  // The analyzer produces this diagnostic when a `catch` clause is found, and
   // neither the exception parameter nor the optional stack trace parameter are
-  // used in the catch block.
+  // used in the `catch` block.
   //
   // #### Examples
   //
@@ -2481,7 +2490,7 @@
   //
   // #### Common fixes
   //
-  // Remove the unused catch clause:
+  // Remove the unused `catch` clause:
   //
   // ```dart
   // void f() {
@@ -2509,7 +2518,7 @@
   // #### Description
   //
   // The analyzer produces this diagnostic when the stack trace parameter in a
-  // catch clause isn't referenced within the body of the catch block.
+  // `catch` clause isn't referenced within the body of the `catch` block.
   //
   // #### Examples
   //
diff --git a/pkg/analyzer/lib/src/dart/error/syntactic_errors.dart b/pkg/analyzer/lib/src/dart/error/syntactic_errors.dart
index 50f4dd5..8d03c94 100644
--- a/pkg/analyzer/lib/src/dart/error/syntactic_errors.dart
+++ b/pkg/analyzer/lib/src/dart/error/syntactic_errors.dart
@@ -2,6 +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.
 
+// It is hard to visually separate each code's _doc comment_ from its published
+// _documentation comment_ when each is written as an end-of-line comment.
+// ignore_for_file: slash_for_doc_comments
+
 /**
  * The errors produced during syntactic analysis (scanning and parsing).
  */
diff --git a/pkg/analyzer/lib/src/dart/error/todo_codes.dart b/pkg/analyzer/lib/src/dart/error/todo_codes.dart
index 22613dd..fe6ed97 100644
--- a/pkg/analyzer/lib/src/dart/error/todo_codes.dart
+++ b/pkg/analyzer/lib/src/dart/error/todo_codes.dart
@@ -4,6 +4,10 @@
 
 import 'package:analyzer/error/error.dart';
 
+// It is hard to visually separate each code's _doc comment_ from its published
+// _documentation comment_ when each is written as an end-of-line comment.
+// ignore_for_file: slash_for_doc_comments
+
 /**
  * The error code indicating a marker in code for work that needs to be finished
  * or revisited.
diff --git a/pkg/analyzer/lib/src/dart/micro/analysis_context.dart b/pkg/analyzer/lib/src/dart/micro/analysis_context.dart
index 60de756..2d3ee76 100644
--- a/pkg/analyzer/lib/src/dart/micro/analysis_context.dart
+++ b/pkg/analyzer/lib/src/dart/micro/analysis_context.dart
@@ -128,7 +128,7 @@
   }
 
   @override
-  noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation);
+  dynamic noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation);
 
   Workspace _buildWorkspace() {
     String path = contextRoot.root.path;
@@ -194,7 +194,7 @@
   }
 
   @override
-  noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation);
+  dynamic noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation);
 }
 
 class _UriConverterImpl implements UriConverter {
diff --git a/pkg/analyzer/lib/src/dart/micro/cider_byte_store.dart b/pkg/analyzer/lib/src/dart/micro/cider_byte_store.dart
index af6b3af..60e8d0f 100644
--- a/pkg/analyzer/lib/src/dart/micro/cider_byte_store.dart
+++ b/pkg/analyzer/lib/src/dart/micro/cider_byte_store.dart
@@ -4,26 +4,22 @@
 
 import 'package:collection/collection.dart';
 
-/**
- * Store of bytes associated with string keys and a hash.
- *
- * Each key must be not longer than 100 characters and consist of only `[a-z]`,
- * `[0-9]`, `.` and `_` characters. The key cannot be an empty string, the
- * literal `.`, or contain the sequence `..`.
- *
- * Note that associations are not guaranteed to be persistent. The value
- * associated with a key can change or become `null` at any point in time.
- */
+/// Store of bytes associated with string keys and a hash.
+///
+/// Each key must be not longer than 100 characters and consist of only `[a-z]`,
+/// `[0-9]`, `.` and `_` characters. The key cannot be an empty string, the
+/// literal `.`, or contain the sequence `..`.
+///
+/// Note that associations are not guaranteed to be persistent. The value
+/// associated with a key can change or become `null` at any point in time.
 abstract class CiderByteStore {
-  /**
-   * Return the bytes associated with the errors for given [key] and [signature].
-   * Return `null` if the association does not exist.
-   */
+  /// Return the bytes associated with the errors for given [key] and
+  /// [signature].
+  ///
+  /// Return `null` if the association does not exist.
   List<int> get(String key, List<int> signature);
 
-  /**
-   * Associate the given [bytes] with the [key] and [digest].
-   */
+  /// Associate the given [bytes] with the [key] and [digest].
   void put(String key, List<int> signature, List<int> bytes);
 }
 
diff --git a/pkg/analyzer/lib/src/dart/micro/library_analyzer.dart b/pkg/analyzer/lib/src/dart/micro/library_analyzer.dart
index 3eccdb9..44bc665f 100644
--- a/pkg/analyzer/lib/src/dart/micro/library_analyzer.dart
+++ b/pkg/analyzer/lib/src/dart/micro/library_analyzer.dart
@@ -19,11 +19,12 @@
 import 'package:analyzer/src/dart/element/element.dart';
 import 'package:analyzer/src/dart/element/inheritance_manager3.dart';
 import 'package:analyzer/src/dart/element/type_provider.dart';
+import 'package:analyzer/src/dart/element/type_system.dart';
 import 'package:analyzer/src/dart/micro/library_graph.dart';
-import 'package:analyzer/src/dart/micro/performance.dart';
 import 'package:analyzer/src/dart/resolver/flow_analysis_visitor.dart';
 import 'package:analyzer/src/dart/resolver/legacy_type_asserter.dart';
 import 'package:analyzer/src/dart/resolver/resolution_visitor.dart';
+import 'package:analyzer/src/dart/resolver/scope.dart';
 import 'package:analyzer/src/error/best_practices_verifier.dart';
 import 'package:analyzer/src/error/codes.dart';
 import 'package:analyzer/src/error/dart2js_verifier.dart';
@@ -45,13 +46,12 @@
 import 'package:analyzer/src/services/lint.dart';
 import 'package:analyzer/src/summary2/linked_element_factory.dart';
 import 'package:analyzer/src/task/strong/checker.dart';
+import 'package:analyzer/src/util/performance/operation_performance.dart';
 import 'package:analyzer/src/workspace/workspace.dart';
 import 'package:meta/meta.dart';
 import 'package:pub_semver/pub_semver.dart';
 
-/**
- * Analyzer of a single library.
- */
+/// Analyzer of a single library.
 class LibraryAnalyzer {
   /// A marker object used to prevent the initialization of
   /// [_versionConstraintFromPubspec] when the previous initialization attempt
@@ -79,11 +79,9 @@
   final List<UsedImportedElements> _usedImportedElementsList = [];
   final List<UsedLocalElements> _usedLocalElementsList = [];
 
-  /**
-   * Constants in the current library.
-   *
-   * TODO(scheglov) Remove after https://github.com/dart-lang/sdk/issues/31925
-   */
+  /// Constants in the current library.
+  ///
+  /// TODO(scheglov) Remove after https://github.com/dart-lang/sdk/issues/31925
   final Set<ConstantEvaluationTarget> _libraryConstants = {};
 
   final Set<ConstantEvaluationTarget> _constants = {};
@@ -107,13 +105,11 @@
 
   TypeSystemImpl get _typeSystem => _libraryElement.typeSystem;
 
-  /**
-   * Compute analysis results for all units of the library.
-   */
+  /// Compute analysis results for all units of the library.
   Map<FileState, UnitAnalysisResult> analyzeSync({
     @required String completionPath,
     @required int completionOffset,
-    @required CiderOperationPerformanceImpl performance,
+    @required OperationPerformanceImpl performance,
   }) {
     var forCompletion = completionPath != null;
     var units = <FileState, CompilationUnit>{};
@@ -175,15 +171,13 @@
     return results;
   }
 
-  /**
-   * Clear evaluation results for all constants before computing them again.
-   * The reason is described in https://github.com/dart-lang/sdk/issues/35940
-   *
-   * Otherwise, we reuse results, including errors are recorded only when
-   * we evaluate constants resynthesized from summaries.
-   *
-   * TODO(scheglov) Remove after https://github.com/dart-lang/sdk/issues/31925
-   */
+  /// Clear evaluation results for all constants before computing them again.
+  /// The reason is described in https://github.com/dart-lang/sdk/issues/35940
+  ///
+  /// Otherwise, we reuse results, including errors are recorded only when
+  /// we evaluate constants resynthesized from summaries.
+  ///
+  /// TODO(scheglov) Remove after https://github.com/dart-lang/sdk/issues/31925
   void _clearConstantEvaluationResults() {
     for (var constant in _libraryConstants) {
       if (constant is ConstFieldElementImpl_ofEnum) continue;
@@ -201,16 +195,14 @@
     unit.accept(constantVerifier);
   }
 
-  /**
-   * Compute [_constants] in all units.
-   */
+  /// Compute [_constants] in all units.
   void _computeConstants() {
     computeConstants(_typeProvider, _typeSystem, _declaredVariables,
         _constants.toList(), _analysisOptions.experimentStatus);
   }
 
   void _computeDiagnostics({
-    @required CiderOperationPerformanceImpl performance,
+    @required OperationPerformanceImpl performance,
     @required Map<FileState, CompilationUnit> units,
   }) {
     performance.run('computeVerifyErrors', (performance) {
@@ -412,10 +404,8 @@
     unit.accept(errorVerifier);
   }
 
-  /**
-   * Return a subset of the given [errors] that are not marked as ignored in
-   * the [file].
-   */
+  /// Return a subset of the given [errors] that are not marked as ignored in
+  /// the [file].
   List<AnalysisError> _filterIgnoredErrors(
       FileState file, List<AnalysisError> errors) {
     if (errors.isEmpty) {
@@ -460,9 +450,7 @@
     });
   }
 
-  /**
-   * Catch all exceptions from the `getFileContent` function.
-   */
+  /// Catch all exceptions from the `getFileContent` function.
   String _getFileContent(String path) {
     try {
       return getFileContent(path);
@@ -488,10 +476,8 @@
     return workspace?.findPackageFor(libraryPath);
   }
 
-  /**
-   * Return the name of the library that the given part is declared to be a
-   * part of, or `null` if the part does not contain a part-of directive.
-   */
+  /// Return the name of the library that the given part is declared to be a
+  /// part of, or `null` if the part does not contain a part-of directive.
   _NameOrSource _getPartLibraryNameOrUri(Source partSource,
       CompilationUnit partUnit, List<Directive> directivesToResolve) {
     for (Directive directive in partUnit.directives) {
@@ -522,16 +508,12 @@
     return false;
   }
 
-  /**
-   * Return `true` if the given [source] is a library.
-   */
+  /// Return `true` if the given [source] is a library.
   bool _isLibrarySource(Source source) {
     return _isLibraryUri(source.uri);
   }
 
-  /**
-   * Return a  parsed unresolved [CompilationUnit].
-   */
+  /// Return a  parsed unresolved [CompilationUnit].
   CompilationUnit _parse(FileState file) {
     AnalysisErrorListener errorListener = _getErrorListener(file);
     String content = _getFileContent(file.path);
@@ -728,10 +710,8 @@
     }
   }
 
-  /**
-   * Return the result of resolve the given [uriContent], reporting errors
-   * against the [uriLiteral].
-   */
+  /// Return the result of resolve the given [uriContent], reporting errors
+  /// against the [uriLiteral].
   Source _resolveUri(FileState file, bool isImport, StringLiteral uriLiteral,
       String uriContent) {
     UriValidationCode code =
@@ -779,10 +759,8 @@
     }
   }
 
-  /**
-   * Check the given [directive] to see if the referenced source exists and
-   * report an error if it does not.
-   */
+  /// Check the given [directive] to see if the referenced source exists and
+  /// report an error if it does not.
   void _validateUriBasedDirective(
       FileState file, UriBasedDirectiveImpl directive) {
     Source source = directive.uriSource;
@@ -806,10 +784,8 @@
         .reportErrorForNode(errorCode, uriLiteral, [directive.uriContent]);
   }
 
-  /**
-   * Check each directive in the given [unit] to see if the referenced source
-   * exists and report an error if it does not.
-   */
+  /// Check each directive in the given [unit] to see if the referenced source
+  /// exists and report an error if it does not.
   void _validateUriBasedDirectives(FileState file, CompilationUnit unit) {
     for (Directive directive in unit.directives) {
       if (directive is UriBasedDirective) {
@@ -818,10 +794,8 @@
     }
   }
 
-  /**
-   * Return `true` if the given [source] refers to a file that is assumed to be
-   * generated.
-   */
+  /// Return `true` if the given [source] refers to a file that is assumed to be
+  /// generated.
   static bool _isGenerated(Source source) {
     if (source == null) {
       return false;
@@ -845,9 +819,7 @@
   }
 }
 
-/**
- * Analysis result for single file.
- */
+/// Analysis result for single file.
 class UnitAnalysisResult {
   final FileState file;
   final CompilationUnit unit;
@@ -856,9 +828,7 @@
   UnitAnalysisResult(this.file, this.unit, this.errors);
 }
 
-/**
- * Either the name or the source associated with a part-of directive.
- */
+/// Either the name or the source associated with a part-of directive.
 class _NameOrSource {
   final String name;
   final Source source;
diff --git a/pkg/analyzer/lib/src/dart/micro/library_graph.dart b/pkg/analyzer/lib/src/dart/micro/library_graph.dart
index 059515c..1b818ef 100644
--- a/pkg/analyzer/lib/src/dart/micro/library_graph.dart
+++ b/pkg/analyzer/lib/src/dart/micro/library_graph.dart
@@ -14,7 +14,6 @@
 import 'package:analyzer/file_system/file_system.dart';
 import 'package:analyzer/src/dart/analysis/experiments.dart';
 import 'package:analyzer/src/dart/analysis/feature_set_provider.dart';
-import 'package:analyzer/src/dart/analysis/performance_logger.dart';
 import 'package:analyzer/src/dart/analysis/unlinked_api_signature.dart';
 import 'package:analyzer/src/dart/ast/ast.dart';
 import 'package:analyzer/src/dart/micro/cider_byte_store.dart';
@@ -30,7 +29,9 @@
 import 'package:analyzer/src/summary/link.dart' as graph
     show DependencyWalker, Node;
 import 'package:analyzer/src/summary2/informative_data.dart';
+import 'package:analyzer/src/util/performance/operation_performance.dart';
 import 'package:convert/convert.dart';
+import 'package:meta/meta.dart';
 
 /// Ensure that the [FileState.libraryCycle] for the [file] and anything it
 /// depends on is computed.
@@ -42,19 +43,13 @@
 class FileState {
   final FileSystemState _fsState;
 
-  /**
-   * The path of the file.
-   */
+  /// The path of the file.
   final String path;
 
-  /**
-   * The URI of the file.
-   */
+  /// The URI of the file.
   final Uri uri;
 
-  /**
-   * The [Source] of the file with the [uri].
-   */
+  /// The [Source] of the file with the [uri].
   final Source source;
 
   /// Files that reference this file.
@@ -167,10 +162,12 @@
     return unit;
   }
 
-  void refresh() {
+  void refresh({
+    @required OperationPerformanceImpl performance,
+  }) {
     _fsState.testView.refreshedFiles.add(path);
 
-    _fsState.timers.digest.run(() {
+    performance.run('digest', (_) {
       _digest = utf8.encode(_fsState.getFileDigest(path));
       _exists = _digest.isNotEmpty;
     });
@@ -183,19 +180,21 @@
       bytes = _fsState._byteStore.get(unlinkedKey, _digest);
 
       if (bytes == null || bytes.isEmpty) {
-        var content = _fsState.timers.read.run(() {
+        var content = performance.run('content', (_) {
           return getContent();
         });
-        var unit = _fsState.timers.parse.run(() {
+
+        var unit = performance.run('parse', (_) {
           return parse(AnalysisErrorListener.NULL_LISTENER, content);
         });
-        _fsState.timers.unlinked.run(() {
+
+        performance.run('unlinked', (_) {
           var unlinkedBuilder = serializeAstCiderUnlinked(_digest, unit);
           bytes = unlinkedBuilder.toBuffer();
           _fsState._byteStore.put(unlinkedKey, _digest, bytes);
         });
 
-        _fsState.timers.prefetch.run(() {
+        performance.run('prefetch', (_) {
           unlinked2 = CiderUnlinkedUnit.fromBuffer(bytes).unlinkedUnit;
           _prefetchDirectReferences(unlinked2);
         });
@@ -208,19 +207,28 @@
 
     // Build the graph.
     for (var directive in unlinked2.imports) {
-      var file = _fileForRelativeUri(directive.uri);
+      var file = _fileForRelativeUri(
+        relativeUri: directive.uri,
+        performance: performance,
+      );
       if (file != null) {
         importedFiles.add(file);
       }
     }
     for (var directive in unlinked2.exports) {
-      var file = _fileForRelativeUri(directive.uri);
+      var file = _fileForRelativeUri(
+        relativeUri: directive.uri,
+        performance: performance,
+      );
       if (file != null) {
         exportedFiles.add(file);
       }
     }
     for (var uri in unlinked2.parts) {
-      var file = _fileForRelativeUri(uri);
+      var file = _fileForRelativeUri(
+        relativeUri: uri,
+        performance: performance,
+      );
       if (file != null) {
         partedFiles.add(file);
       }
@@ -228,7 +236,10 @@
     if (unlinked2.hasPartOfDirective) {
       var uri = unlinked2.partOfUri;
       if (uri.isNotEmpty) {
-        partOfLibrary = _fileForRelativeUri(uri);
+        partOfLibrary = _fileForRelativeUri(
+          relativeUri: uri,
+          performance: performance,
+        );
         if (partOfLibrary != null) {
           directReferencedFiles.add(partOfLibrary);
         }
@@ -250,7 +261,10 @@
     return path;
   }
 
-  FileState _fileForRelativeUri(String relativeUri) {
+  FileState _fileForRelativeUri({
+    @required String relativeUri,
+    @required OperationPerformanceImpl performance,
+  }) {
     if (relativeUri.isEmpty) {
       return null;
     }
@@ -262,7 +276,10 @@
       return null;
     }
 
-    var file = _fsState.getFileForUri(absoluteUri);
+    var file = _fsState.getFileForUri(
+      uri: absoluteUri,
+      performance: performance,
+    );
     if (file == null) {
       return null;
     }
@@ -378,18 +395,15 @@
 }
 
 class FileSystemState {
-  final PerformanceLog _logger;
   final ResourceProvider _resourceProvider;
   final CiderByteStore _byteStore;
   final SourceFactory _sourceFactory;
   final AnalysisOptions _analysisOptions;
   final Uint32List _linkedSalt;
 
-  /**
-   * A function that returns the digest for a file as a String. The function
-   * returns a non null value, returns an empty string if file does
-   * not exist/has no contents.
-   */
+  /// A function that returns the digest for a file as a String. The function
+  /// returns a non null value, returns an empty string if file does
+  /// not exist/has no contents.
   final String Function(String path) getFileDigest;
 
   final Map<String, FileState> _pathToFile = {};
@@ -397,18 +411,15 @@
 
   final FeatureSetProvider featureSetProvider;
 
-  /**
-   * A function that fetches the given list of files. This function can be used
-   * to batch file reads in systems where file fetches are expensive.
-   */
+  /// A function that fetches the given list of files. This function can be used
+  /// to batch file reads in systems where file fetches are expensive.
   final void Function(List<String> paths) prefetchFiles;
 
-  final FileSystemStateTimers timers = FileSystemStateTimers();
+  final FileSystemStateTimers timers2 = FileSystemStateTimers();
 
   final FileSystemStateTestView testView = FileSystemStateTestView();
 
   FileSystemState(
-    this._logger,
     this._resourceProvider,
     this._byteStore,
     this._sourceFactory,
@@ -442,7 +453,10 @@
     }
   }
 
-  FileState getFileForPath(String path) {
+  FileState getFileForPath({
+    @required String path,
+    @required OperationPerformanceImpl performance,
+  }) {
     var file = _pathToFile[path];
     if (file == null) {
       var fileUri = _resourceProvider.pathContext.toUri(path);
@@ -456,12 +470,19 @@
       _pathToFile[path] = file;
       _uriToFile[uri] = file;
 
-      file.refresh();
+      performance.run('refresh', (performance) {
+        file.refresh(
+          performance: performance,
+        );
+      });
     }
     return file;
   }
 
-  FileState getFileForUri(Uri uri) {
+  FileState getFileForUri({
+    @required Uri uri,
+    @required OperationPerformanceImpl performance,
+  }) {
     FileState file = _uriToFile[uri];
     if (file == null) {
       var source = _sourceFactory.forUri2(uri);
@@ -474,7 +495,9 @@
       _pathToFile[path] = file;
       _uriToFile[uri] = file;
 
-      file.refresh();
+      file.refresh(
+        performance: performance,
+      );
     }
     return file;
   }
@@ -486,18 +509,6 @@
     }
     return source.fullName;
   }
-
-  void logStatistics() {
-    _logger.writeln(
-      '[files: ${_pathToFile.length}]'
-      '[digest: ${timers.digest.timer.elapsedMilliseconds} ms]'
-      '[read: ${timers.read.timer.elapsedMilliseconds} ms]'
-      '[parse: ${timers.parse.timer.elapsedMilliseconds} ms]'
-      '[unlinked: ${timers.unlinked.timer.elapsedMilliseconds} ms]'
-      '[prefetch: ${timers.prefetch.timer.elapsedMilliseconds} ms]',
-    );
-    timers.reset();
-  }
 }
 
 class FileSystemStateTestView {
@@ -583,7 +594,7 @@
   _FakeSource(this.fullName, this.uri);
 
   @override
-  noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation);
+  dynamic noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation);
 }
 
 /// Node in [_LibraryWalker].
diff --git a/pkg/analyzer/lib/src/dart/micro/performance.dart b/pkg/analyzer/lib/src/dart/micro/performance.dart
index 5a398f2..cf591ff 100644
--- a/pkg/analyzer/lib/src/dart/micro/performance.dart
+++ b/pkg/analyzer/lib/src/dart/micro/performance.dart
@@ -2,155 +2,8 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'package:meta/meta.dart';
+import 'package:analyzer/src/util/performance/operation_performance.dart';
 
 /// The performance of an operation.
-abstract class CiderOperationPerformance {
-  /// The children operation, might be empty.
-  List<CiderOperationPerformance> get children;
-
-  /// The duration of the operation itself and its children.
-  Duration get elapsed;
-
-  /// The duration of the operation itself.
-  Duration get elapsedSelf;
-
-  /// The name of the operation.
-  String get name;
-
-  CiderOperationPerformance getChild(String name);
-
-  /// Write this operation and its children into the [buffer].
-  void write({
-    @required StringBuffer buffer,
-    String indent = '',
-  });
-}
-
-class CiderOperationPerformanceFixed implements CiderOperationPerformance {
-  @override
-  final String name;
-
-  @override
-  final Duration elapsedSelf;
-
-  CiderOperationPerformanceFixed(this.name, this.elapsedSelf);
-
-  @override
-  List<CiderOperationPerformance> get children => const [];
-
-  @override
-  Duration get elapsed => elapsedSelf;
-
-  @override
-  CiderOperationPerformance getChild(String name) {
-    return null;
-  }
-
-  @override
-  String toString() {
-    return '(name: $name, elapsed: $elapsed)';
-  }
-
-  @override
-  void write({StringBuffer buffer, String indent = ''}) {
-    buffer.writeln('$indent${toString()}');
-  }
-}
-
-class CiderOperationPerformanceImpl implements CiderOperationPerformance {
-  @override
-  final String name;
-
-  final Stopwatch _timer = Stopwatch();
-  final List<CiderOperationPerformance> _children = [];
-
-  CiderOperationPerformanceImpl(this.name);
-
-  @override
-  List<CiderOperationPerformance> get children {
-    return _children;
-  }
-
-  @override
-  Duration get elapsed {
-    return _timer.elapsed;
-  }
-
-  @override
-  Duration get elapsedSelf {
-    return elapsed - _elapsedChildren;
-  }
-
-  Duration get _elapsedChildren {
-    return children.fold<Duration>(
-      Duration.zero,
-      (sum, child) => sum + child.elapsed,
-    );
-  }
-
-  /// Add a new child with the known elapsed time.
-  ///
-  /// This method is used when we already measure performance using some other
-  /// mechanism, but want to add it to this performance hierarchy.
-  void addChildFixed(String name, Duration elapsed) {
-    _children.add(
-      CiderOperationPerformanceFixed(name, elapsed),
-    );
-  }
-
-  @override
-  CiderOperationPerformance getChild(String name) {
-    return children.firstWhere(
-      (child) => child.name == name,
-      orElse: () => null,
-    );
-  }
-
-  /// Run the [operation] as a new child.
-  T run<T>(
-    String name,
-    T Function(CiderOperationPerformanceImpl) operation,
-  ) {
-    var child = CiderOperationPerformanceImpl(name);
-    _children.add(child);
-    child._timer.start();
-
-    try {
-      return operation(child);
-    } finally {
-      child._timer.stop();
-    }
-  }
-
-  /// Run the [operation] as a new child.
-  Future<T> runAsync<T>(
-    String name,
-    Future<T> Function(CiderOperationPerformanceImpl) operation,
-  ) async {
-    var child = CiderOperationPerformanceImpl(name);
-    _children.add(child);
-    child._timer.start();
-
-    try {
-      return await operation(child);
-    } finally {
-      child._timer.stop();
-    }
-  }
-
-  @override
-  String toString() {
-    return '(name: $name, elapsed: $elapsed, elapsedSelf: $elapsedSelf)';
-  }
-
-  @override
-  void write({StringBuffer buffer, String indent = ''}) {
-    buffer.writeln('$indent${toString()}');
-
-    var childIndent = '$indent  ';
-    for (var child in children) {
-      child.write(buffer: buffer, indent: childIndent);
-    }
-  }
-}
+@Deprecated('Use OperationPerformance')
+abstract class CiderOperationPerformance implements OperationPerformance {}
diff --git a/pkg/analyzer/lib/src/dart/micro/resolve_file.dart b/pkg/analyzer/lib/src/dart/micro/resolve_file.dart
index 8e34140..c496128 100644
--- a/pkg/analyzer/lib/src/dart/micro/resolve_file.dart
+++ b/pkg/analyzer/lib/src/dart/micro/resolve_file.dart
@@ -22,7 +22,6 @@
 import 'package:analyzer/src/dart/micro/cider_byte_store.dart';
 import 'package:analyzer/src/dart/micro/library_analyzer.dart';
 import 'package:analyzer/src/dart/micro/library_graph.dart';
-import 'package:analyzer/src/dart/micro/performance.dart';
 import 'package:analyzer/src/generated/engine.dart'
     show AnalysisEngine, AnalysisOptionsImpl;
 import 'package:analyzer/src/generated/source.dart';
@@ -34,6 +33,7 @@
 import 'package:analyzer/src/summary2/linked_element_factory.dart';
 import 'package:analyzer/src/summary2/reference.dart';
 import 'package:analyzer/src/task/options.dart';
+import 'package:analyzer/src/util/performance/operation_performance.dart';
 import 'package:analyzer/src/workspace/workspace.dart';
 import 'package:meta/meta.dart';
 import 'package:yaml/yaml.dart';
@@ -58,10 +58,8 @@
    */
   final String Function(String path) getFileDigest;
 
-  /**
-   * A function that fetches the given list of files. This function can be used
-   * to batch file reads in systems where file fetches are expensive.
-   */
+  /// A function that fetches the given list of files. This function can be used
+  /// to batch file reads in systems where file fetches are expensive.
   final void Function(List<String> paths) prefetchFiles;
 
   final Workspace workspace;
@@ -149,11 +147,11 @@
 
   ErrorsResult getErrors({
     @required String path,
-    CiderOperationPerformanceImpl performance,
+    OperationPerformanceImpl performance,
   }) {
     _throwIfNotAbsoluteNormalizedPath(path);
 
-    performance ??= CiderOperationPerformanceImpl('<default>');
+    performance ??= OperationPerformanceImpl('<default>');
 
     return _withLibraryContextReset(() {
       return logger.run('Get errors for $path', () {
@@ -207,7 +205,7 @@
   @deprecated
   ErrorsResult getErrors2({
     @required String path,
-    CiderOperationPerformanceImpl performance,
+    OperationPerformanceImpl performance,
   }) {
     return getErrors(
       path: path,
@@ -217,32 +215,50 @@
 
   FileContext getFileContext({
     @required String path,
-    @required CiderOperationPerformanceImpl performance,
+    @required OperationPerformanceImpl performance,
   }) {
     return performance.run('fileContext', (performance) {
-      var analysisOptions = _getAnalysisOptions(path);
-      _createContext(path, analysisOptions);
+      var analysisOptions = performance.run('analysisOptions', (_) {
+        return _getAnalysisOptions(path);
+      });
 
-      var file = fsState.getFileForPath(path);
+      performance.run('createContext', (_) {
+        _createContext(path, analysisOptions);
+      });
+
+      var file = performance.run('fileForPath', (performance) {
+        return fsState.getFileForPath(
+          path: path,
+          performance: performance,
+        );
+      });
+
       return FileContext(analysisOptions, file);
     });
   }
 
-  String getLibraryLinkedSignature(String path) {
+  String getLibraryLinkedSignature({
+    @required String path,
+    @required OperationPerformanceImpl performance,
+  }) {
     _throwIfNotAbsoluteNormalizedPath(path);
 
-    var file = fsState.getFileForPath(path);
+    var file = fsState.getFileForPath(
+      path: path,
+      performance: performance,
+    );
+
     return file.libraryCycle.signatureStr;
   }
 
   ResolvedUnitResult resolve({
     int completionOffset,
     @required String path,
-    CiderOperationPerformanceImpl performance,
+    OperationPerformanceImpl performance,
   }) {
     _throwIfNotAbsoluteNormalizedPath(path);
 
-    performance ??= CiderOperationPerformanceImpl('<default>');
+    performance ??= OperationPerformanceImpl('<default>');
 
     return _withLibraryContextReset(() {
       return logger.run('Resolve $path', () {
@@ -308,7 +324,7 @@
   ResolvedUnitResult resolve2({
     int completionOffset,
     @required String path,
-    CiderOperationPerformanceImpl performance,
+    OperationPerformanceImpl performance,
   }) {
     return resolve(
       completionOffset: completionOffset,
@@ -348,7 +364,6 @@
       );
 
       fsState = FileSystemState(
-        logger,
         resourceProvider,
         byteStore,
         sourceFactory,
diff --git a/pkg/analyzer/lib/src/dart/resolver/assignment_expression_resolver.dart b/pkg/analyzer/lib/src/dart/resolver/assignment_expression_resolver.dart
index 15f53c7..5ae37cd 100644
--- a/pkg/analyzer/lib/src/dart/resolver/assignment_expression_resolver.dart
+++ b/pkg/analyzer/lib/src/dart/resolver/assignment_expression_resolver.dart
@@ -11,6 +11,7 @@
 import 'package:analyzer/src/dart/ast/ast.dart';
 import 'package:analyzer/src/dart/ast/token.dart';
 import 'package:analyzer/src/dart/element/type.dart';
+import 'package:analyzer/src/dart/element/type_system.dart';
 import 'package:analyzer/src/dart/resolver/flow_analysis_visitor.dart';
 import 'package:analyzer/src/dart/resolver/invocation_inference_helper.dart';
 import 'package:analyzer/src/dart/resolver/resolution_result.dart';
@@ -18,7 +19,6 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:analyzer/src/error/nullable_dereference_verifier.dart';
 import 'package:analyzer/src/generated/resolver.dart';
-import 'package:analyzer/src/generated/type_system.dart';
 import 'package:analyzer/src/task/strong/checker.dart';
 import 'package:meta/meta.dart';
 
@@ -84,12 +84,10 @@
             : node.staticType);
   }
 
-  /**
-   * Set the static type of [node] to be the least upper bound of the static
-   * types of subexpressions [expr1] and [expr2].
-   *
-   * TODO(scheglov) this is duplicate
-   */
+  /// Set the static type of [node] to be the least upper bound of the static
+  /// types of subexpressions [expr1] and [expr2].
+  ///
+  /// TODO(scheglov) this is duplicate
   void _analyzeLeastUpperBound(
       Expression node, Expression expr1, Expression expr2,
       {bool read = false}) {
@@ -99,12 +97,10 @@
     _analyzeLeastUpperBoundTypes(node, staticType1, staticType2);
   }
 
-  /**
-   * Set the static type of [node] to be the least upper bound of the static
-   * types [staticType1] and [staticType2].
-   *
-   * TODO(scheglov) this is duplicate
-   */
+  /// Set the static type of [node] to be the least upper bound of the static
+  /// types [staticType1] and [staticType2].
+  ///
+  /// TODO(scheglov) this is duplicate
   void _analyzeLeastUpperBoundTypes(
       Expression node, DartType staticType1, DartType staticType2) {
     // TODO(brianwilkerson) Determine whether this can still happen.
@@ -122,25 +118,21 @@
     _inferenceHelper.recordStaticType(node, staticType);
   }
 
-  /**
-   * Gets the definite type of expression, which can be used in cases where
-   * the most precise type is desired, for example computing the least upper
-   * bound.
-   *
-   * See [getExpressionType] for more information. Without strong mode, this is
-   * equivalent to [_getStaticType].
-   *
-   * TODO(scheglov) this is duplicate
-   */
+  /// Gets the definite type of expression, which can be used in cases where
+  /// the most precise type is desired, for example computing the least upper
+  /// bound.
+  ///
+  /// See [getExpressionType] for more information. Without strong mode, this is
+  /// equivalent to [_getStaticType].
+  ///
+  /// TODO(scheglov) this is duplicate
   DartType _getExpressionType(Expression expr, {bool read = false}) =>
       getExpressionType(expr, _typeSystem, _typeProvider, read: read);
 
-  /**
-   * Return the static type of the given [expression] that is to be used for
-   * type analysis.
-   *
-   * TODO(scheglov) this is duplicate
-   */
+  /// Return the static type of the given [expression] that is to be used for
+  /// type analysis.
+  ///
+  /// TODO(scheglov) this is duplicate
   DartType _getStaticType1(Expression expression, {bool read = false}) {
     if (expression is NullLiteral) {
       return _typeProvider.nullType;
@@ -149,11 +141,9 @@
     return _resolveTypeParameter(type);
   }
 
-  /**
-   * Return the static type of the given [expression].
-   *
-   * TODO(scheglov) this is duplicate
-   */
+  /// Return the static type of the given [expression].
+  ///
+  /// TODO(scheglov) this is duplicate
   DartType _getStaticType2(Expression expression, {bool read = false}) {
     DartType type;
     if (read) {
@@ -179,10 +169,10 @@
     return type;
   }
 
-  /// Return the non-nullable variant of the [type] if NNBD is enabled, otherwise
-  /// return the type itself.
+  /// Return the non-nullable variant of the [type] if null safety is enabled,
+  /// otherwise return the type itself.
   ///
-  /// TODO(scheglov) this is duplicate
+  // TODO(scheglov) this is duplicate
   DartType _nonNullable(DartType type) {
     if (_isNonNullableByDefault) {
       return _typeSystem.promoteToNonNull(type);
@@ -300,21 +290,16 @@
     _resolver.nullShortingTermination(node);
   }
 
-  /**
-   * If the given [type] is a type parameter, resolve it to the type that should
-   * be used when looking up members. Otherwise, return the original type.
-   *
-   * TODO(scheglov) this is duplicate
-   */
+  /// If the given [type] is a type parameter, resolve it to the type that
+  /// should be used when looking up members. Otherwise, return the original
+  /// type.
+  // TODO(scheglov) this is duplicate
   DartType _resolveTypeParameter(DartType type) =>
       type?.resolveToBound(_typeProvider.objectType);
 
-  /**
-   * Return `true` if we should report an error for the lookup [result] on
-   * the [type].
-   *
-   * TODO(scheglov) this is duplicate
-   */
+  /// Return `true` if we should report an error for the lookup [result] on
+  /// the [type].
+  // TODO(scheglov) this is duplicate
   bool _shouldReportInvalidMember(DartType type, ResolutionResult result) {
     if (result.isNone && type != null && !type.isDynamic) {
       if (_typeSystem.isNonNullableByDefault &&
diff --git a/pkg/analyzer/lib/src/dart/resolver/ast_rewrite.dart b/pkg/analyzer/lib/src/dart/resolver/ast_rewrite.dart
index 6a42394..a2709ff 100644
--- a/pkg/analyzer/lib/src/dart/resolver/ast_rewrite.dart
+++ b/pkg/analyzer/lib/src/dart/resolver/ast_rewrite.dart
@@ -9,7 +9,6 @@
 import 'package:analyzer/src/dart/ast/utilities.dart';
 import 'package:analyzer/src/dart/resolver/scope.dart';
 import 'package:analyzer/src/error/codes.dart';
-import 'package:analyzer/src/generated/resolver.dart';
 
 /// Helper for [MethodInvocation]s into [InstanceCreationExpression] to support
 /// the optional `new` and `const` feature, or [ExtensionOverride].
diff --git a/pkg/analyzer/lib/src/dart/resolver/binary_expression_resolver.dart b/pkg/analyzer/lib/src/dart/resolver/binary_expression_resolver.dart
index 0c70edc..818e4c5 100644
--- a/pkg/analyzer/lib/src/dart/resolver/binary_expression_resolver.dart
+++ b/pkg/analyzer/lib/src/dart/resolver/binary_expression_resolver.dart
@@ -10,6 +10,7 @@
 import 'package:analyzer/error/listener.dart';
 import 'package:analyzer/src/dart/ast/ast.dart';
 import 'package:analyzer/src/dart/element/type.dart';
+import 'package:analyzer/src/dart/element/type_system.dart';
 import 'package:analyzer/src/dart/resolver/flow_analysis_visitor.dart';
 import 'package:analyzer/src/dart/resolver/invocation_inference_helper.dart';
 import 'package:analyzer/src/dart/resolver/resolution_result.dart';
@@ -17,7 +18,6 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:analyzer/src/generated/resolver.dart';
 import 'package:analyzer/src/generated/type_promotion_manager.dart';
-import 'package:analyzer/src/generated/type_system.dart';
 import 'package:analyzer/src/task/strong/checker.dart';
 import 'package:meta/meta.dart';
 
diff --git a/pkg/analyzer/lib/src/dart/resolver/body_inference_context.dart b/pkg/analyzer/lib/src/dart/resolver/body_inference_context.dart
index 3af9e12..6824312 100644
--- a/pkg/analyzer/lib/src/dart/resolver/body_inference_context.dart
+++ b/pkg/analyzer/lib/src/dart/resolver/body_inference_context.dart
@@ -8,8 +8,7 @@
 import 'package:analyzer/dart/element/type_provider.dart';
 import 'package:analyzer/src/dart/element/type.dart';
 import 'package:analyzer/src/dart/element/type_demotion.dart';
-import 'package:analyzer/src/generated/resolver.dart';
-import 'package:analyzer/src/generated/type_system.dart';
+import 'package:analyzer/src/dart/element/type_system.dart';
 import 'package:meta/meta.dart';
 
 class BodyInferenceContext {
diff --git a/pkg/analyzer/lib/src/dart/resolver/extension_member_resolver.dart b/pkg/analyzer/lib/src/dart/resolver/extension_member_resolver.dart
index e7a02e5..c29cef9 100644
--- a/pkg/analyzer/lib/src/dart/resolver/extension_member_resolver.dart
+++ b/pkg/analyzer/lib/src/dart/resolver/extension_member_resolver.dart
@@ -13,11 +13,11 @@
 import 'package:analyzer/src/dart/element/type.dart';
 import 'package:analyzer/src/dart/element/type_algebra.dart';
 import 'package:analyzer/src/dart/element/type_schema.dart';
+import 'package:analyzer/src/dart/element/type_system.dart';
 import 'package:analyzer/src/dart/resolver/resolution_result.dart';
 import 'package:analyzer/src/dart/resolver/scope.dart';
 import 'package:analyzer/src/error/codes.dart';
 import 'package:analyzer/src/generated/resolver.dart';
-import 'package:analyzer/src/generated/type_system.dart';
 
 class ExtensionMemberResolver {
   final ResolverVisitor _resolver;
diff --git a/pkg/analyzer/lib/src/dart/resolver/flow_analysis_visitor.dart b/pkg/analyzer/lib/src/dart/resolver/flow_analysis_visitor.dart
index 568865d..5a625a1 100644
--- a/pkg/analyzer/lib/src/dart/resolver/flow_analysis_visitor.dart
+++ b/pkg/analyzer/lib/src/dart/resolver/flow_analysis_visitor.dart
@@ -10,8 +10,8 @@
 import 'package:analyzer/dart/element/type.dart';
 import 'package:analyzer/dart/element/type_system.dart';
 import 'package:analyzer/src/dart/element/type.dart';
+import 'package:analyzer/src/dart/element/type_system.dart' show TypeSystemImpl;
 import 'package:analyzer/src/generated/migration.dart';
-import 'package:analyzer/src/generated/type_system.dart' show TypeSystemImpl;
 import 'package:analyzer/src/generated/variable_type_provider.dart';
 
 /// Data gathered by flow analysis, retained for testing purposes.
diff --git a/pkg/analyzer/lib/src/dart/resolver/function_expression_resolver.dart b/pkg/analyzer/lib/src/dart/resolver/function_expression_resolver.dart
index b5eb643..f496a13 100644
--- a/pkg/analyzer/lib/src/dart/resolver/function_expression_resolver.dart
+++ b/pkg/analyzer/lib/src/dart/resolver/function_expression_resolver.dart
@@ -8,6 +8,7 @@
 import 'package:analyzer/src/dart/element/element.dart';
 import 'package:analyzer/src/dart/element/type.dart';
 import 'package:analyzer/src/dart/element/type_demotion.dart';
+import 'package:analyzer/src/dart/element/type_system.dart';
 import 'package:analyzer/src/dart/resolver/body_inference_context.dart';
 import 'package:analyzer/src/dart/resolver/flow_analysis_visitor.dart';
 import 'package:analyzer/src/dart/resolver/invocation_inference_helper.dart';
diff --git a/pkg/analyzer/lib/src/dart/resolver/invocation_inference_helper.dart b/pkg/analyzer/lib/src/dart/resolver/invocation_inference_helper.dart
index 4bc73dc..da2e57c 100644
--- a/pkg/analyzer/lib/src/dart/resolver/invocation_inference_helper.dart
+++ b/pkg/analyzer/lib/src/dart/resolver/invocation_inference_helper.dart
@@ -10,6 +10,7 @@
 import 'package:analyzer/src/dart/element/type.dart';
 import 'package:analyzer/src/dart/element/type_algebra.dart';
 import 'package:analyzer/src/dart/element/type_provider.dart';
+import 'package:analyzer/src/dart/element/type_system.dart';
 import 'package:analyzer/src/dart/resolver/flow_analysis_visitor.dart';
 import 'package:analyzer/src/error/codes.dart';
 import 'package:analyzer/src/generated/migration.dart';
diff --git a/pkg/analyzer/lib/src/dart/resolver/legacy_type_asserter.dart b/pkg/analyzer/lib/src/dart/resolver/legacy_type_asserter.dart
index 406339c..b5dcd58 100644
--- a/pkg/analyzer/lib/src/dart/resolver/legacy_type_asserter.dart
+++ b/pkg/analyzer/lib/src/dart/resolver/legacy_type_asserter.dart
@@ -20,7 +20,7 @@
 /// Checks that the static type of every node, as well as the elements of many
 /// nodes, have legacy types, and asserts that the legacy types are deep legacy
 /// types.
-class LegacyTypeAsserter extends GeneralizingAstVisitor {
+class LegacyTypeAsserter extends GeneralizingAstVisitor<void> {
   final Set<DartType> _visitedTypes = {};
 
   LegacyTypeAsserter({bool requireIsDebug = true}) {
@@ -40,7 +40,7 @@
   }
 
   @override
-  visitClassMember(ClassMember node) {
+  void visitClassMember(ClassMember node) {
     final element = node.declaredElement;
     if (element is ExecutableElement) {
       _assertLegacyType(element?.type);
@@ -49,58 +49,58 @@
   }
 
   @override
-  visitCompilationUnit(CompilationUnit node) {
+  void visitCompilationUnit(CompilationUnit node) {
     if (!node.featureSet.isEnabled(Feature.non_nullable)) {
       super.visitCompilationUnit(node);
     }
   }
 
   @override
-  visitDeclaredIdentifier(DeclaredIdentifier node) {
+  void visitDeclaredIdentifier(DeclaredIdentifier node) {
     _assertLegacyType(node.declaredElement?.type);
     super.visitDeclaredIdentifier(node);
   }
 
   @override
-  visitExpression(Expression node) {
+  void visitExpression(Expression node) {
     _assertLegacyType(node.staticType);
     _assertLegacyType(node.staticParameterElement?.type);
     super.visitExpression(node);
   }
 
   @override
-  visitFormalParameter(FormalParameter node) {
+  void visitFormalParameter(FormalParameter node) {
     _assertLegacyType(node.declaredElement?.type);
     super.visitFormalParameter(node);
   }
 
   @override
-  visitFunctionDeclaration(FunctionDeclaration node) {
+  void visitFunctionDeclaration(FunctionDeclaration node) {
     _assertLegacyType(node.declaredElement?.type);
     super.visitFunctionDeclaration(node);
   }
 
   @override
-  visitInvocationExpression(InvocationExpression node) {
+  void visitInvocationExpression(InvocationExpression node) {
     _assertLegacyType(node.staticInvokeType);
     node.typeArgumentTypes?.forEach(_assertLegacyType);
     return super.visitInvocationExpression(node);
   }
 
   @override
-  visitTypeAnnotation(TypeAnnotation node) {
+  void visitTypeAnnotation(TypeAnnotation node) {
     _assertLegacyType(node.type);
     super.visitTypeAnnotation(node);
   }
 
   @override
-  visitTypeName(TypeName node) {
+  void visitTypeName(TypeName node) {
     _assertLegacyType(node.type);
     super.visitTypeName(node);
   }
 
   @override
-  visitVariableDeclaration(VariableDeclaration node) {
+  void visitVariableDeclaration(VariableDeclaration node) {
     _assertLegacyType(node.declaredElement?.type);
     super.visitVariableDeclaration(node);
   }
diff --git a/pkg/analyzer/lib/src/dart/resolver/method_invocation_resolver.dart b/pkg/analyzer/lib/src/dart/resolver/method_invocation_resolver.dart
index 07d96a2..0ad5812 100644
--- a/pkg/analyzer/lib/src/dart/resolver/method_invocation_resolver.dart
+++ b/pkg/analyzer/lib/src/dart/resolver/method_invocation_resolver.dart
@@ -10,6 +10,7 @@
 import 'package:analyzer/src/dart/ast/utilities.dart';
 import 'package:analyzer/src/dart/element/inheritance_manager3.dart';
 import 'package:analyzer/src/dart/element/type.dart';
+import 'package:analyzer/src/dart/element/type_system.dart';
 import 'package:analyzer/src/dart/resolver/extension_member_resolver.dart';
 import 'package:analyzer/src/dart/resolver/invocation_inference_helper.dart';
 import 'package:analyzer/src/dart/resolver/scope.dart';
diff --git a/pkg/analyzer/lib/src/dart/resolver/postfix_expression_resolver.dart b/pkg/analyzer/lib/src/dart/resolver/postfix_expression_resolver.dart
index 5917ebc..43b20e7 100644
--- a/pkg/analyzer/lib/src/dart/resolver/postfix_expression_resolver.dart
+++ b/pkg/analyzer/lib/src/dart/resolver/postfix_expression_resolver.dart
@@ -9,6 +9,7 @@
 import 'package:analyzer/error/listener.dart';
 import 'package:analyzer/src/dart/ast/ast.dart';
 import 'package:analyzer/src/dart/element/type.dart';
+import 'package:analyzer/src/dart/element/type_system.dart';
 import 'package:analyzer/src/dart/resolver/assignment_expression_resolver.dart';
 import 'package:analyzer/src/dart/resolver/flow_analysis_visitor.dart';
 import 'package:analyzer/src/dart/resolver/invocation_inference_helper.dart';
@@ -16,7 +17,6 @@
 import 'package:analyzer/src/dart/resolver/type_property_resolver.dart';
 import 'package:analyzer/src/error/codes.dart';
 import 'package:analyzer/src/generated/resolver.dart';
-import 'package:analyzer/src/generated/type_system.dart';
 import 'package:analyzer/src/task/strong/checker.dart';
 import 'package:meta/meta.dart';
 
diff --git a/pkg/analyzer/lib/src/dart/resolver/prefix_expression_resolver.dart b/pkg/analyzer/lib/src/dart/resolver/prefix_expression_resolver.dart
index 24eaae3..beeb19a 100644
--- a/pkg/analyzer/lib/src/dart/resolver/prefix_expression_resolver.dart
+++ b/pkg/analyzer/lib/src/dart/resolver/prefix_expression_resolver.dart
@@ -10,6 +10,7 @@
 import 'package:analyzer/error/listener.dart';
 import 'package:analyzer/src/dart/ast/ast.dart';
 import 'package:analyzer/src/dart/element/type.dart';
+import 'package:analyzer/src/dart/element/type_system.dart';
 import 'package:analyzer/src/dart/resolver/assignment_expression_resolver.dart';
 import 'package:analyzer/src/dart/resolver/flow_analysis_visitor.dart';
 import 'package:analyzer/src/dart/resolver/invocation_inference_helper.dart';
@@ -17,7 +18,6 @@
 import 'package:analyzer/src/dart/resolver/type_property_resolver.dart';
 import 'package:analyzer/src/error/codes.dart';
 import 'package:analyzer/src/generated/resolver.dart';
-import 'package:analyzer/src/generated/type_system.dart';
 import 'package:analyzer/src/task/strong/checker.dart';
 import 'package:meta/meta.dart';
 
diff --git a/pkg/analyzer/lib/src/dart/resolver/resolution_visitor.dart b/pkg/analyzer/lib/src/dart/resolver/resolution_visitor.dart
index 7448242..d006206 100644
--- a/pkg/analyzer/lib/src/dart/resolver/resolution_visitor.dart
+++ b/pkg/analyzer/lib/src/dart/resolver/resolution_visitor.dart
@@ -19,7 +19,6 @@
 import 'package:analyzer/src/dart/resolver/type_name_resolver.dart';
 import 'package:analyzer/src/error/codes.dart';
 import 'package:analyzer/src/generated/declaration_resolver.dart';
-import 'package:analyzer/src/generated/resolver.dart';
 import 'package:analyzer/src/generated/utilities_dart.dart';
 import 'package:meta/meta.dart';
 
@@ -1112,10 +1111,8 @@
     }
   }
 
-  /**
-   * For each [Annotation] found in [annotations], create a new
-   * [ElementAnnotation] object and set the [Annotation] to point to it.
-   */
+  /// For each [Annotation] found in [annotations], create a new
+  /// [ElementAnnotation] object and set the [Annotation] to point to it.
   List<ElementAnnotation> _createElementAnnotations(
       List<Annotation> annotations) {
     if (annotations.isEmpty) {
diff --git a/pkg/analyzer/lib/src/dart/resolver/scope.dart b/pkg/analyzer/lib/src/dart/resolver/scope.dart
index 720be05..34e34b51 100644
--- a/pkg/analyzer/lib/src/dart/resolver/scope.dart
+++ b/pkg/analyzer/lib/src/dart/resolver/scope.dart
@@ -10,14 +10,10 @@
 import 'package:analyzer/src/dart/element/type.dart';
 import 'package:analyzer/src/generated/engine.dart';
 
-/**
- * The scope defined by a block.
- */
+/// The scope defined by a block.
 class BlockScope extends EnclosedScope {
-  /**
-   * Initialize a newly created scope, enclosed within the [enclosingScope],
-   * based on the given [block].
-   */
+  /// Initialize a newly created scope, enclosed within the [enclosingScope],
+  /// based on the given [block].
   BlockScope(Scope enclosingScope, Block block) : super(enclosingScope) {
     if (block == null) {
       throw ArgumentError("block cannot be null");
@@ -31,10 +27,8 @@
     }
   }
 
-  /**
-   * Return the elements that are declared directly in the given [block]. This
-   * does not include elements declared in nested blocks.
-   */
+  /// Return the elements that are declared directly in the given [block]. This
+  /// does not include elements declared in nested blocks.
   static Iterable<Element> elementsInBlock(Block block) sync* {
     NodeList<Statement> statements = block.statements;
     int statementCount = statements.length;
@@ -53,14 +47,10 @@
   }
 }
 
-/**
- * The scope defined by a class.
- */
+/// The scope defined by a class.
 class ClassScope extends EnclosedScope {
-  /**
-   * Initialize a newly created scope, enclosed within the [enclosingScope],
-   * based on the given [classElement].
-   */
+  /// Initialize a newly created scope, enclosed within the [enclosingScope],
+  /// based on the given [classElement].
   ClassScope(Scope enclosingScope, ClassElement classElement)
       : super(enclosingScope) {
     if (classElement == null) {
@@ -69,9 +59,7 @@
     _defineMembers(classElement);
   }
 
-  /**
-   * Define the instance members defined by the given [classElement].
-   */
+  /// Define the instance members defined by the given [classElement].
   void _defineMembers(ClassElement classElement) {
     List<PropertyAccessorElement> accessors = classElement.accessors;
     int accessorLength = accessors.length;
@@ -86,21 +74,15 @@
   }
 }
 
-/**
- * The scope defined for the initializers in a constructor.
- */
+/// The scope defined for the initializers in a constructor.
 class ConstructorInitializerScope extends EnclosedScope {
-  /**
-   * Initialize a newly created scope, enclosed within the [enclosingScope].
-   */
+  /// Initialize a newly created scope, enclosed within the [enclosingScope].
   ConstructorInitializerScope(Scope enclosingScope, ConstructorElement element)
       : super(enclosingScope) {
     _initializeFieldFormalParameters(element);
   }
 
-  /**
-   * Initialize the local scope with all of the field formal parameters.
-   */
+  /// Initialize the local scope with all of the field formal parameters.
   void _initializeFieldFormalParameters(ConstructorElement element) {
     for (ParameterElement parameter in element.parameters) {
       if (parameter is FieldFormalParameterElement) {
@@ -110,19 +92,13 @@
   }
 }
 
-/**
- * A scope that is lexically enclosed in another scope.
- */
+/// A scope that is lexically enclosed in another scope.
 class EnclosedScope extends Scope {
-  /**
-   * The scope in which this scope is lexically enclosed.
-   */
+  /// The scope in which this scope is lexically enclosed.
   @override
   final Scope enclosingScope;
 
-  /**
-   * Initialize a newly created scope, enclosed within the [enclosingScope].
-   */
+  /// Initialize a newly created scope, enclosed within the [enclosingScope].
   EnclosedScope(this.enclosingScope);
 
   @override
@@ -167,25 +143,17 @@
   }
 }
 
-/**
- * The scope defined by a function.
- */
+/// The scope defined by a function.
 class FunctionScope extends EnclosedScope {
-  /**
-   * The element representing the function that defines this scope.
-   */
+  /// The element representing the function that defines this scope.
   final FunctionTypedElement _functionElement;
 
-  /**
-   * A flag indicating whether the parameters have already been defined, used to
-   * prevent the parameters from being defined multiple times.
-   */
+  /// A flag indicating whether the parameters have already been defined, used
+  /// to prevent the parameters from being defined multiple times.
   bool _parametersDefined = false;
 
-  /**
-   * Initialize a newly created scope, enclosed within the [enclosingScope],
-   * that represents the given [_functionElement].
-   */
+  /// Initialize a newly created scope, enclosed within the [enclosingScope],
+  /// that represents the given [_functionElement].
   FunctionScope(Scope enclosingScope, this._functionElement)
       : super(EnclosedScope(EnclosedScope(enclosingScope))) {
     if (_functionElement == null) {
@@ -194,10 +162,8 @@
     _defineTypeParameters();
   }
 
-  /**
-   * Define the parameters for the given function in the scope that encloses
-   * this function.
-   */
+  /// Define the parameters for the given function in the scope that encloses
+  /// this function.
   void defineParameters() {
     if (_parametersDefined) {
       return;
@@ -214,9 +180,7 @@
     }
   }
 
-  /**
-   * Define the type parameters for the function.
-   */
+  /// Define the type parameters for the function.
   void _defineTypeParameters() {
     Scope typeParameterScope = enclosingScope.enclosingScope;
     List<TypeParameterElement> typeParameters = _functionElement.typeParameters;
@@ -228,26 +192,20 @@
   }
 }
 
-/**
- * The scope defined by a function type alias.
- */
+/// The scope defined by a function type alias.
 class FunctionTypeScope extends EnclosedScope {
   final FunctionTypeAliasElement _typeElement;
 
   bool _parametersDefined = false;
 
-  /**
-   * Initialize a newly created scope, enclosed within the [enclosingScope],
-   * that represents the given [_typeElement].
-   */
+  /// Initialize a newly created scope, enclosed within the [enclosingScope],
+  /// that represents the given [_typeElement].
   FunctionTypeScope(Scope enclosingScope, this._typeElement)
       : super(EnclosedScope(enclosingScope)) {
     _defineTypeParameters();
   }
 
-  /**
-   * Define the parameters for the function type alias.
-   */
+  /// Define the parameters for the function type alias.
   void defineParameters() {
     if (_parametersDefined) {
       return;
@@ -258,9 +216,7 @@
     }
   }
 
-  /**
-   * Define the type parameters for the function type alias.
-   */
+  /// Define the type parameters for the function type alias.
   void _defineTypeParameters() {
     Scope typeParameterScope = enclosingScope;
     for (TypeParameterElement typeParameter in _typeElement.typeParameters) {
@@ -269,37 +225,25 @@
   }
 }
 
-/**
- * The scope statements that can be the target of unlabeled `break` and
- * `continue` statements.
- */
+/// The scope statements that can be the target of unlabeled `break` and
+/// `continue` statements.
 class ImplicitLabelScope {
-  /**
-   * The implicit label scope associated with the top level of a function.
-   */
+  /// The implicit label scope associated with the top level of a function.
   static const ImplicitLabelScope ROOT = ImplicitLabelScope._(null, null);
 
-  /**
-   * The implicit label scope enclosing this implicit label scope.
-   */
+  /// The implicit label scope enclosing this implicit label scope.
   final ImplicitLabelScope outerScope;
 
-  /**
-   * The statement that acts as a target for break and/or continue statements
-   * at this scoping level.
-   */
+  /// The statement that acts as a target for break and/or continue statements
+  /// at this scoping level.
   final Statement statement;
 
-  /**
-   * Initialize a newly created scope, enclosed within the [outerScope],
-   * representing the given [statement].
-   */
+  /// Initialize a newly created scope, enclosed within the [outerScope],
+  /// representing the given [statement].
   const ImplicitLabelScope._(this.outerScope, this.statement);
 
-  /**
-   * Return the statement which should be the target of an unlabeled `break` or
-   * `continue` statement, or `null` if there is no appropriate target.
-   */
+  /// Return the statement which should be the target of an unlabeled `break` or
+  /// `continue` statement, or `null` if there is no appropriate target.
   Statement getTarget(bool isContinue) {
     if (outerScope == null) {
       // This scope represents the toplevel of a function body, so it doesn't
@@ -312,50 +256,34 @@
     return statement;
   }
 
-  /**
-   * Initialize a newly created scope to represent a switch statement or loop
-   * nested within the current scope.  [statement] is the statement associated
-   * with the newly created scope.
-   */
+  /// Initialize a newly created scope to represent a switch statement or loop
+  /// nested within the current scope.  [statement] is the statement associated
+  /// with the newly created scope.
   ImplicitLabelScope nest(Statement statement) =>
       ImplicitLabelScope._(this, statement);
 }
 
-/**
- * A scope in which a single label is defined.
- */
+/// A scope in which a single label is defined.
 class LabelScope {
-  /**
-   * The label scope enclosing this label scope.
-   */
+  /// The label scope enclosing this label scope.
   final LabelScope _outerScope;
 
-  /**
-   * The label defined in this scope.
-   */
+  /// The label defined in this scope.
   final String _label;
 
-  /**
-   * The element to which the label resolves.
-   */
+  /// The element to which the label resolves.
   final LabelElement element;
 
-  /**
-   * The AST node to which the label resolves.
-   */
+  /// The AST node to which the label resolves.
   final AstNode node;
 
-  /**
-   * Initialize a newly created scope, enclosed within the [_outerScope],
-   * representing the label [_label]. The [node] is the AST node the label
-   * resolves to. The [element] is the element the label resolves to.
-   */
+  /// Initialize a newly created scope, enclosed within the [_outerScope],
+  /// representing the label [_label]. The [node] is the AST node the label
+  /// resolves to. The [element] is the element the label resolves to.
   LabelScope(this._outerScope, this._label, this.node, this.element);
 
-  /**
-   * Return the LabelScope which defines [targetLabel], or `null` if it is not
-   * defined in this scope.
-   */
+  /// Return the LabelScope which defines [targetLabel], or `null` if it is not
+  /// defined in this scope.
   LabelScope lookup(String targetLabel) {
     if (_label == targetLabel) {
       return this;
@@ -364,36 +292,25 @@
   }
 }
 
-/**
- * The scope containing all of the names available from imported libraries.
- */
+/// The scope containing all of the names available from imported libraries.
 class LibraryImportScope extends Scope {
-  /**
-   * The element representing the library in which this scope is enclosed.
-   */
+  /// The element representing the library in which this scope is enclosed.
   final LibraryElement _definingLibrary;
 
-  /**
-   * A list of the namespaces representing the names that are available in this scope from imported
-   * libraries.
-   */
+  /// A list of the namespaces representing the names that are available in this
+  /// scope from imported libraries.
   List<Namespace> _importedNamespaces;
 
-  /**
-   * A table mapping prefixes that have been referenced to a map from the names
-   * that have been referenced to the element associated with the prefixed name.
-   */
+  /// A table mapping prefixes that have been referenced to a map from the names
+  /// that have been referenced to the element associated with the prefixed
+  /// name.
   Map<String, Map<String, Element>> _definedPrefixedNames;
 
-  /**
-   * Cache of public extensions defined in this library's imported namespaces.
-   */
+  /// Cache of public extensions defined in this library's imported namespaces.
   List<ExtensionElement> _extensions;
 
-  /**
-   * Initialize a newly created scope representing the names imported into the
-   * [_definingLibrary].
-   */
+  /// Initialize a newly created scope representing the names imported into the
+  /// [_definingLibrary].
   LibraryImportScope(this._definingLibrary) {
     _createImportedNamespaces();
   }
@@ -492,11 +409,9 @@
     return false;
   }
 
-  /**
-   * Create all of the namespaces associated with the libraries imported into
-   * this library. The names are not added to this scope, but are stored for
-   * later reference.
-   */
+  /// Create all of the namespaces associated with the libraries imported into
+  /// this library. The names are not added to this scope, but are stored for
+  /// later reference.
   void _createImportedNamespaces() {
     List<ImportElement> imports = _definingLibrary.imports;
     int count = imports.length;
@@ -506,10 +421,8 @@
     }
   }
 
-  /**
-   * Add the given [element] to this scope without checking for duplication or
-   * hiding.
-   */
+  /// Add the given [element] to this scope without checking for duplication or
+  /// hiding.
   void _definePrefixedNameWithoutChecking(
       String prefix, String name, Element element) {
     _definedPrefixedNames ??= HashMap<String, Map<String, Element>>();
@@ -532,10 +445,8 @@
     return element;
   }
 
-  /**
-   * Return the element with which the given [prefix] and [name] are associated,
-   * or `null` if the name is not defined within this scope.
-   */
+  /// Return the element with which the given [prefix] and [name] are
+  /// associated, or `null` if the name is not defined within this scope.
   Element _localPrefixedLookup(String prefix, String name) {
     if (_definedPrefixedNames != null) {
       Map<String, Element> unprefixedNames = _definedPrefixedNames[prefix];
@@ -597,16 +508,12 @@
   }
 }
 
-/**
- * A scope containing all of the names defined in a given library.
- */
+/// A scope containing all of the names defined in a given library.
 class LibraryScope extends EnclosedScope {
   final List<ExtensionElement> _extensions = <ExtensionElement>[];
 
-  /**
-   * Initialize a newly created scope representing the names defined in the
-   * [definingLibrary].
-   */
+  /// Initialize a newly created scope representing the names defined in the
+  /// [definingLibrary].
   LibraryScope(LibraryElement definingLibrary)
       : super(LibraryImportScope(definingLibrary)) {
     _defineTopLevelNames(definingLibrary);
@@ -624,10 +531,8 @@
   List<ExtensionElement> get extensions =>
       enclosingScope.extensions.toList()..addAll(_extensions);
 
-  /**
-   * Add to this scope all of the public top-level names that are defined in the
-   * given [compilationUnit].
-   */
+  /// Add to this scope all of the public top-level names that are defined in
+  /// the given [compilationUnit].
   void _defineLocalNames(CompilationUnitElement compilationUnit) {
     for (PropertyAccessorElement element in compilationUnit.accessors) {
       define(element);
@@ -654,10 +559,8 @@
     }
   }
 
-  /**
-   * Add to this scope all of the names that are explicitly defined in the
-   * [definingLibrary].
-   */
+  /// Add to this scope all of the names that are explicitly defined in the
+  /// [definingLibrary].
   void _defineTopLevelNames(LibraryElement definingLibrary) {
     for (PrefixElement prefix in definingLibrary.prefixes) {
       define(prefix);
@@ -669,55 +572,38 @@
   }
 }
 
-/**
- * A mapping of identifiers to the elements represented by those identifiers.
- * Namespaces are the building blocks for scopes.
- */
+/// A mapping of identifiers to the elements represented by those identifiers.
+/// Namespaces are the building blocks for scopes.
 class Namespace {
-  /**
-   * An empty namespace.
-   */
+  /// An empty namespace.
   static Namespace EMPTY = Namespace(HashMap<String, Element>());
 
-  /**
-   * A table mapping names that are defined in this namespace to the element
-   * representing the thing declared with that name.
-   */
+  /// A table mapping names that are defined in this namespace to the element
+  /// representing the thing declared with that name.
   final Map<String, Element> _definedNames;
 
-  /**
-   * Initialize a newly created namespace to have the [_definedNames].
-   */
+  /// Initialize a newly created namespace to have the [_definedNames].
   Namespace(this._definedNames);
 
-  /**
-   * Return a table containing the same mappings as those defined by this
-   * namespace.
-   */
+  /// Return a table containing the same mappings as those defined by this
+  /// namespace.
   Map<String, Element> get definedNames => _definedNames;
 
-  /**
-   * Return the element in this namespace that is available to the containing
-   * scope using the given name, or `null` if there is no such element.
-   */
+  /// Return the element in this namespace that is available to the containing
+  /// scope using the given name, or `null` if there is no such element.
   Element get(String name) => _definedNames[name];
 
-  /**
-   * Return the element in this namespace whose name is the result of combining
-   * the [prefix] and the [name], separated by a period, or `null` if there is
-   * no such element.
-   */
+  /// Return the element in this namespace whose name is the result of combining
+  /// the [prefix] and the [name], separated by a period, or `null` if there is
+  /// no such element.
   Element getPrefixed(String prefix, String name) => null;
 }
 
-/**
- * The builder used to build a namespace. Namespace builders are thread-safe and
- * re-usable.
- */
+/// The builder used to build a namespace. Namespace builders are thread-safe
+/// and re-usable.
 class NamespaceBuilder {
-  /**
-   * Create a namespace representing the export namespace of the given [element].
-   */
+  /// Create a namespace representing the export namespace of the given
+  /// [element].
   Namespace createExportNamespaceForDirective(ExportElement element) {
     LibraryElement exportedLibrary = element.exportedLibrary;
     if (exportedLibrary == null) {
@@ -732,17 +618,15 @@
     return Namespace(exportedNames);
   }
 
-  /**
-   * Create a namespace representing the export namespace of the given [library].
-   */
+  /// Create a namespace representing the export namespace of the given
+  /// [library].
   Namespace createExportNamespaceForLibrary(LibraryElement library) {
     Map<String, Element> exportedNames = _getExportMapping(library);
     return Namespace(exportedNames);
   }
 
-  /**
-   * Create a namespace representing the import namespace of the given [element].
-   */
+  /// Create a namespace representing the import namespace of the given
+  /// [element].
   Namespace createImportNamespaceForDirective(ImportElement element) {
     LibraryElement importedLibrary = element.importedLibrary;
     if (importedLibrary == null) {
@@ -761,10 +645,8 @@
     return Namespace(exportedNames);
   }
 
-  /**
-   * Create a namespace representing the public namespace of the given
-   * [library].
-   */
+  /// Create a namespace representing the public namespace of the given
+  /// [library].
   Namespace createPublicNamespaceForLibrary(LibraryElement library) {
     Map<String, Element> definedNames = HashMap<String, Element>();
     _addPublicNames(definedNames, library.definingCompilationUnit);
@@ -784,10 +666,8 @@
     return Namespace(definedNames);
   }
 
-  /**
-   * Add all of the names in the given [namespace] to the table of
-   * [definedNames].
-   */
+  /// Add all of the names in the given [namespace] to the table of
+  /// [definedNames].
   void _addAllFromNamespace(
       Map<String, Element> definedNames, Namespace namespace) {
     if (namespace != null) {
@@ -795,10 +675,8 @@
     }
   }
 
-  /**
-   * Add the given [element] to the table of [definedNames] if it has a
-   * publicly visible name.
-   */
+  /// Add the given [element] to the table of [definedNames] if it has a
+  /// publicly visible name.
   void _addIfPublic(Map<String, Element> definedNames, Element element) {
     String name = element.name;
     if (name != null && name.isNotEmpty && !Scope.isPrivateName(name)) {
@@ -806,11 +684,9 @@
     }
   }
 
-  /**
-   * Add to the table of [definedNames] all of the public top-level names that
-   * are defined in the given [compilationUnit].
-   *          namespace
-   */
+  /// Add to the table of [definedNames] all of the public top-level names that
+  /// are defined in the given [compilationUnit].
+  ///          namespace
   void _addPublicNames(Map<String, Element> definedNames,
       CompilationUnitElement compilationUnit) {
     for (PropertyAccessorElement element in compilationUnit.accessors) {
@@ -837,10 +713,8 @@
     }
   }
 
-  /**
-   * Apply the given [combinators] to all of the names in the given table of
-   * [definedNames].
-   */
+  /// Apply the given [combinators] to all of the names in the given table of
+  /// [definedNames].
   Map<String, Element> _applyCombinators(Map<String, Element> definedNames,
       List<NamespaceCombinator> combinators) {
     for (NamespaceCombinator combinator in combinators) {
@@ -857,13 +731,11 @@
     return definedNames;
   }
 
-  /**
-   * Create a mapping table representing the export namespace of the given
-   * [library]. The set of [visitedElements] contains the libraries that do not
-   * need to be visited when processing the export directives of the given
-   * library because all of the names defined by them will be added by another
-   * library.
-   */
+  /// Create a mapping table representing the export namespace of the given
+  /// [library]. The set of [visitedElements] contains the libraries that do not
+  /// need to be visited when processing the export directives of the given
+  /// library because all of the names defined by them will be added by another
+  /// library.
   Map<String, Element> _computeExportMapping(
       LibraryElement library, HashSet<LibraryElement> visitedElements) {
     visitedElements.add(library);
@@ -906,10 +778,8 @@
     return _computeExportMapping(library, HashSet<LibraryElement>());
   }
 
-  /**
-   * Return a new map of names which has all the names from [definedNames]
-   * with exception of [hiddenNames].
-   */
+  /// Return a new map of names which has all the names from [definedNames]
+  /// with exception of [hiddenNames].
   Map<String, Element> _hide(
       Map<String, Element> definedNames, List<String> hiddenNames) {
     Map<String, Element> newNames = HashMap<String, Element>.from(definedNames);
@@ -920,9 +790,7 @@
     return newNames;
   }
 
-  /**
-   * Return a new map of names which has only [shownNames] from [definedNames].
-   */
+  /// Return a new map of names which has only [shownNames] from [definedNames].
   Map<String, Element> _show(
       Map<String, Element> definedNames, List<String> shownNames) {
     Map<String, Element> newNames = HashMap<String, Element>();
@@ -941,33 +809,23 @@
   }
 }
 
-/**
- * A mapping of identifiers to the elements represented by those identifiers.
- * Namespaces are the building blocks for scopes.
- */
+/// A mapping of identifiers to the elements represented by those identifiers.
+/// Namespaces are the building blocks for scopes.
 class PrefixedNamespace implements Namespace {
-  /**
-   * The prefix that is prepended to each of the defined names.
-   */
+  /// The prefix that is prepended to each of the defined names.
   final String _prefix;
 
-  /**
-   * The length of the prefix.
-   */
+  /// The length of the prefix.
   final int _length;
 
-  /**
-   * A table mapping names that are defined in this namespace to the element
-   * representing the thing declared with that name.
-   */
+  /// A table mapping names that are defined in this namespace to the element
+  /// representing the thing declared with that name.
   @override
   final Map<String, Element> _definedNames;
 
-  /**
-   * Initialize a newly created namespace to have the names resulting from
-   * prefixing each of the [_definedNames] with the given [_prefix] (and a
-   * period).
-   */
+  /// Initialize a newly created namespace to have the names resulting from
+  /// prefixing each of the [_definedNames] with the given [_prefix] (and a
+  /// period).
   PrefixedNamespace(String prefix, this._definedNames)
       : _prefix = prefix,
         _length = prefix.length;
@@ -1000,51 +858,35 @@
   }
 }
 
-/**
- * A name scope used by the resolver to determine which names are visible at any
- * given point in the code.
- */
+/// A name scope used by the resolver to determine which names are visible at
+/// any given point in the code.
 abstract class Scope {
-  /**
-   * The prefix used to mark an identifier as being private to its library.
-   */
+  /// The prefix used to mark an identifier as being private to its library.
   static int PRIVATE_NAME_PREFIX = 0x5F;
 
-  /**
-   * The suffix added to the declared name of a setter when looking up the
-   * setter. Used to disambiguate between a getter and a setter that have the
-   * same name.
-   */
+  /// The suffix added to the declared name of a setter when looking up the
+  /// setter. Used to disambiguate between a getter and a setter that have the
+  /// same name.
   static String SETTER_SUFFIX = "=";
 
-  /**
-   * The name used to look up the method used to implement the unary minus
-   * operator. Used to disambiguate between the unary and binary operators.
-   */
+  /// The name used to look up the method used to implement the unary minus
+  /// operator. Used to disambiguate between the unary and binary operators.
   static String UNARY_MINUS = "unary-";
 
-  /**
-   * A table mapping names that are defined in this scope to the element
-   * representing the thing declared with that name.
-   */
+  /// A table mapping names that are defined in this scope to the element
+  /// representing the thing declared with that name.
   Map<String, Element> _definedNames;
 
-  /**
-   * Return the scope in which this scope is lexically enclosed.
-   */
+  /// Return the scope in which this scope is lexically enclosed.
   Scope get enclosingScope => null;
 
-  /**
-   * The list of extensions defined in this scope.
-   */
+  /// The list of extensions defined in this scope.
   List<ExtensionElement> get extensions =>
       enclosingScope == null ? <ExtensionElement>[] : enclosingScope.extensions;
 
-  /**
-   * Add the given [element] to this scope. If there is already an element with
-   * the given name defined in this scope, then the original element will
-   * continue to be mapped to the name.
-   */
+  /// Add the given [element] to this scope. If there is already an element with
+  /// the given name defined in this scope, then the original element will
+  /// continue to be mapped to the name.
   void define(Element element) {
     String name = _getName(element);
     if (name != null && name.isNotEmpty) {
@@ -1053,36 +895,28 @@
     }
   }
 
-  /**
-   * Add the given [element] to this scope without checking for duplication or
-   * hiding.
-   */
+  /// Add the given [element] to this scope without checking for duplication or
+  /// hiding.
   void defineNameWithoutChecking(String name, Element element) {
     _definedNames ??= HashMap<String, Element>();
     _definedNames[name] = element;
   }
 
-  /**
-   * Add the given [element] to this scope without checking for duplication or
-   * hiding.
-   */
+  /// Add the given [element] to this scope without checking for duplication or
+  /// hiding.
   void defineWithoutChecking(Element element) {
     _definedNames ??= HashMap<String, Element>();
     _definedNames[_getName(element)] = element;
   }
 
-  /**
-   * Return the element with which the given [name] is associated, or `null` if
-   * the name is not defined within this scope.
-   */
+  /// Return the element with which the given [name] is associated, or `null` if
+  /// the name is not defined within this scope.
   Element internalLookup(String name);
 
-  /**
-   * Return the element with which the given [name] is associated, or `null` if
-   * the name is not defined within this scope. This method only returns
-   * elements that are directly defined within this scope, not elements that are
-   * defined in an enclosing scope.
-   */
+  /// Return the element with which the given [name] is associated, or `null` if
+  /// the name is not defined within this scope. This method only returns
+  /// elements that are directly defined within this scope, not elements that
+  /// are defined in an enclosing scope.
   Element localLookup(String name) {
     if (_definedNames != null) {
       return _definedNames[name];
@@ -1090,12 +924,10 @@
     return null;
   }
 
-  /**
-   * Return the element with which the given [identifier] is associated, or
-   * `null` if the name is not defined within this scope. The
-   * [referencingLibrary] is the library that contains the reference to the
-   * name, used to implement library-level privacy.
-   */
+  /// Return the element with which the given [identifier] is associated, or
+  /// `null` if the name is not defined within this scope. The
+  /// [referencingLibrary] is the library that contains the reference to the
+  /// name, used to implement library-level privacy.
   Element lookup(Identifier identifier, LibraryElement referencingLibrary) {
     if (identifier is PrefixedIdentifier) {
       return _internalLookupPrefixed(
@@ -1104,13 +936,11 @@
     return internalLookup(identifier.name);
   }
 
-  /**
-   * Return `true` if the fact that the given [node] is not defined should be
-   * ignored (from the perspective of error reporting). This will be the case if
-   * there is at least one import that defines the node's prefix, and if that
-   * import either has no show combinators or has a show combinator that
-   * explicitly lists the node's name.
-   */
+  /// Return `true` if the fact that the given [node] is not defined should be
+  /// ignored (from the perspective of error reporting). This will be the case
+  /// if there is at least one import that defines the node's prefix, and if
+  /// that import either has no show combinators or has a show combinator that
+  /// explicitly lists the node's name.
   bool shouldIgnoreUndefined(Identifier node) {
     if (enclosingScope != null) {
       return enclosingScope.shouldIgnoreUndefined(node);
@@ -1118,9 +948,7 @@
     return false;
   }
 
-  /**
-   * Return the name that will be used to look up the given [element].
-   */
+  /// Return the name that will be used to look up the given [element].
   String _getName(Element element) {
     if (element is MethodElement) {
       MethodElement method = element;
@@ -1131,28 +959,20 @@
     return element.name;
   }
 
-  /**
-   * Return the element with which the given [prefix] and [name] are associated,
-   * or `null` if the name is not defined within this scope.
-   */
+  /// Return the element with which the given [prefix] and [name] are
+  /// associated, or `null` if the name is not defined within this scope.
   Element _internalLookupPrefixed(String prefix, String name);
 
-  /**
-   * Return `true` if the given [name] is a library-private name.
-   */
+  /// Return `true` if the given [name] is a library-private name.
   static bool isPrivateName(String name) =>
       name != null && name.startsWith('_');
 }
 
-/**
- * The scope defined by the type parameters in an element that defines type
- * parameters.
- */
+/// The scope defined by the type parameters in an element that defines type
+/// parameters.
 class TypeParameterScope extends EnclosedScope {
-  /**
-   * Initialize a newly created scope, enclosed within the [enclosingScope],
-   * that defines the type parameters from the given [element].
-   */
+  /// Initialize a newly created scope, enclosed within the [enclosingScope],
+  /// that defines the type parameters from the given [element].
   TypeParameterScope(Scope enclosingScope, TypeParameterizedElement element)
       : super(enclosingScope) {
     if (element == null) {
@@ -1161,9 +981,7 @@
     _defineTypeParameters(element);
   }
 
-  /**
-   * Define the type parameters declared by the [element].
-   */
+  /// Define the type parameters declared by the [element].
   void _defineTypeParameters(TypeParameterizedElement element) {
     for (TypeParameterElement typeParameter in element.typeParameters) {
       define(typeParameter);
diff --git a/pkg/analyzer/lib/src/dart/resolver/type_name_resolver.dart b/pkg/analyzer/lib/src/dart/resolver/type_name_resolver.dart
index 928504f..183cf50 100644
--- a/pkg/analyzer/lib/src/dart/resolver/type_name_resolver.dart
+++ b/pkg/analyzer/lib/src/dart/resolver/type_name_resolver.dart
@@ -6,15 +6,15 @@
 import 'package:analyzer/dart/element/element.dart';
 import 'package:analyzer/dart/element/nullability_suffix.dart';
 import 'package:analyzer/dart/element/type.dart';
+import 'package:analyzer/dart/element/type_provider.dart';
 import 'package:analyzer/error/listener.dart';
 import 'package:analyzer/src/dart/ast/ast.dart';
 import 'package:analyzer/src/dart/element/element.dart';
 import 'package:analyzer/src/dart/element/type.dart';
+import 'package:analyzer/src/dart/element/type_system.dart';
 import 'package:analyzer/src/dart/resolver/scope.dart';
 import 'package:analyzer/src/diagnostic/diagnostic_factory.dart';
 import 'package:analyzer/src/error/codes.dart';
-import 'package:analyzer/src/generated/resolver.dart';
-import 'package:analyzer/src/generated/type_system.dart';
 
 /// Helper for resolving types.
 ///
diff --git a/pkg/analyzer/lib/src/dart/resolver/type_property_resolver.dart b/pkg/analyzer/lib/src/dart/resolver/type_property_resolver.dart
index b4b1ba9..edc0374 100644
--- a/pkg/analyzer/lib/src/dart/resolver/type_property_resolver.dart
+++ b/pkg/analyzer/lib/src/dart/resolver/type_property_resolver.dart
@@ -8,6 +8,7 @@
 import 'package:analyzer/src/dart/element/element.dart';
 import 'package:analyzer/src/dart/element/inheritance_manager3.dart';
 import 'package:analyzer/src/dart/element/type_provider.dart';
+import 'package:analyzer/src/dart/element/type_system.dart';
 import 'package:analyzer/src/dart/resolver/extension_member_resolver.dart';
 import 'package:analyzer/src/dart/resolver/resolution_result.dart';
 import 'package:analyzer/src/generated/resolver.dart';
diff --git a/pkg/analyzer/lib/src/dart/resolver/typed_literal_resolver.dart b/pkg/analyzer/lib/src/dart/resolver/typed_literal_resolver.dart
index 21f74ea..7e3a0f5 100644
--- a/pkg/analyzer/lib/src/dart/resolver/typed_literal_resolver.dart
+++ b/pkg/analyzer/lib/src/dart/resolver/typed_literal_resolver.dart
@@ -13,6 +13,7 @@
 import 'package:analyzer/src/dart/element/type.dart';
 import 'package:analyzer/src/dart/element/type_provider.dart';
 import 'package:analyzer/src/dart/element/type_schema.dart';
+import 'package:analyzer/src/dart/element/type_system.dart';
 import 'package:analyzer/src/error/codes.dart';
 import 'package:analyzer/src/generated/engine.dart';
 import 'package:analyzer/src/generated/migratable_ast_info_provider.dart';
@@ -574,14 +575,12 @@
     }
   }
 
-  /**
-   * Record that the static type of the given node is the given type.
-   *
-   * @param expression the node whose type is to be recorded
-   * @param type the static type of the node
-   *
-   * TODO(scheglov) Inline this.
-   */
+  /// Record that the static type of the given node is the given type.
+  ///
+  /// @param expression the node whose type is to be recorded
+  /// @param type the static type of the node
+  ///
+  /// TODO(scheglov) Inline this.
   void _recordStaticType(Expression expression, DartType type) {
     expression.staticType = type;
 //    if (type == null) {
diff --git a/pkg/analyzer/lib/src/dart/resolver/yield_statement_resolver.dart b/pkg/analyzer/lib/src/dart/resolver/yield_statement_resolver.dart
index 47b55df..00aea98 100644
--- a/pkg/analyzer/lib/src/dart/resolver/yield_statement_resolver.dart
+++ b/pkg/analyzer/lib/src/dart/resolver/yield_statement_resolver.dart
@@ -8,9 +8,9 @@
 import 'package:analyzer/dart/element/type_provider.dart';
 import 'package:analyzer/error/listener.dart';
 import 'package:analyzer/src/dart/element/type.dart';
+import 'package:analyzer/src/dart/element/type_system.dart';
 import 'package:analyzer/src/error/codes.dart';
 import 'package:analyzer/src/generated/resolver.dart';
-import 'package:analyzer/src/generated/type_system.dart';
 import 'package:meta/meta.dart';
 
 /// Helper for resolving [YieldStatement]s.
diff --git a/pkg/analyzer/lib/src/dart/scanner/reader.dart b/pkg/analyzer/lib/src/dart/scanner/reader.dart
index 1f1d266..931d438 100644
--- a/pkg/analyzer/lib/src/dart/scanner/reader.dart
+++ b/pkg/analyzer/lib/src/dart/scanner/reader.dart
@@ -7,30 +7,20 @@
 export 'package:_fe_analyzer_shared/src/scanner/reader.dart'
     show CharacterReader, CharSequenceReader, SubSequenceReader;
 
-/**
- * A [CharacterReader] that reads a range of characters from another character
- * reader.
- */
+/// A [CharacterReader] that reads a range of characters from another character
+/// reader.
 class CharacterRangeReader extends CharacterReader {
-  /**
-   * The reader from which the characters are actually being read.
-   */
+  /// The reader from which the characters are actually being read.
   final CharacterReader baseReader;
 
-  /**
-   * The first character to be read.
-   */
+  /// The first character to be read.
   final int startIndex;
 
-  /**
-   * The last character to be read.
-   */
+  /// The last character to be read.
   final int endIndex;
 
-  /**
-   * Initialize a newly created reader to read the characters from the given
-   * [baseReader] between the [startIndex] inclusive to [endIndex] exclusive.
-   */
+  /// Initialize a newly created reader to read the characters from the given
+  /// [baseReader] between the [startIndex] inclusive to [endIndex] exclusive.
   CharacterRangeReader(this.baseReader, this.startIndex, this.endIndex) {
     baseReader.offset = startIndex - 1;
   }
diff --git a/pkg/analyzer/lib/src/dart/scanner/scanner.dart b/pkg/analyzer/lib/src/dart/scanner/scanner.dart
index 5003402..c2ce2e8 100644
--- a/pkg/analyzer/lib/src/dart/scanner/scanner.dart
+++ b/pkg/analyzer/lib/src/dart/scanner/scanner.dart
@@ -18,77 +18,59 @@
 
 export 'package:analyzer/src/dart/error/syntactic_errors.dart';
 
-/**
- * The class `Scanner` implements a scanner for Dart code.
- *
- * The lexical structure of Dart is ambiguous without knowledge of the context
- * in which a token is being scanned. For example, without context we cannot
- * determine whether source of the form "<<" should be scanned as a single
- * left-shift operator or as two left angle brackets. This scanner does not have
- * any context, so it always resolves such conflicts by scanning the longest
- * possible token.
- */
+/// The class `Scanner` implements a scanner for Dart code.
+///
+/// The lexical structure of Dart is ambiguous without knowledge of the context
+/// in which a token is being scanned. For example, without context we cannot
+/// determine whether source of the form "<<" should be scanned as a single
+/// left-shift operator or as two left angle brackets. This scanner does not
+/// have any context, so it always resolves such conflicts by scanning the
+/// longest possible token.
 class Scanner {
   final Source source;
 
-  /**
-   * The text to be scanned.
-   */
+  /// The text to be scanned.
   final String _contents;
 
-  /**
-   * The offset of the first character from the reader.
-   */
+  /// The offset of the first character from the reader.
   final int _readerOffset;
 
-  /**
-   * The error listener that will be informed of any errors that are found
-   * during the scan.
-   */
+  /// The error listener that will be informed of any errors that are found
+  /// during the scan.
   final AnalysisErrorListener _errorListener;
 
-  /**
-   * If the file has [fasta.LanguageVersionToken], it is allowed to use the
-   * language version greater than the one specified in the package config.
-   * So, we need to know the full feature set for the context.
-   */
+  /// If the file has [fasta.LanguageVersionToken], it is allowed to use the
+  /// language version greater than the one specified in the package config.
+  /// So, we need to know the full feature set for the context.
   FeatureSet _featureSetForOverriding;
 
-  /**
-   * The flag specifying whether documentation comments should be parsed.
-   */
+  /// The flag specifying whether documentation comments should be parsed.
   bool _preserveComments = true;
 
   final List<int> lineStarts = <int>[];
 
   Token firstToken;
 
-  /**
-   * A flag indicating whether the scanner should recognize the `>>>` operator
-   * and the `>>>=` operator.
-   *
-   * Use [configureFeatures] rather than this field.
-   */
+  /// A flag indicating whether the scanner should recognize the `>>>` operator
+  /// and the `>>>=` operator.
+  ///
+  /// Use [configureFeatures] rather than this field.
   bool enableGtGtGt = false;
 
-  /**
-   * A flag indicating whether the scanner should recognize the `late` and
-   * `required` keywords.
-   *
-   * Use [configureFeatures] rather than this field.
-   */
+  /// A flag indicating whether the scanner should recognize the `late` and
+  /// `required` keywords.
+  ///
+  /// Use [configureFeatures] rather than this field.
   bool enableNonNullable = false;
 
   fasta.LanguageVersionToken _languageVersion;
 
   FeatureSet _featureSet;
 
-  /**
-   * Initialize a newly created scanner to scan characters from the given
-   * [source]. The given character [reader] will be used to read the characters
-   * in the source. The given [_errorListener] will be informed of any errors
-   * that are found.
-   */
+  /// Initialize a newly created scanner to scan characters from the given
+  /// [source]. The given character [reader] will be used to read the characters
+  /// in the source. The given [_errorListener] will be informed of any errors
+  /// that are found.
   factory Scanner(Source source, CharacterReader reader,
           AnalysisErrorListener errorListener) =>
       Scanner.fasta(source, errorListener,
@@ -105,22 +87,18 @@
     lineStarts.add(0);
   }
 
-  /**
-   * The features associated with this scanner.
-   *
-   * If a language version comment (e.g. '// @dart = 2.3') is detected
-   * when calling [tokenize] and this field is non-null, then this field
-   * will be updated to contain a downgraded feature set based upon the
-   * language version specified.
-   *
-   * Use [configureFeatures] to set the features.
-   */
+  /// The features associated with this scanner.
+  ///
+  /// If a language version comment (e.g. '// @dart = 2.3') is detected
+  /// when calling [tokenize] and this field is non-null, then this field
+  /// will be updated to contain a downgraded feature set based upon the
+  /// language version specified.
+  ///
+  /// Use [configureFeatures] to set the features.
   FeatureSet get featureSet => _featureSet;
 
-  /**
-   * The language version override specified for this compilation unit using a
-   * token like '// @dart = 2.7', or `null` if no override is specified.
-   */
+  /// The language version override specified for this compilation unit using a
+  /// token like '// @dart = 2.7', or `null` if no override is specified.
   fasta.LanguageVersionToken get languageVersion => _languageVersion;
 
   set preserveComments(bool preserveComments) {
diff --git a/pkg/analyzer/lib/src/dart/sdk/sdk.dart b/pkg/analyzer/lib/src/dart/sdk/sdk.dart
index 2826ac3..f8e3074 100644
--- a/pkg/analyzer/lib/src/dart/sdk/sdk.dart
+++ b/pkg/analyzer/lib/src/dart/sdk/sdk.dart
@@ -18,52 +18,30 @@
 import 'package:path/path.dart' as pathos;
 import 'package:yaml/yaml.dart';
 
-/**
- * An abstract implementation of a Dart SDK in which the available libraries are
- * stored in a library map. Subclasses are responsible for populating the
- * library map.
- */
+/// An abstract implementation of a Dart SDK in which the available libraries
+/// are stored in a library map. Subclasses are responsible for populating the
+/// library map.
 abstract class AbstractDartSdk implements DartSdk {
-  /**
-   * The resource provider used to access the file system.
-   */
+  /// The resource provider used to access the file system.
   ResourceProvider resourceProvider;
 
-  /**
-   * A mapping from Dart library URI's to the library represented by that URI.
-   */
+  /// A mapping from Dart library URI's to the library represented by that URI.
   LibraryMap libraryMap = LibraryMap();
 
-  /**
-   * The [AnalysisOptions] to use to create the [context].
-   */
+  /// The [AnalysisOptions] to use to create the [context].
   AnalysisOptions _analysisOptions;
 
-  /**
-   * The flag that specifies whether an SDK summary should be used. This is a
-   * temporary flag until summaries are enabled by default.
-   */
-  bool _useSummary = false;
-
-  /**
-   * The [AnalysisContext] which is used for all of the sources in this SDK.
-   */
+  /// The [AnalysisContext] which is used for all of the sources in this SDK.
   SdkAnalysisContext _analysisContext;
 
-  /**
-   * The mapping from Dart URI's to the corresponding sources.
-   */
+  /// The mapping from Dart URI's to the corresponding sources.
   final Map<String, Source> _uriToSourceMap = HashMap<String, Source>();
 
-  /**
-   * Return the analysis options for this SDK analysis context.
-   */
+  /// Return the analysis options for this SDK analysis context.
   AnalysisOptions get analysisOptions => _analysisOptions;
 
-  /**
-   * Set the [options] for this SDK analysis context.  Throw [StateError] if the
-   * context has been already created.
-   */
+  /// Set the [options] for this SDK analysis context.  Throw [StateError] if
+  /// the context has been already created.
   set analysisOptions(AnalysisOptions options) {
     if (_analysisContext != null) {
       throw StateError(
@@ -84,35 +62,15 @@
   @override
   List<SdkLibrary> get sdkLibraries => libraryMap.sdkLibraries;
 
-  /**
-   * Return the path separator used by the resource provider.
-   */
+  /// Return the path separator used by the resource provider.
   String get separator => resourceProvider.pathContext.separator;
 
   @override
   List<String> get uris => libraryMap.uris;
 
-  /**
-   * Return `true` if the SDK summary will be used when available.
-   */
-  bool get useSummary => _useSummary;
-
-  /**
-   * Specify whether SDK summary should be used.
-   */
-  set useSummary(bool use) {
-    if (_analysisContext != null) {
-      throw StateError(
-          'The "useSummary" flag cannot be changed after context creation.');
-    }
-    _useSummary = use;
-  }
-
-  /**
-   * Add the extensions from one or more sdk extension files to this sdk. The
-   * [extensions] should be a table mapping the names of extensions to the paths
-   * where those extensions can be found.
-   */
+  /// Add the extensions from one or more sdk extension files to this sdk. The
+  /// [extensions] should be a table mapping the names of extensions to the
+  /// paths where those extensions can be found.
   void addExtensions(Map<String, String> extensions) {
     extensions.forEach((String uri, String path) {
       SdkLibraryImpl library = SdkLibraryImpl(uri);
@@ -121,9 +79,7 @@
     });
   }
 
-  /**
-   * Return info for debugging https://github.com/dart-lang/sdk/issues/35226.
-   */
+  /// Return info for debugging https://github.com/dart-lang/sdk/issues/35226.
   Map<String, Object> debugInfo() {
     return <String, Object>{
       'runtimeType': '$runtimeType',
@@ -238,9 +194,7 @@
   }
 }
 
-/**
- * An SDK backed by URI mappings derived from an `_embedder.yaml` file.
- */
+/// An SDK backed by URI mappings derived from an `_embedder.yaml` file.
 class EmbedderSdk extends AbstractDartSdk {
   static const String _DART_COLON_PREFIX = 'dart:';
 
@@ -273,9 +227,7 @@
   // TODO(danrubel) Determine SDK version
   String get sdkVersion => '0';
 
-  /**
-   * The url mappings for this SDK.
-   */
+  /// The url mappings for this SDK.
   Map<String, String> get urlMappings => _urlMappings;
 
   @override
@@ -321,9 +273,7 @@
     }
   }
 
-  /**
-   * Install the mapping from [name] to [libDir]/[file].
-   */
+  /// Install the mapping from [name] to [libDir]/[file].
   void _processEmbeddedLibs(String name, String file, Folder libDir) {
     if (!name.startsWith(_DART_COLON_PREFIX)) {
       // SDK libraries must begin with 'dart:'.
@@ -336,18 +286,16 @@
     libraryMap.setLibrary(name, library);
   }
 
-  /**
-   * Given the 'embedderYamls' from [EmbedderYamlLocator] check each one for the
-   * top level key 'embedded_libs'. Under the 'embedded_libs' key are key value
-   * pairs. Each key is a 'dart:' library uri and each value is a path
-   * (relative to the directory containing `_embedder.yaml`) to a dart script
-   * for the given library. For example:
-   *
-   * embedded_libs:
-   *   'dart:io': '../../sdk/io/io.dart'
-   *
-   * If a key doesn't begin with `dart:` it is ignored.
-   */
+  /// Given the 'embedderYamls' from [EmbedderYamlLocator] check each one for
+  /// the top level key 'embedded_libs'. Under the 'embedded_libs' key are key
+  /// value pairs. Each key is a 'dart:' library uri and each value is a path
+  /// (relative to the directory containing `_embedder.yaml`) to a dart script
+  /// for the given library. For example:
+  ///
+  /// embedded_libs:
+  ///   'dart:io': '../../sdk/io/io.dart'
+  ///
+  /// If a key doesn't begin with `dart:` it is ignored.
   void _processEmbedderYaml(Folder libDir, YamlMap map) {
     YamlNode embedded_libs = map[_EMBEDDED_LIB_MAP_KEY];
     if (embedded_libs is YamlMap) {
@@ -356,22 +304,20 @@
   }
 }
 
-/**
- * A Dart SDK installed in a specified directory. Typical Dart SDK layout is
- * something like...
- *
- *     dart-sdk/
- *        bin/
- *           dart[.exe]  <-- VM
- *        lib/
- *           core/
- *              core.dart
- *              ... other core library files ...
- *           ... other libraries ...
- *        util/
- *           ... Dart utilities ...
- *     Chromium/   <-- Dartium typically exists in a sibling directory
- */
+/// A Dart SDK installed in a specified directory. Typical Dart SDK layout is
+/// something like...
+///
+///     dart-sdk/
+///        bin/
+///           dart[.exe]  <-- VM
+///        lib/
+///           core/
+///              core.dart
+///              ... other core library files ...
+///           ... other libraries ...
+///        util/
+///           ... Dart utilities ...
+///     Chromium/   <-- Dartium typically exists in a sibling directory
 class FolderBasedDartSdk extends AbstractDartSdk {
   /// The name of the directory within the SDK directory that contains
   /// executables.
@@ -416,21 +362,15 @@
   /// The directory within the SDK directory that contains the libraries.
   Folder _libraryDirectory;
 
-  /**
-   * The revision number of this SDK, or `"0"` if the revision number cannot be
-   * discovered.
-   */
+  /// The revision number of this SDK, or `"0"` if the revision number cannot be
+  /// discovered.
   String _sdkVersion;
 
-  /**
-   * The file containing the pub executable.
-   */
+  /// The file containing the pub executable.
   File _pubExecutable;
 
-  /**
-   * Initialize a newly created SDK to represent the Dart SDK installed in the
-   * [sdkDirectory].
-   */
+  /// Initialize a newly created SDK to represent the Dart SDK installed in the
+  /// [sdkDirectory].
   FolderBasedDartSdk(ResourceProvider resourceProvider, Folder sdkDirectory)
       : _sdkDirectory = sdkDirectory {
     this.resourceProvider = resourceProvider;
@@ -450,28 +390,21 @@
     }
   }
 
-  /**
-   * Return the directory containing the SDK.
-   */
+  /// Return the directory containing the SDK.
   Folder get directory => _sdkDirectory;
 
-  /**
-   * Return the directory containing documentation for the SDK.
-   */
+  /// Return the directory containing documentation for the SDK.
   Folder get docDirectory =>
       _sdkDirectory.getChildAssumingFolder(_DOCS_DIRECTORY_NAME);
 
-  /**
-   * Return the directory within the SDK directory that contains the libraries.
-   */
+  /// Return the directory within the SDK directory that contains the libraries.
   Folder get libraryDirectory {
     return _libraryDirectory ??=
         _sdkDirectory.getChildAssumingFolder(_LIB_DIRECTORY_NAME);
   }
 
-  /**
-   * Return the file containing the Pub executable, or `null` if it does not exist.
-   */
+  /// Return the file containing the Pub executable, or `null` if it does not
+  /// exist.
   File get pubExecutable {
     return _pubExecutable ??= _sdkDirectory
         .getChildAssumingFolder(_BIN_DIRECTORY_NAME)
@@ -480,10 +413,8 @@
             : _PUB_EXECUTABLE_NAME);
   }
 
-  /**
-   * Return the revision number of this SDK, or `"0"` if the revision number
-   * cannot be discovered.
-   */
+  /// Return the revision number of this SDK, or `"0"` if the revision number
+  /// cannot be discovered.
   @override
   String get sdkVersion {
     if (_sdkVersion == null) {
@@ -502,9 +433,7 @@
     return _sdkVersion;
   }
 
-  /**
-   * Determine the search order for trying to locate the [_LIBRARIES_FILE].
-   */
+  /// Determine the search order for trying to locate the [_LIBRARIES_FILE].
   Iterable<File> get _libraryMapLocations sync* {
     yield libraryDirectory
         .getChildAssumingFolder(_INTERNAL_DIR)
@@ -516,9 +445,7 @@
         .getChildAssumingFile(_LIBRARIES_FILE);
   }
 
-  /**
-   * Return info for debugging https://github.com/dart-lang/sdk/issues/35226.
-   */
+  /// Return info for debugging https://github.com/dart-lang/sdk/issues/35226.
   @override
   Map<String, Object> debugInfo() {
     var result = super.debugInfo();
@@ -536,10 +463,8 @@
     return filePath.substring(libPath.length + 1);
   }
 
-  /**
-   * Read all of the configuration files to initialize the library maps.
-   * Return the initialized library map.
-   */
+  /// Read all of the configuration files to initialize the library maps.
+  /// Return the initialized library map.
   LibraryMap initialLibraryMap() {
     List<String> searchedPaths = <String>[];
     StackTrace lastStackTrace;
@@ -598,11 +523,9 @@
     }
   }
 
-  /**
-   * Return the default directory for the Dart SDK, or `null` if the directory
-   * cannot be determined (or does not exist). The default directory is provided
-   * by a system property named `com.google.dart.sdk`.
-   */
+  /// Return the default directory for the Dart SDK, or `null` if the directory
+  /// cannot be determined (or does not exist). The default directory is
+  /// provided by a system property named `com.google.dart.sdk`.
   static Folder defaultSdkDirectory(ResourceProvider resourceProvider) {
     // TODO(brianwilkerson) This is currently only being used in the analysis
     // server's Driver class to find the default SDK. The command-line analyzer
@@ -653,41 +576,35 @@
   }
 }
 
-/**
- * An object used to read and parse the libraries file
- * (dart-sdk/lib/_internal/sdk_library_metadata/lib/libraries.dart) for information
- * about the libraries in an SDK. The library information is represented as a
- * Dart file containing a single top-level variable whose value is a const map.
- * The keys of the map are the names of libraries defined in the SDK and the
- * values in the map are info objects defining the library. For example, a
- * subset of a typical SDK might have a libraries file that looks like the
- * following:
- *
- *     final Map<String, LibraryInfo> LIBRARIES = const <LibraryInfo> {
- *       // Used by VM applications
- *       "builtin" : const LibraryInfo(
- *         "builtin/builtin_runtime.dart",
- *         category: "Server",
- *         platforms: VM_PLATFORM),
- *
- *       "compiler" : const LibraryInfo(
- *         "compiler/compiler.dart",
- *         category: "Tools",
- *         platforms: 0),
- *     };
- */
+/// An object used to read and parse the libraries file
+/// (dart-sdk/lib/_internal/sdk_library_metadata/lib/libraries.dart) for
+/// information about the libraries in an SDK. The library information is
+/// represented as a Dart file containing a single top-level variable whose
+/// value is a const map. The keys of the map are the names of libraries defined
+/// in the SDK and the values in the map are info objects defining the library.
+/// For example, a subset of a typical SDK might have a libraries file that
+/// looks like the following:
+///
+///     final Map<String, LibraryInfo> LIBRARIES = const <LibraryInfo> {
+///       // Used by VM applications
+///       "builtin" : const LibraryInfo(
+///         "builtin/builtin_runtime.dart",
+///         category: "Server",
+///         platforms: VM_PLATFORM),
+///
+///       "compiler" : const LibraryInfo(
+///         "compiler/compiler.dart",
+///         category: "Tools",
+///         platforms: 0),
+///     };
 class SdkLibrariesReader {
-  /**
-   * Return the library map read from the given [file], given that the content
-   * of the file is already known to be [libraryFileContents].
-   */
+  /// Return the library map read from the given [file], given that the content
+  /// of the file is already known to be [libraryFileContents].
   LibraryMap readFromFile(File file, String libraryFileContents) =>
       readFromSource(file.createSource(), libraryFileContents);
 
-  /**
-   * Return the library map read from the given [source], given that the content
-   * of the file is already known to be [libraryFileContents].
-   */
+  /// Return the library map read from the given [source], given that the
+  /// content of the file is already known to be [libraryFileContents].
   LibraryMap readFromSource(Source source, String libraryFileContents) {
     // TODO(paulberry): initialize the feature set appropriately based on the
     // version of the SDK we are reading, and enable flags.
diff --git a/pkg/analyzer/lib/src/error/best_practices_verifier.dart b/pkg/analyzer/lib/src/error/best_practices_verifier.dart
index 0968993..ba3ca9e 100644
--- a/pkg/analyzer/lib/src/error/best_practices_verifier.dart
+++ b/pkg/analyzer/lib/src/error/best_practices_verifier.dart
@@ -18,13 +18,13 @@
 import 'package:analyzer/src/dart/element/element.dart';
 import 'package:analyzer/src/dart/element/inheritance_manager3.dart';
 import 'package:analyzer/src/dart/element/type.dart';
+import 'package:analyzer/src/dart/element/type_system.dart';
 import 'package:analyzer/src/dart/resolver/body_inference_context.dart';
 import 'package:analyzer/src/dart/resolver/exit_detector.dart';
 import 'package:analyzer/src/error/codes.dart';
 import 'package:analyzer/src/generated/constant.dart';
 import 'package:analyzer/src/generated/engine.dart';
 import 'package:analyzer/src/generated/resolver.dart';
-import 'package:analyzer/src/generated/type_system.dart';
 import 'package:analyzer/src/lint/linter.dart';
 import 'package:analyzer/src/workspace/workspace.dart';
 import 'package:meta/meta.dart';
@@ -165,7 +165,7 @@
     } else if (element?.isVisibleForTemplate == true ||
         element?.isVisibleForTesting == true) {
       if (parent is Declaration) {
-        reportInvalidAnnotation(Element declaredElement) {
+        void reportInvalidAnnotation(Element declaredElement) {
           _errorReporter.reportErrorForNode(
               HintCode.INVALID_VISIBILITY_ANNOTATION,
               node,
@@ -1403,6 +1403,12 @@
       return false;
     }
 
+    // Casting from `T*` to `T?` is a way to force `T?`.
+    if (leftType.nullabilitySuffix == NullabilitySuffix.star &&
+        rightType.nullabilitySuffix == NullabilitySuffix.question) {
+      return false;
+    }
+
     // For `condition ? then : else` the result type is `LUB`.
     // Casts might be used to consider only a portion of the inheritance tree.
     var parent = node.parent;
diff --git a/pkg/analyzer/lib/src/error/bool_expression_verifier.dart b/pkg/analyzer/lib/src/error/bool_expression_verifier.dart
index 0acc357..3769e07 100644
--- a/pkg/analyzer/lib/src/error/bool_expression_verifier.dart
+++ b/pkg/analyzer/lib/src/error/bool_expression_verifier.dart
@@ -8,9 +8,9 @@
 import 'package:analyzer/error/error.dart';
 import 'package:analyzer/error/listener.dart';
 import 'package:analyzer/src/dart/element/type.dart';
+import 'package:analyzer/src/dart/element/type_system.dart';
 import 'package:analyzer/src/error/codes.dart';
 import 'package:analyzer/src/error/nullable_dereference_verifier.dart';
-import 'package:analyzer/src/generated/resolver.dart';
 import 'package:meta/meta.dart';
 
 /// Helper for verifying expression that should be of type bool.
@@ -66,13 +66,10 @@
     );
   }
 
-  /**
-   * Check for situations where the result of a method or function is used, when
-   * it returns 'void'. Or, in rare cases, when other types of expressions are
-   * void, such as identifiers.
-   *
-   * TODO(scheglov) Move this in a separate verifier.
-   */
+  /// Check for situations where the result of a method or function is used,
+  /// when it returns 'void'. Or, in rare cases, when other types of expressions
+  /// are void, such as identifiers.
+  // TODO(scheglov) Move this in a separate verifier.
   bool _checkForUseOfVoidResult(Expression expression) {
     if (expression == null ||
         !identical(expression.staticType, VoidTypeImpl.instance)) {
diff --git a/pkg/analyzer/lib/src/error/codes.dart b/pkg/analyzer/lib/src/error/codes.dart
index 0d7bb149b..6071d56 100644
--- a/pkg/analyzer/lib/src/error/codes.dart
+++ b/pkg/analyzer/lib/src/error/codes.dart
@@ -93,7 +93,8 @@
       CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH = CheckedModeCompileTimeErrorCode(
           'CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH',
           "A value of type '{0}' can't be assigned to a parameter of type "
-              "'{1}'.");
+              "'{1}'.",
+          hasPublishedDocs: true);
 
   /**
    * 7.6.1 Generative Constructors: In checked mode, it is a dynamic type error
@@ -570,7 +571,7 @@
   //
   // #### Common fixes
   //
-  // If there's a reasonable value that can be returned, then add a return
+  // If there's a reasonable value that can be returned, then add a `return`
   // statement at the end of the method:
   //
   // ```dart
@@ -583,8 +584,8 @@
   // }
   // ```
   //
-  // If the method won't reach the implicit return, then add a throw at the end
-  // of the method:
+  // If the method won't reach the implicit return, then add a `throw` at the
+  // end of the method:
   //
   // ```dart
   // %experiments=non-nullable
@@ -613,7 +614,8 @@
           "The body might complete normally, causing 'null' to be returned, "
               "but the return type is a potentially non-nullable type.",
           correction:
-              "Try adding either a return or a throw statement at the end.");
+              "Try adding either a return or a throw statement at the end.",
+          hasPublishedDocs: true);
 
   static const CompileTimeErrorCode BREAK_LABEL_ON_SWITCH_MEMBER =
       CompileTimeErrorCode('BREAK_LABEL_ON_SWITCH_MEMBER',
@@ -752,8 +754,8 @@
   // #### Description
   //
   // The analyzer produces this diagnostic when the expression following `case`
-  // in a switch statement has a static type that isn't a subtype of the static
-  // type of the expression following `switch`.
+  // in a `switch` statement has a static type that isn't a subtype of the
+  // static type of the expression following `switch`.
   //
   // #### Example
   //
@@ -772,7 +774,7 @@
   //
   // #### Common fixes
   //
-  // If the value of the case expression is wrong, then change the case
+  // If the value of the `case` expression is wrong, then change the `case`
   // expression so that it has the required type:
   //
   // ```dart
@@ -785,7 +787,7 @@
   // }
   // ```
   //
-  // If the value of the case expression is correct, then change the switch
+  // If the value of the `case` expression is correct, then change the `switch`
   // expression to have the required type:
   //
   // ```dart
@@ -802,7 +804,8 @@
       CompileTimeErrorCode(
           'CASE_EXPRESSION_TYPE_IS_NOT_SWITCH_EXPRESSION_SUBTYPE',
           "The switch case expression type '{0}' must be a subtype of the "
-              "switch expression type '{1}'.");
+              "switch expression type '{1}'.",
+          hasPublishedDocs: true);
 
   /**
    * 10.11 Class Member Conflicts: Let `C` be a class. It is a compile-time
@@ -1530,10 +1533,11 @@
    * Parameters:
    * 0: the name of the non-type element
    */
-  static const CompileTimeErrorCode CONST_WITH_NON_TYPE = CompileTimeErrorCode(
-      'CONST_WITH_NON_TYPE', "The name '{0}' isn't a class.",
-      correction: "Try correcting the name to match an existing class.",
-      isUnresolvedIdentifier: true);
+  static const CompileTimeErrorCode CONST_WITH_NON_TYPE =
+      CompileTimeErrorCodeWithUniqueName('CREATION_WITH_NON_TYPE',
+          'CONST_WITH_NON_TYPE', "The name '{0}' isn't a class.",
+          correction: "Try correcting the name to match an existing class.",
+          isUnresolvedIdentifier: true);
 
   /**
    * 16.12.2 Const: If <i>T</i> is a parameterized type, it is a compile-time
@@ -1620,10 +1624,11 @@
   static const CompileTimeErrorCode DEFAULT_LIST_CONSTRUCTOR =
       CompileTimeErrorCode(
           'DEFAULT_LIST_CONSTRUCTOR',
-          "The default 'List' constructor is not available when null safety is "
+          "The default 'List' constructor isn't available when null safety is "
               "enabled.",
           correction: "Try using a list literal, 'List.filled' or "
-              "'List.generate'.");
+              "'List.generate'.",
+          hasPublishedDocs: true);
 
   /**
    * 6.2.1 Required Formals: By means of a function signature that names the
@@ -1709,7 +1714,7 @@
   //
   // #### Example
   //
-  // The following code produces this diagnostic because `x` was not assigned a
+  // The following code produces this diagnostic because `x` wasn't assigned a
   // value before being read:
   //
   // ```dart
@@ -1738,7 +1743,8 @@
           "The late local variable '{0}' is definitely unassigned at this "
               "point.",
           correction:
-              "Ensure that it is assigned on necessary execution paths.");
+              "Ensure that it is assigned on necessary execution paths.",
+          hasPublishedDocs: true);
 
   /**
    * No parameters.
@@ -1819,7 +1825,8 @@
           'DUPLICATE_CONSTRUCTOR',
           'DUPLICATE_CONSTRUCTOR_DEFAULT',
           "The default constructor is already defined.",
-          correction: "Try giving one of the constructors a name.");
+          correction: "Try giving one of the constructors a name.",
+          hasPublishedDocs: true);
 
   /**
    * Parameters:
@@ -1830,7 +1837,8 @@
           'DUPLICATE_CONSTRUCTOR',
           'DUPLICATE_CONSTRUCTOR_NAME',
           "The constructor with name '{0}' is already defined.",
-          correction: "Try renaming one of the constructors.");
+          correction: "Try renaming one of the constructors.",
+          hasPublishedDocs: true);
 
   /**
    * Parameters:
@@ -2083,7 +2091,8 @@
       'EXPORT_LEGACY_SYMBOL',
       "The symbol '{0}' is defined in a legacy library, and can't be "
           "re-exported from a non-nullable by default library.",
-      correction: "Try removing the export or migrating the legacy library.");
+      correction: "Try removing the export or migrating the legacy library.",
+      hasPublishedDocs: true);
 
   /**
    * 14.2 Exports: It is a compile-time error if the compilation unit found at
@@ -2161,7 +2170,7 @@
    */
   // #### Description
   //
-  // The analyzer produces this diagnostic when an extends clause contains a
+  // The analyzer produces this diagnostic when an `extends` clause contains a
   // name that is declared to be something other than a class.
   //
   // #### Examples
@@ -2178,7 +2187,7 @@
   // #### Common fixes
   //
   // If you want the class to extend a class other than `Object`, then replace
-  // the name in the extends clause with the name of that class:
+  // the name in the `extends` clause with the name of that class:
   //
   // ```dart
   // void f() {}
@@ -2188,7 +2197,7 @@
   // class B {}
   // ```
   //
-  // If you want the class to extend `Object`, then remove the extends clause:
+  // If you want the class to extend `Object`, then remove the `extends` clause:
   //
   // ```dart
   // void f() {}
@@ -2430,7 +2439,7 @@
   //
   // The analyzer produces this diagnostic when an extension override is used as
   // the target of a cascade expression. The value of a cascade expression
-  // `e..m` is the value of the target `e`, but extension overrides are not
+  // `e..m` is the value of the target `e`, but extension overrides aren't
   // expressions and don't have a value.
   //
   // #### Examples
@@ -2757,7 +2766,7 @@
    */
   // #### Description
   //
-  // The analyzer produces this diagnostic when a name used in the implements
+  // The analyzer produces this diagnostic when a name used in the `implements`
   // clause of a class or mixin declaration is defined to be something other
   // than a class or mixin.
   //
@@ -2781,8 +2790,8 @@
   // imported, then add an import, with a prefix, for the library in which it’s
   // declared.
   //
-  // Otherwise, either replace the name in the implements clause with the name
-  // of an existing class or mixin, or remove the name from the implements
+  // Otherwise, either replace the name in the `implements` clause with the name
+  // of an existing class or mixin, or remove the name from the `implements`
   // clause.
   static const CompileTimeErrorCode IMPLEMENTS_NON_CLASS = CompileTimeErrorCode(
       'IMPLEMENTS_NON_CLASS',
@@ -2799,7 +2808,7 @@
   // #### Description
   //
   // The analyzer produces this diagnostic when a single class is specified more
-  // than once in an implements clause.
+  // than once in an `implements` clause.
   //
   // #### Examples
   //
@@ -2918,7 +2927,8 @@
   // Remove the import directive.
   static const CompileTimeErrorCode IMPORT_INTERNAL_LIBRARY =
       CompileTimeErrorCode('IMPORT_INTERNAL_LIBRARY',
-          "The library '{0}' is internal and can't be imported.");
+          "The library '{0}' is internal and can't be imported.",
+          hasPublishedDocs: true);
 
   /**
    * 14.1 Imports: It is a compile-time error if the specified URI of an
@@ -2998,7 +3008,8 @@
           "Superinterfaces don't have a valid override for '{0}': {1}.",
           correction:
               "Try adding an explicit override that is consistent with all "
-              "of the inherited members.");
+              "of the inherited members.",
+          hasPublishedDocs: true);
 
   /**
    * 11.1.1 Inheritance and Overriding. Let `I` be the implicit interface of a
@@ -3964,7 +3975,8 @@
           "The parameter '{0}' can't have a value of 'null' because of its "
               "type, and no non-null default value is provided.",
           correction:
-              "Try adding either a default value or the 'required' modifier.");
+              "Try adding either a default value or the 'required' modifier.",
+          hasPublishedDocs: true);
 
   /**
    * Parameters:
@@ -4004,7 +4016,8 @@
           'MISSING_REQUIRED_ARGUMENT',
           "The named parameter '{0}' is required, but there's no corresponding "
               "argument.",
-          correction: "Try adding the required argument.");
+          correction: "Try adding the required argument.",
+          hasPublishedDocs: true);
 
   /**
    * It's a compile-time error to apply a mixin containing super-invocations to
@@ -4138,14 +4151,16 @@
    */
   static const CompileTimeErrorCode MIXIN_OF_DISALLOWED_CLASS =
       CompileTimeErrorCodeWithUniqueName('SUBTYPE_OF_DISALLOWED_TYPE',
-          'MIXIN_OF_DISALLOWED_CLASS', "Classes can't mixin '{0}'.");
+          'MIXIN_OF_DISALLOWED_CLASS', "Classes can't mixin '{0}'.",
+          correction: "Try specifying a different class or mixin, or "
+              "remove the class or mixin from the list.");
 
   /**
    * No parameters.
    */
   // #### Description
   //
-  // The analyzer produces this diagnostic when a name in a mixin clause is
+  // The analyzer produces this diagnostic when a name in a `with` clause is
   // defined to be something other than a mixin or a class.
   //
   // #### Examples
@@ -4161,7 +4176,8 @@
   //
   // #### Common fixes
   //
-  // Remove the invalid name from the list, possibly replacing it with the name of the intended mixin or class:
+  // Remove the invalid name from the list, possibly replacing it with the name
+  // of the intended mixin or class:
   //
   // ```dart
   // typedef F = int Function(String);
@@ -4190,7 +4206,9 @@
       CompileTimeErrorCodeWithUniqueName(
           'SUBTYPE_OF_DISALLOWED_TYPE',
           'MIXIN_SUPER_CLASS_CONSTRAINT_DISALLOWED_CLASS',
-          "'{0}' can't be used as a super-class constraint.");
+          "'{0}' can't be used as a super-class constraint.",
+          correction: "Try specifying a different super-class constraint, or "
+              "remove the 'on' clause.");
 
   /**
    * No parameters.
@@ -4216,7 +4234,7 @@
   // If the type was intended to be a class but was mistyped, then replace the
   // name.
   //
-  // Otherwise, remove the type from the on clause.
+  // Otherwise, remove the type from the `on` clause.
   static const CompileTimeErrorCode MIXIN_SUPER_CLASS_CONSTRAINT_NON_INTERFACE =
       CompileTimeErrorCode('MIXIN_SUPER_CLASS_CONSTRAINT_NON_INTERFACE',
           "Only classes and mixins can be used as superclass constraints.",
@@ -4357,8 +4375,8 @@
    */
   // #### Description
   //
-  // The analyzer produces this diagnostic when the expression in a case clause
-  // isn't a constant expression.
+  // The analyzer produces this diagnostic when the expression in a `case`
+  // clause isn't a constant expression.
   //
   // #### Examples
   //
@@ -4376,8 +4394,8 @@
   //
   // #### Common fixes
   //
-  // Either make the expression a constant expression, or rewrite the switch
-  // statement as a sequence of if statements:
+  // Either make the expression a constant expression, or rewrite the `switch`
+  // statement as a sequence of `if` statements:
   //
   // ```dart
   // void f(int i, int j) {
@@ -4632,12 +4650,12 @@
    */
   // #### Description
   //
-  // The analyzer produces this diagnostic when an if element or a spread
+  // The analyzer produces this diagnostic when an `if` element or a spread
   // element in a constant map isn't a constant element.
   //
   // #### Examples
   //
-  // The following code produces this diagnostic because it is attempting to
+  // The following code produces this diagnostic because it's attempting to
   // spread a non-constant map:
   //
   // ```dart
@@ -4646,7 +4664,7 @@
   // ```
   //
   // Similarly, the following code produces this diagnostic because the
-  // condition in the if element isn't a constant expression:
+  // condition in the `if` element isn't a constant expression:
   //
   // ```dart
   // bool notConst = true;
@@ -4655,7 +4673,7 @@
   //
   // #### Common fixes
   //
-  // If the map needs to be a constant map, then make the elements  constants.
+  // If the map needs to be a constant map, then make the elements constants.
   // In the spread example, you might do that by making the collection being
   // spread a constant:
   //
@@ -4734,7 +4752,8 @@
   // remove the annotation or use a different class for the annotation.
   static const CompileTimeErrorCode NON_CONSTANT_ANNOTATION_CONSTRUCTOR =
       CompileTimeErrorCode('NON_CONSTANT_ANNOTATION_CONSTRUCTOR',
-          "Annotation creation can only call a const constructor.");
+          "Annotation creation can only call a const constructor.",
+          hasPublishedDocs: true);
 
   /**
    * No parameters.
@@ -4935,7 +4954,8 @@
           "The non-nullable local variable '{0}' must be assigned before it "
               "can be used.",
           correction: "Try giving it an initializer expression, or ensure that "
-              "it's assigned on every execution path.");
+              "it's assigned on every execution path.",
+          hasPublishedDocs: true);
 
   /**
    * Parameters:
@@ -5063,7 +5083,8 @@
           "Non-nullable instance field '{0}' must be initialized.",
           correction: "Try adding an initializer expression, "
               "or a generative constructor that initializes it, "
-              "or mark it 'late'.");
+              "or mark it 'late'.",
+          hasPublishedDocs: true);
 
   /**
    * Parameters:
@@ -5077,7 +5098,8 @@
           "Non-nullable instance field '{0}' must be initialized.",
           correction: "Try adding an initializer expression, "
               "or add a field initializer in this constructor, "
-              "or mark it 'late'.");
+              "or mark it 'late'.",
+          hasPublishedDocs: true);
 
   /**
    * Parameters:
@@ -5143,7 +5165,8 @@
   static const CompileTimeErrorCode NOT_INITIALIZED_NON_NULLABLE_VARIABLE =
       CompileTimeErrorCode('NOT_INITIALIZED_NON_NULLABLE_VARIABLE',
           "The non-nullable variable '{0}' must be initialized.",
-          correction: "Try adding an initializer expression.");
+          correction: "Try adding an initializer expression.",
+          hasPublishedDocs: true);
 
   /**
    * No parameters.
@@ -5223,12 +5246,12 @@
   // #### Description
   //
   // The analyzer produces this diagnostic when a class declaration uses an
-  // extends clause to specify a superclass, and the superclass is followed by a
-  // `?`.
+  // `extends` clause to specify a superclass, and the superclass is followed by
+  // a `?`.
   //
   // It isn't valid to specify a nullable superclass because doing so would have
   // no meaning; it wouldn't change either the interface or implementation being
-  // inherited by the class containing the extends clause.
+  // inherited by the class containing the `extends` clause.
   //
   // Note, however, that it _is_ valid to use a nullable type as a type argument
   // to the superclass, such as `class A extends B<C?> {}`.
@@ -5236,7 +5259,7 @@
   // #### Example
   //
   // The following code produces this diagnostic because `A?` is a nullable
-  // type, and nullable types can't be used in an extends clause:
+  // type, and nullable types can't be used in an `extends` clause:
   //
   // ```dart
   // %experiments=non-nullable
@@ -5256,7 +5279,8 @@
   static const CompileTimeErrorCode NULLABLE_TYPE_IN_EXTENDS_CLAUSE =
       CompileTimeErrorCode('NULLABLE_TYPE_IN_EXTENDS_CLAUSE',
           "A class can't extend a nullable type.",
-          correction: "Try removing the question mark.");
+          correction: "Try removing the question mark.",
+          hasPublishedDocs: true);
 
   /**
    * No parameters.
@@ -5264,11 +5288,11 @@
   // #### Description
   //
   // The analyzer produces this diagnostic when a class or mixin declaration has
-  // an implements clause, and an interface is followed by a `?`.
+  // an `implements` clause, and an interface is followed by a `?`.
   //
   // It isn't valid to specify a nullable interface because doing so would have
   // no meaning; it wouldn't change the interface being inherited by the class
-  // containing the implements clause.
+  // containing the `implements` clause.
   //
   // Note, however, that it _is_ valid to use a nullable type as a type argument
   // to the interface, such as `class A implements B<C?> {}`.
@@ -5277,7 +5301,7 @@
   // #### Example
   //
   // The following code produces this diagnostic because `A?` is a nullable
-  // type, and nullable types can't be used in an implements clause:
+  // type, and nullable types can't be used in an `implements` clause:
   //
   // ```dart
   // %experiments=non-nullable
@@ -5297,20 +5321,21 @@
   static const CompileTimeErrorCode NULLABLE_TYPE_IN_IMPLEMENTS_CLAUSE =
       CompileTimeErrorCode('NULLABLE_TYPE_IN_IMPLEMENTS_CLAUSE',
           "A class or mixin can't implement a nullable type.",
-          correction: "Try removing the question mark.");
+          correction: "Try removing the question mark.",
+          hasPublishedDocs: true);
 
   /**
    * No parameters.
    */
   // #### Description
   //
-  // The analyzer produces this diagnostic when a mixin declaration uses an on
+  // The analyzer produces this diagnostic when a mixin declaration uses an `on`
   // clause to specify a superclass constraint, and the class that's specified
   // is followed by a `?`.
   //
   // It isn't valid to specify a nullable superclass constraint because doing so
   // would have no meaning; it wouldn't change the interface being depended on
-  // by the mixin containing the on clause.
+  // by the mixin containing the `on` clause.
   //
   // Note, however, that it _is_ valid to use a nullable type as a type argument
   // to the superclass constraint, such as `mixin A on B<C?> {}`.
@@ -5319,7 +5344,7 @@
   // #### Example
   //
   // The following code produces this diagnostic because `A?` is a nullable type
-  // and nullable types can't be used in an on clause:
+  // and nullable types can't be used in an `on` clause:
   //
   // ```dart
   // %experiments=non-nullable
@@ -5339,7 +5364,8 @@
   static const CompileTimeErrorCode NULLABLE_TYPE_IN_ON_CLAUSE =
       CompileTimeErrorCode('NULLABLE_TYPE_IN_ON_CLAUSE',
           "A mixin can't have a nullable type as a superclass constraint.",
-          correction: "Try removing the question mark.");
+          correction: "Try removing the question mark.",
+          hasPublishedDocs: true);
 
   /**
    * No parameters.
@@ -5347,11 +5373,11 @@
   // #### Description
   //
   // The analyzer produces this diagnostic when a class or mixin declaration has
-  // a with clause, and a mixin is followed by a `?`.
+  // a `with` clause, and a mixin is followed by a `?`.
   //
   // It isn't valid to specify a nullable mixin because doing so would have no
   // meaning; it wouldn't change either the interface or implementation being
-  // inherited by the class containing the with clause.
+  // inherited by the class containing the `with` clause.
   //
   // Note, however, that it _is_ valid to use a nullable type as a type argument
   // to the mixin, such as `class A with B<C?> {}`.
@@ -5359,7 +5385,7 @@
   // #### Example
   //
   // The following code produces this diagnostic because `A?` is a nullable
-  // type, and nullable types can't be used in a with clause:
+  // type, and nullable types can't be used in a `with` clause:
   //
   // ```dart
   // %experiments=non-nullable
@@ -5379,7 +5405,8 @@
   static const CompileTimeErrorCode NULLABLE_TYPE_IN_WITH_CLAUSE =
       CompileTimeErrorCode('NULLABLE_TYPE_IN_WITH_CLAUSE',
           "A class or mixin can't mix in a nullable type.",
-          correction: "Try removing the question mark.");
+          correction: "Try removing the question mark.",
+          hasPublishedDocs: true);
 
   /**
    * 7.9 Superclasses: It is a compile-time error to specify an extends clause
@@ -5533,7 +5560,8 @@
               "by '.'.",
           correction:
               "Try correcting the name to refer to something other than a "
-              "prefix, or renaming the prefix.");
+              "prefix, or renaming the prefix.",
+          hasPublishedDocs: true);
 
   /**
    * It is an error for a mixin to add a private name that conflicts with a
@@ -5838,13 +5866,13 @@
   // #### Description
   //
   // The analyzer produces this diagnostic when a generative constructor
-  // contains a return statement that specifies a value to be returned.
+  // contains a `return` statement that specifies a value to be returned.
   // Generative constructors always return the object that was created, and
   // therefore can't return a different object.
   //
   // #### Example
   //
-  // The following code produces this diagnostic because the return statement
+  // The following code produces this diagnostic because the `return` statement
   // has an expression:
   //
   // ```dart
@@ -5858,7 +5886,7 @@
   // #### Common fixes
   //
   // If the constructor should create a new instance, then remove either the
-  // return statement or the expression:
+  // `return` statement or the expression:
   //
   // ```dart
   // class C {
@@ -5884,7 +5912,8 @@
       CompileTimeErrorCode('RETURN_IN_GENERATIVE_CONSTRUCTOR',
           "Constructors can't return values.",
           correction: "Try removing the return statement or using a factory "
-              "constructor.");
+              "constructor.",
+          hasPublishedDocs: true);
 
   /**
    * 13.12 Return: It is a compile-time error if a return statement of the form
@@ -6020,7 +6049,7 @@
   // #### Description
   //
   // The analyzer produces this diagnostic when the type of the expression in a
-  // throw expression is not assignable to `Object`. It’s not valid to throw
+  // throw expression isn't assignable to `Object`. It isn't valid to throw
   // `null`, so it isn't valid to use an expression that might evaluate to
   // `null`.
   //
@@ -6047,7 +6076,8 @@
   // ```
   static const CompileTimeErrorCode THROW_OF_INVALID_TYPE = CompileTimeErrorCode(
       'THROW_OF_INVALID_TYPE',
-      "The type '{0}' of the thrown expression must be assignable to 'Object'.");
+      "The type '{0}' of the thrown expression must be assignable to 'Object'.",
+      hasPublishedDocs: true);
 
   /**
    * Parameters:
@@ -7027,9 +7057,13 @@
 
   const CompileTimeErrorCodeWithUniqueName(
       String name, this.uniqueName, String message,
-      {String correction, bool hasPublishedDocs})
+      {String correction,
+      bool hasPublishedDocs,
+      bool isUnresolvedIdentifier = false})
       : super(name, message,
-            correction: correction, hasPublishedDocs: hasPublishedDocs);
+            correction: correction,
+            hasPublishedDocs: hasPublishedDocs,
+            isUnresolvedIdentifier: isUnresolvedIdentifier);
 }
 
 /**
@@ -7135,7 +7169,8 @@
           "Functions marked 'async' must have a return type assignable to "
               "'Future'.",
           correction: "Try fixing the return type of the function, or "
-              "removing the modifier 'async' from the function body.");
+              "removing the modifier 'async' from the function body.",
+          hasPublishedDocs: true);
 
   /**
    * 9 Functions: It is a static warning if the declared return type of a
@@ -7682,7 +7717,8 @@
           "There's no constant named '{0}' in '{1}'.",
           correction:
               "Try correcting the name to the name of an existing constant, or "
-              "defining a constant named '{0}'.");
+              "defining a constant named '{0}'.",
+          hasPublishedDocs: true);
 
   /**
    * Parameters:
@@ -8596,13 +8632,13 @@
    */
   // #### Description
   //
-  // The analyzer produces this diagnostic when the last statement in a case
+  // The analyzer produces this diagnostic when the last statement in a `case`
   // block isn't one of the required terminators: `break`, `continue`,
   // `rethrow`, `return`, or `throw`.
   //
   // #### Examples
   //
-  // The following code produces this diagnostic because the case block ends
+  // The following code produces this diagnostic because the `case` block ends
   // with an assignment:
   //
   // ```dart
@@ -8807,7 +8843,8 @@
       'DEAD_NULL_AWARE_EXPRESSION',
       "The left operand can't be null, so the right operand is never executed.",
       correction: "Try removing the operator and the right operand.",
-      errorSeverity: ErrorSeverity.WARNING);
+      errorSeverity: ErrorSeverity.WARNING,
+      hasPublishedDocs: true);
 
   /**
    * 14.2 Exports: It is a static warning to export two different libraries with
@@ -8884,7 +8921,8 @@
           'FIELD_INITIALIZED_IN_INITIALIZER_AND_DECLARATION',
           "Fields can't be initialized in the constructor if they are final "
               "and were already initialized at their declaration.",
-          correction: "Try removing one of the initializations.");
+          correction: "Try removing one of the initializations.",
+          hasPublishedDocs: true);
 
   /**
    * 5. Variables: It is a static warning if a final instance variable that has
@@ -8952,7 +8990,8 @@
       StaticWarningCode(
           'FIELD_INITIALIZER_NOT_ASSIGNABLE',
           "The initializer type '{0}' can't be assigned to the field type "
-              "'{1}'.");
+              "'{1}'.",
+          hasPublishedDocs: true);
 
   /**
    * 7.6.1 Generative Constructors: An initializing formal has the form
@@ -9112,7 +9151,7 @@
       StaticWarningCodeWithUniqueName(
           'FINAL_NOT_INITIALIZED_CONSTRUCTOR',
           'StaticWarningCode.FINAL_NOT_INITIALIZED_CONSTRUCTOR_1',
-          "All final variables must be initialized, but '{0}' is not.",
+          "All final variables must be initialized, but '{0}' isn't.",
           correction: "Try adding an initializer for the field.",
           hasPublishedDocs: true);
 
@@ -9125,8 +9164,8 @@
       StaticWarningCodeWithUniqueName(
           'FINAL_NOT_INITIALIZED_CONSTRUCTOR',
           'StaticWarningCode.FINAL_NOT_INITIALIZED_CONSTRUCTOR_2',
-          "All final variables must be initialized, but '{0}' and '{1}' are "
-              "not.",
+          "All final variables must be initialized, but '{0}' and '{1}' "
+              "aren't.",
           correction: "Try adding initializers for the fields.",
           hasPublishedDocs: true);
 
@@ -9141,7 +9180,7 @@
           'FINAL_NOT_INITIALIZED_CONSTRUCTOR',
           'StaticWarningCode.FINAL_NOT_INITIALIZED_CONSTRUCTOR_3',
           "All final variables must be initialized, but '{0}', '{1}', and {2} "
-              "others are not.",
+              "others aren't.",
           correction: "Try adding initializers for the fields.",
           hasPublishedDocs: true);
 
@@ -9266,8 +9305,8 @@
   //
   // #### Common fixes
   //
-  // Replace the null-aware operator with a non-null-aware equivalent, such as
-  // replacing '?.' with  '.':
+  // Replace the null-aware operator with a non-null-aware equivalent; for
+  // example, change `?.` to  `.`:
   //
   // ```dart
   // %experiments=non-nullable
@@ -9284,7 +9323,8 @@
           "The target expression can't be null, so the null-aware operator "
               "'{0}' can't be used.",
           correction: "Try replace the operator '{0}' with '{1}'.",
-          errorSeverity: ErrorSeverity.WARNING);
+          errorSeverity: ErrorSeverity.WARNING,
+          hasPublishedDocs: true);
 
   /**
    * 7.1 Instance Methods: It is a static warning if an instance method
@@ -9351,7 +9391,8 @@
   static const StaticWarningCode INVALID_USE_OF_NULL_VALUE = StaticWarningCode(
       'INVALID_USE_OF_NULL_VALUE',
       "An expression whose value is always 'null' can't be dereferenced.",
-      correction: "Try changing the type of the expression.");
+      correction: "Try changing the type of the expression.",
+      hasPublishedDocs: true);
 
   /**
    * Parameters:
@@ -9485,7 +9526,7 @@
    */
   // #### Description
   //
-  // The analyzer produces this diagnostic when a switch statement for an enum
+  // The analyzer produces this diagnostic when a `switch` statement for an enum
   // doesn't include an option for one of the values in the enumeration.
   //
   // Note that `null` is always a possible value for an enum and therefore also
@@ -9509,8 +9550,8 @@
   //
   // #### Common fixes
   //
-  // If there's special handling for the missing values, then add a case clause
-  // for each of the missing values:
+  // If there's special handling for the missing values, then add a `case`
+  // clause for each of the missing values:
   //
   // ```dart
   // enum E { e1, e2 }
@@ -9525,7 +9566,7 @@
   // }
   // ```
   //
-  // If the missing values should be handled the same way, then add a default
+  // If the missing values should be handled the same way, then add a `default`
   // clause:
   //
   // ```dart
@@ -9568,10 +9609,11 @@
    * Parameters:
    * 0: the name of the non-type element
    */
-  static const StaticWarningCode NEW_WITH_NON_TYPE = StaticWarningCode(
-      'NEW_WITH_NON_TYPE', "The name '{0}' isn't a class.",
-      correction: "Try correcting the name to match an existing class.",
-      isUnresolvedIdentifier: true);
+  static const StaticWarningCode NEW_WITH_NON_TYPE =
+      StaticWarningCodeWithUniqueName('CREATION_WITH_NON_TYPE',
+          'NEW_WITH_NON_TYPE', "The name '{0}' isn't a class.",
+          correction: "Try correcting the name to match an existing class.",
+          isUnresolvedIdentifier: true);
 
   /**
    * 12.11.1 New: If <i>T</i> is a class or parameterized type accessible in the
@@ -9792,7 +9834,7 @@
   // #### Description
   //
   // The analyzer produces this diagnostic when the identifier following the
-  // `on` in a catch clause is defined to be something other than a type.
+  // `on` in a `catch` clause is defined to be something other than a type.
   //
   // #### Examples
   //
@@ -9918,7 +9960,8 @@
       'PART_OF_DIFFERENT_LIBRARY',
       "Expected this library to be part of '{0}', not '{1}'.",
       correction: "Try including a different part, or changing the name of "
-          "the library in the part's part-of directive.");
+          "the library in the part's part-of directive.",
+      hasPublishedDocs: true);
 
   /**
    * Parameters:
@@ -10075,7 +10118,7 @@
    */
   // #### Description
   //
-  // The analyzer produces this diagnostic when it finds a return statement
+  // The analyzer produces this diagnostic when it finds a `return` statement
   // without an expression in a function that declares a return type.
   //
   // #### Examples
@@ -10176,8 +10219,8 @@
   // #### Description
   //
   // The analyzer produces this diagnostic when the type of the expression in a
-  // switch statement isn't assignable to the type of the expressions in the
-  // case clauses.
+  // `switch` statement isn't assignable to the type of the expressions in the
+  // `case` clauses.
   //
   // #### Example
   //
@@ -10195,8 +10238,8 @@
   //
   // #### Common fixes
   //
-  // If the type of the case expressions is correct, then change the expression
-  // in the switch statement to have the correct type:
+  // If the type of the `case` expressions is correct, then change the
+  // expression in the `switch` statement to have the correct type:
   //
   // ```dart
   // void f(String s) {
@@ -10207,7 +10250,7 @@
   // }
   // ```
   //
-  // If the type of the switch expression is correct, then change the case
+  // If the type of the `switch` expression is correct, then change the `case`
   // expressions to have the correct type:
   //
   // ```dart
@@ -10222,7 +10265,8 @@
       StaticWarningCode(
           'SWITCH_EXPRESSION_NOT_ASSIGNABLE',
           "Type '{0}' of the switch expression isn't assignable to "
-              "the type '{1}' of case expressions.");
+              "the type '{1}' of case expressions.",
+          hasPublishedDocs: true);
 
   /**
    * 15.1 Static Types: It is a static warning to use a deferred type in a type
@@ -10388,7 +10432,8 @@
       "Undefined name 'await' in function body not marked with 'async'.",
       correction: "Try correcting the name to one that is defined, "
           "defining the name, or "
-          "adding 'async' to the enclosing function body.");
+          "adding 'async' to the enclosing function body.",
+      hasPublishedDocs: true);
 
   @Deprecated('Use CompileTimeErrorCode.UNDEFINED_NAMED_PARAMETER')
   static const CompileTimeErrorCode UNDEFINED_NAMED_PARAMETER =
@@ -10463,7 +10508,8 @@
               "it can be dereferenced.",
           correction:
               "Try checking that the value isn't 'null' before dereferencing "
-              "it.");
+              "it.",
+          hasPublishedDocs: true);
 
   /**
    * No parameters.
@@ -10500,7 +10546,8 @@
           "The '!' will have no effect because the target expression can't be"
               " null.",
           correction: "Try removing the '!' operator.",
-          errorSeverity: ErrorSeverity.WARNING);
+          errorSeverity: ErrorSeverity.WARNING,
+          hasPublishedDocs: true);
 
   /**
    * No parameters.
@@ -10567,9 +10614,13 @@
 
   const StaticWarningCodeWithUniqueName(
       String name, this.uniqueName, String message,
-      {String correction, bool hasPublishedDocs})
+      {String correction,
+      bool hasPublishedDocs,
+      bool isUnresolvedIdentifier = false})
       : super(name, message,
-            correction: correction, hasPublishedDocs: hasPublishedDocs);
+            correction: correction,
+            hasPublishedDocs: hasPublishedDocs,
+            isUnresolvedIdentifier: isUnresolvedIdentifier);
 }
 
 /**
diff --git a/pkg/analyzer/lib/src/error/constructor_fields_verifier.dart b/pkg/analyzer/lib/src/error/constructor_fields_verifier.dart
index 3ad3883..d2ee46a 100644
--- a/pkg/analyzer/lib/src/error/constructor_fields_verifier.dart
+++ b/pkg/analyzer/lib/src/error/constructor_fields_verifier.dart
@@ -6,8 +6,8 @@
 import 'package:analyzer/dart/element/element.dart';
 import 'package:analyzer/error/listener.dart';
 import 'package:analyzer/src/dart/element/element.dart';
+import 'package:analyzer/src/dart/element/type_system.dart';
 import 'package:analyzer/src/error/codes.dart';
-import 'package:analyzer/src/generated/type_system.dart';
 import 'package:meta/meta.dart';
 
 /// Verifier for initializing fields in constructors.
diff --git a/pkg/analyzer/lib/src/error/correct_override.dart b/pkg/analyzer/lib/src/error/correct_override.dart
index 384c1c7..0512bac 100644
--- a/pkg/analyzer/lib/src/error/correct_override.dart
+++ b/pkg/analyzer/lib/src/error/correct_override.dart
@@ -12,9 +12,8 @@
 import 'package:analyzer/src/dart/element/extensions.dart';
 import 'package:analyzer/src/dart/element/type.dart';
 import 'package:analyzer/src/dart/element/type_algebra.dart';
+import 'package:analyzer/src/dart/element/type_system.dart';
 import 'package:analyzer/src/error/codes.dart';
-import 'package:analyzer/src/generated/resolver.dart' show TypeSystemImpl;
-import 'package:analyzer/src/generated/type_system.dart';
 import 'package:meta/meta.dart';
 
 class CorrectOverrideHelper {
diff --git a/pkg/analyzer/lib/src/error/dead_code_verifier.dart b/pkg/analyzer/lib/src/error/dead_code_verifier.dart
index fea47dc..4e5cebe 100644
--- a/pkg/analyzer/lib/src/error/dead_code_verifier.dart
+++ b/pkg/analyzer/lib/src/error/dead_code_verifier.dart
@@ -10,13 +10,12 @@
 import 'package:analyzer/error/error.dart';
 import 'package:analyzer/error/listener.dart';
 import 'package:analyzer/source/source_range.dart';
+import 'package:analyzer/src/dart/element/type_system.dart';
 import 'package:analyzer/src/dart/resolver/exit_detector.dart';
 import 'package:analyzer/src/dart/resolver/flow_analysis_visitor.dart';
 import 'package:analyzer/src/dart/resolver/scope.dart';
 import 'package:analyzer/src/error/codes.dart';
 import 'package:analyzer/src/generated/constant.dart';
-import 'package:analyzer/src/generated/resolver.dart';
-import 'package:analyzer/src/generated/type_system.dart';
 
 typedef _CatchClausesVerifierReporter = void Function(
   CatchClause first,
diff --git a/pkg/analyzer/lib/src/error/duplicate_definition_verifier.dart b/pkg/analyzer/lib/src/error/duplicate_definition_verifier.dart
index 9cabeb7..e90e5de 100644
--- a/pkg/analyzer/lib/src/error/duplicate_definition_verifier.dart
+++ b/pkg/analyzer/lib/src/error/duplicate_definition_verifier.dart
@@ -147,9 +147,7 @@
     _checkClassMembers(node.declaredElement, node.members);
   }
 
-  /**
-   * Check that all of the parameters have unique names.
-   */
+  /// Check that all of the parameters have unique names.
   void checkParameters(FormalParameterList node) {
     Map<String, Element> definedNames = HashMap<String, Element>();
     for (FormalParameter parameter in node.parameters) {
diff --git a/pkg/analyzer/lib/src/error/getter_setter_types_verifier.dart b/pkg/analyzer/lib/src/error/getter_setter_types_verifier.dart
index c21040b..3866ef9 100644
--- a/pkg/analyzer/lib/src/error/getter_setter_types_verifier.dart
+++ b/pkg/analyzer/lib/src/error/getter_setter_types_verifier.dart
@@ -8,8 +8,8 @@
 import 'package:analyzer/error/error.dart';
 import 'package:analyzer/error/listener.dart';
 import 'package:analyzer/src/dart/element/inheritance_manager3.dart';
+import 'package:analyzer/src/dart/element/type_system.dart';
 import 'package:analyzer/src/error/codes.dart';
-import 'package:analyzer/src/generated/type_system.dart';
 import 'package:meta/meta.dart';
 
 /// Verifies that the return type of the getter matches the parameter type
diff --git a/pkg/analyzer/lib/src/error/inheritance_override.dart b/pkg/analyzer/lib/src/error/inheritance_override.dart
index f7a930a..8786791 100644
--- a/pkg/analyzer/lib/src/error/inheritance_override.dart
+++ b/pkg/analyzer/lib/src/error/inheritance_override.dart
@@ -13,11 +13,10 @@
 import 'package:analyzer/src/dart/element/element.dart';
 import 'package:analyzer/src/dart/element/inheritance_manager3.dart';
 import 'package:analyzer/src/dart/element/type.dart';
+import 'package:analyzer/src/dart/element/type_system.dart';
 import 'package:analyzer/src/error/codes.dart';
 import 'package:analyzer/src/error/correct_override.dart';
 import 'package:analyzer/src/error/getter_setter_types_verifier.dart';
-import 'package:analyzer/src/generated/resolver.dart' show TypeSystemImpl;
-import 'package:analyzer/src/generated/type_system.dart';
 import 'package:analyzer/src/summary/idl.dart';
 import 'package:meta/meta.dart';
 
diff --git a/pkg/analyzer/lib/src/error/literal_element_verifier.dart b/pkg/analyzer/lib/src/error/literal_element_verifier.dart
index fcf6977..e3098b0 100644
--- a/pkg/analyzer/lib/src/error/literal_element_verifier.dart
+++ b/pkg/analyzer/lib/src/error/literal_element_verifier.dart
@@ -8,8 +8,8 @@
 import 'package:analyzer/dart/element/type_provider.dart';
 import 'package:analyzer/error/listener.dart';
 import 'package:analyzer/src/dart/element/type.dart';
+import 'package:analyzer/src/dart/element/type_system.dart';
 import 'package:analyzer/src/error/codes.dart';
-import 'package:analyzer/src/generated/resolver.dart' show TypeSystemImpl;
 
 /// Verifier for [CollectionElement]s in list, set, or map literals.
 class LiteralElementVerifier {
diff --git a/pkg/analyzer/lib/src/error/nullable_dereference_verifier.dart b/pkg/analyzer/lib/src/error/nullable_dereference_verifier.dart
index 2e69e36..cf0a8ae6 100644
--- a/pkg/analyzer/lib/src/error/nullable_dereference_verifier.dart
+++ b/pkg/analyzer/lib/src/error/nullable_dereference_verifier.dart
@@ -6,8 +6,8 @@
 import 'package:analyzer/dart/element/type.dart';
 import 'package:analyzer/error/listener.dart';
 import 'package:analyzer/src/dart/element/type.dart';
+import 'package:analyzer/src/dart/element/type_system.dart';
 import 'package:analyzer/src/error/codes.dart';
-import 'package:analyzer/src/generated/resolver.dart';
 import 'package:meta/meta.dart';
 
 /// Helper for checking potentially nullable dereferences.
diff --git a/pkg/analyzer/lib/src/error/override_verifier.dart b/pkg/analyzer/lib/src/error/override_verifier.dart
index 91c7968..cf18a55 100644
--- a/pkg/analyzer/lib/src/error/override_verifier.dart
+++ b/pkg/analyzer/lib/src/error/override_verifier.dart
@@ -12,7 +12,7 @@
 /// Instances of the class `OverrideVerifier` visit all of the declarations in a
 /// compilation unit to verify that if they have an override annotation it is
 /// being used correctly.
-class OverrideVerifier extends RecursiveAstVisitor {
+class OverrideVerifier extends RecursiveAstVisitor<void> {
   /// The inheritance manager used to find overridden methods.
   final InheritanceManager3 _inheritance;
 
@@ -30,14 +30,14 @@
       : _libraryUri = library.source.uri;
 
   @override
-  visitClassDeclaration(ClassDeclaration node) {
+  void visitClassDeclaration(ClassDeclaration node) {
     _currentClass = node.declaredElement;
     super.visitClassDeclaration(node);
     _currentClass = null;
   }
 
   @override
-  visitFieldDeclaration(FieldDeclaration node) {
+  void visitFieldDeclaration(FieldDeclaration node) {
     for (VariableDeclaration field in node.fields.variables) {
       FieldElement fieldElement = field.declaredElement;
       if (fieldElement.hasOverride) {
@@ -56,7 +56,7 @@
   }
 
   @override
-  visitMethodDeclaration(MethodDeclaration node) {
+  void visitMethodDeclaration(MethodDeclaration node) {
     ExecutableElement element = node.declaredElement;
     if (element.hasOverride && !_isOverride(element)) {
       if (element is MethodElement) {
@@ -81,7 +81,7 @@
   }
 
   @override
-  visitMixinDeclaration(MixinDeclaration node) {
+  void visitMixinDeclaration(MixinDeclaration node) {
     _currentClass = node.declaredElement;
     super.visitMixinDeclaration(node);
     _currentClass = null;
diff --git a/pkg/analyzer/lib/src/error/return_type_verifier.dart b/pkg/analyzer/lib/src/error/return_type_verifier.dart
index 9f9218c..eca4fd0 100644
--- a/pkg/analyzer/lib/src/error/return_type_verifier.dart
+++ b/pkg/analyzer/lib/src/error/return_type_verifier.dart
@@ -9,9 +9,9 @@
 import 'package:analyzer/error/listener.dart';
 import 'package:analyzer/src/dart/element/type.dart';
 import 'package:analyzer/src/dart/element/type_provider.dart';
+import 'package:analyzer/src/dart/element/type_system.dart';
 import 'package:analyzer/src/error/codes.dart';
 import 'package:analyzer/src/generated/error_verifier.dart';
-import 'package:analyzer/src/generated/resolver.dart';
 import 'package:meta/meta.dart';
 
 class ReturnTypeVerifier {
diff --git a/pkg/analyzer/lib/src/error/type_arguments_verifier.dart b/pkg/analyzer/lib/src/error/type_arguments_verifier.dart
index 363543a..ed3f577 100644
--- a/pkg/analyzer/lib/src/error/type_arguments_verifier.dart
+++ b/pkg/analyzer/lib/src/error/type_arguments_verifier.dart
@@ -13,6 +13,7 @@
 import 'package:analyzer/src/dart/element/type.dart';
 import 'package:analyzer/src/dart/element/type_algebra.dart';
 import 'package:analyzer/src/dart/element/type_schema.dart';
+import 'package:analyzer/src/dart/element/type_system.dart';
 import 'package:analyzer/src/error/codes.dart';
 import 'package:analyzer/src/generated/engine.dart' show AnalysisOptionsImpl;
 import 'package:analyzer/src/generated/resolver.dart';
@@ -190,10 +191,8 @@
     }
   }
 
-  /**
-   * Verify that the type arguments in the given [typeName] are all within
-   * their bounds.
-   */
+  /// Verify that the type arguments in the given [typeName] are all within
+  /// their bounds.
   void _checkForTypeArgumentNotMatchingBounds(TypeName typeName) {
     var element = typeName.name.staticElement;
     var type = typeName.type;
@@ -255,12 +254,10 @@
     }
   }
 
-  /**
-   * Checks to ensure that the given list of type [arguments] does not have a
-   * type parameter as a type argument. The [errorCode] is either
-   * [CompileTimeErrorCode.INVALID_TYPE_ARGUMENT_IN_CONST_LIST] or
-   * [CompileTimeErrorCode.INVALID_TYPE_ARGUMENT_IN_CONST_MAP].
-   */
+  /// Checks to ensure that the given list of type [arguments] does not have a
+  /// type parameter as a type argument. The [errorCode] is either
+  /// [CompileTimeErrorCode.INVALID_TYPE_ARGUMENT_IN_CONST_LIST] or
+  /// [CompileTimeErrorCode.INVALID_TYPE_ARGUMENT_IN_CONST_MAP].
   void _checkTypeArgumentConst(
       NodeList<TypeAnnotation> arguments, ErrorCode errorCode) {
     for (TypeAnnotation type in arguments) {
@@ -288,10 +285,8 @@
     }
   }
 
-  /**
-   * Verify that the given [typeArguments] are all within their bounds, as
-   * defined by the given [element].
-   */
+  /// Verify that the given [typeArguments] are all within their bounds, as
+  /// defined by the given [element].
   void _checkTypeArguments(InvocationExpression node) {
     NodeList<TypeAnnotation> typeArgumentList = node.typeArguments?.arguments;
     if (typeArgumentList == null) {
diff --git a/pkg/analyzer/lib/src/error/unused_local_elements_verifier.dart b/pkg/analyzer/lib/src/error/unused_local_elements_verifier.dart
index ad25164..a713c1e 100644
--- a/pkg/analyzer/lib/src/error/unused_local_elements_verifier.dart
+++ b/pkg/analyzer/lib/src/error/unused_local_elements_verifier.dart
@@ -15,7 +15,7 @@
 import 'package:analyzer/src/error/codes.dart';
 
 /// An [AstVisitor] that fills [UsedLocalElements].
-class GatherUsedLocalElementsVisitor extends RecursiveAstVisitor {
+class GatherUsedLocalElementsVisitor extends RecursiveAstVisitor<void> {
   final UsedLocalElements usedElements = UsedLocalElements();
 
   final LibraryElement _enclosingLibrary;
@@ -25,7 +25,7 @@
   GatherUsedLocalElementsVisitor(this._enclosingLibrary);
 
   @override
-  visitAssignmentExpression(AssignmentExpression node) {
+  void visitAssignmentExpression(AssignmentExpression node) {
     var element = node.staticElement;
     if (element != null) {
       usedElements.members.add(element);
@@ -34,14 +34,14 @@
   }
 
   @override
-  visitBinaryExpression(BinaryExpression node) {
+  void visitBinaryExpression(BinaryExpression node) {
     var element = node.staticElement;
     usedElements.members.add(element);
     super.visitBinaryExpression(node);
   }
 
   @override
-  visitCatchClause(CatchClause node) {
+  void visitCatchClause(CatchClause node) {
     SimpleIdentifier exceptionParameter = node.exceptionParameter;
     SimpleIdentifier stackTraceParameter = node.stackTraceParameter;
     if (exceptionParameter != null) {
@@ -59,7 +59,7 @@
   }
 
   @override
-  visitClassDeclaration(ClassDeclaration node) {
+  void visitClassDeclaration(ClassDeclaration node) {
     ClassElement enclosingClassOld = _enclosingClass;
     try {
       _enclosingClass = node.declaredElement;
@@ -70,7 +70,7 @@
   }
 
   @override
-  visitFunctionDeclaration(FunctionDeclaration node) {
+  void visitFunctionDeclaration(FunctionDeclaration node) {
     ExecutableElement enclosingExecOld = _enclosingExec;
     try {
       _enclosingExec = node.declaredElement;
@@ -81,7 +81,7 @@
   }
 
   @override
-  visitFunctionExpression(FunctionExpression node) {
+  void visitFunctionExpression(FunctionExpression node) {
     if (node.parent is! FunctionDeclaration) {
       usedElements.addElement(node.declaredElement);
     }
@@ -89,14 +89,14 @@
   }
 
   @override
-  visitIndexExpression(IndexExpression node) {
+  void visitIndexExpression(IndexExpression node) {
     var element = node.staticElement;
     usedElements.members.add(element);
     super.visitIndexExpression(node);
   }
 
   @override
-  visitMethodDeclaration(MethodDeclaration node) {
+  void visitMethodDeclaration(MethodDeclaration node) {
     ExecutableElement enclosingExecOld = _enclosingExec;
     try {
       _enclosingExec = node.declaredElement;
@@ -107,21 +107,21 @@
   }
 
   @override
-  visitPostfixExpression(PostfixExpression node) {
+  void visitPostfixExpression(PostfixExpression node) {
     var element = node.staticElement;
     usedElements.members.add(element);
     super.visitPostfixExpression(node);
   }
 
   @override
-  visitPrefixExpression(PrefixExpression node) {
+  void visitPrefixExpression(PrefixExpression node) {
     var element = node.staticElement;
     usedElements.members.add(element);
     super.visitPrefixExpression(node);
   }
 
   @override
-  visitSimpleIdentifier(SimpleIdentifier node) {
+  void visitSimpleIdentifier(SimpleIdentifier node) {
     if (node.inDeclarationContext()) {
       return;
     }
@@ -250,7 +250,7 @@
 /// Instances of the class [UnusedLocalElementsVerifier] traverse an AST
 /// looking for cases of [HintCode.UNUSED_ELEMENT], [HintCode.UNUSED_FIELD],
 /// [HintCode.UNUSED_LOCAL_VARIABLE], etc.
-class UnusedLocalElementsVerifier extends RecursiveAstVisitor {
+class UnusedLocalElementsVerifier extends RecursiveAstVisitor<void> {
   /// The error listener to which errors will be reported.
   final AnalysisErrorListener _errorListener;
 
@@ -269,7 +269,7 @@
       : _libraryUri = library.source.uri;
 
   @override
-  visitSimpleIdentifier(SimpleIdentifier node) {
+  void visitSimpleIdentifier(SimpleIdentifier node) {
     if (node.inDeclarationContext()) {
       var element = node.staticElement;
       if (element is ClassElement) {
@@ -415,14 +415,14 @@
     }
   }
 
-  _visitClassElement(ClassElement element) {
+  void _visitClassElement(ClassElement element) {
     if (!_isUsedElement(element)) {
       _reportErrorForElement(
           HintCode.UNUSED_ELEMENT, element, [element.displayName]);
     }
   }
 
-  _visitConstructorElement(ConstructorElement element) {
+  void _visitConstructorElement(ConstructorElement element) {
     // Only complain about an unused constructor if it is not the only
     // constructor in the class. A single unused, private constructor may serve
     // the purpose of preventing the class from being extended. In serving this
@@ -434,28 +434,28 @@
     }
   }
 
-  _visitFieldElement(FieldElement element) {
+  void _visitFieldElement(FieldElement element) {
     if (!_isReadMember(element)) {
       _reportErrorForElement(
           HintCode.UNUSED_FIELD, element, [element.displayName]);
     }
   }
 
-  _visitFunctionElement(FunctionElement element) {
+  void _visitFunctionElement(FunctionElement element) {
     if (!_isUsedElement(element)) {
       _reportErrorForElement(
           HintCode.UNUSED_ELEMENT, element, [element.displayName]);
     }
   }
 
-  _visitFunctionTypeAliasElement(FunctionTypeAliasElement element) {
+  void _visitFunctionTypeAliasElement(FunctionTypeAliasElement element) {
     if (!_isUsedElement(element)) {
       _reportErrorForElement(
           HintCode.UNUSED_ELEMENT, element, [element.displayName]);
     }
   }
 
-  _visitLocalVariableElement(LocalVariableElement element) {
+  void _visitLocalVariableElement(LocalVariableElement element) {
     if (!_isUsedElement(element) && !_isNamedUnderscore(element)) {
       HintCode errorCode;
       if (_usedElements.isCatchException(element)) {
@@ -469,21 +469,21 @@
     }
   }
 
-  _visitMethodElement(MethodElement element) {
+  void _visitMethodElement(MethodElement element) {
     if (!_isUsedMember(element)) {
       _reportErrorForElement(
           HintCode.UNUSED_ELEMENT, element, [element.displayName]);
     }
   }
 
-  _visitPropertyAccessorElement(PropertyAccessorElement element) {
+  void _visitPropertyAccessorElement(PropertyAccessorElement element) {
     if (!_isUsedMember(element)) {
       _reportErrorForElement(
           HintCode.UNUSED_ELEMENT, element, [element.displayName]);
     }
   }
 
-  _visitTopLevelVariableElement(TopLevelVariableElement element) {
+  void _visitTopLevelVariableElement(TopLevelVariableElement element) {
     if (!_isUsedElement(element)) {
       _reportErrorForElement(
           HintCode.UNUSED_ELEMENT, element, [element.displayName]);
diff --git a/pkg/analyzer/lib/src/fasta/ast_builder.dart b/pkg/analyzer/lib/src/fasta/ast_builder.dart
index a9378b7..ceda591 100644
--- a/pkg/analyzer/lib/src/fasta/ast_builder.dart
+++ b/pkg/analyzer/lib/src/fasta/ast_builder.dart
@@ -3775,7 +3775,7 @@
   const _InvalidCollectionElement._();
 
   @override
-  noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation);
+  dynamic noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation);
 }
 
 /// Data structure placed on the stack to represent a non-empty sequence
diff --git a/pkg/analyzer/lib/src/file_system/file_system.dart b/pkg/analyzer/lib/src/file_system/file_system.dart
index a6f128f..4709f04 100644
--- a/pkg/analyzer/lib/src/file_system/file_system.dart
+++ b/pkg/analyzer/lib/src/file_system/file_system.dart
@@ -6,13 +6,9 @@
 import 'package:analyzer/src/generated/source.dart';
 import 'package:analyzer/src/util/uri.dart';
 
-/**
- * A [UriResolver] for [Resource]s.
- */
+/// A [UriResolver] for [Resource]s.
 class ResourceUriResolver extends UriResolver {
-  /**
-   * The name of the `file` scheme.
-   */
+  /// The name of the `file` scheme.
   static final String FILE_SCHEME = "file";
 
   final ResourceProvider _provider;
@@ -35,8 +31,6 @@
   Uri restoreAbsolute(Source source) =>
       _provider.pathContext.toUri(source.fullName);
 
-  /**
-   * Return `true` if the given [uri] is a `file` URI.
-   */
+  /// Return `true` if the given [uri] is a `file` URI.
   static bool isFileUri(Uri uri) => uri.scheme == FILE_SCHEME;
 }
diff --git a/pkg/analyzer/lib/src/generated/ast.dart b/pkg/analyzer/lib/src/generated/ast.dart
index a1900ab..ffafbd6 100644
--- a/pkg/analyzer/lib/src/generated/ast.dart
+++ b/pkg/analyzer/lib/src/generated/ast.dart
@@ -2,16 +2,14 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-/**
- * This library is deprecated. Please convert all references to this library to
- * reference one of the following public libraries:
- * * package:analyzer/dart/ast/ast.dart
- * * package:analyzer/dart/ast/visitor.dart
- *
- * If your code is using APIs not available in these public libraries, please
- * contact the analyzer team to either find an alternate API or have the API you
- * depend on added to the public API.
- */
+/// This library is deprecated. Please convert all references to this library to
+/// reference one of the following public libraries:
+/// * package:analyzer/dart/ast/ast.dart
+/// * package:analyzer/dart/ast/visitor.dart
+///
+/// If your code is using APIs not available in these public libraries, please
+/// contact the analyzer team to either find an alternate API or have the API
+/// you depend on added to the public API.
 @deprecated
 library analyzer.src.generated.ast;
 
diff --git a/pkg/analyzer/lib/src/generated/constant.dart b/pkg/analyzer/lib/src/generated/constant.dart
index c9ba0933..90abe81 100644
--- a/pkg/analyzer/lib/src/generated/constant.dart
+++ b/pkg/analyzer/lib/src/generated/constant.dart
@@ -9,10 +9,10 @@
 import 'package:analyzer/error/listener.dart';
 import 'package:analyzer/src/dart/constant/evaluation.dart';
 import 'package:analyzer/src/dart/constant/value.dart';
+import 'package:analyzer/src/dart/element/type_system.dart' show TypeSystemImpl;
 import 'package:analyzer/src/generated/engine.dart';
 import 'package:analyzer/src/generated/engine.dart' show RecordingErrorListener;
 import 'package:analyzer/src/generated/source.dart' show Source;
-import 'package:analyzer/src/generated/type_system.dart' show TypeSystemImpl;
 
 export 'package:analyzer/dart/analysis/declared_variables.dart';
 export 'package:analyzer/dart/constant/value.dart';
@@ -96,26 +96,18 @@
 /// indicate various conditions encountered during evaluation. These are
 /// documented with the static fields that define those values.
 class ConstantEvaluator {
-  /**
-   * The source containing the expression(s) that will be evaluated.
-   */
+  /// The source containing the expression(s) that will be evaluated.
   final Source _source;
 
-  /**
-   * The type provider used to access the known types.
-   */
+  /// The type provider used to access the known types.
   final TypeProvider _typeProvider;
 
-  /**
-   * The type system primitives.
-   */
+  /// The type system primitives.
   final TypeSystemImpl _typeSystem;
 
-  /**
-   * Initialize a newly created evaluator to evaluate expressions in the given
-   * [source]. The [typeProvider] is the type provider used to access known
-   * types.
-   */
+  /// Initialize a newly created evaluator to evaluate expressions in the given
+  /// [source]. The [typeProvider] is the type provider used to access known
+  /// types.
   ConstantEvaluator(this._source, TypeProvider typeProvider,
       {TypeSystemImpl typeSystem})
       : _typeSystem = typeSystem ??
diff --git a/pkg/analyzer/lib/src/generated/element.dart b/pkg/analyzer/lib/src/generated/element.dart
index da03617..a874806 100644
--- a/pkg/analyzer/lib/src/generated/element.dart
+++ b/pkg/analyzer/lib/src/generated/element.dart
@@ -2,17 +2,15 @@
 // for 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 is deprecated. Please convert all references to this library to
- * reference one of the following public libraries:
- * * package:analyzer/dart/element/element.dart
- * * package:analyzer/dart/element/type.dart
- * * package:analyzer/dart/element/visitor.dart
- *
- * If your code is using APIs not available in these public libraries, please
- * contact the analyzer team to either find an alternate API or have the API you
- * depend on added to the public API.
- */
+/// This library is deprecated. Please convert all references to this library to
+/// reference one of the following public libraries:
+/// * package:analyzer/dart/element/element.dart
+/// * package:analyzer/dart/element/type.dart
+/// * package:analyzer/dart/element/visitor.dart
+///
+/// If your code is using APIs not available in these public libraries, please
+/// contact the analyzer team to either find an alternate API or have the API
+/// you depend on added to the public API.
 @deprecated
 library analyzer.src.generated.element;
 
diff --git a/pkg/analyzer/lib/src/generated/element_resolver.dart b/pkg/analyzer/lib/src/generated/element_resolver.dart
index cc900ea..f4ecf94 100644
--- a/pkg/analyzer/lib/src/generated/element_resolver.dart
+++ b/pkg/analyzer/lib/src/generated/element_resolver.dart
@@ -15,9 +15,11 @@
 import 'package:analyzer/src/dart/element/inheritance_manager3.dart';
 import 'package:analyzer/src/dart/element/type.dart';
 import 'package:analyzer/src/dart/element/type_provider.dart';
+import 'package:analyzer/src/dart/element/type_system.dart';
 import 'package:analyzer/src/dart/resolver/extension_member_resolver.dart';
 import 'package:analyzer/src/dart/resolver/method_invocation_resolver.dart';
 import 'package:analyzer/src/dart/resolver/resolution_result.dart';
+import 'package:analyzer/src/dart/resolver/scope.dart';
 import 'package:analyzer/src/dart/resolver/type_property_resolver.dart';
 import 'package:analyzer/src/error/codes.dart';
 import 'package:analyzer/src/generated/engine.dart';
@@ -27,83 +29,73 @@
 import 'package:analyzer/src/task/strong/checker.dart';
 import 'package:meta/meta.dart';
 
-/**
- * An object used by instances of [ResolverVisitor] to resolve references within
- * the AST structure to the elements being referenced. The requirements for the
- * element resolver are:
- *
- * 1. Every [SimpleIdentifier] should be resolved to the element to which it
- *    refers. Specifically:
- *    * An identifier within the declaration of that name should resolve to the
- *      element being declared.
- *    * An identifier denoting a prefix should resolve to the element
- *      representing the import that defines the prefix (an [ImportElement]).
- *    * An identifier denoting a variable should resolve to the element
- *      representing the variable (a [VariableElement]).
- *    * An identifier denoting a parameter should resolve to the element
- *      representing the parameter (a [ParameterElement]).
- *    * An identifier denoting a field should resolve to the element
- *      representing the getter or setter being invoked (a
- *      [PropertyAccessorElement]).
- *    * An identifier denoting the name of a method or function being invoked
- *      should resolve to the element representing the method or function (an
- *      [ExecutableElement]).
- *    * An identifier denoting a label should resolve to the element
- *      representing the label (a [LabelElement]).
- *    The identifiers within directives are exceptions to this rule and are
- *    covered below.
- * 2. Every node containing a token representing an operator that can be
- *    overridden ( [BinaryExpression], [PrefixExpression], [PostfixExpression])
- *    should resolve to the element representing the method invoked by that
- *    operator (a [MethodElement]).
- * 3. Every [FunctionExpressionInvocation] should resolve to the element
- *    representing the function being invoked (a [FunctionElement]). This will
- *    be the same element as that to which the name is resolved if the function
- *    has a name, but is provided for those cases where an unnamed function is
- *    being invoked.
- * 4. Every [LibraryDirective] and [PartOfDirective] should resolve to the
- *    element representing the library being specified by the directive (a
- *    [LibraryElement]) unless, in the case of a part-of directive, the
- *    specified library does not exist.
- * 5. Every [ImportDirective] and [ExportDirective] should resolve to the
- *    element representing the library being specified by the directive unless
- *    the specified library does not exist (an [ImportElement] or
- *    [ExportElement]).
- * 6. The identifier representing the prefix in an [ImportDirective] should
- *    resolve to the element representing the prefix (a [PrefixElement]).
- * 7. The identifiers in the hide and show combinators in [ImportDirective]s
- *    and [ExportDirective]s should resolve to the elements that are being
- *    hidden or shown, respectively, unless those names are not defined in the
- *    specified library (or the specified library does not exist).
- * 8. Every [PartDirective] should resolve to the element representing the
- *    compilation unit being specified by the string unless the specified
- *    compilation unit does not exist (a [CompilationUnitElement]).
- *
- * Note that AST nodes that would represent elements that are not defined are
- * not resolved to anything. This includes such things as references to
- * undeclared variables (which is an error) and names in hide and show
- * combinators that are not defined in the imported library (which is not an
- * error).
- */
+/// An object used by instances of [ResolverVisitor] to resolve references
+/// within the AST structure to the elements being referenced. The requirements
+/// for the element resolver are:
+///
+/// 1. Every [SimpleIdentifier] should be resolved to the element to which it
+///    refers. Specifically:
+///    * An identifier within the declaration of that name should resolve to the
+///      element being declared.
+///    * An identifier denoting a prefix should resolve to the element
+///      representing the import that defines the prefix (an [ImportElement]).
+///    * An identifier denoting a variable should resolve to the element
+///      representing the variable (a [VariableElement]).
+///    * An identifier denoting a parameter should resolve to the element
+///      representing the parameter (a [ParameterElement]).
+///    * An identifier denoting a field should resolve to the element
+///      representing the getter or setter being invoked (a
+///      [PropertyAccessorElement]).
+///    * An identifier denoting the name of a method or function being invoked
+///      should resolve to the element representing the method or function (an
+///      [ExecutableElement]).
+///    * An identifier denoting a label should resolve to the element
+///      representing the label (a [LabelElement]).
+///    The identifiers within directives are exceptions to this rule and are
+///    covered below.
+/// 2. Every node containing a token representing an operator that can be
+///    overridden ( [BinaryExpression], [PrefixExpression], [PostfixExpression])
+///    should resolve to the element representing the method invoked by that
+///    operator (a [MethodElement]).
+/// 3. Every [FunctionExpressionInvocation] should resolve to the element
+///    representing the function being invoked (a [FunctionElement]). This will
+///    be the same element as that to which the name is resolved if the function
+///    has a name, but is provided for those cases where an unnamed function is
+///    being invoked.
+/// 4. Every [LibraryDirective] and [PartOfDirective] should resolve to the
+///    element representing the library being specified by the directive (a
+///    [LibraryElement]) unless, in the case of a part-of directive, the
+///    specified library does not exist.
+/// 5. Every [ImportDirective] and [ExportDirective] should resolve to the
+///    element representing the library being specified by the directive unless
+///    the specified library does not exist (an [ImportElement] or
+///    [ExportElement]).
+/// 6. The identifier representing the prefix in an [ImportDirective] should
+///    resolve to the element representing the prefix (a [PrefixElement]).
+/// 7. The identifiers in the hide and show combinators in [ImportDirective]s
+///    and [ExportDirective]s should resolve to the elements that are being
+///    hidden or shown, respectively, unless those names are not defined in the
+///    specified library (or the specified library does not exist).
+/// 8. Every [PartDirective] should resolve to the element representing the
+///    compilation unit being specified by the string unless the specified
+///    compilation unit does not exist (a [CompilationUnitElement]).
+///
+/// Note that AST nodes that would represent elements that are not defined are
+/// not resolved to anything. This includes such things as references to
+/// undeclared variables (which is an error) and names in hide and show
+/// combinators that are not defined in the imported library (which is not an
+/// error).
 class ElementResolver extends SimpleAstVisitor<void> {
-  /**
-   * The resolver driving this participant.
-   */
+  /// The resolver driving this participant.
   final ResolverVisitor _resolver;
 
-  /**
-   * The element for the library containing the compilation unit being visited.
-   */
+  /// The element for the library containing the compilation unit being visited.
   final LibraryElement _definingLibrary;
 
-  /**
-   * The type representing the type 'dynamic'.
-   */
+  /// The type representing the type 'dynamic'.
   DartType _dynamicType;
 
-  /**
-   * The type representing the type 'Type'.
-   */
+  /// The type representing the type 'Type'.
   InterfaceType _typeType;
 
   /// Whether constant evaluation errors should be reported during resolution.
@@ -118,10 +110,8 @@
 
   MethodInvocationResolver _methodInvocationResolver;
 
-  /**
-   * Initialize a newly created visitor to work for the given [_resolver] to
-   * resolve the nodes in a compilation unit.
-   */
+  /// Initialize a newly created visitor to work for the given [_resolver] to
+  /// resolve the nodes in a compilation unit.
   ElementResolver(this._resolver,
       {this.reportConstEvaluationErrors = true,
       MigratableAstInfoProvider migratableAstInfoProvider =
@@ -138,10 +128,8 @@
     );
   }
 
-  /**
-   * Return `true` iff the current enclosing function is a constant constructor
-   * declaration.
-   */
+  /// Return `true` iff the current enclosing function is a constant constructor
+  /// declaration.
   bool get isInConstConstructor {
     ExecutableElement function = _resolver.enclosingFunction;
     if (function is ConstructorElement) {
@@ -862,12 +850,10 @@
     );
   }
 
-  /**
-   * Check that the given index [expression] was resolved, otherwise a
-   * [StaticTypeWarningCode.UNDEFINED_OPERATOR] is generated. The [target] is
-   * the target of the expression. The [methodName] is the name of the operator
-   * associated with the context of using of the given index expression.
-   */
+  /// Check that the given index [expression] was resolved, otherwise a
+  /// [StaticTypeWarningCode.UNDEFINED_OPERATOR] is generated. The [target] is
+  /// the target of the expression. The [methodName] is the name of the operator
+  /// associated with the context of using of the given index expression.
   void _checkForUndefinedIndexOperator(
       IndexExpression expression,
       Expression target,
@@ -926,10 +912,8 @@
     }
   }
 
-  /**
-   * Assuming that the given [identifier] is a prefix for a deferred import,
-   * return the library that is being imported.
-   */
+  /// Assuming that the given [identifier] is a prefix for a deferred import,
+  /// return the library that is being imported.
   LibraryElement _getImportedLibrary(SimpleIdentifier identifier) {
     PrefixElement prefixElement = identifier.staticElement as PrefixElement;
     List<ImportElement> imports =
@@ -937,10 +921,8 @@
     return imports[0].importedLibrary;
   }
 
-  /**
-   * Return the static type of the given [expression] that is to be used for
-   * type analysis.
-   */
+  /// Return the static type of the given [expression] that is to be used for
+  /// type analysis.
   DartType _getStaticType(Expression expression, {bool read = false}) {
     if (expression is NullLiteral) {
       return _typeProvider.nullType;
@@ -959,9 +941,7 @@
     );
   }
 
-  /**
-   * Return `true` if the given [expression] is a prefix for a deferred import.
-   */
+  /// Return `true` if the given [expression] is a prefix for a deferred import.
   bool _isDeferredPrefix(Expression expression) {
     if (expression is SimpleIdentifier) {
       Element element = expression.staticElement;
@@ -977,11 +957,9 @@
     return false;
   }
 
-  /**
-   * Return `true` if the given [node] can validly be resolved to a prefix:
-   * * it is the prefix in an import directive, or
-   * * it is the prefix in a prefixed identifier.
-   */
+  /// Return `true` if the given [node] can validly be resolved to a prefix:
+  /// * it is the prefix in an import directive, or
+  /// * it is the prefix in a prefixed identifier.
   bool _isValidAsPrefix(SimpleIdentifier node) {
     AstNode parent = node.parent;
     if (parent is ImportDirective) {
@@ -995,13 +973,11 @@
     return false;
   }
 
-  /**
-   * Return the target of a break or continue statement, and update the static
-   * element of its label (if any). The [parentNode] is the AST node of the
-   * break or continue statement. The [labelNode] is the label contained in that
-   * statement (if any). The flag [isContinue] is `true` if the node being
-   * visited is a continue statement.
-   */
+  /// Return the target of a break or continue statement, and update the static
+  /// element of its label (if any). The [parentNode] is the AST node of the
+  /// break or continue statement. The [labelNode] is the label contained in
+  /// that statement (if any). The flag [isContinue] is `true` if the node being
+  /// visited is a continue statement.
   AstNode _lookupBreakOrContinueTarget(
       AstNode parentNode, SimpleIdentifier labelNode, bool isContinue) {
     if (labelNode == null) {
@@ -1052,9 +1028,7 @@
     }
   }
 
-  /**
-   * Continues resolution of the given [annotation].
-   */
+  /// Continues resolution of the given [annotation].
   void _resolveAnnotationElement(Annotation annotation) {
     SimpleIdentifier nameNode1;
     SimpleIdentifier nameNode2;
@@ -1192,13 +1166,11 @@
     return;
   }
 
-  /**
-   * Given an [argumentList] and the [executableElement] that will be invoked
-   * using those argument, compute the list of parameters that correspond to the
-   * list of arguments. An error will be reported if any of the arguments cannot
-   * be matched to a parameter. Return the parameters that correspond to the
-   * arguments, or `null` if no correspondence could be computed.
-   */
+  /// Given an [argumentList] and the [executableElement] that will be invoked
+  /// using those argument, compute the list of parameters that correspond to
+  /// the list of arguments. An error will be reported if any of the arguments
+  /// cannot be matched to a parameter. Return the parameters that correspond to
+  /// the arguments, or `null` if no correspondence could be computed.
   List<ParameterElement> _resolveArgumentsToFunction(
       ArgumentList argumentList, ExecutableElement executableElement) {
     if (executableElement == null) {
@@ -1208,23 +1180,19 @@
     return _resolveArgumentsToParameters(argumentList, parameters);
   }
 
-  /**
-   * Given an [argumentList] and the [parameters] related to the element that
-   * will be invoked using those arguments, compute the list of parameters that
-   * correspond to the list of arguments. An error will be reported if any of
-   * the arguments cannot be matched to a parameter. Return the parameters that
-   * correspond to the arguments.
-   */
+  /// Given an [argumentList] and the [parameters] related to the element that
+  /// will be invoked using those arguments, compute the list of parameters that
+  /// correspond to the list of arguments. An error will be reported if any of
+  /// the arguments cannot be matched to a parameter. Return the parameters that
+  /// correspond to the arguments.
   List<ParameterElement> _resolveArgumentsToParameters(
       ArgumentList argumentList, List<ParameterElement> parameters) {
     return ResolverVisitor.resolveArgumentsToParameters(
         argumentList, parameters, _errorReporter.reportErrorForNode);
   }
 
-  /**
-   * Resolve the names in the given [combinators] in the scope of the given
-   * [library].
-   */
+  /// Resolve the names in the given [combinators] in the scope of the given
+  /// [library].
   void _resolveCombinators(
       LibraryElement library, NodeList<Combinator> combinators) {
     if (library == null) {
@@ -1259,10 +1227,8 @@
     }
   }
 
-  /**
-   * Given a [node] that can have annotations associated with it, resolve the
-   * annotations in the element model representing annotations to the node.
-   */
+  /// Given a [node] that can have annotations associated with it, resolve the
+  /// annotations in the element model representing annotations to the node.
   void _resolveMetadataForParameter(NormalFormalParameter node) {
     _resolveAnnotations(node.metadata);
   }
@@ -1553,11 +1519,9 @@
     }
   }
 
-  /**
-   * Resolve the given simple [identifier] if possible. Return the element to
-   * which it could be resolved, or `null` if it could not be resolved. This
-   * does not record the results of the resolution.
-   */
+  /// Resolve the given simple [identifier] if possible. Return the element to
+  /// which it could be resolved, or `null` if it could not be resolved. This
+  /// does not record the results of the resolution.
   Element _resolveSimpleIdentifier(SimpleIdentifier identifier) {
     Element element = _resolver.nameScope.lookup(identifier, _definingLibrary);
     element = _resolver.toLegacyElement(element);
@@ -1632,18 +1596,15 @@
     return element;
   }
 
-  /**
-   * If the given [type] is a type parameter, resolve it to the type that should
-   * be used when looking up members. Otherwise, return the original type.
-   */
+  /// If the given [type] is a type parameter, resolve it to the type that
+  /// should be used when looking up members. Otherwise, return the original
+  /// type.
   DartType _resolveTypeParameter(DartType type) =>
       type?.resolveToBound(_typeProvider.objectType);
 
-  /**
-   * Checks whether the given [expression] is a reference to a class. If it is
-   * then the element representing the class is returned, otherwise `null` is
-   * returned.
-   */
+  /// Checks whether the given [expression] is a reference to a class. If it is
+  /// then the element representing the class is returned, otherwise `null` is
+  /// returned.
   static ClassElement getTypeReference(Expression expression) {
     if (expression is Identifier) {
       Element staticElement = expression.staticElement;
@@ -1654,10 +1615,8 @@
     return null;
   }
 
-  /**
-   * Given a [node] that can have annotations associated with it, resolve the
-   * annotations in the element model representing the annotations on the node.
-   */
+  /// Given a [node] that can have annotations associated with it, resolve the
+  /// annotations in the element model representing the annotations on the node.
   static void resolveMetadata(AnnotatedNode node) {
     _resolveAnnotations(node.metadata);
     if (node is VariableDeclaration) {
@@ -1674,10 +1633,8 @@
     }
   }
 
-  /**
-   * Return `true` if the given [identifier] is the return type of a constructor
-   * declaration.
-   */
+  /// Return `true` if the given [identifier] is the return type of a
+  /// constructor declaration.
   static bool _isConstructorReturnType(SimpleIdentifier identifier) {
     AstNode parent = identifier.parent;
     if (parent is ConstructorDeclaration) {
@@ -1686,10 +1643,8 @@
     return false;
   }
 
-  /**
-   * Return `true` if the given [identifier] is the return type of a factory
-   * constructor.
-   */
+  /// Return `true` if the given [identifier] is the return type of a factory
+  /// constructor.
   static bool _isFactoryConstructorReturnType(SimpleIdentifier identifier) {
     AstNode parent = identifier.parent;
     if (parent is ConstructorDeclaration) {
@@ -1699,9 +1654,7 @@
     return false;
   }
 
-  /**
-   * Resolve each of the annotations in the given list of [annotations].
-   */
+  /// Resolve each of the annotations in the given list of [annotations].
   static void _resolveAnnotations(NodeList<Annotation> annotations) {
     for (Annotation annotation in annotations) {
       ElementAnnotationImpl elementAnnotation = annotation.elementAnnotation;
@@ -1710,12 +1663,10 @@
   }
 }
 
-/**
- * An identifier that can be used to look up names in the lexical scope when
- * there is no identifier in the AST structure. There is no identifier in the
- * AST when the parser could not distinguish between a method invocation and an
- * invocation of a top-level function imported with a prefix.
- */
+/// An identifier that can be used to look up names in the lexical scope when
+/// there is no identifier in the AST structure. There is no identifier in the
+/// AST when the parser could not distinguish between a method invocation and an
+/// invocation of a top-level function imported with a prefix.
 class SyntheticIdentifier implements SimpleIdentifier {
   @override
   final String name;
@@ -1723,5 +1674,5 @@
   SyntheticIdentifier(this.name);
 
   @override
-  noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation);
+  dynamic noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation);
 }
diff --git a/pkg/analyzer/lib/src/generated/element_type_provider.dart b/pkg/analyzer/lib/src/generated/element_type_provider.dart
index e1c9985..cd56719 100644
--- a/pkg/analyzer/lib/src/generated/element_type_provider.dart
+++ b/pkg/analyzer/lib/src/generated/element_type_provider.dart
@@ -54,6 +54,9 @@
   FunctionType getExecutableType(ElementImplWithFunctionType element) =>
       element.typeInternal;
 
+  DartType getExtendedType(ExtensionElementImpl element) =>
+      element.extendedTypeInternal;
+
   /// Queries the type of a field.
   DartType getFieldType(PropertyInducingElementImpl element) =>
       element.typeInternal;
diff --git a/pkg/analyzer/lib/src/generated/engine.dart b/pkg/analyzer/lib/src/generated/engine.dart
index 8145c6a..d25b96d 100644
--- a/pkg/analyzer/lib/src/generated/engine.dart
+++ b/pkg/analyzer/lib/src/generated/engine.dart
@@ -12,9 +12,9 @@
 import 'package:analyzer/instrumentation/instrumentation.dart';
 import 'package:analyzer/source/error_processor.dart';
 import 'package:analyzer/src/dart/analysis/experiments.dart';
+import 'package:analyzer/src/dart/element/type_system.dart';
 import 'package:analyzer/src/generated/constant.dart';
 import 'package:analyzer/src/generated/java_engine.dart';
-import 'package:analyzer/src/generated/resolver.dart' show TypeSystem;
 import 'package:analyzer/src/generated/source.dart';
 import 'package:analyzer/src/generated/utilities_general.dart';
 import 'package:analyzer/src/services/lint.dart';
@@ -216,9 +216,6 @@
 /// A set of analysis options used to control the behavior of an analysis
 /// context.
 abstract class AnalysisOptions {
-  /// The length of the list returned by [signature].
-  static const int signatureLength = 4;
-
   /// Function that returns `true` if analysis is to parse and analyze function
   /// bodies for a given source.
   @deprecated
@@ -383,8 +380,8 @@
 
   /// Determine whether two signatures returned by [signature] are equal.
   static bool signaturesEqual(Uint32List a, Uint32List b) {
-    assert(a.length == signatureLength);
-    assert(b.length == signatureLength);
+    assert(a.length == AnalysisOptionsImpl.signatureLength);
+    assert(b.length == AnalysisOptionsImpl.signatureLength);
     if (a.length != b.length) {
       return false;
     }
@@ -400,6 +397,9 @@
 /// A set of analysis options used to control the behavior of an analysis
 /// context.
 class AnalysisOptionsImpl implements AnalysisOptions {
+  /// The length of the list returned by `signature` getters.
+  static const int signatureLength = 4;
+
   /// DEPRECATED: The maximum number of sources for which data should be kept in
   /// the cache.
   ///
@@ -407,9 +407,6 @@
   @deprecated
   static const int DEFAULT_CACHE_SIZE = 64;
 
-  /// The length of the list returned by [unlinkedSignature].
-  static const int unlinkedSignatureLength = 4;
-
   /// A predicate indicating whether analysis is to parse and analyze function
   /// bodies.
   @deprecated
@@ -422,6 +419,9 @@
   /// The cached [signature].
   Uint32List _signature;
 
+  /// The cached [signatureForElements].
+  Uint32List _signatureForElements;
+
   @override
   VersionConstraint sdkVersionConstraint;
 
@@ -770,6 +770,23 @@
     return _signature;
   }
 
+  Uint32List get signatureForElements {
+    if (_signatureForElements == null) {
+      ApiSignature buffer = ApiSignature();
+
+      // Append features.
+      buffer.addInt(ExperimentStatus.knownFeatures.length);
+      for (var feature in ExperimentStatus.knownFeatures.values) {
+        buffer.addBool(contextFeatures.isEnabled(feature));
+      }
+
+      // Hash and convert to Uint32List.
+      List<int> bytes = buffer.toByteList();
+      _signatureForElements = Uint8List.fromList(bytes).buffer.asUint32List();
+    }
+    return _signatureForElements;
+  }
+
   @override
   bool get strongMode => true;
 
diff --git a/pkg/analyzer/lib/src/generated/error_verifier.dart b/pkg/analyzer/lib/src/generated/error_verifier.dart
index 2cab966..e2567c4 100644
--- a/pkg/analyzer/lib/src/generated/error_verifier.dart
+++ b/pkg/analyzer/lib/src/generated/error_verifier.dart
@@ -21,6 +21,8 @@
 import 'package:analyzer/src/dart/element/element.dart';
 import 'package:analyzer/src/dart/element/inheritance_manager3.dart';
 import 'package:analyzer/src/dart/element/type.dart';
+import 'package:analyzer/src/dart/element/type_system.dart';
+import 'package:analyzer/src/dart/resolver/scope.dart';
 import 'package:analyzer/src/dart/resolver/variance.dart';
 import 'package:analyzer/src/diagnostic/diagnostic_factory.dart';
 import 'package:analyzer/src/error/codes.dart';
@@ -36,7 +38,6 @@
 import 'package:analyzer/src/generated/engine.dart';
 import 'package:analyzer/src/generated/java_engine.dart';
 import 'package:analyzer/src/generated/parser.dart' show ParserErrorCode;
-import 'package:analyzer/src/generated/resolver.dart';
 import 'package:analyzer/src/generated/sdk.dart' show DartSdk, SdkLibrary;
 import 'package:analyzer/src/task/strong/checker.dart';
 
@@ -112,56 +113,36 @@
   }
 }
 
-/**
- * A visitor used to traverse an AST structure looking for additional errors and
- * warnings not covered by the parser and resolver.
- */
+/// A visitor used to traverse an AST structure looking for additional errors
+/// and warnings not covered by the parser and resolver.
 class ErrorVerifier extends RecursiveAstVisitor<void> {
-  /**
-   * The error reporter by which errors will be reported.
-   */
+  /// The error reporter by which errors will be reported.
   final ErrorReporter _errorReporter;
 
-  /**
-   * The current library that is being analyzed.
-   */
+  /// The current library that is being analyzed.
   final LibraryElement _currentLibrary;
 
-  /**
-   * The type representing the type 'int'.
-   */
+  /// The type representing the type 'int'.
   InterfaceType _intType;
 
-  /**
-   * The options for verification.
-   */
+  /// The options for verification.
   AnalysisOptionsImpl _options;
 
-  /**
-   * The object providing access to the types defined by the language.
-   */
+  /// The object providing access to the types defined by the language.
   final TypeProvider _typeProvider;
 
-  /**
-   * The type system primitives
-   */
+  /// The type system primitives
   TypeSystemImpl _typeSystem;
 
-  /**
-   * The manager for the inheritance mappings.
-   */
+  /// The manager for the inheritance mappings.
   final InheritanceManager3 _inheritanceManager;
 
-  /**
-   * A flag indicating whether the visitor is currently within a catch clause.
-   *
-   * See [visitCatchClause].
-   */
+  /// A flag indicating whether the visitor is currently within a catch clause.
+  ///
+  /// See [visitCatchClause].
   bool _isInCatchClause = false;
 
-  /**
-   * A flag indicating whether the visitor is currently within a comment.
-   */
+  /// A flag indicating whether the visitor is currently within a comment.
   bool _isInComment = false;
 
   /// The stack of flags, where `true` at the top (last) of the stack indicates
@@ -170,69 +151,47 @@
   /// etc.
   final List<bool> _isInLateLocalVariable = [false];
 
-  /**
-   * A flag indicating whether the visitor is currently within a native class
-   * declaration.
-   */
+  /// A flag indicating whether the visitor is currently within a native class
+  /// declaration.
   bool _isInNativeClass = false;
 
-  /**
-   * A flag indicating whether the visitor is currently within a static variable
-   * declaration.
-   */
+  /// A flag indicating whether the visitor is currently within a static
+  /// variable declaration.
   bool _isInStaticVariableDeclaration = false;
 
-  /**
-   * A flag indicating whether the visitor is currently within an instance
-   * variable declaration, which is not `late`.
-   */
+  /// A flag indicating whether the visitor is currently within an instance
+  /// variable declaration, which is not `late`.
   bool _isInInstanceNotLateVariableDeclaration = false;
 
-  /**
-   * A flag indicating whether the visitor is currently within a constructor
-   * initializer.
-   */
+  /// A flag indicating whether the visitor is currently within a constructor
+  /// initializer.
   bool _isInConstructorInitializer = false;
 
-  /**
-   * This is set to `true` iff the visitor is currently within a function typed
-   * formal parameter.
-   */
+  /// This is set to `true` iff the visitor is currently within a function typed
+  /// formal parameter.
   bool _isInFunctionTypedFormalParameter = false;
 
-  /**
-   * A flag indicating whether the visitor is currently within code in the SDK.
-   */
+  /// A flag indicating whether the visitor is currently within code in the SDK.
   bool _isInSystemLibrary = false;
 
-  /**
-   * A flag indicating whether the current library contains at least one import
-   * directive with a URI that uses the "dart-ext" scheme.
-   */
+  /// A flag indicating whether the current library contains at least one import
+  /// directive with a URI that uses the "dart-ext" scheme.
   bool _hasExtUri = false;
 
-  /**
-   * The class containing the AST nodes being visited, or `null` if we are not
-   * in the scope of a class.
-   */
+  /// The class containing the AST nodes being visited, or `null` if we are not
+  /// in the scope of a class.
   ClassElementImpl _enclosingClass;
 
-  /**
-   * The enum containing the AST nodes being visited, or `null` if we are not
-   * in the scope of an enum.
-   */
+  /// The enum containing the AST nodes being visited, or `null` if we are not
+  /// in the scope of an enum.
   ClassElement _enclosingEnum;
 
-  /**
-   * The element of the extension being visited, or `null` if we are not
-   * in the scope of an extension.
-   */
+  /// The element of the extension being visited, or `null` if we are not
+  /// in the scope of an extension.
   ExtensionElement _enclosingExtension;
 
-  /**
-   * The context of the method or function that we are currently visiting, or
-   * `null` if we are not inside a method or function.
-   */
+  /// The context of the method or function that we are currently visiting, or
+  /// `null` if we are not inside a method or function.
   EnclosingExecutableContext _enclosingExecutable =
       EnclosingExecutableContext.empty();
 
@@ -253,10 +212,8 @@
   final HashSet<String> _namesForReferenceToDeclaredVariableInInitializer =
       HashSet<String>();
 
-  /**
-   * The elements that will be defined later in the current scope, but right
-   * now are not declared.
-   */
+  /// The elements that will be defined later in the current scope, but right
+  /// now are not declared.
   HiddenElements _hiddenElements;
 
   final _UninstantiatedBoundChecker _uninstantiatedBoundChecker;
@@ -270,9 +227,7 @@
   ConstructorFieldsVerifier _constructorFieldsVerifier;
   ReturnTypeVerifier _returnTypeVerifier;
 
-  /**
-   * Initialize a newly created error verifier.
-   */
+  /// Initialize a newly created error verifier.
   ErrorVerifier(ErrorReporter errorReporter, this._currentLibrary,
       this._typeProvider, this._inheritanceManager)
       : _errorReporter = errorReporter,
@@ -304,14 +259,12 @@
 
   ClassElement get enclosingClass => _enclosingClass;
 
-  /**
-   * For consumers of error verification as a library, (currently just the
-   * angular plugin), expose a setter that can make the errors reported more
-   * accurate when dangling code snippets are being resolved from a class
-   * context. Note that this setter is very defensive for potential misuse; it
-   * should not be modified in the middle of visiting a tree and requires an
-   * analyzer-provided Impl instance to work.
-   */
+  /// For consumers of error verification as a library, (currently just the
+  /// angular plugin), expose a setter that can make the errors reported more
+  /// accurate when dangling code snippets are being resolved from a class
+  /// context. Note that this setter is very defensive for potential misuse; it
+  /// should not be modified in the middle of visiting a tree and requires an
+  /// analyzer-provided Impl instance to work.
   set enclosingClass(ClassElement classElement) {
     assert(classElement is ClassElementImpl);
     assert(_enclosingClass == null);
@@ -1277,10 +1230,8 @@
     super.visitWithClause(node);
   }
 
-  /**
-   * Checks the class for problems with the superclass, mixins, or implemented
-   * interfaces.
-   */
+  /// Checks the class for problems with the superclass, mixins, or implemented
+  /// interfaces.
   void _checkClassInheritance(
       NamedCompilationUnitMember node,
       TypeName superclass,
@@ -1303,12 +1254,10 @@
     }
   }
 
-  /**
-   * Given a list of [directives] that have the same prefix, generate an error
-   * if there is more than one import and any of those imports is deferred.
-   *
-   * See [CompileTimeErrorCode.SHARED_DEFERRED_PREFIX].
-   */
+  /// Given a list of [directives] that have the same prefix, generate an error
+  /// if there is more than one import and any of those imports is deferred.
+  ///
+  /// See [CompileTimeErrorCode.SHARED_DEFERRED_PREFIX].
   void _checkDeferredPrefixCollision(List<ImportDirective> directives) {
     int count = directives.length;
     if (count > 1) {
@@ -1322,12 +1271,10 @@
     }
   }
 
-  /**
-   * Verify that all classes of the given [withClause] are valid.
-   *
-   * See [CompileTimeErrorCode.MIXIN_CLASS_DECLARES_CONSTRUCTOR],
-   * [CompileTimeErrorCode.MIXIN_INHERITS_FROM_NOT_OBJECT].
-   */
+  /// Verify that all classes of the given [withClause] are valid.
+  ///
+  /// See [CompileTimeErrorCode.MIXIN_CLASS_DECLARES_CONSTRUCTOR],
+  /// [CompileTimeErrorCode.MIXIN_INHERITS_FROM_NOT_OBJECT].
   bool _checkForAllMixinErrorCodes(WithClause withClause) {
     if (withClause == null) {
       return false;
@@ -1373,9 +1320,7 @@
     return problemReported;
   }
 
-  /**
-   * Check for errors related to the redirected constructors.
-   */
+  /// Check for errors related to the redirected constructors.
   void _checkForAllRedirectConstructorErrorCodes(
       ConstructorDeclaration declaration) {
     // Prepare redirected constructor node
@@ -1428,15 +1373,13 @@
     }
   }
 
-  /**
-   * Verify that the export namespace of the given export [directive] does not
-   * export any name already exported by another export directive. The
-   * [exportElement] is the [ExportElement] retrieved from the node. If the
-   * element in the node was `null`, then this method is not called. The
-   * [exportedLibrary] is the library element containing the exported element.
-   *
-   * See [CompileTimeErrorCode.AMBIGUOUS_EXPORT].
-   */
+  /// Verify that the export namespace of the given export [directive] does not
+  /// export any name already exported by another export directive. The
+  /// [exportElement] is the [ExportElement] retrieved from the node. If the
+  /// element in the node was `null`, then this method is not called. The
+  /// [exportedLibrary] is the library element containing the exported element.
+  ///
+  /// See [CompileTimeErrorCode.AMBIGUOUS_EXPORT].
   void _checkForAmbiguousExport(ExportDirective directive,
       ExportElement exportElement, LibraryElement exportedLibrary) {
     if (exportedLibrary == null) {
@@ -1463,10 +1406,8 @@
     }
   }
 
-  /**
-   * Check the given node to see whether it was ambiguous because the name was
-   * imported from two or more imports.
-   */
+  /// Check the given node to see whether it was ambiguous because the name was
+  /// imported from two or more imports.
   void _checkForAmbiguousImport(SimpleIdentifier node) {
     Element element = node.staticElement;
     if (element is MultiplyDefinedElementImpl) {
@@ -1483,12 +1424,10 @@
     }
   }
 
-  /**
-   * Verify that the given [expression] can be assigned to its corresponding
-   * parameters. The [expectedStaticType] is the expected static type of the
-   * parameter. The [actualStaticType] is the actual static type of the
-   * argument.
-   */
+  /// Verify that the given [expression] can be assigned to its corresponding
+  /// parameters. The [expectedStaticType] is the expected static type of the
+  /// parameter. The [actualStaticType] is the actual static type of the
+  /// argument.
   void _checkForArgumentTypeNotAssignable(
       Expression expression,
       DartType expectedStaticType,
@@ -1505,15 +1444,13 @@
     }
   }
 
-  /**
-   * Verify that the given [argument] can be assigned to its corresponding
-   * parameter.
-   *
-   * This method corresponds to
-   * [BestPracticesVerifier.checkForArgumentTypeNotAssignableForArgument].
-   *
-   * See [StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE].
-   */
+  /// Verify that the given [argument] can be assigned to its corresponding
+  /// parameter.
+  ///
+  /// This method corresponds to
+  /// [BestPracticesVerifier.checkForArgumentTypeNotAssignableForArgument].
+  ///
+  /// See [StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE].
   void _checkForArgumentTypeNotAssignableForArgument(Expression argument,
       {bool promoteParameterToNullable = false}) {
     if (argument == null) {
@@ -1529,36 +1466,32 @@
         staticParameterType, StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE);
   }
 
-  /**
-   * Verify that the given [expression] can be assigned to its corresponding
-   * parameters. The [expectedStaticType] is the expected static type.
-   *
-   * This method corresponds to
-   * [BestPracticesVerifier.checkForArgumentTypeNotAssignableWithExpectedTypes].
-   *
-   * See [StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE],
-   * [CompileTimeErrorCode.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE],
-   * [StaticWarningCode.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE],
-   * [CompileTimeErrorCode.MAP_KEY_TYPE_NOT_ASSIGNABLE],
-   * [CompileTimeErrorCode.MAP_VALUE_TYPE_NOT_ASSIGNABLE],
-   * [StaticWarningCode.MAP_KEY_TYPE_NOT_ASSIGNABLE], and
-   * [StaticWarningCode.MAP_VALUE_TYPE_NOT_ASSIGNABLE].
-   */
+  /// Verify that the given [expression] can be assigned to its corresponding
+  /// parameters. The [expectedStaticType] is the expected static type.
+  ///
+  /// This method corresponds to
+  /// [BestPracticesVerifier.checkForArgumentTypeNotAssignableWithExpectedTypes].
+  ///
+  /// See [StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE],
+  /// [CompileTimeErrorCode.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE],
+  /// [StaticWarningCode.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE],
+  /// [CompileTimeErrorCode.MAP_KEY_TYPE_NOT_ASSIGNABLE],
+  /// [CompileTimeErrorCode.MAP_VALUE_TYPE_NOT_ASSIGNABLE],
+  /// [StaticWarningCode.MAP_KEY_TYPE_NOT_ASSIGNABLE], and
+  /// [StaticWarningCode.MAP_VALUE_TYPE_NOT_ASSIGNABLE].
   void _checkForArgumentTypeNotAssignableWithExpectedTypes(
       Expression expression, DartType expectedStaticType, ErrorCode errorCode) {
     _checkForArgumentTypeNotAssignable(
         expression, expectedStaticType, getStaticType(expression), errorCode);
   }
 
-  /**
-   * Verify that the arguments in the given [argumentList] can be assigned to
-   * their corresponding parameters.
-   *
-   * This method corresponds to
-   * [BestPracticesVerifier.checkForArgumentTypesNotAssignableInList].
-   *
-   * See [StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE].
-   */
+  /// Verify that the arguments in the given [argumentList] can be assigned to
+  /// their corresponding parameters.
+  ///
+  /// This method corresponds to
+  /// [BestPracticesVerifier.checkForArgumentTypesNotAssignableInList].
+  ///
+  /// See [StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE].
   void _checkForArgumentTypesNotAssignableInList(ArgumentList argumentList) {
     if (argumentList == null) {
       return;
@@ -1590,13 +1523,11 @@
     return true;
   }
 
-  /**
-   * Verify that the given [expression] is not final.
-   *
-   * See [StaticWarningCode.ASSIGNMENT_TO_CONST],
-   * [StaticWarningCode.ASSIGNMENT_TO_FINAL], and
-   * [StaticWarningCode.ASSIGNMENT_TO_METHOD].
-   */
+  /// Verify that the given [expression] is not final.
+  ///
+  /// See [StaticWarningCode.ASSIGNMENT_TO_CONST],
+  /// [StaticWarningCode.ASSIGNMENT_TO_FINAL], and
+  /// [StaticWarningCode.ASSIGNMENT_TO_METHOD].
   void _checkForAssignmentToFinal(Expression expression) {
     // prepare element
     Element element;
@@ -1663,10 +1594,8 @@
     }
   }
 
-  /**
-   * Verifies that the class is not named `Function` and that it doesn't
-   * extends/implements/mixes in `Function`.
-   */
+  /// Verifies that the class is not named `Function` and that it doesn't
+  /// extends/implements/mixes in `Function`.
   void _checkForBadFunctionUse(ClassDeclaration node) {
     ExtendsClause extendsClause = node.extendsClause;
     WithClause withClause = node.withClause;
@@ -1695,15 +1624,13 @@
     }
   }
 
-  /**
-   * Verify that the given [identifier] is not a keyword, and generates the
-   * given [errorCode] on the identifier if it is a keyword.
-   *
-   * See [CompileTimeErrorCode.BUILT_IN_IDENTIFIER_AS_EXTENSION_NAME],
-   * [CompileTimeErrorCode.BUILT_IN_IDENTIFIER_AS_TYPE_NAME],
-   * [CompileTimeErrorCode.BUILT_IN_IDENTIFIER_AS_TYPE_PARAMETER_NAME], and
-   * [CompileTimeErrorCode.BUILT_IN_IDENTIFIER_AS_TYPEDEF_NAME].
-   */
+  /// Verify that the given [identifier] is not a keyword, and generates the
+  /// given [errorCode] on the identifier if it is a keyword.
+  ///
+  /// See [CompileTimeErrorCode.BUILT_IN_IDENTIFIER_AS_EXTENSION_NAME],
+  /// [CompileTimeErrorCode.BUILT_IN_IDENTIFIER_AS_TYPE_NAME],
+  /// [CompileTimeErrorCode.BUILT_IN_IDENTIFIER_AS_TYPE_PARAMETER_NAME], and
+  /// [CompileTimeErrorCode.BUILT_IN_IDENTIFIER_AS_TYPEDEF_NAME].
   void _checkForBuiltInIdentifierAsName(
       SimpleIdentifier identifier, ErrorCode errorCode) {
     Token token = identifier.token;
@@ -1713,12 +1640,10 @@
     }
   }
 
-  /**
-   * Verify that the given [switchCase] is terminated with 'break', 'continue',
-   * 'return' or 'throw'.
-   *
-   * see [StaticWarningCode.CASE_BLOCK_NOT_TERMINATED].
-   */
+  /// Verify that the given [switchCase] is terminated with 'break', 'continue',
+  /// 'return' or 'throw'.
+  ///
+  /// see [StaticWarningCode.CASE_BLOCK_NOT_TERMINATED].
   void _checkForCaseBlockNotTerminated(SwitchCase switchCase) {
     NodeList<Statement> statements = switchCase.statements;
     if (statements.isEmpty) {
@@ -1757,12 +1682,10 @@
         StaticWarningCode.CASE_BLOCK_NOT_TERMINATED, switchCase.keyword);
   }
 
-  /**
-   * Verify that the switch cases in the given switch [statement] are terminated
-   * with 'break', 'continue', 'rethrow', 'return' or 'throw'.
-   *
-   * See [StaticWarningCode.CASE_BLOCK_NOT_TERMINATED].
-   */
+  /// Verify that the switch cases in the given switch [statement] are
+  /// terminated with 'break', 'continue', 'rethrow', 'return' or 'throw'.
+  ///
+  /// See [StaticWarningCode.CASE_BLOCK_NOT_TERMINATED].
   void _checkForCaseBlocksNotTerminated(SwitchStatement statement) {
     if (_isNonNullableByDefault) return;
 
@@ -1776,14 +1699,12 @@
     }
   }
 
-  /**
-   * Verify that the [_enclosingClass] does not have a method and getter pair
-   * with the same name, via inheritance.
-   *
-   * See [CompileTimeErrorCode.CONFLICTING_STATIC_AND_INSTANCE],
-   * [CompileTimeErrorCode.CONFLICTING_METHOD_AND_FIELD], and
-   * [CompileTimeErrorCode.CONFLICTING_FIELD_AND_METHOD].
-   */
+  /// Verify that the [_enclosingClass] does not have a method and getter pair
+  /// with the same name, via inheritance.
+  ///
+  /// See [CompileTimeErrorCode.CONFLICTING_STATIC_AND_INSTANCE],
+  /// [CompileTimeErrorCode.CONFLICTING_METHOD_AND_FIELD], and
+  /// [CompileTimeErrorCode.CONFLICTING_FIELD_AND_METHOD].
   void _checkForConflictingClassMembers() {
     if (_enclosingClass == null) {
       return;
@@ -1845,13 +1766,11 @@
     }
   }
 
-  /**
-   * Verify all conflicts between type variable and enclosing class.
-   * TODO(scheglov)
-   *
-   * See [CompileTimeErrorCode.CONFLICTING_TYPE_VARIABLE_AND_CLASS], and
-   * [CompileTimeErrorCode.CONFLICTING_TYPE_VARIABLE_AND_MEMBER].
-   */
+  /// Verify all conflicts between type variable and enclosing class.
+  /// TODO(scheglov)
+  ///
+  /// See [CompileTimeErrorCode.CONFLICTING_TYPE_VARIABLE_AND_CLASS], and
+  /// [CompileTimeErrorCode.CONFLICTING_TYPE_VARIABLE_AND_MEMBER].
   void _checkForConflictingClassTypeVariableErrorCodes() {
     for (TypeParameterElement typeParameter in _enclosingClass.typeParameters) {
       String name = typeParameter.name;
@@ -1999,11 +1918,9 @@
         [supertype]);
   }
 
-  /**
-   * Verify that if the given [constructor] declaration is 'const' then there
-   * are no non-final instance variable. The [constructorElement] is the
-   * constructor element.
-   */
+  /// Verify that if the given [constructor] declaration is 'const' then there
+  /// are no non-final instance variable. The [constructorElement] is the
+  /// constructor element.
   void _checkForConstConstructorWithNonFinalField(
       ConstructorDeclaration constructor,
       ConstructorElement constructorElement) {
@@ -2024,14 +1941,12 @@
         constructor);
   }
 
-  /**
-   * Verify that the given 'const' instance creation [expression] is not
-   * creating a deferred type. The [constructorName] is the constructor name,
-   * always non-`null`. The [typeName] is the name of the type defining the
-   * constructor, always non-`null`.
-   *
-   * See [CompileTimeErrorCode.CONST_DEFERRED_CLASS].
-   */
+  /// Verify that the given 'const' instance creation [expression] is not
+  /// creating a deferred type. The [constructorName] is the constructor name,
+  /// always non-`null`. The [typeName] is the name of the type defining the
+  /// constructor, always non-`null`.
+  ///
+  /// See [CompileTimeErrorCode.CONST_DEFERRED_CLASS].
   void _checkForConstDeferredClass(InstanceCreationExpression expression,
       ConstructorName constructorName, TypeName typeName) {
     if (typeName.isDeferred) {
@@ -2042,12 +1957,10 @@
     }
   }
 
-  /**
-   * Verify that the given throw [expression] is not enclosed in a 'const'
-   * constructor declaration.
-   *
-   * See [CompileTimeErrorCode.CONST_CONSTRUCTOR_THROWS_EXCEPTION].
-   */
+  /// Verify that the given throw [expression] is not enclosed in a 'const'
+  /// constructor declaration.
+  ///
+  /// See [CompileTimeErrorCode.CONST_CONSTRUCTOR_THROWS_EXCEPTION].
   void _checkForConstEvalThrowsException(ThrowExpression expression) {
     if (_enclosingExecutable.isConstConstructor) {
       _errorReporter.reportErrorForNode(
@@ -2055,11 +1968,9 @@
     }
   }
 
-  /**
-   * Verify that the given normal formal [parameter] is not 'const'.
-   *
-   * See [CompileTimeErrorCode.CONST_FORMAL_PARAMETER].
-   */
+  /// Verify that the given normal formal [parameter] is not 'const'.
+  ///
+  /// See [CompileTimeErrorCode.CONST_FORMAL_PARAMETER].
   void _checkForConstFormalParameter(NormalFormalParameter parameter) {
     if (parameter.isConst) {
       _errorReporter.reportErrorForNode(
@@ -2067,13 +1978,11 @@
     }
   }
 
-  /**
-   * Verify that the given instance creation [expression] is not being invoked
-   * on an abstract class. The [typeName] is the [TypeName] of the
-   * [ConstructorName] from the [InstanceCreationExpression], this is the AST
-   * node that the error is attached to. The [type] is the type being
-   * constructed with this [InstanceCreationExpression].
-   */
+  /// Verify that the given instance creation [expression] is not being invoked
+  /// on an abstract class. The [typeName] is the [TypeName] of the
+  /// [ConstructorName] from the [InstanceCreationExpression], this is the AST
+  /// node that the error is attached to. The [type] is the type being
+  /// constructed with this [InstanceCreationExpression].
   void _checkForConstOrNewWithAbstractClass(
       InstanceCreationExpression expression,
       TypeName typeName,
@@ -2094,15 +2003,13 @@
     }
   }
 
-  /**
-   * Verify that the given instance creation [expression] is not being invoked
-   * on an enum. The [typeName] is the [TypeName] of the [ConstructorName] from
-   * the [InstanceCreationExpression], this is the AST node that the error is
-   * attached to. The [type] is the type being constructed with this
-   * [InstanceCreationExpression].
-   *
-   * See [CompileTimeErrorCode.INSTANTIATE_ENUM].
-   */
+  /// Verify that the given instance creation [expression] is not being invoked
+  /// on an enum. The [typeName] is the [TypeName] of the [ConstructorName] from
+  /// the [InstanceCreationExpression], this is the AST node that the error is
+  /// attached to. The [type] is the type being constructed with this
+  /// [InstanceCreationExpression].
+  ///
+  /// See [CompileTimeErrorCode.INSTANTIATE_ENUM].
   void _checkForConstOrNewWithEnum(InstanceCreationExpression expression,
       TypeName typeName, InterfaceType type) {
     if (type.element.isEnum) {
@@ -2111,9 +2018,7 @@
     }
   }
 
-  /**
-   * Verify that the given [expression] is not a mixin instantiation.
-   */
+  /// Verify that the given [expression] is not a mixin instantiation.
   void _checkForConstOrNewWithMixin(InstanceCreationExpression expression,
       TypeName typeName, InterfaceType type) {
     if (type.element.isMixin) {
@@ -2122,15 +2027,13 @@
     }
   }
 
-  /**
-   * Verify that the given 'const' instance creation [expression] is not being
-   * invoked on a constructor that is not 'const'.
-   *
-   * This method assumes that the instance creation was tested to be 'const'
-   * before being called.
-   *
-   * See [CompileTimeErrorCode.CONST_WITH_NON_CONST].
-   */
+  /// Verify that the given 'const' instance creation [expression] is not being
+  /// invoked on a constructor that is not 'const'.
+  ///
+  /// This method assumes that the instance creation was tested to be 'const'
+  /// before being called.
+  ///
+  /// See [CompileTimeErrorCode.CONST_WITH_NON_CONST].
   void _checkForConstWithNonConst(InstanceCreationExpression expression) {
     ConstructorElement constructorElement =
         expression.constructorName.staticElement;
@@ -2145,18 +2048,16 @@
     }
   }
 
-  /**
-   * Verify that if the given 'const' instance creation [expression] is being
-   * invoked on the resolved constructor. The [constructorName] is the
-   * constructor name, always non-`null`. The [typeName] is the name of the type
-   * defining the constructor, always non-`null`.
-   *
-   * This method assumes that the instance creation was tested to be 'const'
-   * before being called.
-   *
-   * See [CompileTimeErrorCode.CONST_WITH_UNDEFINED_CONSTRUCTOR], and
-   * [CompileTimeErrorCode.CONST_WITH_UNDEFINED_CONSTRUCTOR_DEFAULT].
-   */
+  /// Verify that if the given 'const' instance creation [expression] is being
+  /// invoked on the resolved constructor. The [constructorName] is the
+  /// constructor name, always non-`null`. The [typeName] is the name of the
+  /// type defining the constructor, always non-`null`.
+  ///
+  /// This method assumes that the instance creation was tested to be 'const'
+  /// before being called.
+  ///
+  /// See [CompileTimeErrorCode.CONST_WITH_UNDEFINED_CONSTRUCTOR], and
+  /// [CompileTimeErrorCode.CONST_WITH_UNDEFINED_CONSTRUCTOR_DEFAULT].
   void _checkForConstWithUndefinedConstructor(
       InstanceCreationExpression expression,
       ConstructorName constructorName,
@@ -2200,12 +2101,10 @@
     }
   }
 
-  /**
-   * Verify that the given default formal [parameter] is not part of a function
-   * typed parameter.
-   *
-   * See [CompileTimeErrorCode.DEFAULT_VALUE_IN_FUNCTION_TYPED_PARAMETER].
-   */
+  /// Verify that the given default formal [parameter] is not part of a function
+  /// typed parameter.
+  ///
+  /// See [CompileTimeErrorCode.DEFAULT_VALUE_IN_FUNCTION_TYPED_PARAMETER].
   void _checkForDefaultValueInFunctionTypedParameter(
       DefaultFormalParameter parameter) {
     // OK, not in a function typed parameter.
@@ -2222,10 +2121,8 @@
         parameter);
   }
 
-  /**
-   * Report a diagnostic if there are any extensions in the imported library
-   * that are not hidden.
-   */
+  /// Report a diagnostic if there are any extensions in the imported library
+  /// that are not hidden.
   void _checkForDeferredImportOfExtensions(
       ImportDirective directive, ImportElement importElement) {
     for (var element in importElement.namespace.definedNames.values) {
@@ -2239,12 +2136,10 @@
     }
   }
 
-  /**
-   * Verify that any deferred imports in the given compilation [unit] have a
-   * unique prefix.
-   *
-   * See [CompileTimeErrorCode.SHARED_DEFERRED_PREFIX].
-   */
+  /// Verify that any deferred imports in the given compilation [unit] have a
+  /// unique prefix.
+  ///
+  /// See [CompileTimeErrorCode.SHARED_DEFERRED_PREFIX].
   void _checkForDeferredPrefixCollisions(CompilationUnit unit) {
     NodeList<Directive> directives = unit.directives;
     int count = directives.length;
@@ -2274,10 +2169,8 @@
     }
   }
 
-  /**
-   * Return `true` if the caller should continue checking the rest of the
-   * information in the for-each part.
-   */
+  /// Return `true` if the caller should continue checking the rest of the
+  /// information in the for-each part.
   bool _checkForEachParts(ForEachParts node, SimpleIdentifier variable) {
     if (_checkForUseOfVoidResult(node.iterable)) {
       return false;
@@ -2360,15 +2253,13 @@
     return true;
   }
 
-  /**
-   * Verify that the given export [directive] has a unique name among other
-   * exported libraries. The [exportElement] is the [ExportElement] retrieved
-   * from the node, if the element in the node was `null`, then this method is
-   * not called. The [exportedLibrary] is the library element containing the
-   * exported element.
-   *
-   * See [CompileTimeErrorCode.EXPORT_DUPLICATED_LIBRARY_NAME].
-   */
+  /// Verify that the given export [directive] has a unique name among other
+  /// exported libraries. The [exportElement] is the [ExportElement] retrieved
+  /// from the node, if the element in the node was `null`, then this method is
+  /// not called. The [exportedLibrary] is the library element containing the
+  /// exported element.
+  ///
+  /// See [CompileTimeErrorCode.EXPORT_DUPLICATED_LIBRARY_NAME].
   void _checkForExportDuplicateLibraryName(ExportDirective directive,
       ExportElement exportElement, LibraryElement exportedLibrary) {
     if (exportedLibrary == null) {
@@ -2394,14 +2285,12 @@
     }
   }
 
-  /**
-   * Check that if the visiting library is not system, then any given library
-   * should not be SDK internal library. The [exportElement] is the
-   * [ExportElement] retrieved from the node, if the element in the node was
-   * `null`, then this method is not called.
-   *
-   * See [CompileTimeErrorCode.EXPORT_INTERNAL_LIBRARY].
-   */
+  /// Check that if the visiting library is not system, then any given library
+  /// should not be SDK internal library. The [exportElement] is the
+  /// [ExportElement] retrieved from the node, if the element in the node was
+  /// `null`, then this method is not called.
+  ///
+  /// See [CompileTimeErrorCode.EXPORT_INTERNAL_LIBRARY].
   void _checkForExportInternalLibrary(
       ExportDirective directive, ExportElement exportElement) {
     if (_isInSystemLibrary) {
@@ -2430,9 +2319,7 @@
         [directive.uri]);
   }
 
-  /**
-   * See [CompileTimeErrorCode.EXPORT_LEGACY_SYMBOL].
-   */
+  /// See [CompileTimeErrorCode.EXPORT_LEGACY_SYMBOL].
   void _checkForExportLegacySymbol(ExportDirective node) {
     if (!_isNonNullableByDefault) {
       return;
@@ -2461,11 +2348,9 @@
     }
   }
 
-  /**
-   * Verify that the given extends [clause] does not extend a deferred class.
-   *
-   * See [CompileTimeErrorCode.EXTENDS_DEFERRED_CLASS].
-   */
+  /// Verify that the given extends [clause] does not extend a deferred class.
+  ///
+  /// See [CompileTimeErrorCode.EXTENDS_DEFERRED_CLASS].
   void _checkForExtendsDeferredClass(TypeName superclass) {
     if (superclass == null) {
       return;
@@ -2474,12 +2359,10 @@
         superclass, CompileTimeErrorCode.EXTENDS_DEFERRED_CLASS);
   }
 
-  /**
-   * Verify that the given extends [clause] does not extend classes such as
-   * 'num' or 'String'.
-   *
-   * See [CompileTimeErrorCode.EXTENDS_DISALLOWED_CLASS].
-   */
+  /// Verify that the given extends [clause] does not extend classes such as
+  /// 'num' or 'String'.
+  ///
+  /// See [CompileTimeErrorCode.EXTENDS_DISALLOWED_CLASS].
   bool _checkForExtendsDisallowedClass(TypeName superclass) {
     if (superclass == null) {
       return false;
@@ -2488,18 +2371,16 @@
         superclass, CompileTimeErrorCode.EXTENDS_DISALLOWED_CLASS);
   }
 
-  /**
-   * Verify that the given [typeName] does not extend, implement or mixin
-   * classes that are deferred.
-   *
-   * See [_checkForExtendsDeferredClass],
-   * [_checkForExtendsDeferredClassInTypeAlias],
-   * [_checkForImplementsDeferredClass],
-   * [_checkForAllMixinErrorCodes],
-   * [CompileTimeErrorCode.EXTENDS_DEFERRED_CLASS],
-   * [CompileTimeErrorCode.IMPLEMENTS_DEFERRED_CLASS], and
-   * [CompileTimeErrorCode.MIXIN_DEFERRED_CLASS].
-   */
+  /// Verify that the given [typeName] does not extend, implement or mixin
+  /// classes that are deferred.
+  ///
+  /// See [_checkForExtendsDeferredClass],
+  /// [_checkForExtendsDeferredClassInTypeAlias],
+  /// [_checkForImplementsDeferredClass],
+  /// [_checkForAllMixinErrorCodes],
+  /// [CompileTimeErrorCode.EXTENDS_DEFERRED_CLASS],
+  /// [CompileTimeErrorCode.IMPLEMENTS_DEFERRED_CLASS], and
+  /// [CompileTimeErrorCode.MIXIN_DEFERRED_CLASS].
   bool _checkForExtendsOrImplementsDeferredClass(
       TypeName typeName, ErrorCode errorCode) {
     if (typeName.isSynthetic) {
@@ -2512,15 +2393,13 @@
     return false;
   }
 
-  /**
-   * Verify that the given [typeName] does not extend, implement or mixin
-   * classes such as 'num' or 'String'.
-   *
-   * TODO(scheglov) Remove this method, when all inheritance / override
-   * is concentrated. We keep it for now only because we need to know when
-   * inheritance is completely wrong, so that we don't need to check anything
-   * else.
-   */
+  /// Verify that the given [typeName] does not extend, implement or mixin
+  /// classes such as 'num' or 'String'.
+  ///
+  /// TODO(scheglov) Remove this method, when all inheritance / override
+  /// is concentrated. We keep it for now only because we need to know when
+  /// inheritance is completely wrong, so that we don't need to check anything
+  /// else.
   bool _checkForExtendsOrImplementsDisallowedClass(
       TypeName typeName, ErrorCode errorCode) {
     if (typeName.isSynthetic) {
@@ -2551,14 +2430,12 @@
     }
   }
 
-  /**
-   * Verify that the given constructor field [initializer] has compatible field
-   * and initializer expression types. The [fieldElement] is the static element
-   * from the name in the [ConstructorFieldInitializer].
-   *
-   * See [CompileTimeErrorCode.CONST_FIELD_INITIALIZER_NOT_ASSIGNABLE], and
-   * [StaticWarningCode.FIELD_INITIALIZER_NOT_ASSIGNABLE].
-   */
+  /// Verify that the given constructor field [initializer] has compatible field
+  /// and initializer expression types. The [fieldElement] is the static element
+  /// from the name in the [ConstructorFieldInitializer].
+  ///
+  /// See [CompileTimeErrorCode.CONST_FIELD_INITIALIZER_NOT_ASSIGNABLE], and
+  /// [StaticWarningCode.FIELD_INITIALIZER_NOT_ASSIGNABLE].
   void _checkForFieldInitializerNotAssignable(
       ConstructorFieldInitializer initializer, FieldElement fieldElement) {
     // prepare field type
@@ -2614,12 +2491,10 @@
 //        return true;
   }
 
-  /**
-   * Verify that the given field formal [parameter] is in a constructor
-   * declaration.
-   *
-   * See [CompileTimeErrorCode.FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR].
-   */
+  /// Verify that the given field formal [parameter] is in a constructor
+  /// declaration.
+  ///
+  /// See [CompileTimeErrorCode.FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR].
   void _checkForFieldInitializingFormalRedirectingConstructor(
       FieldFormalParameter parameter) {
     // prepare the node that should be a ConstructorDeclaration
@@ -2653,13 +2528,11 @@
     }
   }
 
-  /**
-   * Verify that the given variable declaration [list] has only initialized
-   * variables if the list is final or const.
-   *
-   * See [CompileTimeErrorCode.CONST_NOT_INITIALIZED], and
-   * [StaticWarningCode.FINAL_NOT_INITIALIZED].
-   */
+  /// Verify that the given variable declaration [list] has only initialized
+  /// variables if the list is final or const.
+  ///
+  /// See [CompileTimeErrorCode.CONST_NOT_INITIALIZED], and
+  /// [StaticWarningCode.FINAL_NOT_INITIALIZED].
   void _checkForFinalNotInitialized(VariableDeclarationList list) {
     if (_isInNativeClass || list.isSynthetic) {
       return;
@@ -2686,14 +2559,12 @@
     }
   }
 
-  /**
-   * If there are no constructors in the given [members], verify that all
-   * final fields are initialized.  Cases in which there is at least one
-   * constructor are handled in [_checkForAllFinalInitializedErrorCodes].
-   *
-   * See [CompileTimeErrorCode.CONST_NOT_INITIALIZED], and
-   * [StaticWarningCode.FINAL_NOT_INITIALIZED].
-   */
+  /// If there are no constructors in the given [members], verify that all
+  /// final fields are initialized.  Cases in which there is at least one
+  /// constructor are handled in [_checkForAllFinalInitializedErrorCodes].
+  ///
+  /// See [CompileTimeErrorCode.CONST_NOT_INITIALIZED], and
+  /// [StaticWarningCode.FINAL_NOT_INITIALIZED].
   void _checkForFinalNotInitializedInClass(List<ClassMember> members) {
     for (ClassMember classMember in members) {
       if (classMember is ConstructorDeclaration) {
@@ -2728,13 +2599,11 @@
     }
   }
 
-  /**
-   * Verify that the given implements [clause] does not implement classes such
-   * as 'num' or 'String'.
-   *
-   * See [CompileTimeErrorCode.IMPLEMENTS_DISALLOWED_CLASS],
-   * [CompileTimeErrorCode.IMPLEMENTS_DEFERRED_CLASS].
-   */
+  /// Verify that the given implements [clause] does not implement classes such
+  /// as 'num' or 'String'.
+  ///
+  /// See [CompileTimeErrorCode.IMPLEMENTS_DISALLOWED_CLASS],
+  /// [CompileTimeErrorCode.IMPLEMENTS_DEFERRED_CLASS].
   bool _checkForImplementsClauseErrorCodes(ImplementsClause clause) {
     if (clause == null) {
       return false;
@@ -2803,14 +2672,12 @@
     }
   }
 
-  /**
-   * Verify that if the given [identifier] is part of a constructor initializer,
-   * then it does not implicitly reference 'this' expression.
-   *
-   * See [CompileTimeErrorCode.IMPLICIT_THIS_REFERENCE_IN_INITIALIZER], and
-   * [CompileTimeErrorCode.INSTANCE_MEMBER_ACCESS_FROM_STATIC].
-   * TODO(scheglov) rename thid method
-   */
+  /// Verify that if the given [identifier] is part of a constructor
+  /// initializer, then it does not implicitly reference 'this' expression.
+  ///
+  /// See [CompileTimeErrorCode.IMPLICIT_THIS_REFERENCE_IN_INITIALIZER], and
+  /// [CompileTimeErrorCode.INSTANCE_MEMBER_ACCESS_FROM_STATIC].
+  /// TODO(scheglov) rename thid method
   void _checkForImplicitThisReferenceInInitializer(
       SimpleIdentifier identifier) {
     if (_isInComment) {
@@ -2874,14 +2741,12 @@
     }
   }
 
-  /**
-   * Verify that the given import [directive] has a unique name among other
-   * imported libraries. The [importElement] is the [ImportElement] retrieved
-   * from the node, if the element in the node was `null`, then this method is
-   * not called.
-   *
-   * See [CompileTimeErrorCode.IMPORT_DUPLICATED_LIBRARY_NAME].
-   */
+  /// Verify that the given import [directive] has a unique name among other
+  /// imported libraries. The [importElement] is the [ImportElement] retrieved
+  /// from the node, if the element in the node was `null`, then this method is
+  /// not called.
+  ///
+  /// See [CompileTimeErrorCode.IMPORT_DUPLICATED_LIBRARY_NAME].
   void _checkForImportDuplicateLibraryName(
       ImportDirective directive, ImportElement importElement) {
     // prepare imported library
@@ -2906,14 +2771,12 @@
     }
   }
 
-  /**
-   * Check that if the visiting library is not system, then any given library
-   * should not be SDK internal library. The [importElement] is the
-   * [ImportElement] retrieved from the node, if the element in the node was
-   * `null`, then this method is not called
-   *
-   * See [CompileTimeErrorCode.IMPORT_INTERNAL_LIBRARY].
-   */
+  /// Check that if the visiting library is not system, then any given library
+  /// should not be SDK internal library. The [importElement] is the
+  /// [ImportElement] retrieved from the node, if the element in the node was
+  /// `null`, then this method is not called
+  ///
+  /// See [CompileTimeErrorCode.IMPORT_INTERNAL_LIBRARY].
   void _checkForImportInternalLibrary(
       ImportDirective directive, ImportElement importElement) {
     if (_isInSystemLibrary) {
@@ -2939,12 +2802,10 @@
         [directive.uri.stringValue]);
   }
 
-  /**
-   * Check that the given [typeReference] is not a type reference and that then
-   * the [name] is reference to an instance member.
-   *
-   * See [StaticTypeWarningCode.INSTANCE_ACCESS_TO_STATIC_MEMBER].
-   */
+  /// Check that the given [typeReference] is not a type reference and that then
+  /// the [name] is reference to an instance member.
+  ///
+  /// See [StaticTypeWarningCode.INSTANCE_ACCESS_TO_STATIC_MEMBER].
   void _checkForInstanceAccessToStaticMember(
       ClassElement typeReference, Expression target, SimpleIdentifier name) {
     if (_isInComment) {
@@ -2987,13 +2848,11 @@
     }
   }
 
-  /**
-   * Verify that an 'int' can be assigned to the parameter corresponding to the
-   * given [argument]. This is used for prefix and postfix expressions where
-   * the argument value is implicit.
-   *
-   * See [StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE].
-   */
+  /// Verify that an 'int' can be assigned to the parameter corresponding to the
+  /// given [argument]. This is used for prefix and postfix expressions where
+  /// the argument value is implicit.
+  ///
+  /// See [StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE].
   void _checkForIntNotAssignable(Expression argument) {
     if (argument == null) {
       return;
@@ -3004,11 +2863,9 @@
         StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE);
   }
 
-  /**
-   * Verify that the given [annotation] isn't defined in a deferred library.
-   *
-   * See [CompileTimeErrorCode.INVALID_ANNOTATION_FROM_DEFERRED_LIBRARY].
-   */
+  /// Verify that the given [annotation] isn't defined in a deferred library.
+  ///
+  /// See [CompileTimeErrorCode.INVALID_ANNOTATION_FROM_DEFERRED_LIBRARY].
   void _checkForInvalidAnnotationFromDeferredLibrary(Annotation annotation) {
     Identifier nameIdentifier = annotation.name;
     if (nameIdentifier is PrefixedIdentifier && nameIdentifier.isDeferred) {
@@ -3018,12 +2875,10 @@
     }
   }
 
-  /**
-   * Verify that the given left hand side ([lhs]) and right hand side ([rhs])
-   * represent a valid assignment.
-   *
-   * See [StaticTypeWarningCode.INVALID_ASSIGNMENT].
-   */
+  /// Verify that the given left hand side ([lhs]) and right hand side ([rhs])
+  /// represent a valid assignment.
+  ///
+  /// See [StaticTypeWarningCode.INVALID_ASSIGNMENT].
   void _checkForInvalidAssignment(Expression lhs, Expression rhs) {
     if (lhs == null || rhs == null) {
       return;
@@ -3051,12 +2906,10 @@
         rhs, leftType, StaticTypeWarningCode.INVALID_ASSIGNMENT);
   }
 
-  /**
-   * Check the given [initializer] to ensure that the field being initialized is
-   * a valid field. The [fieldName] is the field name from the
-   * [ConstructorFieldInitializer]. The [staticElement] is the static element
-   * from the name in the [ConstructorFieldInitializer].
-   */
+  /// Check the given [initializer] to ensure that the field being initialized
+  /// is a valid field. The [fieldName] is the field name from the
+  /// [ConstructorFieldInitializer]. The [staticElement] is the static element
+  /// from the name in the [ConstructorFieldInitializer].
   void _checkForInvalidField(ConstructorFieldInitializer initializer,
       SimpleIdentifier fieldName, Element staticElement) {
     if (staticElement is FieldElement) {
@@ -3080,10 +2933,8 @@
     }
   }
 
-  /**
-   * Check to see whether the given function [body] has a modifier associated
-   * with it, and report it as an error if it does.
-   */
+  /// Check to see whether the given function [body] has a modifier associated
+  /// with it, and report it as an error if it does.
   void _checkForInvalidModifierOnBody(
       FunctionBody body, CompileTimeErrorCode errorCode) {
     Token keyword = body.keyword;
@@ -3092,11 +2943,9 @@
     }
   }
 
-  /**
-   * Verify that the usage of the given 'this' is valid.
-   *
-   * See [CompileTimeErrorCode.INVALID_REFERENCE_TO_THIS].
-   */
+  /// Verify that the usage of the given 'this' is valid.
+  ///
+  /// See [CompileTimeErrorCode.INVALID_REFERENCE_TO_THIS].
   void _checkForInvalidReferenceToThis(ThisExpression expression) {
     if (!_isThisInValidContext(expression)) {
       _errorReporter.reportErrorForNode(
@@ -3135,13 +2984,11 @@
     }
   }
 
-  /**
-   * Verify that the elements of the given list [literal] are subtypes of the
-   * list's static type.
-   *
-   * See [CompileTimeErrorCode.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE], and
-   * [StaticWarningCode.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE].
-   */
+  /// Verify that the elements of the given list [literal] are subtypes of the
+  /// list's static type.
+  ///
+  /// See [CompileTimeErrorCode.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE], and
+  /// [StaticWarningCode.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE].
   void _checkForListElementTypeNotAssignable(ListLiteral literal) {
     // Determine the list's element type. We base this on the static type and
     // not the literal's type arguments because in strong mode, the type
@@ -3207,11 +3054,9 @@
     }
   }
 
-  /**
-   * Check to make sure that the given switch [statement] whose static type is
-   * an enum type either have a default case or include all of the enum
-   * constants.
-   */
+  /// Check to make sure that the given switch [statement] whose static type is
+  /// an enum type either have a default case or include all of the enum
+  /// constants.
   void _checkForMissingEnumConstantInSwitch(SwitchStatement statement) {
     // TODO(brianwilkerson) This needs to be checked after constant values have
     // been computed.
@@ -3275,13 +3120,11 @@
     }
   }
 
-  /**
-   * Verify that the given mixin does not have an explicitly declared
-   * constructor. The [mixinName] is the node to report problem on. The
-   * [mixinElement] is the mixing to evaluate.
-   *
-   * See [CompileTimeErrorCode.MIXIN_CLASS_DECLARES_CONSTRUCTOR].
-   */
+  /// Verify that the given mixin does not have an explicitly declared
+  /// constructor. The [mixinName] is the node to report problem on. The
+  /// [mixinElement] is the mixing to evaluate.
+  ///
+  /// See [CompileTimeErrorCode.MIXIN_CLASS_DECLARES_CONSTRUCTOR].
   bool _checkForMixinClassDeclaresConstructor(
       TypeName mixinName, ClassElement mixinElement) {
     for (ConstructorElement constructor in mixinElement.constructors) {
@@ -3296,13 +3139,12 @@
     return false;
   }
 
-  /**
-   * Verify that the given mixin has the 'Object' superclass. The [mixinName] is
-   * the node to report problem on. The [mixinElement] is the mixing to
-   * evaluate.
-   *
-   * See [CompileTimeErrorCode.MIXIN_INHERITS_FROM_NOT_OBJECT].
-   */
+  /// Verify that the given mixin has the 'Object' superclass.
+  ///
+  /// The [mixinName] is the node to report problem on. The [mixinElement] is
+  /// the mixing to evaluate.
+  ///
+  /// See [CompileTimeErrorCode.MIXIN_INHERITS_FROM_NOT_OBJECT].
   bool _checkForMixinInheritsNotFromObject(
       TypeName mixinName, ClassElement mixinElement) {
     InterfaceType mixinSupertype = mixinElement.supertype;
@@ -3404,11 +3246,9 @@
     return false;
   }
 
-  /**
-   * Check for the declaration of a mixin from a library other than the current
-   * library that defines a private member that conflicts with a private name
-   * from the same library but from a superclass or a different mixin.
-   */
+  /// Check for the declaration of a mixin from a library other than the current
+  /// library that defines a private member that conflicts with a private name
+  /// from the same library but from a superclass or a different mixin.
   void _checkForMixinWithConflictingPrivateMember(
       WithClause withClause, TypeName superclassName) {
     if (withClause == null) {
@@ -3482,11 +3322,9 @@
     }
   }
 
-  /**
-   * Verify that the given [constructor] has at most one 'super' initializer.
-   *
-   * See [CompileTimeErrorCode.MULTIPLE_SUPER_INITIALIZERS].
-   */
+  /// Verify that the given [constructor] has at most one 'super' initializer.
+  ///
+  /// See [CompileTimeErrorCode.MULTIPLE_SUPER_INITIALIZERS].
   void _checkForMultipleSuperInitializers(ConstructorDeclaration constructor) {
     bool hasSuperInitializer = false;
     for (ConstructorInitializer initializer in constructor.initializers) {
@@ -3515,11 +3353,9 @@
     }
   }
 
-  /**
-   * Checks to ensure that the given native function [body] is in SDK code.
-   *
-   * See [ParserErrorCode.NATIVE_FUNCTION_BODY_IN_NON_SDK_CODE].
-   */
+  /// Checks to ensure that the given native function [body] is in SDK code.
+  ///
+  /// See [ParserErrorCode.NATIVE_FUNCTION_BODY_IN_NON_SDK_CODE].
   void _checkForNativeFunctionBodyInNonSdkCode(NativeFunctionBody body) {
     if (!_isInSystemLibrary && !_hasExtUri) {
       _errorReporter.reportErrorForNode(
@@ -3527,16 +3363,14 @@
     }
   }
 
-  /**
-   * Verify that the given instance creation [expression] invokes an existing
-   * constructor. The [constructorName] is the constructor name. The [typeName]
-   * is the name of the type defining the constructor.
-   *
-   * This method assumes that the instance creation was tested to be 'new'
-   * before being called.
-   *
-   * See [StaticWarningCode.NEW_WITH_UNDEFINED_CONSTRUCTOR].
-   */
+  /// Verify that the given instance creation [expression] invokes an existing
+  /// constructor. The [constructorName] is the constructor name. The [typeName]
+  /// is the name of the type defining the constructor.
+  ///
+  /// This method assumes that the instance creation was tested to be 'new'
+  /// before being called.
+  ///
+  /// See [StaticWarningCode.NEW_WITH_UNDEFINED_CONSTRUCTOR].
   void _checkForNewWithUndefinedConstructor(
       InstanceCreationExpression expression,
       ConstructorName constructorName,
@@ -3570,13 +3404,11 @@
     }
   }
 
-  /**
-   * Check that if the given class [declaration] implicitly calls default
-   * constructor of its superclass, there should be such default constructor -
-   * implicit or explicit.
-   *
-   * See [CompileTimeErrorCode.NO_DEFAULT_SUPER_CONSTRUCTOR_IMPLICIT].
-   */
+  /// Check that if the given class [declaration] implicitly calls default
+  /// constructor of its superclass, there should be such default constructor -
+  /// implicit or explicit.
+  ///
+  /// See [CompileTimeErrorCode.NO_DEFAULT_SUPER_CONSTRUCTOR_IMPLICIT].
   void _checkForNoDefaultSuperConstructorImplicit(
       ClassDeclaration declaration) {
     // do nothing if there is explicit constructor
@@ -3606,20 +3438,22 @@
       }
     }
 
-    _errorReporter.reportErrorForNode(
-        CompileTimeErrorCode.NO_DEFAULT_SUPER_CONSTRUCTOR_IMPLICIT,
-        declaration.name,
-        [superType, _enclosingClass.displayName]);
+    if (!_typeProvider.nonSubtypableClasses.contains(superType.element)) {
+      // Don't report this diagnostic for non-subtypable classes because the
+      // real problem was already reported.
+      _errorReporter.reportErrorForNode(
+          CompileTimeErrorCode.NO_DEFAULT_SUPER_CONSTRUCTOR_IMPLICIT,
+          declaration.name,
+          [superType, _enclosingClass.displayName]);
+    }
   }
 
-  /**
-   * Verify the given map [literal] either:
-   * * has `const modifier`
-   * * has explicit type arguments
-   * * is not start of the statement
-   *
-   * See [CompileTimeErrorCode.NON_CONST_MAP_AS_EXPRESSION_STATEMENT].
-   */
+  /// Verify the given map [literal] either:
+  /// * has `const modifier`
+  /// * has explicit type arguments
+  /// * is not start of the statement
+  ///
+  /// See [CompileTimeErrorCode.NON_CONST_MAP_AS_EXPRESSION_STATEMENT].
   void _checkForNonConstMapAsExpressionStatement3(SetOrMapLiteral literal) {
     // "const"
     if (literal.constKeyword != null) {
@@ -3643,12 +3477,10 @@
         CompileTimeErrorCode.NON_CONST_MAP_AS_EXPRESSION_STATEMENT, literal);
   }
 
-  /**
-   * Verify that the given method [declaration] of operator `[]=`, has `void`
-   * return type.
-   *
-   * See [StaticWarningCode.NON_VOID_RETURN_FOR_OPERATOR].
-   */
+  /// Verify that the given method [declaration] of operator `[]=`, has `void`
+  /// return type.
+  ///
+  /// See [StaticWarningCode.NON_VOID_RETURN_FOR_OPERATOR].
   void _checkForNonVoidReturnTypeForOperator(MethodDeclaration declaration) {
     // check that []= operator
     SimpleIdentifier name = declaration.name;
@@ -3666,12 +3498,10 @@
     }
   }
 
-  /**
-   * Verify the [typeName], used as the return type of a setter, is valid
-   * (either `null` or the type 'void').
-   *
-   * See [StaticWarningCode.NON_VOID_RETURN_FOR_SETTER].
-   */
+  /// Verify the [typeName], used as the return type of a setter, is valid
+  /// (either `null` or the type 'void').
+  ///
+  /// See [StaticWarningCode.NON_VOID_RETURN_FOR_SETTER].
   void _checkForNonVoidReturnTypeForSetter(TypeAnnotation typeName) {
     if (typeName != null) {
       DartType type = typeName.type;
@@ -3752,12 +3582,10 @@
     }
   }
 
-  /**
-   * Verify that all classes of the given [onClause] are valid.
-   *
-   * See [CompileTimeErrorCode.MIXIN_SUPER_CLASS_CONSTRAINT_DISALLOWED_CLASS],
-   * [CompileTimeErrorCode.MIXIN_SUPER_CLASS_CONSTRAINT_DEFERRED_CLASS].
-   */
+  /// Verify that all classes of the given [onClause] are valid.
+  ///
+  /// See [CompileTimeErrorCode.MIXIN_SUPER_CLASS_CONSTRAINT_DISALLOWED_CLASS],
+  /// [CompileTimeErrorCode.MIXIN_SUPER_CLASS_CONSTRAINT_DEFERRED_CLASS].
   bool _checkForOnClauseErrorCodes(OnClause onClause) {
     if (onClause == null) {
       return false;
@@ -3784,13 +3612,13 @@
     return problemReported;
   }
 
-  /**
-   * Verify the given operator-method [declaration], does not have an optional
-   * parameter. This method assumes that the method declaration was tested to be
-   * an operator declaration before being called.
-   *
-   * See [CompileTimeErrorCode.OPTIONAL_PARAMETER_IN_OPERATOR].
-   */
+  /// Verify the given operator-method [declaration], does not have an optional
+  /// parameter.
+  ///
+  /// This method assumes that the method declaration was tested to be an
+  /// operator declaration before being called.
+  ///
+  /// See [CompileTimeErrorCode.OPTIONAL_PARAMETER_IN_OPERATOR].
   void _checkForOptionalParameterInOperator(MethodDeclaration declaration) {
     FormalParameterList parameterList = declaration.parameters;
     if (parameterList == null) {
@@ -3807,27 +3635,25 @@
     }
   }
 
-  /**
-   * Via informal specification: dart-lang/language/issues/4
-   *
-   * If e is an integer literal which is not the operand of a unary minus
-   * operator, then:
-   *   - If the context type is double, it is a compile-time error if the
-   *   numerical value of e is not precisely representable by a double.
-   *   Otherwise the static type of e is double and the result of evaluating e
-   *   is a double instance representing that value.
-   *   - Otherwise (the current behavior of e, with a static type of int).
-   *
-   * and
-   *
-   * If e is -n and n is an integer literal, then
-   *   - If the context type is double, it is a compile-time error if the
-   *   numerical value of n is not precisley representable by a double.
-   *   Otherwise the static type of e is double and the result of evaluating e
-   *   is the result of calling the unary minus operator on a double instance
-   *   representing the numerical value of n.
-   *   - Otherwise (the current behavior of -n)
-   */
+  /// Via informal specification: dart-lang/language/issues/4
+  ///
+  /// If e is an integer literal which is not the operand of a unary minus
+  /// operator, then:
+  ///   - If the context type is double, it is a compile-time error if the
+  ///   numerical value of e is not precisely representable by a double.
+  ///   Otherwise the static type of e is double and the result of evaluating e
+  ///   is a double instance representing that value.
+  ///   - Otherwise (the current behavior of e, with a static type of int).
+  ///
+  /// and
+  ///
+  /// If e is -n and n is an integer literal, then
+  ///   - If the context type is double, it is a compile-time error if the
+  ///   numerical value of n is not precisley representable by a double.
+  ///   Otherwise the static type of e is double and the result of evaluating e
+  ///   is the result of calling the unary minus operator on a double instance
+  ///   representing the numerical value of n.
+  ///   - Otherwise (the current behavior of -n)
   void _checkForOutOfRange(IntegerLiteral node) {
     String lexeme = node.literal.lexeme;
     final bool isNegated = (node as IntegerLiteralImpl).immediatelyNegated;
@@ -3856,11 +3682,9 @@
     }
   }
 
-  /**
-   * Check that the given named optional [parameter] does not begin with '_'.
-   *
-   * See [CompileTimeErrorCode.PRIVATE_OPTIONAL_PARAMETER].
-   */
+  /// Check that the given named optional [parameter] does not begin with '_'.
+  ///
+  /// See [CompileTimeErrorCode.PRIVATE_OPTIONAL_PARAMETER].
   void _checkForPrivateOptionalParameter(FormalParameter parameter) {
     // should be named parameter
     if (!parameter.isNamed) {
@@ -3876,13 +3700,11 @@
         CompileTimeErrorCode.PRIVATE_OPTIONAL_PARAMETER, parameter);
   }
 
-  /**
-   * Check whether the given constructor [declaration] is the redirecting
-   * generative constructor and references itself directly or indirectly. The
-   * [constructorElement] is the constructor element.
-   *
-   * See [CompileTimeErrorCode.RECURSIVE_CONSTRUCTOR_REDIRECT].
-   */
+  /// Check whether the given constructor [declaration] is the redirecting
+  /// generative constructor and references itself directly or indirectly. The
+  /// [constructorElement] is the constructor element.
+  ///
+  /// See [CompileTimeErrorCode.RECURSIVE_CONSTRUCTOR_REDIRECT].
   void _checkForRecursiveConstructorRedirect(ConstructorDeclaration declaration,
       ConstructorElement constructorElement) {
     // we check generative constructor here
@@ -3902,13 +3724,11 @@
     }
   }
 
-  /**
-   * Check whether the given constructor [declaration] has redirected
-   * constructor and references itself directly or indirectly. The
-   * constructor [element] is the element introduced by the declaration.
-   *
-   * See [CompileTimeErrorCode.RECURSIVE_FACTORY_REDIRECT].
-   */
+  /// Check whether the given constructor [declaration] has redirected
+  /// constructor and references itself directly or indirectly. The
+  /// constructor [element] is the element introduced by the declaration.
+  ///
+  /// See [CompileTimeErrorCode.RECURSIVE_FACTORY_REDIRECT].
   bool _checkForRecursiveFactoryRedirect(
       ConstructorDeclaration declaration, ConstructorElement element) {
     // prepare redirected constructor
@@ -3928,18 +3748,16 @@
     return true;
   }
 
-  /**
-   * Check that the given constructor [declaration] has a valid combination of
-   * redirected constructor invocation(s), super constructor invocations and
-   * field initializers.
-   *
-   * See [CompileTimeErrorCode.ASSERT_IN_REDIRECTING_CONSTRUCTOR],
-   * [CompileTimeErrorCode.DEFAULT_VALUE_IN_REDIRECTING_FACTORY_CONSTRUCTOR],
-   * [CompileTimeErrorCode.FIELD_INITIALIZER_REDIRECTING_CONSTRUCTOR],
-   * [CompileTimeErrorCode.MULTIPLE_REDIRECTING_CONSTRUCTOR_INVOCATIONS],
-   * [CompileTimeErrorCode.SUPER_IN_REDIRECTING_CONSTRUCTOR], and
-   * [CompileTimeErrorCode.REDIRECT_GENERATIVE_TO_NON_GENERATIVE_CONSTRUCTOR].
-   */
+  /// Check that the given constructor [declaration] has a valid combination of
+  /// redirected constructor invocation(s), super constructor invocations and
+  /// field initializers.
+  ///
+  /// See [CompileTimeErrorCode.ASSERT_IN_REDIRECTING_CONSTRUCTOR],
+  /// [CompileTimeErrorCode.DEFAULT_VALUE_IN_REDIRECTING_FACTORY_CONSTRUCTOR],
+  /// [CompileTimeErrorCode.FIELD_INITIALIZER_REDIRECTING_CONSTRUCTOR],
+  /// [CompileTimeErrorCode.MULTIPLE_REDIRECTING_CONSTRUCTOR_INVOCATIONS],
+  /// [CompileTimeErrorCode.SUPER_IN_REDIRECTING_CONSTRUCTOR], and
+  /// [CompileTimeErrorCode.REDIRECT_GENERATIVE_TO_NON_GENERATIVE_CONSTRUCTOR].
   void _checkForRedirectingConstructorErrorCodes(
       ConstructorDeclaration declaration) {
     // Check for default values in the parameters
@@ -4038,12 +3856,10 @@
     }
   }
 
-  /**
-   * Check whether the redirecting constructor, [element], is const, and
-   * [redirectedElement], its redirectee, is not const.
-   *
-   * See [CompileTimeErrorCode.REDIRECT_TO_NON_CONST_CONSTRUCTOR].
-   */
+  /// Check whether the redirecting constructor, [element], is const, and
+  /// [redirectedElement], its redirectee, is not const.
+  ///
+  /// See [CompileTimeErrorCode.REDIRECT_TO_NON_CONST_CONSTRUCTOR].
   void _checkForRedirectToNonConstConstructor(
     ConstructorElement element,
     ConstructorElement redirectedElement,
@@ -4096,11 +3912,9 @@
     }
   }
 
-  /**
-   * Check that the given rethrow [expression] is inside of a catch clause.
-   *
-   * See [CompileTimeErrorCode.RETHROW_OUTSIDE_CATCH].
-   */
+  /// Check that the given rethrow [expression] is inside of a catch clause.
+  ///
+  /// See [CompileTimeErrorCode.RETHROW_OUTSIDE_CATCH].
   void _checkForRethrowOutsideCatch(RethrowExpression expression) {
     if (!_isInCatchClause) {
       _errorReporter.reportErrorForNode(
@@ -4108,12 +3922,10 @@
     }
   }
 
-  /**
-   * Check that if the given constructor [declaration] is generative, then
-   * it does not have an expression function body.
-   *
-   * See [CompileTimeErrorCode.RETURN_IN_GENERATIVE_CONSTRUCTOR].
-   */
+  /// Check that if the given constructor [declaration] is generative, then
+  /// it does not have an expression function body.
+  ///
+  /// See [CompileTimeErrorCode.RETURN_IN_GENERATIVE_CONSTRUCTOR].
   void _checkForReturnInGenerativeConstructor(
       ConstructorDeclaration declaration) {
     // ignore factory
@@ -4130,13 +3942,11 @@
         CompileTimeErrorCode.RETURN_IN_GENERATIVE_CONSTRUCTOR, body);
   }
 
-  /**
-   * Verify that the elements in the given set [literal] are subtypes of the
-   * set's static type.
-   *
-   * See [CompileTimeErrorCode.SET_ELEMENT_TYPE_NOT_ASSIGNABLE], and
-   * [StaticWarningCode.SET_ELEMENT_TYPE_NOT_ASSIGNABLE].
-   */
+  /// Verify that the elements in the given set [literal] are subtypes of the
+  /// set's static type.
+  ///
+  /// See [CompileTimeErrorCode.SET_ELEMENT_TYPE_NOT_ASSIGNABLE], and
+  /// [StaticWarningCode.SET_ELEMENT_TYPE_NOT_ASSIGNABLE].
   void _checkForSetElementTypeNotAssignable3(SetOrMapLiteral literal) {
     // Determine the set's element type. We base this on the static type and
     // not the literal's type arguments because in strong mode, the type
@@ -4168,12 +3978,10 @@
     }
   }
 
-  /**
-   * Check the given [typeReference] and that the [name] is not a reference to
-   * an instance member.
-   *
-   * See [StaticWarningCode.STATIC_ACCESS_TO_INSTANCE_MEMBER].
-   */
+  /// Check the given [typeReference] and that the [name] is not a reference to
+  /// an instance member.
+  ///
+  /// See [StaticWarningCode.STATIC_ACCESS_TO_INSTANCE_MEMBER].
   void _checkForStaticAccessToInstanceMember(
       ClassElement typeReference, SimpleIdentifier name) {
     // OK, in comment
@@ -4198,12 +4006,10 @@
     }
   }
 
-  /**
-   * Check that the type of the expression in the given 'switch' [statement] is
-   * assignable to the type of the 'case' members.
-   *
-   * See [StaticWarningCode.SWITCH_EXPRESSION_NOT_ASSIGNABLE].
-   */
+  /// Check that the type of the expression in the given 'switch' [statement] is
+  /// assignable to the type of the 'case' members.
+  ///
+  /// See [StaticWarningCode.SWITCH_EXPRESSION_NOT_ASSIGNABLE].
   void _checkForSwitchExpressionNotAssignable(SwitchStatement statement) {
     // For NNBD we verify runtime types of values, and subtyping.
     if (_isNonNullableByDefault) {
@@ -4255,12 +4061,10 @@
     }
   }
 
-  /**
-   * Verify that the given [element] does not reference itself directly.
-   * If it does, report the error on the [node].
-   *
-   * See [CompileTimeErrorCode.TYPE_ALIAS_CANNOT_REFERENCE_ITSELF].
-   */
+  /// Verify that the given [element] does not reference itself directly.
+  /// If it does, report the error on the [node].
+  ///
+  /// See [CompileTimeErrorCode.TYPE_ALIAS_CANNOT_REFERENCE_ITSELF].
   void _checkForTypeAliasCannotReferenceItself(
     AstNode node,
     FunctionTypeAliasElement element,
@@ -4273,11 +4077,9 @@
     }
   }
 
-  /**
-   * Verify that the [type] is not a deferred type.
-   *
-   * See [StaticWarningCode.TYPE_ANNOTATION_DEFERRED_CLASS].
-   */
+  /// Verify that the [type] is not a deferred type.
+  ///
+  /// See [StaticWarningCode.TYPE_ANNOTATION_DEFERRED_CLASS].
   void _checkForTypeAnnotationDeferredClass(TypeAnnotation type) {
     if (type is TypeName && type.isDeferred) {
       _errorReporter.reportErrorForNode(
@@ -4285,11 +4087,9 @@
     }
   }
 
-  /**
-   * Check that none of the type [parameters] references itself in its bound.
-   *
-   * See [StaticTypeWarningCode.TYPE_PARAMETER_SUPERTYPE_OF_ITS_BOUND].
-   */
+  /// Check that none of the type [parameters] references itself in its bound.
+  ///
+  /// See [StaticTypeWarningCode.TYPE_PARAMETER_SUPERTYPE_OF_ITS_BOUND].
   void _checkForTypeParameterBoundRecursion(List<TypeParameter> parameters) {
     Map<TypeParameterElement, TypeParameter> elementToNode;
     for (var parameter in parameters) {
@@ -4337,15 +4137,13 @@
     }
   }
 
-  /**
-   * Check that if the given generative [constructor] has neither an explicit
-   * super constructor invocation nor a redirecting constructor invocation, that
-   * the superclass has a default generative constructor.
-   *
-   * See [CompileTimeErrorCode.UNDEFINED_CONSTRUCTOR_IN_INITIALIZER_DEFAULT],
-   * [CompileTimeErrorCode.NON_GENERATIVE_CONSTRUCTOR], and
-   * [StaticWarningCode.NO_DEFAULT_SUPER_CONSTRUCTOR_EXPLICIT].
-   */
+  /// Check that if the given generative [constructor] has neither an explicit
+  /// super constructor invocation nor a redirecting constructor invocation,
+  /// that the superclass has a default generative constructor.
+  ///
+  /// See [CompileTimeErrorCode.UNDEFINED_CONSTRUCTOR_IN_INITIALIZER_DEFAULT],
+  /// [CompileTimeErrorCode.NON_GENERATIVE_CONSTRUCTOR], and
+  /// [StaticWarningCode.NO_DEFAULT_SUPER_CONSTRUCTOR_EXPLICIT].
   void _checkForUndefinedConstructorInInitializerImplicit(
       ConstructorDeclaration constructor) {
     if (_enclosingClass == null) {
@@ -4447,12 +4245,11 @@
     }
   }
 
-  /**
-   * Check that if the given [name] is a reference to a static member it is
-   * defined in the enclosing class rather than in a superclass.
-   *
-   * See [StaticTypeWarningCode.UNQUALIFIED_REFERENCE_TO_NON_LOCAL_STATIC_MEMBER].
-   */
+  /// Check that if the given [name] is a reference to a static member it is
+  /// defined in the enclosing class rather than in a superclass.
+  ///
+  /// See
+  /// [StaticTypeWarningCode.UNQUALIFIED_REFERENCE_TO_NON_LOCAL_STATIC_MEMBER].
   void _checkForUnqualifiedReferenceToNonLocalStaticMember(
       SimpleIdentifier name) {
     Element element = name.staticElement;
@@ -4492,15 +4289,13 @@
     }
   }
 
-  /**
-   * While in general Never is a sort of placehold type that should be usable
-   * anywhere, we explicitly bar it from some dubious syntactic locations such
-   * as calling a method on Never, which in practice would look something like
-   * `(throw x).toString()` which is clearly something between a mistake and
-   * dead code.
-   *
-   * See [StaticWarningCode.RECEIVER_OF_TYPE_NEVER].
-   */
+  /// While in general Never is a sort of placehold type that should be usable
+  /// anywhere, we explicitly bar it from some dubious syntactic locations such
+  /// as calling a method on Never, which in practice would look something like
+  /// `(throw x).toString()` which is clearly something between a mistake and
+  /// dead code.
+  ///
+  /// See [StaticWarningCode.RECEIVER_OF_TYPE_NEVER].
   bool _checkForUseOfNever(Expression expression) {
     if (expression == null ||
         !identical(expression.staticType, NeverTypeImpl.instance)) {
@@ -4513,13 +4308,11 @@
     return true;
   }
 
-  /**
-   * Check for situations where the result of a method or function is used, when
-   * it returns 'void'. Or, in rare cases, when other types of expressions are
-   * void, such as identifiers.
-   *
-   * See [StaticWarningCode.USE_OF_VOID_RESULT].
-   */
+  /// Check for situations where the result of a method or function is used,
+  /// when it returns 'void'. Or, in rare cases, when other types of expressions
+  /// are void, such as identifiers.
+  ///
+  /// See [StaticWarningCode.USE_OF_VOID_RESULT].
   bool _checkForUseOfVoidResult(Expression expression) {
     if (expression == null ||
         !identical(expression.staticType, VoidTypeImpl.instance)) {
@@ -4596,15 +4389,13 @@
 //        }
   }
 
-  /**
-   * Verify the given operator-method [declaration], has correct number of
-   * parameters.
-   *
-   * This method assumes that the method declaration was tested to be an
-   * operator declaration before being called.
-   *
-   * See [CompileTimeErrorCode.WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR].
-   */
+  /// Verify the given operator-method [declaration], has correct number of
+  /// parameters.
+  ///
+  /// This method assumes that the method declaration was tested to be an
+  /// operator declaration before being called.
+  ///
+  /// See [CompileTimeErrorCode.WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR].
   void _checkForWrongNumberOfParametersForOperator(
       MethodDeclaration declaration) {
     // prepare number of parameters
@@ -4656,16 +4447,14 @@
     }
   }
 
-  /**
-   * Verify that the given setter [parameterList] has only one required
-   * parameter. The [setterName] is the name of the setter to report problems
-   * on.
-   *
-   * This method assumes that the method declaration was tested to be a setter
-   * before being called.
-   *
-   * See [CompileTimeErrorCode.WRONG_NUMBER_OF_PARAMETERS_FOR_SETTER].
-   */
+  /// Verify that the given setter [parameterList] has only one required
+  /// parameter. The [setterName] is the name of the setter to report problems
+  /// on.
+  ///
+  /// This method assumes that the method declaration was tested to be a setter
+  /// before being called.
+  ///
+  /// See [CompileTimeErrorCode.WRONG_NUMBER_OF_PARAMETERS_FOR_SETTER].
   void _checkForWrongNumberOfParametersForSetter(
       SimpleIdentifier setterName, FormalParameterList parameterList) {
     if (setterName == null || parameterList == null) {
@@ -4807,21 +4596,19 @@
     _enclosingClass.superclassConstraints.forEach(checkOne);
   }
 
-  /**
-   * Check for invalid variance positions in members of a class or mixin.
-   *
-   * Let `C` be a class or mixin declaration with type parameter `T`.
-   * If `T` is an `out` type parameter then `T` can only appear in covariant
-   * positions within the accessors and methods of `C`.
-   * If `T` is an `in` type parameter then `T` can only appear in contravariant
-   * positions within the accessors and methods of `C`.
-   * If `T` is an `inout` type parameter or a type parameter with no explicit
-   * variance modifier then `T` can appear in any variant position within the
-   * accessors and methods of `C`.
-   *
-   * Errors should only be reported in classes and mixins since those are the
-   * only components that allow explicit variance modifiers.
-   */
+  /// Check for invalid variance positions in members of a class or mixin.
+  ///
+  /// Let `C` be a class or mixin declaration with type parameter `T`.
+  /// If `T` is an `out` type parameter then `T` can only appear in covariant
+  /// positions within the accessors and methods of `C`.
+  /// If `T` is an `in` type parameter then `T` can only appear in contravariant
+  /// positions within the accessors and methods of `C`.
+  /// If `T` is an `inout` type parameter or a type parameter with no explicit
+  /// variance modifier then `T` can appear in any variant position within the
+  /// accessors and methods of `C`.
+  ///
+  /// Errors should only be reported in classes and mixins since those are the
+  /// only components that allow explicit variance modifiers.
   void _checkForWrongVariancePosition(
       Variance variance, TypeParameterElement typeParameter, AstNode node) {
     TypeParameterElementImpl typeParameterImpl =
@@ -4839,12 +4626,10 @@
     }
   }
 
-  /**
-   * Verify that the given class [declaration] does not have the same class in
-   * the 'extends' and 'implements' clauses.
-   *
-   * See [CompileTimeErrorCode.IMPLEMENTS_SUPER_CLASS].
-   */
+  /// Verify that the given class [declaration] does not have the same class in
+  /// the 'extends' and 'implements' clauses.
+  ///
+  /// See [CompileTimeErrorCode.IMPLEMENTS_SUPER_CLASS].
   void _checkImplementsSuperClass(ImplementsClause implementsClause) {
     // prepare super type
     InterfaceType superType = _enclosingClass.supertype;
@@ -4914,10 +4699,8 @@
     }
   }
 
-  /**
-   * Checks the class for problems with the superclass, mixins, or implemented
-   * interfaces.
-   */
+  /// Checks the class for problems with the superclass, mixins, or implemented
+  /// interfaces.
   void _checkMixinInheritance(MixinDeclaration node, OnClause onClause,
       ImplementsClause implementsClause) {
     // Only check for all of the inheritance logic around clauses if there
@@ -5105,10 +4888,8 @@
     return null;
   }
 
-  /**
-   * Given an [expression] in a switch case whose value is expected to be an
-   * enum constant, return the name of the constant.
-   */
+  /// Given an [expression] in a switch case whose value is expected to be an
+  /// enum constant, return the name of the constant.
   String _getConstantName(Expression expression) {
     // TODO(brianwilkerson) Convert this to return the element representing the
     // constant.
@@ -5122,9 +4903,7 @@
     return null;
   }
 
-  /**
-   * Return a human-readable representation of the kind of the [element].
-   */
+  /// Return a human-readable representation of the kind of the [element].
   String _getKind(ExecutableElement element) {
     if (element is MethodElement) {
       return 'method';
@@ -5148,9 +4927,7 @@
     return 'member';
   }
 
-  /**
-   * Return the name of the library that defines given [element].
-   */
+  /// Return the name of the library that defines given [element].
   String _getLibraryName(Element element) {
     if (element == null) {
       return StringUtilities.EMPTY;
@@ -5210,10 +4987,8 @@
         (parent) => parent.lookUpConcreteMethod(name, parent.library) != null);
   }
 
-  /**
-   * Return `true` if the given [constructor] redirects to itself, directly or
-   * indirectly.
-   */
+  /// Return `true` if the given [constructor] redirects to itself, directly or
+  /// indirectly.
   bool _hasRedirectingFactoryConstructorCycle(ConstructorElement constructor) {
     Set<ConstructorElement> constructors = HashSet<ConstructorElement>();
     ConstructorElement current = constructor;
@@ -5240,9 +5015,7 @@
     return false;
   }
 
-  /**
-   * Return `true` if the given 'this' [expression] is in a valid context.
-   */
+  /// Return `true` if the given 'this' [expression] is in a valid context.
   bool _isThisInValidContext(ThisExpression expression) {
     for (AstNode node = expression.parent; node != null; node = node.parent) {
       if (node is CompilationUnit) {
@@ -5265,10 +5038,8 @@
     return false;
   }
 
-  /**
-   * Return `true` if the given [identifier] is in a location where it is
-   * allowed to resolve to a static member of a supertype.
-   */
+  /// Return `true` if the given [identifier] is in a location where it is
+  /// allowed to resolve to a static member of a supertype.
   bool _isUnqualifiedReferenceToNonLocalStaticMemberAllowed(
       SimpleIdentifier identifier) {
     if (identifier.inDeclarationContext()) {
@@ -5325,10 +5096,8 @@
     }
   }
 
-  /**
-   * Return [FieldElement]s that are declared in the [ClassDeclaration] with
-   * the given [constructor], but are not initialized.
-   */
+  /// Return [FieldElement]s that are declared in the [ClassDeclaration] with
+  /// the given [constructor], but are not initialized.
   static List<FieldElement> computeNotInitializedFields(
       ConstructorDeclaration constructor) {
     Set<FieldElement> fields = <FieldElement>{};
@@ -5364,10 +5133,8 @@
     return fields.toList();
   }
 
-  /**
-   * Return the static type of the given [expression] that is to be used for
-   * type analysis.
-   */
+  /// Return the static type of the given [expression] that is to be used for
+  /// type analysis.
   static DartType getStaticType(Expression expression) {
     DartType type = expression.staticType;
     if (type == null) {
@@ -5377,10 +5144,8 @@
     return type;
   }
 
-  /**
-   * Return the variable element represented by the given [expression], or
-   * `null` if there is no such element.
-   */
+  /// Return the variable element represented by the given [expression], or
+  /// `null` if there is no such element.
   static VariableElement getVariableElement(Expression expression) {
     if (expression is Identifier) {
       Element element = expression.staticElement;
@@ -5406,33 +5171,25 @@
   }
 }
 
-/**
- * A record of the elements that will be declared in some scope (block), but are
- * not yet declared.
- */
+/// A record of the elements that will be declared in some scope (block), but
+/// are not yet declared.
 class HiddenElements {
-  /**
-   * The elements hidden in outer scopes, or `null` if this is the outermost
-   * scope.
-   */
+  /// The elements hidden in outer scopes, or `null` if this is the outermost
+  /// scope.
   final HiddenElements outerElements;
 
   /// A set containing the elements that will be declared in this scope, but are
   /// not yet declared.
   final Set<Element> _elements = HashSet<Element>();
 
-  /**
-   * Initialize a newly created set of hidden elements to include all of the
-   * elements defined in the set of [outerElements] and all of the elements
-   * declared in the given [block].
-   */
+  /// Initialize a newly created set of hidden elements to include all of the
+  /// elements defined in the set of [outerElements] and all of the elements
+  /// declared in the given [block].
   HiddenElements(this.outerElements, Block block) {
     _initializeElements(block);
   }
 
-  /**
-   * Return `true` if this set of elements contains the given [element].
-   */
+  /// Return `true` if this set of elements contains the given [element].
   bool contains(Element element) {
     if (_elements.contains(element)) {
       return true;
@@ -5442,31 +5199,25 @@
     return false;
   }
 
-  /**
-   * Record that the given [element] has been declared, so it is no longer
-   * hidden.
-   */
+  /// Record that the given [element] has been declared, so it is no longer
+  /// hidden.
   void declare(Element element) {
     _elements.remove(element);
   }
 
-  /**
-   * Initialize the list of elements that are not yet declared to be all of the
-   * elements declared somewhere in the given [block].
-   */
+  /// Initialize the list of elements that are not yet declared to be all of the
+  /// elements declared somewhere in the given [block].
   void _initializeElements(Block block) {
     _elements.addAll(BlockScope.elementsInBlock(block));
   }
 }
 
-/**
- * Recursively visits an AST, looking for method invocations.
- */
-class _InvocationCollector extends RecursiveAstVisitor {
+/// Recursively visits an AST, looking for method invocations.
+class _InvocationCollector extends RecursiveAstVisitor<void> {
   final List<String> superCalls = <String>[];
 
   @override
-  visitMethodInvocation(MethodInvocation node) {
+  void visitMethodInvocation(MethodInvocation node) {
     if (node.target is SuperExpression) {
       superCalls.add(node.methodName.name);
     }
@@ -5474,16 +5225,14 @@
   }
 }
 
-/**
- * Recursively visits a type annotation, looking uninstantiated bounds.
- */
-class _UninstantiatedBoundChecker extends RecursiveAstVisitor {
+/// Recursively visits a type annotation, looking uninstantiated bounds.
+class _UninstantiatedBoundChecker extends RecursiveAstVisitor<void> {
   final ErrorReporter _errorReporter;
 
   _UninstantiatedBoundChecker(this._errorReporter);
 
   @override
-  visitTypeName(node) {
+  void visitTypeName(node) {
     var typeArgs = node.typeArguments;
     if (typeArgs != null) {
       typeArgs.accept(this);
diff --git a/pkg/analyzer/lib/src/generated/ffi_verifier.dart b/pkg/analyzer/lib/src/generated/ffi_verifier.dart
index f5f1b19..9cf47f3 100644
--- a/pkg/analyzer/lib/src/generated/ffi_verifier.dart
+++ b/pkg/analyzer/lib/src/generated/ffi_verifier.dart
@@ -7,8 +7,8 @@
 import 'package:analyzer/dart/element/element.dart';
 import 'package:analyzer/dart/element/type.dart';
 import 'package:analyzer/error/listener.dart';
+import 'package:analyzer/src/dart/element/type_system.dart';
 import 'package:analyzer/src/dart/error/ffi_code.dart';
-import 'package:analyzer/src/generated/type_system.dart';
 
 /// A visitor used to find problems with the way the `dart:ffi` APIs are being
 /// used. See 'pkg/vm/lib/transformations/ffi_checks.md' for the specification
@@ -210,7 +210,7 @@
   }
 
   /// Returns `true` iff [nativeType] is a struct type.
-  _isStructClass(DartType nativeType) {
+  bool _isStructClass(DartType nativeType) {
     if (nativeType is InterfaceType) {
       final superClassElement = nativeType.element.supertype.element;
       if (superClassElement.library.name == 'dart.ffi') {
diff --git a/pkg/analyzer/lib/src/generated/incremental_resolver.dart b/pkg/analyzer/lib/src/generated/incremental_resolver.dart
index 52f9122..c9b2b7e 100644
--- a/pkg/analyzer/lib/src/generated/incremental_resolver.dart
+++ b/pkg/analyzer/lib/src/generated/incremental_resolver.dart
@@ -5,11 +5,9 @@
 import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/element/element.dart';
 import 'package:analyzer/exception/exception.dart';
-import 'package:analyzer/src/generated/resolver.dart';
+import 'package:analyzer/src/dart/resolver/scope.dart';
 
-/**
- * The context to resolve an [AstNode] in.
- */
+/// The context to resolve an [AstNode] in.
 class ResolutionContext {
   CompilationUnitElement enclosingUnit;
   ClassDeclaration enclosingClassDeclaration;
@@ -17,27 +15,19 @@
   Scope scope;
 }
 
-/**
- * Instances of the class [ResolutionContextBuilder] build the context for a
- * given node in an AST structure. At the moment, this class only handles
- * top-level and class-level declarations.
- */
+/// Instances of the class [ResolutionContextBuilder] build the context for a
+/// given node in an AST structure. At the moment, this class only handles
+/// top-level and class-level declarations.
 class ResolutionContextBuilder {
-  /**
-   * The class containing the enclosing [CompilationUnitElement].
-   */
+  /// The class containing the enclosing [CompilationUnitElement].
   CompilationUnitElement _enclosingUnit;
 
-  /**
-   * The class containing the enclosing [ClassDeclaration], or `null` if we are
-   * not in the scope of a class.
-   */
+  /// The class containing the enclosing [ClassDeclaration], or `null` if we are
+  /// not in the scope of a class.
   ClassDeclaration _enclosingClassDeclaration;
 
-  /**
-   * The class containing the enclosing [ClassElement], or `null` if we are not
-   * in the scope of a class.
-   */
+  /// The class containing the enclosing [ClassElement], or `null` if we are not
+  /// in the scope of a class.
   ClassElement _enclosingClass;
 
   Scope _scopeFor(AstNode node) {
@@ -52,17 +42,15 @@
     return _scopeForAstNode(parent);
   }
 
-  /**
-   * Return the scope in which the given AST structure should be resolved.
-   *
-   * *Note:* This method needs to be kept in sync with
-   * [IncrementalResolver.canBeResolved].
-   *
-   * [node] - the root of the AST structure to be resolved.
-   *
-   * Throws [AnalysisException] if the AST structure has not been resolved or
-   * is not part of a [CompilationUnit]
-   */
+  /// Return the scope in which the given AST structure should be resolved.
+  ///
+  /// *Note:* This method needs to be kept in sync with
+  /// [IncrementalResolver.canBeResolved].
+  ///
+  /// [node] - the root of the AST structure to be resolved.
+  ///
+  /// Throws [AnalysisException] if the AST structure has not been resolved or
+  /// is not part of a [CompilationUnit]
   Scope _scopeForAstNode(AstNode node) {
     if (node is CompilationUnit) {
       return _scopeForCompilationUnit(node);
@@ -135,14 +123,12 @@
     return LibraryScope(libraryElement);
   }
 
-  /**
-   * Return the context in which the given AST structure should be resolved.
-   *
-   * [node] - the root of the AST structure to be resolved.
-   *
-   * Throws [AnalysisException] if the AST structure has not been resolved or
-   * is not part of a [CompilationUnit]
-   */
+  /// Return the context in which the given AST structure should be resolved.
+  ///
+  /// [node] - the root of the AST structure to be resolved.
+  ///
+  /// Throws [AnalysisException] if the AST structure has not been resolved or
+  /// is not part of a [CompilationUnit]
   static ResolutionContext contextFor(AstNode node) {
     if (node == null) {
       throw AnalysisException("Cannot create context: node is null");
diff --git a/pkg/analyzer/lib/src/generated/interner.dart b/pkg/analyzer/lib/src/generated/interner.dart
index 5d4bc6c..bef468c 100644
--- a/pkg/analyzer/lib/src/generated/interner.dart
+++ b/pkg/analyzer/lib/src/generated/interner.dart
@@ -9,10 +9,8 @@
 export 'package:_fe_analyzer_shared/src/scanner/interner.dart'
     show Interner, NullInterner;
 
-/**
- * The class `MappedInterner` implements an interner that uses a map to manage
- * the strings that have been interned.
- */
+/// The class `MappedInterner` implements an interner that uses a map to manage
+/// the strings that have been interned.
 class MappedInterner implements Interner {
   /// A table mapping strings to themselves.
   final Map<String, String> _table = HashMap<String, String>();
diff --git a/pkg/analyzer/lib/src/generated/java_core.dart b/pkg/analyzer/lib/src/generated/java_core.dart
index 9259416..800d03f 100644
--- a/pkg/analyzer/lib/src/generated/java_core.dart
+++ b/pkg/analyzer/lib/src/generated/java_core.dart
@@ -2,13 +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.
 
-/**
- * Inserts the given arguments into [pattern].
- *
- *     format('Hello, {0}!', 'John') = 'Hello, John!'
- *     format('{0} are you {1}ing?', 'How', 'do') = 'How are you doing?'
- *     format('{0} are you {1}ing?', 'What', 'read') = 'What are you reading?'
- */
+/// Inserts the given arguments into [pattern].
+///
+///     format('Hello, {0}!', 'John') = 'Hello, John!'
+///     format('{0} are you {1}ing?', 'How', 'do') = 'How are you doing?'
+///     format('{0} are you {1}ing?', 'What', 'read') = 'What are you reading?'
 String format(String pattern,
     [arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7]) {
   // TODO(rnystrom): This is not used by analyzer, but is called by
@@ -16,13 +14,12 @@
   return formatList(pattern, [arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7]);
 }
 
-/**
- * Inserts the given [arguments] into [pattern].
- *
- *     format('Hello, {0}!', ['John']) = 'Hello, John!'
- *     format('{0} are you {1}ing?', ['How', 'do']) = 'How are you doing?'
- *     format('{0} are you {1}ing?', ['What', 'read']) = 'What are you reading?'
- */
+/// Inserts the given [arguments] into [pattern].
+///
+///     format('Hello, {0}!', ['John']) = 'Hello, John!'
+///     format('{0} are you {1}ing?', ['How', 'do']) = 'How are you doing?'
+///     format('{0} are you {1}ing?', ['What', 'read']) =
+///         'What are you reading?'
 String formatList(String pattern, List<Object> arguments) {
   if (arguments == null || arguments.isEmpty) {
     assert(!pattern.contains(RegExp(r'\{(\d+)\}')),
@@ -38,9 +35,7 @@
   });
 }
 
-/**
- * Very limited printf implementation, supports only %s and %d.
- */
+/// Very limited printf implementation, supports only %s and %d.
 String _printf(String fmt, List args) {
   StringBuffer sb = StringBuffer();
   bool markFound = false;
diff --git a/pkg/analyzer/lib/src/generated/java_engine.dart b/pkg/analyzer/lib/src/generated/java_engine.dart
index e150504..c88230d 100644
--- a/pkg/analyzer/lib/src/generated/java_engine.dart
+++ b/pkg/analyzer/lib/src/generated/java_engine.dart
@@ -29,10 +29,8 @@
 
   static Interner INTERNER = NullInterner();
 
-  /**
-   * Compute line starts for the given [content].
-   * Lines end with `\r`, `\n` or `\r\n`.
-   */
+  /// Compute line starts for the given [content].
+  /// Lines end with `\r`, `\n` or `\r\n`.
   static List<int> computeLineStarts(String content) {
     List<int> lineStarts = <int>[0];
     int length = content.length;
@@ -56,7 +54,7 @@
     return lineStarts;
   }
 
-  static endsWith3(String str, int c1, int c2, int c3) {
+  static bool endsWith3(String str, int c1, int c2, int c3) {
     var length = str.length;
     return length >= 3 &&
         str.codeUnitAt(length - 3) == c1 &&
@@ -64,7 +62,7 @@
         str.codeUnitAt(length - 1) == c3;
   }
 
-  static endsWithChar(String str, int c) {
+  static bool endsWithChar(String str, int c) {
     int length = str.length;
     return length > 0 && str.codeUnitAt(length - 1) == c;
   }
@@ -126,11 +124,9 @@
     return -1;
   }
 
-  /**
-   * Return the index of the first not letter/digit character in the [string]
-   * that is at or after the [startIndex]. Return the length of the [string] if
-   * all characters to the end are letters/digits.
-   */
+  /// Return the index of the first not letter/digit character in the [string]
+  /// that is at or after the [startIndex]. Return the length of the [string] if
+  /// all characters to the end are letters/digits.
   static int indexOfFirstNotLetterDigit(String string, int startIndex) {
     int index = startIndex;
     int last = string.length;
@@ -168,13 +164,13 @@
     return true;
   }
 
-  /**
-   * Produce a string containing all of the names in the given array, surrounded by single quotes,
-   * and separated by commas. The list must contain at least two elements.
-   *
-   * @param names the names to be printed
-   * @return the result of printing the names
-   */
+  /// Produce a string containing all of the names in the given array,
+  /// surrounded by single quotes, and separated by commas.
+  ///
+  /// The list must contain at least two elements.
+  ///
+  /// @param names the names to be printed
+  /// @return the result of printing the names
   static String printListOfQuotedNames(List<String> names) {
     if (names == null) {
       throw ArgumentError("The list must not be null");
@@ -198,20 +194,21 @@
     return buffer.toString();
   }
 
-  static startsWith2(String str, int start, int c1, int c2) {
+  static bool startsWith2(String str, int start, int c1, int c2) {
     return str.length - start >= 2 &&
         str.codeUnitAt(start) == c1 &&
         str.codeUnitAt(start + 1) == c2;
   }
 
-  static startsWith3(String str, int start, int c1, int c2, int c3) {
+  static bool startsWith3(String str, int start, int c1, int c2, int c3) {
     return str.length - start >= 3 &&
         str.codeUnitAt(start) == c1 &&
         str.codeUnitAt(start + 1) == c2 &&
         str.codeUnitAt(start + 2) == c3;
   }
 
-  static startsWith4(String str, int start, int c1, int c2, int c3, int c4) {
+  static bool startsWith4(
+      String str, int start, int c1, int c2, int c3, int c4) {
     return str.length - start >= 4 &&
         str.codeUnitAt(start) == c1 &&
         str.codeUnitAt(start + 1) == c2 &&
@@ -219,7 +216,7 @@
         str.codeUnitAt(start + 3) == c4;
   }
 
-  static startsWith5(
+  static bool startsWith5(
       String str, int start, int c1, int c2, int c3, int c4, int c5) {
     return str.length - start >= 5 &&
         str.codeUnitAt(start) == c1 &&
@@ -229,7 +226,7 @@
         str.codeUnitAt(start + 4) == c5;
   }
 
-  static startsWith6(
+  static bool startsWith6(
       String str, int start, int c1, int c2, int c3, int c4, int c5, int c6) {
     return str.length - start >= 6 &&
         str.codeUnitAt(start) == c1 &&
diff --git a/pkg/analyzer/lib/src/generated/parser_fasta.dart b/pkg/analyzer/lib/src/generated/parser_fasta.dart
index 8f9706b..a3a03ad 100644
--- a/pkg/analyzer/lib/src/generated/parser_fasta.dart
+++ b/pkg/analyzer/lib/src/generated/parser_fasta.dart
@@ -4,23 +4,17 @@
 
 part of analyzer.parser;
 
-/**
- * Proxy implementation of the analyzer parser, implemented in terms of the
- * Fasta parser.
- */
+/// Proxy implementation of the analyzer parser, implemented in terms of the
+/// Fasta parser.
 abstract class ParserAdapter implements Parser {
   @override
   Token currentToken;
 
-  /**
-   * The fasta parser being wrapped.
-   */
+  /// The fasta parser being wrapped.
   final fasta.Parser fastaParser;
 
-  /**
-   * The builder which creates the analyzer AST data structures
-   * based on the Fasta parser.
-   */
+  /// The builder which creates the analyzer AST data structures
+  /// based on the Fasta parser.
   final AstBuilder astBuilder;
 
   ParserAdapter(this.currentToken, ErrorReporter errorReporter, Uri fileUri,
@@ -60,7 +54,7 @@
 
   /// Append the given token to the end of the token stream,
   /// and update the token's offset.
-  appendToken(Token token, Token newToken) {
+  void appendToken(Token token, Token newToken) {
     while (!token.next.isEof) {
       token = token.next;
     }
@@ -365,13 +359,9 @@
   Expression parseUnaryExpression() => parseExpression2();
 }
 
-/**
- * Replacement parser based on Fasta.
- */
+/// Replacement parser based on Fasta.
 class _Parser2 extends ParserAdapter {
-  /**
-   * The source being parsed.
-   */
+  /// The source being parsed.
   @override
   final Source _source;
 
@@ -396,5 +386,5 @@
             allowNativeClause: allowNativeClause);
 
   @override
-  noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation);
+  dynamic noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation);
 }
diff --git a/pkg/analyzer/lib/src/generated/resolver.dart b/pkg/analyzer/lib/src/generated/resolver.dart
index 7170960..79bdfac 100644
--- a/pkg/analyzer/lib/src/generated/resolver.dart
+++ b/pkg/analyzer/lib/src/generated/resolver.dart
@@ -21,6 +21,7 @@
     show ConstructorMember, Member;
 import 'package:analyzer/src/dart/element/nullability_eliminator.dart';
 import 'package:analyzer/src/dart/element/type_provider.dart';
+import 'package:analyzer/src/dart/element/type_system.dart';
 import 'package:analyzer/src/dart/resolver/assignment_expression_resolver.dart';
 import 'package:analyzer/src/dart/resolver/binary_expression_resolver.dart';
 import 'package:analyzer/src/dart/resolver/body_inference_context.dart';
@@ -49,15 +50,14 @@
 import 'package:analyzer/src/generated/source.dart';
 import 'package:analyzer/src/generated/static_type_analyzer.dart';
 import 'package:analyzer/src/generated/type_promotion_manager.dart';
-import 'package:analyzer/src/generated/type_system.dart';
 import 'package:analyzer/src/generated/variable_type_provider.dart';
 import 'package:meta/meta.dart';
 
 export 'package:analyzer/dart/element/type_provider.dart';
 export 'package:analyzer/src/dart/constant/constant_verifier.dart';
+export 'package:analyzer/src/dart/element/type_system.dart';
 export 'package:analyzer/src/dart/resolver/exit_detector.dart';
 export 'package:analyzer/src/dart/resolver/scope.dart';
-export 'package:analyzer/src/generated/type_system.dart';
 
 /// Maintains and manages contextual type information used for
 /// inferring types.
diff --git a/pkg/analyzer/lib/src/generated/sdk.dart b/pkg/analyzer/lib/src/generated/sdk.dart
index 0aaabce..2ed64ad 100644
--- a/pkg/analyzer/lib/src/generated/sdk.dart
+++ b/pkg/analyzer/lib/src/generated/sdk.dart
@@ -6,118 +6,74 @@
 
 import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/ast/visitor.dart';
-import 'package:analyzer/src/generated/engine.dart'
-    show AnalysisContext, AnalysisOptions;
+import 'package:analyzer/src/generated/engine.dart' show AnalysisContext;
 import 'package:analyzer/src/generated/source.dart' show Source;
-import 'package:analyzer/src/generated/utilities_general.dart';
 
-/**
- * A Dart SDK installed in a specified location.
- */
+/// A Dart SDK installed in a specified location.
 abstract class DartSdk {
-  /**
-   * The short name of the dart SDK 'async' library.
-   */
+  /// The short name of the dart SDK 'async' library.
   static const String DART_ASYNC = "dart:async";
 
-  /**
-   * The short name of the dart SDK 'core' library.
-   */
+  /// The short name of the dart SDK 'core' library.
   static const String DART_CORE = "dart:core";
 
-  /**
-   * The short name of the dart SDK 'html' library.
-   */
+  /// The short name of the dart SDK 'html' library.
   static const String DART_HTML = "dart:html";
 
-  /**
-   * The prefix shared by all dart library URIs.
-   */
+  /// The prefix shared by all dart library URIs.
   static const String DART_LIBRARY_PREFIX = "dart:";
 
-  /**
-   * The version number that is returned when the real version number could not
-   * be determined.
-   */
+  /// The version number that is returned when the real version number could not
+  /// be determined.
   static const String DEFAULT_VERSION = "0";
 
   /// Return the content of the `allowed_experiments.json` file, or `null`
   /// if the file cannot be read, e.g. does not exist.
   String get allowedExperimentsJson;
 
-  /**
-   * Return the analysis context used for all of the sources in this [DartSdk].
-   */
+  /// Return the analysis context used for all of the sources in this [DartSdk].
   AnalysisContext get context;
 
-  /**
-   * Return a list containing all of the libraries defined in this SDK.
-   */
+  /// Return a list containing all of the libraries defined in this SDK.
   List<SdkLibrary> get sdkLibraries;
 
-  /**
-   * Return the revision number of this SDK, or `"0"` if the revision number
-   * cannot be discovered.
-   */
+  /// Return the revision number of this SDK, or `"0"` if the revision number
+  /// cannot be discovered.
   String get sdkVersion;
 
-  /**
-   * Return a list containing the library URI's for the libraries defined in
-   * this SDK.
-   */
+  /// Return a list containing the library URI's for the libraries defined in
+  /// this SDK.
   List<String> get uris;
 
-  /**
-   * Return a source representing the given 'file:' [uri] if the file is in this
-   * SDK, or `null` if the file is not in this SDK.
-   */
+  /// Return a source representing the given 'file:' [uri] if the file is in
+  /// this SDK, or `null` if the file is not in this SDK.
   Source fromFileUri(Uri uri);
 
-  /**
-   * Return the library representing the library with the given 'dart:' [uri],
-   * or `null` if the given URI does not denote a library in this SDK.
-   */
+  /// Return the library representing the library with the given 'dart:' [uri],
+  /// or `null` if the given URI does not denote a library in this SDK.
   SdkLibrary getSdkLibrary(String uri);
 
-  /**
-   * Return the source representing the library with the given 'dart:' [uri], or
-   * `null` if the given URI does not denote a library in this SDK.
-   */
+  /// Return the source representing the library with the given 'dart:' [uri],
+  /// or `null` if the given URI does not denote a library in this SDK.
   Source mapDartUri(String uri);
 }
 
-/**
- * Manages the DartSdk's that have been created. Clients need to create multiple
- * SDKs when the analysis options associated with those SDK's contexts will
- * produce different analysis results.
- */
+/// Manages the DartSdk's that have been created. Clients need to create
+/// multiple SDKs when the analysis options associated with those SDK's contexts
+/// will produce different analysis results.
 class DartSdkManager {
-  /**
-   * The absolute path to the directory containing the default SDK.
-   */
+  /// The absolute path to the directory containing the default SDK.
   final String defaultSdkDirectory;
 
-  /**
-   * A flag indicating whether it is acceptable to use summaries when they are
-   * available.
-   */
-  final bool canUseSummaries;
-
-  /**
-   * A table mapping (an encoding of) analysis options and SDK locations to the
-   * DartSdk from that location that has been configured with those options.
-   */
+  /// A table mapping (an encoding of) analysis options and SDK locations to the
+  /// DartSdk from that location that has been configured with those options.
   Map<SdkDescription, DartSdk> sdkMap = HashMap<SdkDescription, DartSdk>();
 
-  /**
-   * Initialize a newly created manager.
-   */
-  DartSdkManager(this.defaultSdkDirectory, this.canUseSummaries);
+  /// Initialize a newly created manager.
+  DartSdkManager(this.defaultSdkDirectory, [@deprecated bool canUseSummaries]);
 
-  /**
-   * Return any SDK that has been created, or `null` if no SDKs have been
-   * created.
-   */
+  /// Return any SDK that has been created, or `null` if no SDKs have been
+  /// created.
   DartSdk get anySdk {
     if (sdkMap.isEmpty) {
       return null;
@@ -125,10 +81,8 @@
     return sdkMap.values.first;
   }
 
-  /**
-   * Return a list of the descriptors of the SDKs that are currently being
-   * managed.
-   */
+  /// Return a list of the descriptors of the SDKs that are currently being
+  /// managed.
   List<SdkDescription> get sdkDescriptors => sdkMap.keys.toList();
 
   /// Return the Dart SDK that is appropriate for the given SDK [description].
@@ -139,27 +93,20 @@
   }
 }
 
-/**
- * A map from Dart library URI's to the [SdkLibraryImpl] representing that
- * library.
- */
+/// A map from Dart library URI's to the [SdkLibraryImpl] representing that
+/// library.
 class LibraryMap {
   /// A table mapping Dart library URI's to the library.
   final Map<String, SdkLibraryImpl> _libraryMap = <String, SdkLibraryImpl>{};
 
-  /**
-   * Return a list containing all of the sdk libraries in this mapping.
-   */
+  /// Return a list containing all of the sdk libraries in this mapping.
   List<SdkLibrary> get sdkLibraries => List.from(_libraryMap.values);
 
-  /**
-   * Return a list containing the library URI's for which a mapping is available.
-   */
+  /// Return a list containing the library URI's for which a mapping is
+  /// available.
   List<String> get uris => _libraryMap.keys.toList();
 
-  /**
-   * Return info for debugging https://github.com/dart-lang/sdk/issues/35226.
-   */
+  /// Return info for debugging https://github.com/dart-lang/sdk/issues/35226.
   Map<String, Object> debugInfo() {
     var map = <String, Object>{};
     for (var uri in _libraryMap.keys) {
@@ -172,101 +119,42 @@
     return map;
   }
 
-  /**
-   * Return the library with the given 'dart:' [uri], or `null` if the URI does
-   * not map to a library.
-   */
+  /// Return the library with the given 'dart:' [uri], or `null` if the URI does
+  /// not map to a library.
   SdkLibrary getLibrary(String uri) => _libraryMap[uri];
 
-  /**
-   * Set the library with the given 'dart:' [uri] to the given [library].
-   */
+  /// Set the library with the given 'dart:' [uri] to the given [library].
   void setLibrary(String dartUri, SdkLibraryImpl library) {
     _libraryMap[dartUri] = library;
   }
 
-  /**
-   * Return the number of library URI's for which a mapping is available.
-   */
+  /// Return the number of library URI's for which a mapping is available.
   int size() => _libraryMap.length;
 }
 
-/**
- * A description of a [DartSdk].
- */
+/// A description of a [DartSdk].
 class SdkDescription {
-  /**
-   * The paths to the files or directories that define the SDK.
-   */
-  final List<String> paths;
+  /// The path of the SDK.
+  final String path;
 
-  /**
-   * The analysis options that will be used by the SDK's context.
-   */
-  final AnalysisOptions options;
-
-  /**
-   * Initialize a newly created SDK description to describe an SDK based on the
-   * files or directories at the given [paths] that is analyzed using the given
-   * [options].
-   */
-  SdkDescription(this.paths, this.options);
+  SdkDescription(this.path);
 
   @override
   int get hashCode {
-    int hashCode = 0;
-    for (int value in options.signature) {
-      hashCode = JenkinsSmiHash.combine(hashCode, value);
-    }
-    for (String path in paths) {
-      hashCode = JenkinsSmiHash.combine(hashCode, path.hashCode);
-    }
-    return JenkinsSmiHash.finish(hashCode);
+    return path.hashCode;
   }
 
   @override
   bool operator ==(Object other) {
     if (other is SdkDescription) {
-      if (!AnalysisOptions.signaturesEqual(
-          options.signature, other.options.signature)) {
-        return false;
-      }
-      int length = paths.length;
-      if (other.paths.length != length) {
-        return false;
-      }
-      for (int i = 0; i < length; i++) {
-        if (other.paths[i] != paths[i]) {
-          return false;
-        }
-      }
-      return true;
+      return other.path == path;
     }
     return false;
   }
 
   @override
   String toString() {
-    StringBuffer buffer = StringBuffer();
-    bool needsSeparator = false;
-    void add(String optionName) {
-      if (needsSeparator) {
-        buffer.write(', ');
-      }
-      buffer.write(optionName);
-      needsSeparator = true;
-    }
-
-    for (String path in paths) {
-      add(path);
-    }
-    if (needsSeparator) {
-      buffer.write(' ');
-    }
-    buffer.write('(');
-    buffer.write(options.signature);
-    buffer.write(')');
-    return buffer.toString();
+    return path;
   }
 }
 
@@ -295,18 +183,16 @@
   /// the library can be used.
   static const String _PLATFORMS = "platforms";
 
-  /// The value of the [PLATFORMS] parameter used to specify that the library can
-  /// be used on the VM.
+  /// The value of the [PLATFORMS] parameter used to specify that the library
+  /// can be used on the VM.
   static const String _VM_PLATFORM = "VM_PLATFORM";
 
-  /// The library map that is populated by visiting the AST structure parsed from
-  /// the contents of the libraries file.
+  /// The library map that is populated by visiting the AST structure parsed
+  /// from the contents of the libraries file.
   final LibraryMap _librariesMap = LibraryMap();
 
-  /**
-   * Return the library map that was populated by visiting the AST structure
-   * parsed from the contents of the libraries file.
-   */
+  /// Return the library map that was populated by visiting the AST structure
+  /// parsed from the contents of the libraries file.
   LibraryMap get librariesMap => _librariesMap;
 
   // To be backwards-compatible the new categories field is translated to
@@ -372,116 +258,77 @@
   }
 }
 
-/**
- * Represents a single library in the SDK
- */
+/// Represents a single library in the SDK
 abstract class SdkLibrary {
-  /**
-   * Return the name of the category containing the library.
-   */
+  /// Return the name of the category containing the library.
   String get category;
 
-  /**
-   * Return `true` if this library can be compiled to JavaScript by dart2js.
-   */
+  /// Return `true` if this library can be compiled to JavaScript by dart2js.
   bool get isDart2JsLibrary;
 
-  /**
-   * Return `true` if the library is documented.
-   */
+  /// Return `true` if the library is documented.
   bool get isDocumented;
 
-  /**
-   * Return `true` if the library is an implementation library.
-   */
+  /// Return `true` if the library is an implementation library.
   bool get isImplementation;
 
-  /**
-   * Return `true` if library is internal can be used only by other SDK libraries.
-   */
+  /// Return `true` if library is internal can be used only by other SDK
+  /// libraries.
   bool get isInternal;
 
-  /**
-   * Return `true` if this library can be used for both client and server.
-   */
+  /// Return `true` if this library can be used for both client and server.
   bool get isShared;
 
-  /**
-   * Return `true` if this library can be run on the VM.
-   */
+  /// Return `true` if this library can be run on the VM.
   bool get isVmLibrary;
 
-  /**
-   * Return the path to the file defining the library. The path is relative to
-   * the `lib` directory within the SDK.
-   */
+  /// Return the path to the file defining the library. The path is relative to
+  /// the `lib` directory within the SDK.
   String get path;
 
-  /**
-   * Return the short name of the library. This is the URI of the library,
-   * including `dart:`.
-   */
+  /// Return the short name of the library. This is the URI of the library,
+  /// including `dart:`.
   String get shortName;
 }
 
-/**
- * The information known about a single library within the SDK.
- */
+/// The information known about a single library within the SDK.
 class SdkLibraryImpl implements SdkLibrary {
-  /**
-   * The bit mask used to access the bit representing the flag indicating
-   * whether a library is intended to work on the dart2js platform.
-   */
+  /// The bit mask used to access the bit representing the flag indicating
+  /// whether a library is intended to work on the dart2js platform.
   static int DART2JS_PLATFORM = 1;
 
-  /**
-   * The bit mask used to access the bit representing the flag indicating
-   * whether a library is intended to work on the VM platform.
-   */
+  /// The bit mask used to access the bit representing the flag indicating
+  /// whether a library is intended to work on the VM platform.
   static int VM_PLATFORM = 2;
 
   @override
   final String shortName;
 
-  /**
-   * The path to the file defining the library. The path is relative to the
-   * 'lib' directory within the SDK.
-   */
+  /// The path to the file defining the library. The path is relative to the
+  /// 'lib' directory within the SDK.
   @override
   String path;
 
-  /**
-   * The name of the category containing the library. Unless otherwise specified
-   * in the libraries file all libraries are assumed to be shared between server
-   * and client.
-   */
+  /// The name of the category containing the library. Unless otherwise
+  /// specified in the libraries file all libraries are assumed to be shared
+  /// between server and client.
   @override
   String category = "Shared";
 
-  /**
-   * A flag indicating whether the library is documented.
-   */
+  /// A flag indicating whether the library is documented.
   bool _documented = true;
 
-  /**
-   * A flag indicating whether the library is an implementation library.
-   */
+  /// A flag indicating whether the library is an implementation library.
   bool _implementation = false;
 
-  /**
-   * An encoding of which platforms this library is intended to work on.
-   */
+  /// An encoding of which platforms this library is intended to work on.
   int _platforms = 0;
 
-  /**
-   * Initialize a newly created library to represent the library with the given
-   * [name].
-   */
+  /// Initialize a newly created library to represent the library with the given
+  /// [name].
   SdkLibraryImpl(this.shortName);
 
-  /**
-   * Set whether the library is documented.
-   */
+  /// Set whether the library is documented.
   set documented(bool documented) {
     this._documented = documented;
   }
@@ -504,16 +351,12 @@
   @override
   bool get isVmLibrary => (_platforms & VM_PLATFORM) != 0;
 
-  /**
-   * Record that this library can be compiled to JavaScript by dart2js.
-   */
+  /// Record that this library can be compiled to JavaScript by dart2js.
   void setDart2JsLibrary() {
     _platforms |= DART2JS_PLATFORM;
   }
 
-  /**
-   * Record that this library can be run on the VM.
-   */
+  /// Record that this library can be run on the VM.
   void setVmLibrary() {
     _platforms |= VM_PLATFORM;
   }
diff --git a/pkg/analyzer/lib/src/generated/sdk_io.dart b/pkg/analyzer/lib/src/generated/sdk_io.dart
index a2e058c..fe7ecc0 100644
--- a/pkg/analyzer/lib/src/generated/sdk_io.dart
+++ b/pkg/analyzer/lib/src/generated/sdk_io.dart
@@ -15,41 +15,25 @@
 import 'package:analyzer/src/generated/source_io.dart';
 import 'package:analyzer/src/summary/idl.dart' show PackageBundle;
 
-/**
- * An abstract implementation of a Dart SDK in which the available libraries are
- * stored in a library map. Subclasses are responsible for populating the
- * library map.
- */
+/// An abstract implementation of a Dart SDK in which the available libraries
+/// are stored in a library map. Subclasses are responsible for populating the
+/// library map.
 @deprecated
 abstract class AbstractDartSdk implements DartSdk {
-  /**
-   * A mapping from Dart library URI's to the library represented by that URI.
-   */
+  /// A mapping from Dart library URI's to the library represented by that URI.
   LibraryMap libraryMap = LibraryMap();
 
-  /**
-   * The [AnalysisOptions] to use to create the [context].
-   */
+  /// The [AnalysisOptions] to use to create the [context].
   AnalysisOptions _analysisOptions;
 
-  /**
-   * The flag that specifies whether an SDK summary should be used. This is a
-   * temporary flag until summaries are enabled by default.
-   */
-  bool _useSummary = false;
-
-  /**
-   * The [AnalysisContext] which is used for all of the sources in this SDK.
-   */
+  /// The [AnalysisContext] which is used for all of the sources in this SDK.
   SdkAnalysisContext _analysisContext;
 
   /// The mapping from Dart URI's to the corresponding sources.
   final Map<String, Source> _uriToSourceMap = HashMap<String, Source>();
 
-  /**
-   * Set the [options] for this SDK analysis context.  Throw [StateError] if the
-   * context has been already created.
-   */
+  /// Set the [options] for this SDK analysis context.  Throw [StateError] if
+  /// the context has been already created.
   set analysisOptions(AnalysisOptions options) {
     if (_analysisContext != null) {
       throw StateError(
@@ -73,27 +57,9 @@
   @override
   List<String> get uris => libraryMap.uris;
 
-  /**
-   * Return `true` if the SDK summary will be used when available.
-   */
-  bool get useSummary => _useSummary;
-
-  /**
-   * Specify whether SDK summary should be used.
-   */
-  set useSummary(bool use) {
-    if (_analysisContext != null) {
-      throw StateError(
-          'The "useSummary" flag cannot be changed after context creation.');
-    }
-    _useSummary = use;
-  }
-
-  /**
-   * Add the extensions from one or more sdk extension files to this sdk. The
-   * [extensions] should be a table mapping the names of extensions to the paths
-   * where those extensions can be found.
-   */
+  /// Add the extensions from one or more sdk extension files to this sdk. The
+  /// [extensions] should be a table mapping the names of extensions to the
+  /// paths where those extensions can be found.
   void addExtensions(Map<String, String> extensions) {
     extensions.forEach((String uri, String path) {
       String shortName = uri.substring(uri.indexOf(':') + 1);
@@ -126,11 +92,9 @@
   @override
   SdkLibrary getSdkLibrary(String dartUri) => libraryMap.getLibrary(dartUri);
 
-  /**
-   * Return the [PackageBundle] for this SDK, if it exists, or `null` otherwise.
-   * This method should not be used outside of `analyzer` and `analyzer_cli`
-   * packages.
-   */
+  /// Return the [PackageBundle] for this SDK, if it exists, or `null`
+  /// otherwise. This method should not be used outside of `analyzer` and
+  /// `analyzer_cli` packages.
   @deprecated
   PackageBundle getSummarySdkBundle(bool _);
 
diff --git a/pkg/analyzer/lib/src/generated/source.dart b/pkg/analyzer/lib/src/generated/source.dart
index 940df39..5c2152e 100644
--- a/pkg/analyzer/lib/src/generated/source.dart
+++ b/pkg/analyzer/lib/src/generated/source.dart
@@ -47,11 +47,9 @@
   bool operator ==(Object object) => object is Source && object.uri == uri;
 }
 
-/**
- * A cache used to override the default content of a [Source].
- *
- * TODO(scheglov) Remove it.
- */
+/// A cache used to override the default content of a [Source].
+///
+/// TODO(scheglov) Remove it.
 class ContentCache {
   /// A table mapping the full path of sources to the contents of those sources.
   /// This is used to override the default contents of a source.
@@ -64,9 +62,7 @@
 
   int _nextStamp = 0;
 
-  /**
-   * Visit all entries of this cache.
-   */
+  /// Visit all entries of this cache.
   void accept(ContentCacheVisitor visitor) {
     _contentMap.forEach((String fullPath, String contents) {
       int stamp = _stampMap[fullPath];
@@ -74,41 +70,33 @@
     });
   }
 
-  /**
-   * Return the contents of the given [source], or `null` if this cache does not
-   * override the contents of the source.
-   *
-   * <b>Note:</b> This method is not intended to be used except by
-   * [AnalysisContext.getContents].
-   */
+  /// Return the contents of the given [source], or `null` if this cache does
+  /// not override the contents of the source.
+  ///
+  /// <b>Note:</b> This method is not intended to be used except by
+  /// [AnalysisContext.getContents].
   String getContents(Source source) => _contentMap[source.fullName];
 
-  /**
-   * Return `true` if the given [source] exists, `false` if it does not exist,
-   * or `null` if this cache does not override existence of the source.
-   *
-   * <b>Note:</b> This method is not intended to be used except by
-   * [AnalysisContext.exists].
-   */
+  /// Return `true` if the given [source] exists, `false` if it does not exist,
+  /// or `null` if this cache does not override existence of the source.
+  ///
+  /// <b>Note:</b> This method is not intended to be used except by
+  /// [AnalysisContext.exists].
   bool getExists(Source source) {
     return _contentMap.containsKey(source.fullName) ? true : null;
   }
 
-  /**
-   * Return the modification stamp of the given [source], or `null` if this
-   * cache does not override the contents of the source.
-   *
-   * <b>Note:</b> This method is not intended to be used except by
-   * [AnalysisContext.getModificationStamp].
-   */
+  /// Return the modification stamp of the given [source], or `null` if this
+  /// cache does not override the contents of the source.
+  ///
+  /// <b>Note:</b> This method is not intended to be used except by
+  /// [AnalysisContext.getModificationStamp].
   int getModificationStamp(Source source) => _stampMap[source.fullName];
 
-  /**
-   * Set the contents of the given [source] to the given [contents]. This has
-   * the effect of overriding the default contents of the source. If the
-   * contents are `null` the override is removed so that the default contents
-   * will be returned.
-   */
+  /// Set the contents of the given [source] to the given [contents]. This has
+  /// the effect of overriding the default contents of the source. If the
+  /// contents are `null` the override is removed so that the default contents
+  /// will be returned.
   String setContents(Source source, String contents) {
     String fullName = source.fullName;
     if (contents == null) {
@@ -150,33 +138,25 @@
   }
 }
 
-/**
- * Instances of the class `DartUriResolver` resolve `dart` URI's.
- */
+/// Instances of the class `DartUriResolver` resolve `dart` URI's.
 class DartUriResolver extends UriResolver {
-  /**
-   * The name of the `dart` scheme.
-   */
+  /// The name of the `dart` scheme.
   static String DART_SCHEME = "dart";
 
   /// The prefix of a URI using the dart-ext scheme to reference a native code
   /// library.
   static const String _DART_EXT_SCHEME = "dart-ext:";
 
-  /**
-   * The Dart SDK against which URI's are to be resolved.
-   */
+  /// The Dart SDK against which URI's are to be resolved.
   final DartSdk _sdk;
 
   /// Initialize a newly created resolver to resolve Dart URI's against the
   /// given platform within the given Dart SDK.
   DartUriResolver(this._sdk);
 
-  /**
-   * Return the [DartSdk] against which URIs are to be resolved.
-   *
-   * @return the [DartSdk] against which URIs are to be resolved.
-   */
+  /// Return the [DartSdk] against which URIs are to be resolved.
+  ///
+  /// @return the [DartSdk] against which URIs are to be resolved.
   DartSdk get dartSdk => _sdk;
 
   @override
@@ -193,53 +173,39 @@
     return dartSource?.uri;
   }
 
-  /**
-   * Return `true` if the given URI is a `dart-ext:` URI.
-   *
-   * @param uriContent the textual representation of the URI being tested
-   * @return `true` if the given URI is a `dart-ext:` URI
-   */
+  /// Return `true` if the given URI is a `dart-ext:` URI.
+  ///
+  /// @param uriContent the textual representation of the URI being tested
+  /// @return `true` if the given URI is a `dart-ext:` URI
   static bool isDartExtUri(String uriContent) =>
       uriContent != null && uriContent.startsWith(_DART_EXT_SCHEME);
 
-  /**
-   * Return `true` if the given URI is a `dart:` URI.
-   *
-   * @param uri the URI being tested
-   * @return `true` if the given URI is a `dart:` URI
-   */
+  /// Return `true` if the given URI is a `dart:` URI.
+  ///
+  /// @param uri the URI being tested
+  /// @return `true` if the given URI is a `dart:` URI
   static bool isDartUri(Uri uri) => DART_SCHEME == uri.scheme;
 }
 
-/**
- * Instances of the class `Location` represent the location of a character as a line and
- * column pair.
- */
+/// Instances of the class `Location` represent the location of a character as a
+/// line and column pair.
 @deprecated
 class LineInfo_Location {
-  /**
-   * The one-based index of the line containing the character.
-   */
+  /// The one-based index of the line containing the character.
   final int lineNumber;
 
-  /**
-   * The one-based index of the column containing the character.
-   */
+  /// The one-based index of the column containing the character.
   final int columnNumber;
 
-  /**
-   * Initialize a newly created location to represent the location of the
-   * character at the given [lineNumber] and [columnNumber].
-   */
+  /// Initialize a newly created location to represent the location of the
+  /// character at the given [lineNumber] and [columnNumber].
   LineInfo_Location(this.lineNumber, this.columnNumber);
 
   @override
   String toString() => '$lineNumber:$columnNumber';
 }
 
-/**
- * An implementation of an non-existing [Source].
- */
+/// An implementation of an non-existing [Source].
 class NonExistingSource extends Source {
   static final unknown = NonExistingSource(
       '/unknown.dart', pathos.toUri('/unknown.dart'), UriKind.FILE_URI);
@@ -290,258 +256,205 @@
   String toString() => 'NonExistingSource($uri, $fullName)';
 }
 
-/**
- * The interface `Source` defines the behavior of objects representing source
- * code that can be analyzed by the analysis engine.
- *
- * Implementations of this interface need to be aware of some assumptions made
- * by the analysis engine concerning sources:
- *
- * * Sources are not required to be unique. That is, there can be multiple
- * instances representing the same source.
- * * Sources are long lived. That is, the engine is allowed to hold on to a
- * source for an extended period of time and that source must continue to
- * report accurate and up-to-date information.
- *
- * Because of these assumptions, most implementations will not maintain any
- * state but will delegate to an authoritative system of record in order to
- * implement this API. For example, a source that represents files on disk
- * would typically query the file system to determine the state of the file.
- *
- * If the instances that implement this API are the system of record, then they
- * will typically be unique. In that case, sources that are created that
- * represent non-existent files must also be retained so that if those files
- * are created at a later date the long-lived sources representing those files
- * will know that they now exist.
- */
+/// The interface `Source` defines the behavior of objects representing source
+/// code that can be analyzed by the analysis engine.
+///
+/// Implementations of this interface need to be aware of some assumptions made
+/// by the analysis engine concerning sources:
+///
+/// * Sources are not required to be unique. That is, there can be multiple
+/// instances representing the same source.
+/// * Sources are long lived. That is, the engine is allowed to hold on to a
+/// source for an extended period of time and that source must continue to
+/// report accurate and up-to-date information.
+///
+/// Because of these assumptions, most implementations will not maintain any
+/// state but will delegate to an authoritative system of record in order to
+/// implement this API. For example, a source that represents files on disk
+/// would typically query the file system to determine the state of the file.
+///
+/// If the instances that implement this API are the system of record, then they
+/// will typically be unique. In that case, sources that are created that
+/// represent non-existent files must also be retained so that if those files
+/// are created at a later date the long-lived sources representing those files
+/// will know that they now exist.
 abstract class Source implements AnalysisTarget {
-  /**
-   * Get the contents and timestamp of this source.
-   *
-   * Clients should consider using the method [AnalysisContext.getContents]
-   * because contexts can have local overrides of the content of a source that
-   * the source is not aware of.
-   *
-   * @return the contents and timestamp of the source
-   * @throws Exception if the contents of this source could not be accessed
-   */
+  /// Get the contents and timestamp of this source.
+  ///
+  /// Clients should consider using the method [AnalysisContext.getContents]
+  /// because contexts can have local overrides of the content of a source that
+  /// the source is not aware of.
+  ///
+  /// @return the contents and timestamp of the source
+  /// @throws Exception if the contents of this source could not be accessed
   TimestampedData<String> get contents;
 
-  /**
-   * Return an encoded representation of this source that can be used to create
-   * a source that is equal to this source.
-   *
-   * @return an encoded representation of this source
-   * See [SourceFactory.fromEncoding].
-   */
+  /// Return an encoded representation of this source that can be used to create
+  /// a source that is equal to this source.
+  ///
+  /// @return an encoded representation of this source
+  /// See [SourceFactory.fromEncoding].
   @deprecated
   String get encoding;
 
-  /**
-   * Return the full (long) version of the name that can be displayed to the
-   * user to denote this source. For example, for a source representing a file
-   * this would typically be the absolute path of the file.
-   *
-   * @return a name that can be displayed to the user to denote this source
-   */
+  /// Return the full (long) version of the name that can be displayed to the
+  /// user to denote this source. For example, for a source representing a file
+  /// this would typically be the absolute path of the file.
+  ///
+  /// @return a name that can be displayed to the user to denote this source
   String get fullName;
 
-  /**
-   * Return a hash code for this source.
-   *
-   * @return a hash code for this source
-   * See [Object.hashCode].
-   */
+  /// Return a hash code for this source.
+  ///
+  /// @return a hash code for this source
+  /// See [Object.hashCode].
   @override
   int get hashCode;
 
-  /**
-   * Return `true` if this source is in one of the system libraries.
-   *
-   * @return `true` if this is in a system library
-   */
+  /// Return `true` if this source is in one of the system libraries.
+  ///
+  /// @return `true` if this is in a system library
   bool get isInSystemLibrary;
 
   @override
   Source get librarySource => null;
 
-  /**
-   * Return the modification stamp for this source, or a negative value if the
-   * source does not exist. A modification stamp is a non-negative integer with
-   * the property that if the contents of the source have not been modified
-   * since the last time the modification stamp was accessed then the same
-   * value will be returned, but if the contents of the source have been
-   * modified one or more times (even if the net change is zero) the stamps
-   * will be different.
-   *
-   * Clients should consider using the method
-   * [AnalysisContext.getModificationStamp] because contexts can have local
-   * overrides of the content of a source that the source is not aware of.
-   */
+  /// Return the modification stamp for this source, or a negative value if the
+  /// source does not exist. A modification stamp is a non-negative integer with
+  /// the property that if the contents of the source have not been modified
+  /// since the last time the modification stamp was accessed then the same
+  /// value will be returned, but if the contents of the source have been
+  /// modified one or more times (even if the net change is zero) the stamps
+  /// will be different.
+  ///
+  /// Clients should consider using the method
+  /// [AnalysisContext.getModificationStamp] because contexts can have local
+  /// overrides of the content of a source that the source is not aware of.
   int get modificationStamp;
 
-  /**
-   * Return a short version of the name that can be displayed to the user to
-   * denote this source. For example, for a source representing a file this
-   * would typically be the name of the file.
-   *
-   * @return a name that can be displayed to the user to denote this source
-   */
+  /// Return a short version of the name that can be displayed to the user to
+  /// denote this source. For example, for a source representing a file this
+  /// would typically be the name of the file.
+  ///
+  /// @return a name that can be displayed to the user to denote this source
   String get shortName;
 
   @override
   Source get source => this;
 
-  /**
-   * Return the URI from which this source was originally derived.
-   *
-   * @return the URI from which this source was originally derived
-   */
+  /// Return the URI from which this source was originally derived.
+  ///
+  /// @return the URI from which this source was originally derived
   Uri get uri;
 
-  /**
-   * Return the kind of URI from which this source was originally derived. If
-   * this source was created from an absolute URI, then the returned kind will
-   * reflect the scheme of the absolute URI. If it was created from a relative
-   * URI, then the returned kind will be the same as the kind of the source
-   * against which the relative URI was resolved.
-   *
-   * @return the kind of URI from which this source was originally derived
-   */
+  /// Return the kind of URI from which this source was originally derived. If
+  /// this source was created from an absolute URI, then the returned kind will
+  /// reflect the scheme of the absolute URI. If it was created from a relative
+  /// URI, then the returned kind will be the same as the kind of the source
+  /// against which the relative URI was resolved.
+  ///
+  /// @return the kind of URI from which this source was originally derived
   UriKind get uriKind;
 
-  /**
-   * Return `true` if the given object is a source that represents the same
-   * source code as this source.
-   *
-   * @param object the object to be compared with this object
-   * @return `true` if the given object is a source that represents the same
-   *         source code as this source
-   * See [Object.==].
-   */
+  /// Return `true` if the given object is a source that represents the same
+  /// source code as this source.
+  ///
+  /// @param object the object to be compared with this object
+  /// @return `true` if the given object is a source that represents the same
+  ///         source code as this source
+  /// See [Object.==].
   @override
   bool operator ==(Object object);
 
-  /**
-   * Return `true` if this source exists.
-   *
-   * Clients should consider using the method [AnalysisContext.exists] because
-   * contexts can have local overrides of the content of a source that the
-   * source is not aware of and a source with local content is considered to
-   * exist even if there is no file on disk.
-   *
-   * @return `true` if this source exists
-   */
+  /// Return `true` if this source exists.
+  ///
+  /// Clients should consider using the method [AnalysisContext.exists] because
+  /// contexts can have local overrides of the content of a source that the
+  /// source is not aware of and a source with local content is considered to
+  /// exist even if there is no file on disk.
+  ///
+  /// @return `true` if this source exists
   bool exists();
 }
 
-/**
- * Instances of the class `SourceFactory` resolve possibly relative URI's against an existing
- * [Source].
- */
+/// Instances of the class `SourceFactory` resolve possibly relative URI's
+/// against an existing [Source].
 abstract class SourceFactory {
-  /**
-   * Initialize a newly created source factory with the given absolute URI
-   * [resolvers].
-   */
+  /// Initialize a newly created source factory with the given absolute URI
+  /// [resolvers].
   factory SourceFactory(List<UriResolver> resolvers) = SourceFactoryImpl;
 
-  /**
-   * Return the [DartSdk] associated with this [SourceFactory], or `null` if
-   * there is no such SDK.
-   *
-   * @return the [DartSdk] associated with this [SourceFactory], or `null` if
-   *         there is no such SDK
-   */
+  /// Return the [DartSdk] associated with this [SourceFactory], or `null` if
+  /// there is no such SDK.
+  ///
+  /// @return the [DartSdk] associated with this [SourceFactory], or `null` if
+  ///         there is no such SDK
   DartSdk get dartSdk;
 
   /// A table mapping package names to paths of directories containing
   /// the package (or [null] if there is no registered package URI resolver).
   Map<String, List<Folder>> get packageMap;
 
-  /**
-   * Clear any cached URI resolution information in the [SourceFactory] itself,
-   * and also ask each [UriResolver]s to clear its caches.
-   */
+  /// Clear any cached URI resolution information in the [SourceFactory] itself,
+  /// and also ask each [UriResolver]s to clear its caches.
   void clearCache();
 
-  /**
-   * Return a source object representing the given absolute URI, or `null` if
-   * the URI is not a valid URI or if it is not an absolute URI.
-   *
-   * @param absoluteUri the absolute URI to be resolved
-   * @return a source object representing the absolute URI
-   */
+  /// Return a source object representing the given absolute URI, or `null` if
+  /// the URI is not a valid URI or if it is not an absolute URI.
+  ///
+  /// @param absoluteUri the absolute URI to be resolved
+  /// @return a source object representing the absolute URI
   Source forUri(String absoluteUri);
 
-  /**
-   * Return a source object representing the given absolute URI, or `null` if
-   * the URI is not an absolute URI.
-   *
-   * @param absoluteUri the absolute URI to be resolved
-   * @return a source object representing the absolute URI
-   */
+  /// Return a source object representing the given absolute URI, or `null` if
+  /// the URI is not an absolute URI.
+  ///
+  /// @param absoluteUri the absolute URI to be resolved
+  /// @return a source object representing the absolute URI
   Source forUri2(Uri absoluteUri);
 
-  /**
-   * Return a source representing the URI that results from resolving the given
-   * (possibly relative) [containedUri] against the URI associated with the
-   * [containingSource], whether or not the resulting source exists, or `null`
-   * if either the [containedUri] is invalid or if it cannot be resolved against
-   * the [containingSource]'s URI.
-   */
+  /// Return a source representing the URI that results from resolving the given
+  /// (possibly relative) [containedUri] against the URI associated with the
+  /// [containingSource], whether or not the resulting source exists, or `null`
+  /// if either the [containedUri] is invalid or if it cannot be resolved
+  /// against the [containingSource]'s URI.
   Source resolveUri(Source containingSource, String containedUri);
 
-  /**
-   * Return an absolute URI that represents the given source, or `null` if a
-   * valid URI cannot be computed.
-   *
-   * @param source the source to get URI for
-   * @return the absolute URI representing the given source
-   */
+  /// Return an absolute URI that represents the given source, or `null` if a
+  /// valid URI cannot be computed.
+  ///
+  /// @param source the source to get URI for
+  /// @return the absolute URI representing the given source
   Uri restoreUri(Source source);
 }
 
-/**
- * The enumeration `SourceKind` defines the different kinds of sources that are
- * known to the analysis engine.
- */
+/// The enumeration `SourceKind` defines the different kinds of sources that are
+/// known to the analysis engine.
 class SourceKind implements Comparable<SourceKind> {
-  /**
-   * A source containing HTML. The HTML might or might not contain Dart scripts.
-   */
+  /// A source containing HTML. The HTML might or might not contain Dart
+  /// scripts.
   static const SourceKind HTML = SourceKind('HTML', 0);
 
-  /**
-   * A Dart compilation unit that is not a part of another library. Libraries
-   * might or might not contain any directives, including a library directive.
-   */
+  /// A Dart compilation unit that is not a part of another library. Libraries
+  /// might or might not contain any directives, including a library directive.
   static const SourceKind LIBRARY = SourceKind('LIBRARY', 1);
 
-  /**
-   * A Dart compilation unit that is part of another library. Parts contain a
-   * part-of directive.
-   */
+  /// A Dart compilation unit that is part of another library. Parts contain a
+  /// part-of directive.
   static const SourceKind PART = SourceKind('PART', 2);
 
-  /**
-   * An unknown kind of source. Used both when it is not possible to identify
-   * the kind of a source and also when the kind of a source is not known
-   * without performing a computation and the client does not want to spend the
-   * time to identify the kind.
-   */
+  /// An unknown kind of source. Used both when it is not possible to identify
+  /// the kind of a source and also when the kind of a source is not known
+  /// without performing a computation and the client does not want to spend the
+  /// time to identify the kind.
   static const SourceKind UNKNOWN = SourceKind('UNKNOWN', 3);
 
   static const List<SourceKind> values = [HTML, LIBRARY, PART, UNKNOWN];
 
-  /**
-   * The name of this source kind.
-   */
+  /// The name of this source kind.
   final String name;
 
-  /**
-   * The ordinal value of the source kind.
-   */
+  /// The ordinal value of the source kind.
   final int ordinal;
 
   const SourceKind(this.name, this.ordinal);
@@ -556,47 +469,31 @@
   String toString() => name;
 }
 
-/**
- * The enumeration `UriKind` defines the different kinds of URI's that are
- * known to the analysis engine. These are used to keep track of the kind of
- * URI associated with a given source.
- */
+/// The enumeration `UriKind` defines the different kinds of URI's that are
+/// known to the analysis engine. These are used to keep track of the kind of
+/// URI associated with a given source.
 class UriKind implements Comparable<UriKind> {
-  /**
-   * A 'dart:' URI.
-   */
+  /// A 'dart:' URI.
   static const UriKind DART_URI = UriKind('DART_URI', 0, 0x64);
 
-  /**
-   * A 'file:' URI.
-   */
+  /// A 'file:' URI.
   static const UriKind FILE_URI = UriKind('FILE_URI', 1, 0x66);
 
-  /**
-   * A 'package:' URI.
-   */
+  /// A 'package:' URI.
   static const UriKind PACKAGE_URI = UriKind('PACKAGE_URI', 2, 0x70);
 
   static const List<UriKind> values = [DART_URI, FILE_URI, PACKAGE_URI];
 
-  /**
-   * The name of this URI kind.
-   */
+  /// The name of this URI kind.
   final String name;
 
-  /**
-   * The ordinal value of the URI kind.
-   */
+  /// The ordinal value of the URI kind.
   final int ordinal;
 
-  /**
-   * The single character encoding used to identify this kind of URI.
-   */
+  /// The single character encoding used to identify this kind of URI.
   final int encoding;
 
-  /**
-   * Initialize a newly created URI kind to have the given encoding.
-   */
+  /// Initialize a newly created URI kind to have the given encoding.
   const UriKind(this.name, this.ordinal, this.encoding);
 
   @override
@@ -608,10 +505,8 @@
   @override
   String toString() => name;
 
-  /**
-   * Return the URI kind represented by the given [encoding], or `null` if there
-   * is no kind with the given encoding.
-   */
+  /// Return the URI kind represented by the given [encoding], or `null` if
+  /// there is no kind with the given encoding.
   static UriKind fromEncoding(int encoding) {
     while (true) {
       if (encoding == 0x64) {
@@ -626,9 +521,7 @@
     return null;
   }
 
-  /**
-   * Return the URI kind corresponding to the given scheme string.
-   */
+  /// Return the URI kind corresponding to the given scheme string.
   static UriKind fromScheme(String scheme) {
     if (scheme == 'package') {
       return UriKind.PACKAGE_URI;
@@ -641,39 +534,32 @@
   }
 }
 
-/**
- * The abstract class `UriResolver` defines the behavior of objects that are used to resolve
- * URI's for a source factory. Subclasses of this class are expected to resolve a single scheme of
- * absolute URI.
- *
- * NOTICE: in a future breaking change release of the analyzer, a method
- * `void clearCache()` will be added.  Clients that implement, but do not
- * extend, this class, can prepare for the breaking change by adding an
- * implementation of this method that clears any cached URI resolution
- * information.
- */
+/// The abstract class `UriResolver` defines the behavior of objects that are
+/// used to resolve URI's for a source factory. Subclasses of this class are
+/// expected to resolve a single scheme of absolute URI.
+///
+/// NOTICE: in a future breaking change release of the analyzer, a method
+/// `void clearCache()` will be added.  Clients that implement, but do not
+/// extend, this class, can prepare for the breaking change by adding an
+/// implementation of this method that clears any cached URI resolution
+/// information.
 abstract class UriResolver {
-  /**
-   * Clear any cached URI resolution information.
-   */
+  /// Clear any cached URI resolution information.
   void clearCache() {}
 
-  /**
-   * Resolve the given absolute URI. Return a [Source] representing the file to which
-   * it was resolved, whether or not the resulting source exists, or `null` if it could not be
-   * resolved because the URI is invalid.
-   *
-   * @param uri the URI to be resolved
-   * @param actualUri the actual uri for this source -- if `null`, the value of [uri] will be used
-   * @return a [Source] representing the file to which given URI was resolved
-   */
+  /// Resolve the given absolute URI. Return a [Source] representing the file to
+  /// which it was resolved, whether or not the resulting source exists, or
+  /// `null` if it could not be resolved because the URI is invalid.
+  ///
+  /// @param uri the URI to be resolved
+  /// @param actualUri the actual uri for this source -- if `null`, the value of
+  /// [uri] will be used
+  /// @return a [Source] representing the file to which given URI was resolved
   Source resolveAbsolute(Uri uri, [Uri actualUri]);
 
-  /**
-   * Return an absolute URI that represents the given [source], or `null` if a
-   * valid URI cannot be computed.
-   *
-   * The computation should be based solely on [source.fullName].
-   */
+  /// Return an absolute URI that represents the given [source], or `null` if a
+  /// valid URI cannot be computed.
+  ///
+  /// The computation should be based solely on [source.fullName].
   Uri restoreAbsolute(Source source) => null;
 }
diff --git a/pkg/analyzer/lib/src/generated/source_io.dart b/pkg/analyzer/lib/src/generated/source_io.dart
index 3645309..16d82d2 100644
--- a/pkg/analyzer/lib/src/generated/source_io.dart
+++ b/pkg/analyzer/lib/src/generated/source_io.dart
@@ -12,18 +12,14 @@
 
 export 'package:analyzer/src/generated/source.dart';
 
-/**
- * Instances of the class [ExplicitSourceResolver] map URIs to files on disk
- * using a fixed mapping provided at construction time.
- */
+/// Instances of the class [ExplicitSourceResolver] map URIs to files on disk
+/// using a fixed mapping provided at construction time.
 @deprecated
 class ExplicitSourceResolver extends UriResolver {
   final Map<Uri, JavaFile> uriToFileMap;
   final Map<String, Uri> pathToUriMap;
 
-  /**
-   * Construct an [ExplicitSourceResolver] based on the given [uriToFileMap].
-   */
+  /// Construct an [ExplicitSourceResolver] based on the given [uriToFileMap].
   ExplicitSourceResolver(Map<Uri, JavaFile> uriToFileMap)
       : uriToFileMap = uriToFileMap,
         pathToUriMap = _computePathToUriMap(uriToFileMap);
@@ -44,9 +40,7 @@
     return pathToUriMap[source.fullName];
   }
 
-  /**
-   * Build the inverse mapping of [uriToSourceMap].
-   */
+  /// Build the inverse mapping of [uriToSourceMap].
   static Map<String, Uri> _computePathToUriMap(
       Map<Uri, JavaFile> uriToSourceMap) {
     Map<String, Uri> pathToUriMap = <String, Uri>{};
@@ -57,55 +51,38 @@
   }
 }
 
-/**
- * Instances of the class `FileBasedSource` implement a source that represents a file.
- */
+/// Instances of the class `FileBasedSource` implement a source that represents
+/// a file.
 class FileBasedSource extends Source {
-  /**
-   * A function that changes the way that files are read off of disk.
-   */
+  /// A function that changes the way that files are read off of disk.
   static Function fileReadMode = (String s) => s;
 
-  /**
-   * Map from encoded URI/filepath pair to a unique integer identifier.  This
-   * identifier is used for equality tests and hash codes.
-   *
-   * The URI and filepath are joined into a pair by separating them with an '@'
-   * character.
-   */
+  /// Map from encoded URI/filepath pair to a unique integer identifier.  This
+  /// identifier is used for equality tests and hash codes.
+  ///
+  /// The URI and filepath are joined into a pair by separating them with an '@'
+  /// character.
   static final Map<String, int> _idTable = HashMap<String, int>();
 
-  /**
-   * The URI from which this source was originally derived.
-   */
+  /// The URI from which this source was originally derived.
   @override
   final Uri uri;
 
-  /**
-   * The unique ID associated with this [FileBasedSource].
-   */
+  /// The unique ID associated with this [FileBasedSource].
   final int id;
 
-  /**
-   * The file represented by this source.
-   */
+  /// The file represented by this source.
   final JavaFile file;
 
-  /**
-   * The cached absolute path of this source.
-   */
+  /// The cached absolute path of this source.
   String _absolutePath;
 
-  /**
-   * The cached encoding for this source.
-   */
+  /// The cached encoding for this source.
   String _encoding;
 
-  /**
-   * Initialize a newly created source object to represent the given [file]. If
-   * a [uri] is given, then it will be used as the URI from which the source was
-   * derived, otherwise a `file:` URI will be created based on the [file].
-   */
+  /// Initialize a newly created source object to represent the given [file]. If
+  /// a [uri] is given, then it will be used as the URI from which the source
+  /// was derived, otherwise a `file:` URI will be created based on the [file].
   FileBasedSource(JavaFile file, [Uri uri])
       : this.uri = uri ?? file.toURI(),
         this.file = file,
@@ -119,17 +96,16 @@
     });
   }
 
-  /**
-   * Get the contents and timestamp of the underlying file.
-   *
-   * Clients should consider using the method [AnalysisContext.getContents]
-   * because contexts can have local overrides of the content of a source that the source is not
-   * aware of.
-   *
-   * @return the contents of the source paired with the modification stamp of the source
-   * @throws Exception if the contents of this source could not be accessed
-   * See [contents].
-   */
+  /// Get the contents and timestamp of the underlying file.
+  ///
+  /// Clients should consider using the method [AnalysisContext.getContents]
+  /// because contexts can have local overrides of the content of a source that
+  /// the source is not aware of.
+  ///
+  /// @return the contents of the source paired with the modification stamp of
+  /// the source
+  /// @throws Exception if the contents of this source could not be accessed
+  /// See [contents].
   TimestampedData<String> get contentsFromFile {
     return TimestampedData<String>(
         file.lastModified(), fileReadMode(file.readAsStringSync()));
@@ -185,17 +161,13 @@
   }
 }
 
-/**
- * Instances of the class `FileUriResolver` resolve `file` URI's.
- *
- * This class is now deprecated, 'new FileUriResolver()' is equivalent to
- * 'new ResourceUriResolver(PhysicalResourceProvider.INSTANCE)'.
- */
+/// Instances of the class `FileUriResolver` resolve `file` URI's.
+///
+/// This class is now deprecated, 'new FileUriResolver()' is equivalent to
+/// 'new ResourceUriResolver(PhysicalResourceProvider.INSTANCE)'.
 @deprecated
 class FileUriResolver extends UriResolver {
-  /**
-   * The name of the `file` scheme.
-   */
+  /// The name of the `file` scheme.
   static String FILE_SCHEME = "file";
 
   @override
@@ -211,42 +183,30 @@
     return Uri.file(source.fullName);
   }
 
-  /**
-   * Return `true` if the given URI is a `file` URI.
-   *
-   * @param uri the URI being tested
-   * @return `true` if the given URI is a `file` URI
-   */
+  /// Return `true` if the given URI is a `file` URI.
+  ///
+  /// @param uri the URI being tested
+  /// @return `true` if the given URI is a `file` URI
   static bool isFileUri(Uri uri) => uri.scheme == FILE_SCHEME;
 }
 
-/**
- * Instances of interface `LocalSourcePredicate` are used to determine if the given
- * [Source] is "local" in some sense, so can be updated.
- */
+/// Instances of interface `LocalSourcePredicate` are used to determine if the
+/// given [Source] is "local" in some sense, so can be updated.
 abstract class LocalSourcePredicate {
-  /**
-   * Instance of [LocalSourcePredicate] that always returns `false`.
-   */
+  /// Instance of [LocalSourcePredicate] that always returns `false`.
   static final LocalSourcePredicate FALSE = LocalSourcePredicate_FALSE();
 
-  /**
-   * Instance of [LocalSourcePredicate] that always returns `true`.
-   */
+  /// Instance of [LocalSourcePredicate] that always returns `true`.
   static final LocalSourcePredicate TRUE = LocalSourcePredicate_TRUE();
 
-  /**
-   * Instance of [LocalSourcePredicate] that returns `true` for all [Source]s
-   * except of SDK.
-   */
+  /// Instance of [LocalSourcePredicate] that returns `true` for all [Source]s
+  /// except of SDK.
   static final LocalSourcePredicate NOT_SDK = LocalSourcePredicate_NOT_SDK();
 
-  /**
-   * Determines if the given [Source] is local.
-   *
-   * @param source the [Source] to analyze
-   * @return `true` if the given [Source] is local
-   */
+  /// Determines if the given [Source] is local.
+  ///
+  /// @param source the [Source] to analyze
+  /// @return `true` if the given [Source] is local
   bool isLocal(Source source);
 }
 
@@ -265,48 +225,39 @@
   bool isLocal(Source source) => true;
 }
 
-/**
- * Instances of the class `PackageUriResolver` resolve `package` URI's in the context of
- * an application.
- *
- * For the purposes of sharing analysis, the path to each package under the "packages" directory
- * should be canonicalized, but to preserve relative links within a package, the remainder of the
- * path from the package directory to the leaf should not.
- */
+/// Instances of the class `PackageUriResolver` resolve `package` URI's in the
+/// context of an application.
+///
+/// For the purposes of sharing analysis, the path to each package under the
+/// "packages" directory should be canonicalized, but to preserve relative links
+/// within a package, the remainder of the path from the package directory to
+/// the leaf should not.
 @deprecated
 class PackageUriResolver extends UriResolver {
-  /**
-   * The name of the `package` scheme.
-   */
+  /// The name of the `package` scheme.
   static String PACKAGE_SCHEME = "package";
 
-  /**
-   * Log exceptions thrown with the message "Required key not available" only once.
-   */
+  /// Log exceptions thrown with the message "Required key not available" only
+  /// once.
   static bool _CanLogRequiredKeyIoException = true;
 
-  /**
-   * The package directories that `package` URI's are assumed to be relative to.
-   */
+  /// The package directories that `package` URI's are assumed to be relative
+  /// to.
   final List<JavaFile> _packagesDirectories;
 
-  /**
-   * Initialize a newly created resolver to resolve `package` URI's relative to the given
-   * package directories.
-   *
-   * @param packagesDirectories the package directories that `package` URI's are assumed to be
-   *          relative to
-   */
+  /// Initialize a newly created resolver to resolve `package` URI's relative to
+  /// the given package directories.
+  ///
+  /// @param packagesDirectories the package directories that `package` URI's
+  ///          are assumed to be relative to
   PackageUriResolver(this._packagesDirectories) {
     if (_packagesDirectories.isEmpty) {
       throw ArgumentError("At least one package directory must be provided");
     }
   }
 
-  /**
-   * If the list of package directories contains one element, return it.
-   * Otherwise raise an exception.  Intended for testing.
-   */
+  /// If the list of package directories contains one element, return it.
+  /// Otherwise raise an exception.  Intended for testing.
   String get packagesDirectory_forTesting {
     int length = _packagesDirectories.length;
     if (length != 1) {
@@ -315,15 +266,13 @@
     return _packagesDirectories[0].getPath();
   }
 
-  /**
-   * Answer the canonical file for the specified package.
-   *
-   * @param packagesDirectory the "packages" directory (not `null`)
-   * @param pkgName the package name (not `null`, not empty)
-   * @param relPath the path relative to the package directory (not `null`, no leading slash,
-   *          but may be empty string)
-   * @return the file (not `null`)
-   */
+  /// Answer the canonical file for the specified package.
+  ///
+  /// @param packagesDirectory the "packages" directory (not `null`)
+  /// @param pkgName the package name (not `null`, not empty)
+  /// @param relPath the path relative to the package directory (not `null`, no
+  ///          leading slash, but may be empty string)
+  /// @return the file (not `null`)
   JavaFile getCanonicalFile(
       JavaFile packagesDirectory, String pkgName, String relPath) {
     JavaFile pkgDir = JavaFile.relative(packagesDirectory, pkgName);
@@ -414,10 +363,9 @@
     return null;
   }
 
-  /**
-   * @return `true` if "file" was found in "packagesDir", and it is part of the "lib" folder
-   *         of the application that contains in this "packagesDir".
-   */
+  /// @return `true` if "file" was found in "packagesDir", and it is part of
+  ///         the "lib" folder of the application that contains in this
+  ///         "packagesDir".
   bool _isSelfReference(JavaFile packagesDir, JavaFile file) {
     JavaFile rootDir = packagesDir.getParentFile();
     if (rootDir == null) {
@@ -428,49 +376,35 @@
     return filePath.startsWith("$rootPath/lib");
   }
 
-  /**
-   * Convert the given file path to a "file:" URI.  On Windows, this transforms
-   * backslashes to forward slashes.
-   */
+  /// Convert the given file path to a "file:" URI.  On Windows, this transforms
+  /// backslashes to forward slashes.
   String _toFileUri(String filePath) => path.context.toUri(filePath).toString();
 
-  /**
-   * Return `true` if the given URI is a `package` URI.
-   *
-   * @param uri the URI being tested
-   * @return `true` if the given URI is a `package` URI
-   */
+  /// Return `true` if the given URI is a `package` URI.
+  ///
+  /// @param uri the URI being tested
+  /// @return `true` if the given URI is a `package` URI
   static bool isPackageUri(Uri uri) => PACKAGE_SCHEME == uri.scheme;
 }
 
-/**
- * Instances of the class `RelativeFileUriResolver` resolve `file` URI's.
- *
- * This class is now deprecated, file URI resolution should be done with
- * ResourceUriResolver, i.e.
- * 'new ResourceUriResolver(PhysicalResourceProvider.INSTANCE)'.
- */
+/// Instances of the class `RelativeFileUriResolver` resolve `file` URI's.
+///
+/// This class is now deprecated, file URI resolution should be done with
+/// ResourceUriResolver, i.e.
+/// 'new ResourceUriResolver(PhysicalResourceProvider.INSTANCE)'.
 @deprecated
 class RelativeFileUriResolver extends UriResolver {
-  /**
-   * The name of the `file` scheme.
-   */
+  /// The name of the `file` scheme.
   static String FILE_SCHEME = "file";
 
-  /**
-   * The directories for the relatvie URI's
-   */
+  /// The directories for the relatvie URI's
   final List<JavaFile> _relativeDirectories;
 
-  /**
-   * The root directory for all the source trees
-   */
+  /// The root directory for all the source trees
   final JavaFile _rootDirectory;
 
-  /**
-   * Initialize a newly created resolver to resolve `file` URI's relative to the given root
-   * directory.
-   */
+  /// Initialize a newly created resolver to resolve `file` URI's relative to
+  /// the given root directory.
   RelativeFileUriResolver(this._rootDirectory, this._relativeDirectories)
       : super();
 
@@ -490,11 +424,9 @@
     return null;
   }
 
-  /**
-   * Return `true` if the given URI is a `file` URI.
-   *
-   * @param uri the URI being tested
-   * @return `true` if the given URI is a `file` URI
-   */
+  /// Return `true` if the given URI is a `file` URI.
+  ///
+  /// @param uri the URI being tested
+  /// @return `true` if the given URI is a `file` URI
   static bool isFileUri(Uri uri) => uri.scheme == FILE_SCHEME;
 }
diff --git a/pkg/analyzer/lib/src/generated/static_type_analyzer.dart b/pkg/analyzer/lib/src/generated/static_type_analyzer.dart
index f224920..eafa028 100644
--- a/pkg/analyzer/lib/src/generated/static_type_analyzer.dart
+++ b/pkg/analyzer/lib/src/generated/static_type_analyzer.dart
@@ -14,6 +14,7 @@
 import 'package:analyzer/src/dart/element/type.dart';
 import 'package:analyzer/src/dart/element/type_demotion.dart';
 import 'package:analyzer/src/dart/element/type_provider.dart';
+import 'package:analyzer/src/dart/element/type_system.dart';
 import 'package:analyzer/src/dart/resolver/flow_analysis_visitor.dart';
 import 'package:analyzer/src/error/codes.dart';
 import 'package:analyzer/src/generated/engine.dart';
@@ -23,61 +24,43 @@
 import 'package:analyzer/src/task/strong/checker.dart'
     show getExpressionType, getReadType;
 
-/**
- * Instances of the class `StaticTypeAnalyzer` perform two type-related tasks. First, they
- * compute the static type of every expression. Second, they look for any static type errors or
- * warnings that might need to be generated. The requirements for the type analyzer are:
- * <ol>
- * * Every element that refers to types should be fully populated.
- * * Every node representing an expression should be resolved to the Type of the expression.
- * </ol>
- */
+/// Instances of the class `StaticTypeAnalyzer` perform two type-related tasks. First, they
+/// compute the static type of every expression. Second, they look for any static type errors or
+/// warnings that might need to be generated. The requirements for the type analyzer are:
+/// <ol>
+/// * Every element that refers to types should be fully populated.
+/// * Every node representing an expression should be resolved to the Type of the expression.
+/// </ol>
 class StaticTypeAnalyzer extends SimpleAstVisitor<void> {
-  /**
-   * The resolver driving the resolution and type analysis.
-   */
+  /// The resolver driving the resolution and type analysis.
   final ResolverVisitor _resolver;
 
-  /**
-   * The feature set that should be used to resolve types.
-   */
+  /// The feature set that should be used to resolve types.
   final FeatureSet _featureSet;
 
   final MigrationResolutionHooks _migrationResolutionHooks;
 
-  /**
-   * The object providing access to the types defined by the language.
-   */
+  /// The object providing access to the types defined by the language.
   TypeProviderImpl _typeProvider;
 
-  /**
-   * The type system in use for static type analysis.
-   */
+  /// The type system in use for static type analysis.
   TypeSystemImpl _typeSystem;
 
-  /**
-   * The type representing the type 'dynamic'.
-   */
+  /// The type representing the type 'dynamic'.
   DartType _dynamicType;
 
-  /**
-   * True if inference failures should be reported, otherwise false.
-   */
+  /// True if inference failures should be reported, otherwise false.
   bool _strictInference;
 
-  /**
-   * The object providing promoted or declared types of variables.
-   */
+  /// The object providing promoted or declared types of variables.
   LocalVariableTypeProvider _localVariableTypeProvider;
 
   final FlowAnalysisHelper _flowAnalysis;
 
-  /**
-   * Initialize a newly created static type analyzer to analyze types for the
-   * [_resolver] based on the
-   *
-   * @param resolver the resolver driving this participant
-   */
+  /// Initialize a newly created static type analyzer to analyze types for the
+  /// [_resolver] based on the
+  ///
+  /// @param resolver the resolver driving this participant
   StaticTypeAnalyzer(this._resolver, this._featureSet, this._flowAnalysis,
       this._migrationResolutionHooks) {
     _typeProvider = _resolver.typeProvider;
@@ -93,14 +76,12 @@
   bool get _isNonNullableByDefault =>
       _featureSet.isEnabled(Feature.non_nullable);
 
-  /**
-   * Given a constructor for a generic type, returns the equivalent generic
-   * function type that we could use to forward to the constructor, or for a
-   * non-generic type simply returns the constructor type.
-   *
-   * For example given the type `class C<T> { C(T arg); }`, the generic function
-   * type is `<T>(T) -> C<T>`.
-   */
+  /// Given a constructor for a generic type, returns the equivalent generic
+  /// function type that we could use to forward to the constructor, or for a
+  /// non-generic type simply returns the constructor type.
+  ///
+  /// For example given the type `class C<T> { C(T arg); }`, the generic function
+  /// type is `<T>(T) -> C<T>`.
   FunctionType constructorToGenericFunctionType(
       ConstructorElement constructor) {
     var classElement = constructor.enclosingElement;
@@ -117,12 +98,10 @@
     );
   }
 
-  /**
-   * Record that the static type of the given node is the given type.
-   *
-   * @param expression the node whose type is to be recorded
-   * @param type the static type of the node
-   */
+  /// Record that the static type of the given node is the given type.
+  ///
+  /// @param expression the node whose type is to be recorded
+  /// @param type the static type of the node
   void recordStaticType(Expression expression, DartType type) {
     if (_migrationResolutionHooks != null) {
       type = _migrationResolutionHooks.modifyExpressionType(
@@ -139,34 +118,28 @@
     }
   }
 
-  /**
-   * The Dart Language Specification, 12.5: <blockquote>The static type of a string literal is
-   * `String`.</blockquote>
-   */
+  /// The Dart Language Specification, 12.5: <blockquote>The static type of a string literal is
+  /// `String`.</blockquote>
   @override
   void visitAdjacentStrings(AdjacentStrings node) {
     recordStaticType(node, _nonNullable(_typeProvider.stringType));
   }
 
-  /**
-   * The Dart Language Specification, 12.32: <blockquote>... the cast expression <i>e as T</i> ...
-   *
-   * It is a static warning if <i>T</i> does not denote a type available in the current lexical
-   * scope.
-   *
-   * The static type of a cast expression <i>e as T</i> is <i>T</i>.</blockquote>
-   */
+  /// The Dart Language Specification, 12.32: <blockquote>... the cast expression <i>e as T</i> ...
+  ///
+  /// It is a static warning if <i>T</i> does not denote a type available in the current lexical
+  /// scope.
+  ///
+  /// The static type of a cast expression <i>e as T</i> is <i>T</i>.</blockquote>
   @override
   void visitAsExpression(AsExpression node) {
     recordStaticType(node, _getType(node.type));
   }
 
-  /**
-   * The Dart Language Specification, 16.29 (Await Expressions):
-   *
-   *   The static type of [the expression "await e"] is flatten(T) where T is
-   *   the static type of e.
-   */
+  /// The Dart Language Specification, 16.29 (Await Expressions):
+  ///
+  ///   The static type of [the expression "await e"] is flatten(T) where T is
+  ///   the static type of e.
   @override
   void visitAwaitExpression(AwaitExpression node) {
     DartType resultType = _getStaticType(node.expression);
@@ -174,43 +147,35 @@
     recordStaticType(node, resultType);
   }
 
-  /**
-   * The Dart Language Specification, 12.4: <blockquote>The static type of a boolean literal is
-   * bool.</blockquote>
-   */
+  /// The Dart Language Specification, 12.4: <blockquote>The static type of a boolean literal is
+  /// bool.</blockquote>
   @override
   void visitBooleanLiteral(BooleanLiteral node) {
     recordStaticType(node, _nonNullable(_typeProvider.boolType));
   }
 
-  /**
-   * The Dart Language Specification, 12.15.2: <blockquote>A cascaded method invocation expression
-   * of the form <i>e..suffix</i> is equivalent to the expression <i>(t) {t.suffix; return
-   * t;}(e)</i>.</blockquote>
-   */
+  /// The Dart Language Specification, 12.15.2: <blockquote>A cascaded method invocation expression
+  /// of the form <i>e..suffix</i> is equivalent to the expression <i>(t) {t.suffix; return
+  /// t;}(e)</i>.</blockquote>
   @override
   void visitCascadeExpression(CascadeExpression node) {
     recordStaticType(node, _getStaticType(node.target));
   }
 
-  /**
-   * The Dart Language Specification, 12.19: <blockquote> ... a conditional expression <i>c</i> of
-   * the form <i>e<sub>1</sub> ? e<sub>2</sub> : e<sub>3</sub></i> ...
-   *
-   * It is a static type warning if the type of e<sub>1</sub> may not be assigned to `bool`.
-   *
-   * The static type of <i>c</i> is the least upper bound of the static type of <i>e<sub>2</sub></i>
-   * and the static type of <i>e<sub>3</sub></i>.</blockquote>
-   */
+  /// The Dart Language Specification, 12.19: <blockquote> ... a conditional expression <i>c</i> of
+  /// the form <i>e<sub>1</sub> ? e<sub>2</sub> : e<sub>3</sub></i> ...
+  ///
+  /// It is a static type warning if the type of e<sub>1</sub> may not be assigned to `bool`.
+  ///
+  /// The static type of <i>c</i> is the least upper bound of the static type of <i>e<sub>2</sub></i>
+  /// and the static type of <i>e<sub>3</sub></i>.</blockquote>
   @override
   void visitConditionalExpression(ConditionalExpression node) {
     _analyzeLeastUpperBound(node, node.thenExpression, node.elseExpression);
   }
 
-  /**
-   * The Dart Language Specification, 12.3: <blockquote>The static type of a literal double is
-   * double.</blockquote>
-   */
+  /// The Dart Language Specification, 12.3: <blockquote>The static type of a literal double is
+  /// double.</blockquote>
   @override
   void visitDoubleLiteral(DoubleLiteral node) {
     recordStaticType(node, _nonNullable(_typeProvider.doubleType));
@@ -221,44 +186,40 @@
     _resolver.extensionResolver.resolveOverride(node);
   }
 
-  /**
-   * The Dart Language Specification, 12.9: <blockquote>The static type of a function literal of the
-   * form <i>(T<sub>1</sub> a<sub>1</sub>, &hellip;, T<sub>n</sub> a<sub>n</sub>, [T<sub>n+1</sub>
-   * x<sub>n+1</sub> = d1, &hellip;, T<sub>n+k</sub> x<sub>n+k</sub> = dk]) => e</i> is
-   * <i>(T<sub>1</sub>, &hellip;, Tn, [T<sub>n+1</sub> x<sub>n+1</sub>, &hellip;, T<sub>n+k</sub>
-   * x<sub>n+k</sub>]) &rarr; T<sub>0</sub></i>, where <i>T<sub>0</sub></i> is the static type of
-   * <i>e</i>. In any case where <i>T<sub>i</sub>, 1 &lt;= i &lt;= n</i>, is not specified, it is
-   * considered to have been specified as dynamic.
-   *
-   * The static type of a function literal of the form <i>(T<sub>1</sub> a<sub>1</sub>, &hellip;,
-   * T<sub>n</sub> a<sub>n</sub>, {T<sub>n+1</sub> x<sub>n+1</sub> : d1, &hellip;, T<sub>n+k</sub>
-   * x<sub>n+k</sub> : dk}) => e</i> is <i>(T<sub>1</sub>, &hellip;, T<sub>n</sub>, {T<sub>n+1</sub>
-   * x<sub>n+1</sub>, &hellip;, T<sub>n+k</sub> x<sub>n+k</sub>}) &rarr; T<sub>0</sub></i>, where
-   * <i>T<sub>0</sub></i> is the static type of <i>e</i>. In any case where <i>T<sub>i</sub>, 1
-   * &lt;= i &lt;= n</i>, is not specified, it is considered to have been specified as dynamic.
-   *
-   * The static type of a function literal of the form <i>(T<sub>1</sub> a<sub>1</sub>, &hellip;,
-   * T<sub>n</sub> a<sub>n</sub>, [T<sub>n+1</sub> x<sub>n+1</sub> = d1, &hellip;, T<sub>n+k</sub>
-   * x<sub>n+k</sub> = dk]) {s}</i> is <i>(T<sub>1</sub>, &hellip;, T<sub>n</sub>, [T<sub>n+1</sub>
-   * x<sub>n+1</sub>, &hellip;, T<sub>n+k</sub> x<sub>n+k</sub>]) &rarr; dynamic</i>. In any case
-   * where <i>T<sub>i</sub>, 1 &lt;= i &lt;= n</i>, is not specified, it is considered to have been
-   * specified as dynamic.
-   *
-   * The static type of a function literal of the form <i>(T<sub>1</sub> a<sub>1</sub>, &hellip;,
-   * T<sub>n</sub> a<sub>n</sub>, {T<sub>n+1</sub> x<sub>n+1</sub> : d1, &hellip;, T<sub>n+k</sub>
-   * x<sub>n+k</sub> : dk}) {s}</i> is <i>(T<sub>1</sub>, &hellip;, T<sub>n</sub>, {T<sub>n+1</sub>
-   * x<sub>n+1</sub>, &hellip;, T<sub>n+k</sub> x<sub>n+k</sub>}) &rarr; dynamic</i>. In any case
-   * where <i>T<sub>i</sub>, 1 &lt;= i &lt;= n</i>, is not specified, it is considered to have been
-   * specified as dynamic.</blockquote>
-   */
+  /// The Dart Language Specification, 12.9: <blockquote>The static type of a function literal of the
+  /// form <i>(T<sub>1</sub> a<sub>1</sub>, &hellip;, T<sub>n</sub> a<sub>n</sub>, [T<sub>n+1</sub>
+  /// x<sub>n+1</sub> = d1, &hellip;, T<sub>n+k</sub> x<sub>n+k</sub> = dk]) => e</i> is
+  /// <i>(T<sub>1</sub>, &hellip;, Tn, [T<sub>n+1</sub> x<sub>n+1</sub>, &hellip;, T<sub>n+k</sub>
+  /// x<sub>n+k</sub>]) &rarr; T<sub>0</sub></i>, where <i>T<sub>0</sub></i> is the static type of
+  /// <i>e</i>. In any case where <i>T<sub>i</sub>, 1 &lt;= i &lt;= n</i>, is not specified, it is
+  /// considered to have been specified as dynamic.
+  ///
+  /// The static type of a function literal of the form <i>(T<sub>1</sub> a<sub>1</sub>, &hellip;,
+  /// T<sub>n</sub> a<sub>n</sub>, {T<sub>n+1</sub> x<sub>n+1</sub> : d1, &hellip;, T<sub>n+k</sub>
+  /// x<sub>n+k</sub> : dk}) => e</i> is <i>(T<sub>1</sub>, &hellip;, T<sub>n</sub>, {T<sub>n+1</sub>
+  /// x<sub>n+1</sub>, &hellip;, T<sub>n+k</sub> x<sub>n+k</sub>}) &rarr; T<sub>0</sub></i>, where
+  /// <i>T<sub>0</sub></i> is the static type of <i>e</i>. In any case where <i>T<sub>i</sub>, 1
+  /// &lt;= i &lt;= n</i>, is not specified, it is considered to have been specified as dynamic.
+  ///
+  /// The static type of a function literal of the form <i>(T<sub>1</sub> a<sub>1</sub>, &hellip;,
+  /// T<sub>n</sub> a<sub>n</sub>, [T<sub>n+1</sub> x<sub>n+1</sub> = d1, &hellip;, T<sub>n+k</sub>
+  /// x<sub>n+k</sub> = dk]) {s}</i> is <i>(T<sub>1</sub>, &hellip;, T<sub>n</sub>, [T<sub>n+1</sub>
+  /// x<sub>n+1</sub>, &hellip;, T<sub>n+k</sub> x<sub>n+k</sub>]) &rarr; dynamic</i>. In any case
+  /// where <i>T<sub>i</sub>, 1 &lt;= i &lt;= n</i>, is not specified, it is considered to have been
+  /// specified as dynamic.
+  ///
+  /// The static type of a function literal of the form <i>(T<sub>1</sub> a<sub>1</sub>, &hellip;,
+  /// T<sub>n</sub> a<sub>n</sub>, {T<sub>n+1</sub> x<sub>n+1</sub> : d1, &hellip;, T<sub>n+k</sub>
+  /// x<sub>n+k</sub> : dk}) {s}</i> is <i>(T<sub>1</sub>, &hellip;, T<sub>n</sub>, {T<sub>n+1</sub>
+  /// x<sub>n+1</sub>, &hellip;, T<sub>n+k</sub> x<sub>n+k</sub>}) &rarr; dynamic</i>. In any case
+  /// where <i>T<sub>i</sub>, 1 &lt;= i &lt;= n</i>, is not specified, it is considered to have been
+  /// specified as dynamic.</blockquote>
   @override
   void visitFunctionExpression(FunctionExpression node) {}
 
-  /**
-   * The Dart Language Specification, 12.29: <blockquote>An assignable expression of the form
-   * <i>e<sub>1</sub>[e<sub>2</sub>]</i> is evaluated as a method invocation of the operator method
-   * <i>[]</i> on <i>e<sub>1</sub></i> with argument <i>e<sub>2</sub></i>.</blockquote>
-   */
+  /// The Dart Language Specification, 12.29: <blockquote>An assignable expression of the form
+  /// <i>e<sub>1</sub>[e<sub>2</sub>]</i> is evaluated as a method invocation of the operator method
+  /// <i>[]</i> on <i>e<sub>1</sub></i> with argument <i>e<sub>2</sub></i>.</blockquote>
   @override
   void visitIndexExpression(IndexExpression node) {
     if (identical(node.realTarget.staticType, NeverTypeImpl.instance)) {
@@ -282,38 +243,34 @@
     _resolver.nullShortingTermination(node);
   }
 
-  /**
-   * The Dart Language Specification, 12.11.1: <blockquote>The static type of a new expression of
-   * either the form <i>new T.id(a<sub>1</sub>, &hellip;, a<sub>n</sub>)</i> or the form <i>new
-   * T(a<sub>1</sub>, &hellip;, a<sub>n</sub>)</i> is <i>T</i>.</blockquote>
-   *
-   * The Dart Language Specification, 12.11.2: <blockquote>The static type of a constant object
-   * expression of either the form <i>const T.id(a<sub>1</sub>, &hellip;, a<sub>n</sub>)</i> or the
-   * form <i>const T(a<sub>1</sub>, &hellip;, a<sub>n</sub>)</i> is <i>T</i>. </blockquote>
-   */
+  /// The Dart Language Specification, 12.11.1: <blockquote>The static type of a new expression of
+  /// either the form <i>new T.id(a<sub>1</sub>, &hellip;, a<sub>n</sub>)</i> or the form <i>new
+  /// T(a<sub>1</sub>, &hellip;, a<sub>n</sub>)</i> is <i>T</i>.</blockquote>
+  ///
+  /// The Dart Language Specification, 12.11.2: <blockquote>The static type of a constant object
+  /// expression of either the form <i>const T.id(a<sub>1</sub>, &hellip;, a<sub>n</sub>)</i> or the
+  /// form <i>const T(a<sub>1</sub>, &hellip;, a<sub>n</sub>)</i> is <i>T</i>. </blockquote>
   @override
   void visitInstanceCreationExpression(InstanceCreationExpression node) {
     _inferInstanceCreationExpression(node);
     recordStaticType(node, node.constructorName.type.type);
   }
 
-  /**
-   * <blockquote>
-   * An integer literal has static type \code{int}, unless the surrounding
-   * static context type is a type which \code{int} is not assignable to, and
-   * \code{double} is. In that case the static type of the integer literal is
-   * \code{double}.
-   * <blockquote>
-   *
-   * and
-   *
-   * <blockquote>
-   * If $e$ is an expression of the form \code{-$l$} where $l$ is an integer
-   * literal (\ref{numbers}) with numeric integer value $i$, then the static
-   * type of $e$ is the same as the static type of an integer literal with the
-   * same contexttype
-   * </blockquote>
-   */
+  /// <blockquote>
+  /// An integer literal has static type \code{int}, unless the surrounding
+  /// static context type is a type which \code{int} is not assignable to, and
+  /// \code{double} is. In that case the static type of the integer literal is
+  /// \code{double}.
+  /// <blockquote>
+  ///
+  /// and
+  ///
+  /// <blockquote>
+  /// If $e$ is an expression of the form \code{-$l$} where $l$ is an integer
+  /// literal (\ref{numbers}) with numeric integer value $i$, then the static
+  /// type of $e$ is the same as the static type of an integer literal with the
+  /// same contexttype
+  /// </blockquote>
   @override
   void visitIntegerLiteral(IntegerLiteral node) {
     // Check the parent context for negated integer literals.
@@ -328,12 +285,10 @@
     }
   }
 
-  /**
-   * The Dart Language Specification, 12.31: <blockquote>It is a static warning if <i>T</i> does not
-   * denote a type available in the current lexical scope.
-   *
-   * The static type of an is-expression is `bool`.</blockquote>
-   */
+  /// The Dart Language Specification, 12.31: <blockquote>It is a static warning if <i>T</i> does not
+  /// denote a type available in the current lexical scope.
+  ///
+  /// The static type of an is-expression is `bool`.</blockquote>
   @override
   void visitIsExpression(IsExpression node) {
     recordStaticType(node, _nonNullable(_typeProvider.boolType));
@@ -350,10 +305,8 @@
     recordStaticType(node, _getStaticType(expression));
   }
 
-  /**
-   * The Dart Language Specification, 12.2: <blockquote>The static type of `null` is bottom.
-   * </blockquote>
-   */
+  /// The Dart Language Specification, 12.2: <blockquote>The static type of `null` is bottom.
+  /// </blockquote>
   @override
   void visitNullLiteral(NullLiteral node) {
     recordStaticType(node, _typeProvider.nullType);
@@ -365,9 +318,7 @@
     recordStaticType(node, _getStaticType(expression));
   }
 
-  /**
-   * See [visitSimpleIdentifier].
-   */
+  /// See [visitSimpleIdentifier].
   @override
   void visitPrefixedIdentifier(PrefixedIdentifier node) {
     SimpleIdentifier prefixedIdentifier = node.identifier;
@@ -423,47 +374,45 @@
     }
   }
 
-  /**
-   * The Dart Language Specification, 12.13: <blockquote> Property extraction allows for a member of
-   * an object to be concisely extracted from the object. If <i>o</i> is an object, and if <i>m</i>
-   * is the name of a method member of <i>o</i>, then
-   * * <i>o.m</i> is defined to be equivalent to: <i>(r<sub>1</sub>, &hellip;, r<sub>n</sub>,
-   * {p<sub>1</sub> : d<sub>1</sub>, &hellip;, p<sub>k</sub> : d<sub>k</sub>}){return
-   * o.m(r<sub>1</sub>, &hellip;, r<sub>n</sub>, p<sub>1</sub>: p<sub>1</sub>, &hellip;,
-   * p<sub>k</sub>: p<sub>k</sub>);}</i> if <i>m</i> has required parameters <i>r<sub>1</sub>,
-   * &hellip;, r<sub>n</sub></i>, and named parameters <i>p<sub>1</sub> &hellip; p<sub>k</sub></i>
-   * with defaults <i>d<sub>1</sub>, &hellip;, d<sub>k</sub></i>.
-   * * <i>(r<sub>1</sub>, &hellip;, r<sub>n</sub>, [p<sub>1</sub> = d<sub>1</sub>, &hellip;,
-   * p<sub>k</sub> = d<sub>k</sub>]){return o.m(r<sub>1</sub>, &hellip;, r<sub>n</sub>,
-   * p<sub>1</sub>, &hellip;, p<sub>k</sub>);}</i> if <i>m</i> has required parameters
-   * <i>r<sub>1</sub>, &hellip;, r<sub>n</sub></i>, and optional positional parameters
-   * <i>p<sub>1</sub> &hellip; p<sub>k</sub></i> with defaults <i>d<sub>1</sub>, &hellip;,
-   * d<sub>k</sub></i>.
-   * Otherwise, if <i>m</i> is the name of a getter member of <i>o</i> (declared implicitly or
-   * explicitly) then <i>o.m</i> evaluates to the result of invoking the getter. </blockquote>
-   *
-   * The Dart Language Specification, 12.17: <blockquote> ... a getter invocation <i>i</i> of the
-   * form <i>e.m</i> ...
-   *
-   * Let <i>T</i> be the static type of <i>e</i>. It is a static type warning if <i>T</i> does not
-   * have a getter named <i>m</i>.
-   *
-   * The static type of <i>i</i> is the declared return type of <i>T.m</i>, if <i>T.m</i> exists;
-   * otherwise the static type of <i>i</i> is dynamic.
-   *
-   * ... a getter invocation <i>i</i> of the form <i>C.m</i> ...
-   *
-   * It is a static warning if there is no class <i>C</i> in the enclosing lexical scope of
-   * <i>i</i>, or if <i>C</i> does not declare, implicitly or explicitly, a getter named <i>m</i>.
-   *
-   * The static type of <i>i</i> is the declared return type of <i>C.m</i> if it exists or dynamic
-   * otherwise.
-   *
-   * ... a top-level getter invocation <i>i</i> of the form <i>m</i>, where <i>m</i> is an
-   * identifier ...
-   *
-   * The static type of <i>i</i> is the declared return type of <i>m</i>.</blockquote>
-   */
+  /// The Dart Language Specification, 12.13: <blockquote> Property extraction allows for a member of
+  /// an object to be concisely extracted from the object. If <i>o</i> is an object, and if <i>m</i>
+  /// is the name of a method member of <i>o</i>, then
+  /// * <i>o.m</i> is defined to be equivalent to: <i>(r<sub>1</sub>, &hellip;, r<sub>n</sub>,
+  /// {p<sub>1</sub> : d<sub>1</sub>, &hellip;, p<sub>k</sub> : d<sub>k</sub>}){return
+  /// o.m(r<sub>1</sub>, &hellip;, r<sub>n</sub>, p<sub>1</sub>: p<sub>1</sub>, &hellip;,
+  /// p<sub>k</sub>: p<sub>k</sub>);}</i> if <i>m</i> has required parameters <i>r<sub>1</sub>,
+  /// &hellip;, r<sub>n</sub></i>, and named parameters <i>p<sub>1</sub> &hellip; p<sub>k</sub></i>
+  /// with defaults <i>d<sub>1</sub>, &hellip;, d<sub>k</sub></i>.
+  /// * <i>(r<sub>1</sub>, &hellip;, r<sub>n</sub>, [p<sub>1</sub> = d<sub>1</sub>, &hellip;,
+  /// p<sub>k</sub> = d<sub>k</sub>]){return o.m(r<sub>1</sub>, &hellip;, r<sub>n</sub>,
+  /// p<sub>1</sub>, &hellip;, p<sub>k</sub>);}</i> if <i>m</i> has required parameters
+  /// <i>r<sub>1</sub>, &hellip;, r<sub>n</sub></i>, and optional positional parameters
+  /// <i>p<sub>1</sub> &hellip; p<sub>k</sub></i> with defaults <i>d<sub>1</sub>, &hellip;,
+  /// d<sub>k</sub></i>.
+  /// Otherwise, if <i>m</i> is the name of a getter member of <i>o</i> (declared implicitly or
+  /// explicitly) then <i>o.m</i> evaluates to the result of invoking the getter. </blockquote>
+  ///
+  /// The Dart Language Specification, 12.17: <blockquote> ... a getter invocation <i>i</i> of the
+  /// form <i>e.m</i> ...
+  ///
+  /// Let <i>T</i> be the static type of <i>e</i>. It is a static type warning if <i>T</i> does not
+  /// have a getter named <i>m</i>.
+  ///
+  /// The static type of <i>i</i> is the declared return type of <i>T.m</i>, if <i>T.m</i> exists;
+  /// otherwise the static type of <i>i</i> is dynamic.
+  ///
+  /// ... a getter invocation <i>i</i> of the form <i>C.m</i> ...
+  ///
+  /// It is a static warning if there is no class <i>C</i> in the enclosing lexical scope of
+  /// <i>i</i>, or if <i>C</i> does not declare, implicitly or explicitly, a getter named <i>m</i>.
+  ///
+  /// The static type of <i>i</i> is the declared return type of <i>C.m</i> if it exists or dynamic
+  /// otherwise.
+  ///
+  /// ... a top-level getter invocation <i>i</i> of the form <i>m</i>, where <i>m</i> is an
+  /// identifier ...
+  ///
+  /// The static type of <i>i</i> is the declared return type of <i>m</i>.</blockquote>
   @override
   void visitPropertyAccess(PropertyAccess node) {
     SimpleIdentifier propertyName = node.propertyName;
@@ -486,53 +435,49 @@
     }
   }
 
-  /**
-   * The Dart Language Specification, 12.9: <blockquote>The static type of a rethrow expression is
-   * bottom.</blockquote>
-   */
+  /// The Dart Language Specification, 12.9: <blockquote>The static type of a rethrow expression is
+  /// bottom.</blockquote>
   @override
   void visitRethrowExpression(RethrowExpression node) {
     recordStaticType(node, _typeProvider.bottomType);
   }
 
-  /**
-   * The Dart Language Specification, 12.30: <blockquote>Evaluation of an identifier expression
-   * <i>e</i> of the form <i>id</i> proceeds as follows:
-   *
-   * Let <i>d</i> be the innermost declaration in the enclosing lexical scope whose name is
-   * <i>id</i>. If no such declaration exists in the lexical scope, let <i>d</i> be the declaration
-   * of the inherited member named <i>id</i> if it exists.
-   * * If <i>d</i> is a class or type alias <i>T</i>, the value of <i>e</i> is the unique instance
-   * of class `Type` reifying <i>T</i>.
-   * * If <i>d</i> is a type parameter <i>T</i>, then the value of <i>e</i> is the value of the
-   * actual type argument corresponding to <i>T</i> that was passed to the generative constructor
-   * that created the current binding of this. We are assured that this is well defined, because if
-   * we were in a static member the reference to <i>T</i> would be a compile-time error.
-   * * If <i>d</i> is a library variable then:
-   * * If <i>d</i> is of one of the forms <i>var v = e<sub>i</sub>;</i>, <i>T v =
-   * e<sub>i</sub>;</i>, <i>final v = e<sub>i</sub>;</i>, <i>final T v = e<sub>i</sub>;</i>, and no
-   * value has yet been stored into <i>v</i> then the initializer expression <i>e<sub>i</sub></i> is
-   * evaluated. If, during the evaluation of <i>e<sub>i</sub></i>, the getter for <i>v</i> is
-   * referenced, a CyclicInitializationError is thrown. If the evaluation succeeded yielding an
-   * object <i>o</i>, let <i>r = o</i>, otherwise let <i>r = null</i>. In any case, <i>r</i> is
-   * stored into <i>v</i>. The value of <i>e</i> is <i>r</i>.
-   * * If <i>d</i> is of one of the forms <i>const v = e;</i> or <i>const T v = e;</i> the result
-   * of the getter is the value of the compile time constant <i>e</i>. Otherwise
-   * * <i>e</i> evaluates to the current binding of <i>id</i>.
-   * * If <i>d</i> is a local variable or formal parameter then <i>e</i> evaluates to the current
-   * binding of <i>id</i>.
-   * * If <i>d</i> is a static method, top level function or local function then <i>e</i>
-   * evaluates to the function defined by <i>d</i>.
-   * * If <i>d</i> is the declaration of a static variable or static getter declared in class
-   * <i>C</i>, then <i>e</i> is equivalent to the getter invocation <i>C.id</i>.
-   * * If <i>d</i> is the declaration of a top level getter, then <i>e</i> is equivalent to the
-   * getter invocation <i>id</i>.
-   * * Otherwise, if <i>e</i> occurs inside a top level or static function (be it function,
-   * method, getter, or setter) or variable initializer, evaluation of e causes a NoSuchMethodError
-   * to be thrown.
-   * * Otherwise <i>e</i> is equivalent to the property extraction <i>this.id</i>.
-   * </blockquote>
-   */
+  /// The Dart Language Specification, 12.30: <blockquote>Evaluation of an identifier expression
+  /// <i>e</i> of the form <i>id</i> proceeds as follows:
+  ///
+  /// Let <i>d</i> be the innermost declaration in the enclosing lexical scope whose name is
+  /// <i>id</i>. If no such declaration exists in the lexical scope, let <i>d</i> be the declaration
+  /// of the inherited member named <i>id</i> if it exists.
+  /// * If <i>d</i> is a class or type alias <i>T</i>, the value of <i>e</i> is the unique instance
+  /// of class `Type` reifying <i>T</i>.
+  /// * If <i>d</i> is a type parameter <i>T</i>, then the value of <i>e</i> is the value of the
+  /// actual type argument corresponding to <i>T</i> that was passed to the generative constructor
+  /// that created the current binding of this. We are assured that this is well defined, because if
+  /// we were in a static member the reference to <i>T</i> would be a compile-time error.
+  /// * If <i>d</i> is a library variable then:
+  /// * If <i>d</i> is of one of the forms <i>var v = e<sub>i</sub>;</i>, <i>T v =
+  /// e<sub>i</sub>;</i>, <i>final v = e<sub>i</sub>;</i>, <i>final T v = e<sub>i</sub>;</i>, and no
+  /// value has yet been stored into <i>v</i> then the initializer expression <i>e<sub>i</sub></i> is
+  /// evaluated. If, during the evaluation of <i>e<sub>i</sub></i>, the getter for <i>v</i> is
+  /// referenced, a CyclicInitializationError is thrown. If the evaluation succeeded yielding an
+  /// object <i>o</i>, let <i>r = o</i>, otherwise let <i>r = null</i>. In any case, <i>r</i> is
+  /// stored into <i>v</i>. The value of <i>e</i> is <i>r</i>.
+  /// * If <i>d</i> is of one of the forms <i>const v = e;</i> or <i>const T v = e;</i> the result
+  /// of the getter is the value of the compile time constant <i>e</i>. Otherwise
+  /// * <i>e</i> evaluates to the current binding of <i>id</i>.
+  /// * If <i>d</i> is a local variable or formal parameter then <i>e</i> evaluates to the current
+  /// binding of <i>id</i>.
+  /// * If <i>d</i> is a static method, top level function or local function then <i>e</i>
+  /// evaluates to the function defined by <i>d</i>.
+  /// * If <i>d</i> is the declaration of a static variable or static getter declared in class
+  /// <i>C</i>, then <i>e</i> is equivalent to the getter invocation <i>C.id</i>.
+  /// * If <i>d</i> is the declaration of a top level getter, then <i>e</i> is equivalent to the
+  /// getter invocation <i>id</i>.
+  /// * Otherwise, if <i>e</i> occurs inside a top level or static function (be it function,
+  /// method, getter, or setter) or variable initializer, evaluation of e causes a NoSuchMethodError
+  /// to be thrown.
+  /// * Otherwise <i>e</i> is equivalent to the property extraction <i>this.id</i>.
+  /// </blockquote>
   @override
   void visitSimpleIdentifier(SimpleIdentifier node) {
     Element element = node.staticElement;
@@ -581,19 +526,15 @@
     recordStaticType(node, staticType);
   }
 
-  /**
-   * The Dart Language Specification, 12.5: <blockquote>The static type of a string literal is
-   * `String`.</blockquote>
-   */
+  /// The Dart Language Specification, 12.5: <blockquote>The static type of a string literal is
+  /// `String`.</blockquote>
   @override
   void visitSimpleStringLiteral(SimpleStringLiteral node) {
     recordStaticType(node, _nonNullable(_typeProvider.stringType));
   }
 
-  /**
-   * The Dart Language Specification, 12.5: <blockquote>The static type of a string literal is
-   * `String`.</blockquote>
-   */
+  /// The Dart Language Specification, 12.5: <blockquote>The static type of a string literal is
+  /// `String`.</blockquote>
   @override
   void visitStringInterpolation(StringInterpolation node) {
     recordStaticType(node, _nonNullable(_typeProvider.stringType));
@@ -616,10 +557,8 @@
     recordStaticType(node, _nonNullable(_typeProvider.symbolType));
   }
 
-  /**
-   * The Dart Language Specification, 12.10: <blockquote>The static type of `this` is the
-   * interface of the immediately enclosing class.</blockquote>
-   */
+  /// The Dart Language Specification, 12.10: <blockquote>The static type of `this` is the
+  /// interface of the immediately enclosing class.</blockquote>
   @override
   void visitThisExpression(ThisExpression node) {
     if (_resolver.thisType == null) {
@@ -631,10 +570,8 @@
     }
   }
 
-  /**
-   * The Dart Language Specification, 12.8: <blockquote>The static type of a throw expression is
-   * bottom.</blockquote>
-   */
+  /// The Dart Language Specification, 12.8: <blockquote>The static type of a throw expression is
+  /// bottom.</blockquote>
   @override
   void visitThrowExpression(ThrowExpression node) {
     recordStaticType(node, _typeProvider.bottomType);
@@ -645,10 +582,8 @@
     _inferLocalVariableType(node, node.initializer);
   }
 
-  /**
-   * Set the static type of [node] to be the least upper bound of the static
-   * types of subexpressions [expr1] and [expr2].
-   */
+  /// Set the static type of [node] to be the least upper bound of the static
+  /// types of subexpressions [expr1] and [expr2].
   void _analyzeLeastUpperBound(
       Expression node, Expression expr1, Expression expr2,
       {bool read = false}) {
@@ -658,10 +593,8 @@
     _analyzeLeastUpperBoundTypes(node, staticType1, staticType2);
   }
 
-  /**
-   * Set the static type of [node] to be the least upper bound of the static
-   * types [staticType1] and [staticType2].
-   */
+  /// Set the static type of [node] to be the least upper bound of the static
+  /// types [staticType1] and [staticType2].
   void _analyzeLeastUpperBoundTypes(
       Expression node, DartType staticType1, DartType staticType2) {
     // TODO(brianwilkerson) Determine whether this can still happen.
@@ -679,20 +612,16 @@
     recordStaticType(node, staticType);
   }
 
-  /**
-   * Gets the definite type of expression, which can be used in cases where
-   * the most precise type is desired, for example computing the least upper
-   * bound.
-   *
-   * See [getExpressionType] for more information. Without strong mode, this is
-   * equivalent to [_getStaticType].
-   */
+  /// Gets the definite type of expression, which can be used in cases where
+  /// the most precise type is desired, for example computing the least upper
+  /// bound.
+  ///
+  /// See [getExpressionType] for more information. Without strong mode, this is
+  /// equivalent to [_getStaticType].
   DartType _getExpressionType(Expression expr, {bool read = false}) =>
       getExpressionType(expr, _typeSystem, _typeProvider, read: read);
 
-  /**
-   * Return the static type of the given [expression].
-   */
+  /// Return the static type of the given [expression].
   DartType _getStaticType(Expression expression, {bool read = false}) {
     DartType type;
     if (read) {
@@ -718,9 +647,7 @@
     return type;
   }
 
-  /**
-   * Return the type represented by the given type [annotation].
-   */
+  /// Return the type represented by the given type [annotation].
   DartType _getType(TypeAnnotation annotation) {
     DartType type = annotation.type;
     if (type == null) {
@@ -731,12 +658,10 @@
     return type;
   }
 
-  /**
-   * Return the type that should be recorded for a node that resolved to the given accessor.
-   *
-   * @param accessor the accessor that the node resolved to
-   * @return the type that should be recorded for a node that resolved to the given accessor
-   */
+  /// Return the type that should be recorded for a node that resolved to the given accessor.
+  ///
+  /// @param accessor the accessor that the node resolved to
+  /// @return the type that should be recorded for a node that resolved to the given accessor
   DartType _getTypeOfProperty(PropertyAccessorElement accessor) {
     FunctionType functionType = accessor.type;
     if (functionType == null) {
@@ -763,10 +688,8 @@
     return functionType.returnType;
   }
 
-  /**
-   * Given an instance creation of a possibly generic type, infer the type
-   * arguments using the current context type as well as the argument types.
-   */
+  /// Given an instance creation of a possibly generic type, infer the type
+  /// arguments using the current context type as well as the argument types.
   void _inferInstanceCreationExpression(InstanceCreationExpression node) {
     ConstructorName constructor = node.constructorName;
     ConstructorElement originalElement = constructor.staticElement;
@@ -822,12 +745,10 @@
     }
   }
 
-  /**
-   * Given a local variable declaration and its initializer, attempt to infer
-   * a type for the local variable declaration based on the initializer.
-   * Inference is only done if an explicit type is not present, and if
-   * inferring a type improves the type.
-   */
+  /// Given a local variable declaration and its initializer, attempt to infer
+  /// a type for the local variable declaration based on the initializer.
+  /// Inference is only done if an explicit type is not present, and if
+  /// inferring a type improves the type.
   void _inferLocalVariableType(
       VariableDeclaration node, Expression initializer) {
     AstNode parent = node.parent;
@@ -857,13 +778,11 @@
     }
   }
 
-  /**
-   * Given a property access [node] with static type [nodeType],
-   * and [id] is the property name being accessed, infer a type for the
-   * access itself and its constituent components if the access is to one of the
-   * methods or getters of the built in 'Object' type, and if the result type is
-   * a sealed type. Returns true if inference succeeded.
-   */
+  /// Given a property access [node] with static type [nodeType],
+  /// and [id] is the property name being accessed, infer a type for the
+  /// access itself and its constituent components if the access is to one of the
+  /// methods or getters of the built in 'Object' type, and if the result type is
+  /// a sealed type. Returns true if inference succeeded.
   bool _inferObjectAccess(
       Expression node, DartType nodeType, SimpleIdentifier id) {
     // If we have an access like `libraryPrefix.hashCode` don't infer it.
@@ -891,11 +810,9 @@
     return false;
   }
 
-  /**
-   * Given an uninstantiated generic function type, referenced by the
-   * [identifier] in the tear-off [expression], try to infer the instantiated
-   * generic function type from the surrounding context.
-   */
+  /// Given an uninstantiated generic function type, referenced by the
+  /// [identifier] in the tear-off [expression], try to infer the instantiated
+  /// generic function type from the surrounding context.
   DartType _inferTearOff(
     Expression expression,
     SimpleIdentifier identifier,
@@ -918,9 +835,7 @@
     return tearOffType;
   }
 
-  /**
-   * Return `true` if the given [node] is not a type literal.
-   */
+  /// Return `true` if the given [node] is not a type literal.
   bool _isExpressionIdentifier(Identifier node) {
     var parent = node.parent;
     if (node is SimpleIdentifier && node.inDeclarationContext()) {
@@ -941,10 +856,8 @@
     return true;
   }
 
-  /**
-   * Return the non-nullable variant of the [type] if NNBD is enabled, otherwise
-   * return the type itself.
-   */
+  /// Return the non-nullable variant of the [type] if NNBD is enabled, otherwise
+  /// return the type itself.
   DartType _nonNullable(DartType type) {
     if (_isNonNullableByDefault) {
       return _typeSystem.promoteToNonNull(type);
diff --git a/pkg/analyzer/lib/src/generated/testing/ast_test_factory.dart b/pkg/analyzer/lib/src/generated/testing/ast_test_factory.dart
index 2b9b822..8b8744a 100644
--- a/pkg/analyzer/lib/src/generated/testing/ast_test_factory.dart
+++ b/pkg/analyzer/lib/src/generated/testing/ast_test_factory.dart
@@ -14,18 +14,19 @@
 import 'package:analyzer/src/generated/utilities_dart.dart';
 import 'package:meta/meta.dart';
 
-/**
- * The class `AstTestFactory` defines utility methods that can be used to create AST nodes. The
- * nodes that are created are complete in the sense that all of the tokens that would have been
- * associated with the nodes by a parser are also created, but the token stream is not constructed.
- * None of the nodes are resolved.
- *
- * The general pattern is for the name of the factory method to be the same as the name of the class
- * of AST node being created. There are two notable exceptions. The first is for methods creating
- * nodes that are part of a cascade expression. These methods are all prefixed with 'cascaded'. The
- * second is places where a shorter name seemed unambiguous and easier to read, such as using
- * 'identifier' rather than 'prefixedIdentifier', or 'integer' rather than 'integerLiteral'.
- */
+/// The class `AstTestFactory` defines utility methods that can be used to
+/// create AST nodes. The nodes that are created are complete in the sense that
+/// all of the tokens that would have been
+/// associated with the nodes by a parser are also created, but the token stream
+/// is not constructed. None of the nodes are resolved.
+///
+/// The general pattern is for the name of the factory method to be the same as
+/// the name of the class of AST node being created. There are two notable
+/// exceptions. The first is for methods creating nodes that are part of a
+/// cascade expression. These methods are all prefixed with 'cascaded'. The
+/// second is places where a shorter name seemed unambiguous and easier to read,
+/// such as using 'identifier' rather than 'prefixedIdentifier', or 'integer'
+/// rather than 'integerLiteral'.
 class AstTestFactory {
   static AdjacentStrings adjacentStrings(List<StringLiteral> strings) =>
       astFactory.adjacentStrings(strings);
@@ -1320,13 +1321,11 @@
         types, TokenFactory.tokenFromType(TokenType.GT));
   }
 
-  /**
-   * Create a type name whose name has been resolved to the given [element] and
-   * whose type has been resolved to the type of the given element.
-   *
-   * <b>Note:</b> This method does not correctly handle class elements that have
-   * type parameters.
-   */
+  /// Create a type name whose name has been resolved to the given [element] and
+  /// whose type has been resolved to the type of the given element.
+  ///
+  /// <b>Note:</b> This method does not correctly handle class elements that
+  /// have type parameters.
   static TypeName typeName(ClassElement element,
       [List<TypeAnnotation> arguments]) {
     SimpleIdentifier name = identifier3(element.name);
diff --git a/pkg/analyzer/lib/src/generated/testing/element_factory.dart b/pkg/analyzer/lib/src/generated/testing/element_factory.dart
index 90c08eb..0b63323 100644
--- a/pkg/analyzer/lib/src/generated/testing/element_factory.dart
+++ b/pkg/analyzer/lib/src/generated/testing/element_factory.dart
@@ -13,25 +13,22 @@
 import 'package:analyzer/src/dart/analysis/session.dart';
 import 'package:analyzer/src/dart/element/element.dart';
 import 'package:analyzer/src/dart/element/type.dart';
+import 'package:analyzer/src/dart/element/type_system.dart';
 import 'package:analyzer/src/dart/resolver/variance.dart';
 import 'package:analyzer/src/generated/constant.dart';
 import 'package:analyzer/src/generated/engine.dart';
 import 'package:analyzer/src/generated/source.dart';
 import 'package:analyzer/src/generated/testing/ast_test_factory.dart';
-import 'package:analyzer/src/generated/type_system.dart';
 import 'package:analyzer/src/generated/utilities_dart.dart';
 import 'package:meta/meta.dart';
 import 'package:path/path.dart';
 
-/**
- * The class `ElementFactory` defines utility methods used to create elements for testing
- * purposes. The elements that are created are complete in the sense that as much of the element
- * model as can be created, given the provided information, has been created.
- */
+/// The class `ElementFactory` defines utility methods used to create elements
+/// for testing purposes. The elements that are created are complete in the
+/// sense that as much of the element model as can be created, given the
+/// provided information, has been created.
 class ElementFactory {
-  /**
-   * The element representing the class 'Object'.
-   */
+  /// The element representing the class 'Object'.
   static ClassElementImpl _objectElement;
   static InterfaceType _objectType;
 
@@ -82,7 +79,8 @@
     return element;
   }
 
-  static classTypeAlias(String typeName, InterfaceType superclassType,
+  static ClassElementImpl classTypeAlias(
+      String typeName, InterfaceType superclassType,
       [List<String> parameterNames]) {
     ClassElementImpl element =
         classElement(typeName, superclassType, parameterNames);
@@ -254,11 +252,9 @@
           Identifier name) =>
       FieldFormalParameterElementImpl(name.name, name.offset);
 
-  /**
-   * Destroy any static state retained by [ElementFactory].  This should be
-   * called from the `setUp` method of any tests that use [ElementFactory], in
-   * order to ensure that state is not shared between multiple tests.
-   */
+  /// Destroy any static state retained by [ElementFactory].  This should be
+  /// called from the `setUp` method of any tests that use [ElementFactory], in
+  /// order to ensure that state is not shared between multiple tests.
   static void flushStaticState() {
     _objectElement = null;
   }
diff --git a/pkg/analyzer/lib/src/generated/testing/element_search.dart b/pkg/analyzer/lib/src/generated/testing/element_search.dart
index 053724e..e0bfdbb1 100644
--- a/pkg/analyzer/lib/src/generated/testing/element_search.dart
+++ b/pkg/analyzer/lib/src/generated/testing/element_search.dart
@@ -6,9 +6,7 @@
 import 'package:analyzer/dart/ast/visitor.dart';
 import 'package:analyzer/dart/element/element.dart';
 
-/**
- * Search the [unit] for the [Element]s with the given [name].
- */
+/// Search the [unit] for the [Element]s with the given [name].
 List<Element> findElementsByName(CompilationUnit unit, String name) {
   var finder = _ElementsByNameFinder(name);
   unit.accept(finder);
@@ -22,7 +20,7 @@
   _ElementsByNameFinder(this.name);
 
   @override
-  visitSimpleIdentifier(SimpleIdentifier node) {
+  void visitSimpleIdentifier(SimpleIdentifier node) {
     if (node.name == name && node.inDeclarationContext()) {
       elements.add(node.staticElement);
     }
diff --git a/pkg/analyzer/lib/src/generated/testing/node_search.dart b/pkg/analyzer/lib/src/generated/testing/node_search.dart
index 92743c7..9a2b15d 100644
--- a/pkg/analyzer/lib/src/generated/testing/node_search.dart
+++ b/pkg/analyzer/lib/src/generated/testing/node_search.dart
@@ -5,9 +5,7 @@
 import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/ast/visitor.dart';
 
-/**
- * Search the [unit] for declared [SimpleIdentifier]s with the given [name].
- */
+/// Search the [unit] for declared [SimpleIdentifier]s with the given [name].
 List<SimpleIdentifier> findDeclaredIdentifiersByName(
     CompilationUnit unit, String name) {
   var finder = _DeclaredIdentifiersByNameFinder(name);
@@ -22,7 +20,7 @@
   _DeclaredIdentifiersByNameFinder(this.name);
 
   @override
-  visitSimpleIdentifier(SimpleIdentifier node) {
+  void visitSimpleIdentifier(SimpleIdentifier node) {
     if (node.name == name && node.inDeclarationContext()) {
       identifiers.add(node);
     }
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 e47a635..7db4ea0 100644
--- a/pkg/analyzer/lib/src/generated/testing/test_type_provider.dart
+++ b/pkg/analyzer/lib/src/generated/testing/test_type_provider.dart
@@ -11,10 +11,8 @@
 import 'package:analyzer/src/generated/source.dart';
 import 'package:analyzer/src/test_utilities/mock_sdk_elements.dart';
 
-/**
- * A type provider that can be used by tests without creating the element model
- * for the core library.
- */
+/// A type provider that can be used by tests without creating the element model
+/// for the core library.
 class TestTypeProvider extends TypeProviderImpl {
   factory TestTypeProvider() {
     var analysisContext = _MockAnalysisContext();
@@ -41,7 +39,7 @@
   final SourceFactory sourceFactory = _MockSourceFactory();
 
   @override
-  noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation);
+  dynamic noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation);
 }
 
 class _MockAnalysisSession implements AnalysisSessionImpl {
@@ -49,7 +47,7 @@
   final ClassHierarchy classHierarchy = ClassHierarchy();
 
   @override
-  noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation);
+  dynamic noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation);
 }
 
 class _MockSource implements Source {
@@ -65,7 +63,7 @@
   String get fullName => uri.path;
 
   @override
-  noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation);
+  dynamic noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation);
 }
 
 class _MockSourceFactory implements SourceFactory {
@@ -76,5 +74,5 @@
   }
 
   @override
-  noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation);
+  dynamic noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation);
 }
diff --git a/pkg/analyzer/lib/src/generated/testing/token_factory.dart b/pkg/analyzer/lib/src/generated/testing/token_factory.dart
index 4f10dfe..71dabc7 100644
--- a/pkg/analyzer/lib/src/generated/testing/token_factory.dart
+++ b/pkg/analyzer/lib/src/generated/testing/token_factory.dart
@@ -5,9 +5,7 @@
 import 'package:analyzer/dart/ast/token.dart';
 import 'package:analyzer/src/dart/ast/token.dart';
 
-/**
- * A set of utility methods that can be used to create tokens.
- */
+/// A set of utility methods that can be used to create tokens.
 class TokenFactory {
   static Token tokenFromKeyword(Keyword keyword) => KeywordToken(keyword, 0);
 
diff --git a/pkg/analyzer/lib/src/generated/timestamped_data.dart b/pkg/analyzer/lib/src/generated/timestamped_data.dart
index 7084cbd..5fa8b35 100644
--- a/pkg/analyzer/lib/src/generated/timestamped_data.dart
+++ b/pkg/analyzer/lib/src/generated/timestamped_data.dart
@@ -2,23 +2,15 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-/**
- * Analysis data for which we have a modification time.
- */
+/// Analysis data for which we have a modification time.
 class TimestampedData<E> {
-  /**
-   * The modification time of the source from which the data was created.
-   */
+  /// The modification time of the source from which the data was created.
   final int modificationTime;
 
-  /**
-   * The data that was created from the source.
-   */
+  /// The data that was created from the source.
   final E data;
 
-  /**
-   * Initialize a newly created holder to associate the given [data] with the
-   * given [modificationTime].
-   */
+  /// Initialize a newly created holder to associate the given [data] with the
+  /// given [modificationTime].
   TimestampedData(this.modificationTime, this.data);
 }
diff --git a/pkg/analyzer/lib/src/generated/type_promotion_manager.dart b/pkg/analyzer/lib/src/generated/type_promotion_manager.dart
index a6ba19d..2ed4d3e 100644
--- a/pkg/analyzer/lib/src/generated/type_promotion_manager.dart
+++ b/pkg/analyzer/lib/src/generated/type_promotion_manager.dart
@@ -8,7 +8,7 @@
 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/src/generated/resolver.dart';
+import 'package:analyzer/src/dart/element/type_system.dart';
 import 'package:analyzer/src/generated/variable_type_provider.dart';
 
 /// Instances of the class `TypePromotionManager` manage the ability to promote
diff --git a/pkg/analyzer/lib/src/generated/type_system.dart b/pkg/analyzer/lib/src/generated/type_system.dart
index 7fd31c8..c457420 100644
--- a/pkg/analyzer/lib/src/generated/type_system.dart
+++ b/pkg/analyzer/lib/src/generated/type_system.dart
@@ -2,1554 +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 'dart:collection';
+@Deprecated("Use package:analyzer/src/dart/element/type_system.dart instead")
+library type_system_generated;
 
-import 'package:analyzer/dart/ast/ast.dart' show AstNode;
-import 'package:analyzer/dart/ast/token.dart' show TokenType;
-import 'package:analyzer/dart/element/element.dart';
-import 'package:analyzer/dart/element/null_safety_understanding_flag.dart';
-import 'package:analyzer/dart/element/nullability_suffix.dart';
-import 'package:analyzer/dart/element/type.dart';
-import 'package:analyzer/dart/element/type_provider.dart';
-import 'package:analyzer/dart/element/type_system.dart' as public;
-import 'package:analyzer/error/listener.dart' show ErrorReporter;
-import 'package:analyzer/src/dart/element/element.dart';
-import 'package:analyzer/src/dart/element/generic_inferrer.dart';
-import 'package:analyzer/src/dart/element/greatest_lower_bound.dart';
-import 'package:analyzer/src/dart/element/least_upper_bound.dart';
-import 'package:analyzer/src/dart/element/normalize.dart';
-import 'package:analyzer/src/dart/element/nullability_eliminator.dart';
-import 'package:analyzer/src/dart/element/runtime_type_equality.dart';
-import 'package:analyzer/src/dart/element/subtype.dart';
-import 'package:analyzer/src/dart/element/top_merge.dart';
-import 'package:analyzer/src/dart/element/type.dart';
-import 'package:analyzer/src/dart/element/type_algebra.dart';
-import 'package:analyzer/src/dart/element/type_schema.dart';
-import 'package:analyzer/src/dart/element/type_schema_elimination.dart';
-import 'package:meta/meta.dart';
-
-/**
- * The interface `TypeSystem` defines the behavior of an object representing
- * the type system.  This provides a common location to put methods that act on
- * types but may need access to more global data structures, and it paves the
- * way for a possible future where we may wish to make the type system
- * pluggable.
- */
-// TODO(brianwilkerson) Rename this class to TypeSystemImpl.
-abstract class TypeSystem implements public.TypeSystem {
-  /// If `true`, then NNBD type rules should be used.
-  /// If `false`, then legacy type rules should be used.
-  final bool isNonNullableByDefault;
-
-  TypeSystem({@required this.isNonNullableByDefault});
-
-  /**
-   * The provider of types for the system
-   */
-  TypeProvider get typeProvider;
-
-  @override
-  TypeImpl flatten(DartType type) {
-    if (identical(type, UnknownInferredType.instance)) {
-      return type;
-    }
-
-    // if T is S? then flatten(T) = flatten(S)?
-    // if T is S* then flatten(T) = flatten(S)*
-    NullabilitySuffix nullabilitySuffix = type.nullabilitySuffix;
-    if (nullabilitySuffix != NullabilitySuffix.none) {
-      var S = (type as TypeImpl).withNullability(NullabilitySuffix.none);
-      return flatten(S).withNullability(nullabilitySuffix);
-    }
-
-    if (type is InterfaceType) {
-      // Implement the cases:
-      //  - "If T = FutureOr<S> then flatten(T) = S."
-      //  - "If T = Future<S> then flatten(T) = S."
-      if (type.isDartAsyncFutureOr || type.isDartAsyncFuture) {
-        return type.typeArguments.isNotEmpty
-            ? type.typeArguments[0]
-            : DynamicTypeImpl.instance;
-      }
-      // Implement the case: "Otherwise if T <: Future then let S be a type
-      // such that T << Future<S> and for all R, if T << Future<R> then S << R.
-      // Then flatten(T) = S."
-      //
-      // In other words, given the set of all types R such that T << Future<R>,
-      // let S be the most specific of those types, if any such S exists.
-      //
-      // Since we only care about the most specific type, it is sufficient to
-      // look at the types appearing as a parameter to Future in the type
-      // hierarchy of T.  We don't need to consider the supertypes of those
-      // types, since they are by definition less specific.
-      List<DartType> candidateTypes =
-          _searchTypeHierarchyForFutureTypeParameters(type);
-      DartType flattenResult =
-          InterfaceTypeImpl.findMostSpecificType(candidateTypes, this);
-      if (flattenResult != null) {
-        return flattenResult;
-      }
-    }
-    // Implement the case: "In any other circumstance, flatten(T) = T."
-    return type;
-  }
-
-  List<InterfaceType> gatherMixinSupertypeConstraintsForInference(
-      ClassElement mixinElement) {
-    List<InterfaceType> candidates;
-    if (mixinElement.isMixin) {
-      candidates = mixinElement.superclassConstraints;
-    } else {
-      candidates = [mixinElement.supertype];
-      candidates.addAll(mixinElement.mixins);
-      if (mixinElement.isMixinApplication) {
-        candidates.removeLast();
-      }
-    }
-    return candidates
-        .where((type) => type.element.typeParameters.isNotEmpty)
-        .toList();
-  }
-
-  /**
-   * Compute the least upper bound of two types.
-   */
-  DartType getLeastUpperBound(DartType type1, DartType type2);
-
-  /**
-   * Given a [DartType] [type], instantiate it with its bounds.
-   *
-   * The behavior of this method depends on the type system, for example, in
-   * classic Dart `dynamic` will be used for all type arguments, whereas
-   * strong mode prefers the actual bound type if it was specified.
-   */
-  DartType instantiateToBounds(DartType type, {List<bool> hasError});
-
-  /**
-   * Given a [DartType] [type] and a list of types
-   * [typeArguments], instantiate the type formals with the
-   * provided actuals.  If [type] is not a parameterized type,
-   * no instantiation is done.
-   */
-  DartType instantiateType(DartType type, List<DartType> typeArguments) {
-    if (type is FunctionType) {
-      return type.instantiate(typeArguments);
-    } else if (type is InterfaceTypeImpl) {
-      // TODO(scheglov) Use `ClassElement.instantiate()`, don't use raw types.
-      return type.element.instantiate(
-        typeArguments: typeArguments,
-        nullabilitySuffix: type.nullabilitySuffix,
-      );
-    } else {
-      return type;
-    }
-  }
-
-  /**
-   * Given uninstantiated [typeFormals], instantiate them to their bounds.
-   */
-  List<DartType> instantiateTypeFormalsToBounds(
-      List<TypeParameterElement> typeFormals,
-      {List<bool> hasError});
-
-  /**
-   * Return `true` if the [leftType] is assignable to the [rightType] (that is,
-   * if leftType <==> rightType).
-   */
-  @override
-  bool isAssignableTo(DartType leftType, DartType rightType);
-
-  /**
-   * Return `true` if the [leftType] is more specific than the [rightType]
-   * (that is, if leftType << rightType), as defined in the Dart language spec.
-   *
-   * In strong mode, this is equivalent to [isSubtypeOf].
-   */
-  @Deprecated('Use isSubtypeOf() instead.')
-  bool isMoreSpecificThan(DartType leftType, DartType rightType);
-
-  @override
-  bool isNonNullable(DartType type) {
-    if (type.isDynamic || type.isVoid || type.isDartCoreNull) {
-      return false;
-    } else if (type.nullabilitySuffix == NullabilitySuffix.question) {
-      return false;
-    } else if (type.isDartAsyncFutureOr) {
-      return isNonNullable((type as InterfaceType).typeArguments[0]);
-    } else if (type is TypeParameterType) {
-      return isNonNullable(type.bound);
-    }
-    return true;
-  }
-
-  @override
-  bool isNullable(DartType type) {
-    if (type.isDynamic || type.isVoid || type.isDartCoreNull) {
-      return true;
-    } else if (type.nullabilitySuffix == NullabilitySuffix.question) {
-      return true;
-    } else if (type.isDartAsyncFutureOr) {
-      return isNullable((type as InterfaceType).typeArguments[0]);
-    }
-    return false;
-  }
-
-  @override
-  bool isPotentiallyNonNullable(DartType type) => !isNullable(type);
-
-  @override
-  bool isPotentiallyNullable(DartType type) => !isNonNullable(type);
-
-  @override
-  bool isStrictlyNonNullable(DartType type) {
-    if (type.isDynamic || type.isVoid || type.isDartCoreNull) {
-      return false;
-    } else if (type.nullabilitySuffix != NullabilitySuffix.none) {
-      return false;
-    } else if (type is InterfaceType && type.isDartAsyncFutureOr) {
-      return isStrictlyNonNullable(type.typeArguments[0]);
-    } else if (type is TypeParameterType) {
-      return isStrictlyNonNullable(type.bound);
-    }
-    return true;
-  }
-
-  /**
-   * Return `true` if the [leftType] is a subtype of the [rightType] (that is,
-   * if leftType <: rightType).
-   */
-  @override
-  bool isSubtypeOf(DartType leftType, DartType rightType);
-
-  @override
-  DartType leastUpperBound(DartType leftType, DartType rightType) {
-    if (!NullSafetyUnderstandingFlag.isEnabled) {
-      leftType = NullabilityEliminator.perform(typeProvider, leftType);
-      rightType = NullabilityEliminator.perform(typeProvider, rightType);
-    }
-    return getLeastUpperBound(leftType, rightType);
-  }
-
-  /// Returns a nullable version of [type].  The result would be equivalent to
-  /// the union `type | Null` (if we supported union types).
-  DartType makeNullable(TypeImpl type) {
-    // TODO(paulberry): handle type parameter types
-    return type.withNullability(NullabilitySuffix.question);
-  }
-
-  /// Attempts to find the appropriate substitution for the [mixinElement]
-  /// type parameters that can be applied to [srcTypes] to make it equal to
-  /// [destTypes].  If no such substitution can be found, `null` is returned.
-  List<DartType> matchSupertypeConstraints(
-    ClassElement mixinElement,
-    List<DartType> srcTypes,
-    List<DartType> destTypes,
-  ) {
-    var typeParameters = mixinElement.typeParameters;
-    var inferrer = GenericInferrer(this, typeParameters);
-    for (int i = 0; i < srcTypes.length; i++) {
-      inferrer.constrainReturnType(srcTypes[i], destTypes[i]);
-      inferrer.constrainReturnType(destTypes[i], srcTypes[i]);
-    }
-
-    var inferredTypes = inferrer.infer(
-      typeParameters,
-      considerExtendsClause: false,
-    );
-    var substitution = Substitution.fromPairs(typeParameters, inferredTypes);
-
-    for (int i = 0; i < srcTypes.length; i++) {
-      if (substitution.substituteType(srcTypes[i]) != destTypes[i]) {
-        // Failed to find an appropriate substitution
-        return null;
-      }
-    }
-
-    return inferredTypes;
-  }
-
-  /**
-   * Searches the superinterfaces of [type] for implementations of [genericType]
-   * and returns the most specific type argument used for that generic type.
-   *
-   * For a more general/robust solution, use [InterfaceTypeImpl.asInstanceOf].
-   *
-   * For example, given [type] `List<int>` and [genericType] `Iterable<T>`,
-   * returns [int].
-   *
-   * Returns `null` if [type] does not implement [genericType].
-   */
-  DartType mostSpecificTypeArgument(DartType type, DartType genericType) {
-    if (type is! InterfaceType) return null;
-    if (genericType is! InterfaceType) return null;
-
-    var asInstanceOf = (type as InterfaceTypeImpl)
-        .asInstanceOf((genericType as InterfaceType).element);
-
-    if (asInstanceOf != null) {
-      return asInstanceOf.typeArguments[0];
-    }
-
-    return null;
-  }
-
-  /// Returns a non-nullable version of [type].  This is equivalent to the
-  /// operation `NonNull` defined in the spec.
-  @override
-  DartType promoteToNonNull(DartType type) {
-    if (type.isDartCoreNull) return NeverTypeImpl.instance;
-
-    if (type is TypeParameterTypeImpl) {
-      var element = type.element;
-
-      // NonNull(X & T) = X & NonNull(T)
-      if (type.promotedBound != null) {
-        var promotedBound = promoteToNonNull(type.promotedBound);
-        return TypeParameterTypeImpl(
-          element: element,
-          nullabilitySuffix: NullabilitySuffix.none,
-          promotedBound: promotedBound,
-        );
-      }
-
-      // NonNull(X) = X & NonNull(B), where B is the bound of X
-      var promotedBound = element.bound != null
-          ? promoteToNonNull(element.bound)
-          : typeProvider.objectType;
-      if (identical(promotedBound, element.bound)) {
-        promotedBound = null;
-      }
-      return TypeParameterTypeImpl(
-        element: element,
-        nullabilitySuffix: NullabilitySuffix.none,
-        promotedBound: promotedBound,
-      );
-    }
-
-    return (type as TypeImpl).withNullability(NullabilitySuffix.none);
-  }
-
-  /**
-   * Determine the type of a binary expression with the given [operator] whose
-   * left operand has the type [leftType] and whose right operand has the type
-   * [rightType], given that resolution has so far produced the [currentType].
-   */
-  DartType refineBinaryExpressionType(DartType leftType, TokenType operator,
-      DartType rightType, DartType currentType) {
-    // bool
-    if (operator == TokenType.AMPERSAND_AMPERSAND ||
-        operator == TokenType.BAR_BAR ||
-        operator == TokenType.EQ_EQ ||
-        operator == TokenType.BANG_EQ) {
-      if (isNonNullableByDefault) {
-        return promoteToNonNull(typeProvider.boolType);
-      }
-      return typeProvider.boolType;
-    }
-    if (leftType.isDartCoreInt) {
-      // int op double
-      if (operator == TokenType.MINUS ||
-          operator == TokenType.PERCENT ||
-          operator == TokenType.PLUS ||
-          operator == TokenType.STAR ||
-          operator == TokenType.MINUS_EQ ||
-          operator == TokenType.PERCENT_EQ ||
-          operator == TokenType.PLUS_EQ ||
-          operator == TokenType.STAR_EQ) {
-        if (rightType.isDartCoreDouble) {
-          InterfaceTypeImpl doubleType = typeProvider.doubleType;
-          if (isNonNullableByDefault) {
-            return promoteToNonNull(doubleType);
-          }
-          return doubleType;
-        }
-      }
-      // int op int
-      if (operator == TokenType.MINUS ||
-          operator == TokenType.PERCENT ||
-          operator == TokenType.PLUS ||
-          operator == TokenType.STAR ||
-          operator == TokenType.TILDE_SLASH ||
-          operator == TokenType.MINUS_EQ ||
-          operator == TokenType.PERCENT_EQ ||
-          operator == TokenType.PLUS_EQ ||
-          operator == TokenType.STAR_EQ ||
-          operator == TokenType.TILDE_SLASH_EQ ||
-          operator == TokenType.PLUS_PLUS ||
-          operator == TokenType.MINUS_MINUS) {
-        if (rightType.isDartCoreInt) {
-          InterfaceTypeImpl intType = typeProvider.intType;
-          if (isNonNullableByDefault) {
-            return promoteToNonNull(intType);
-          }
-          return intType;
-        }
-      }
-    }
-    // default
-    return currentType;
-  }
-
-  @override
-  DartType resolveToBound(DartType type) {
-    if (type is TypeParameterTypeImpl) {
-      var element = type.element;
-
-      var bound = element.bound;
-      if (bound == null) {
-        return typeProvider.objectType;
-      }
-
-      NullabilitySuffix nullabilitySuffix = type.nullabilitySuffix;
-      NullabilitySuffix newNullabilitySuffix;
-      if (nullabilitySuffix == NullabilitySuffix.question ||
-          bound.nullabilitySuffix == NullabilitySuffix.question) {
-        newNullabilitySuffix = NullabilitySuffix.question;
-      } else if (nullabilitySuffix == NullabilitySuffix.star ||
-          bound.nullabilitySuffix == NullabilitySuffix.star) {
-        newNullabilitySuffix = NullabilitySuffix.star;
-      } else {
-        newNullabilitySuffix = NullabilitySuffix.none;
-      }
-
-      var resolved = resolveToBound(bound) as TypeImpl;
-      return resolved.withNullability(newNullabilitySuffix);
-    }
-
-    return type;
-  }
-
-  /**
-   * Tries to promote from the first type from the second type, and returns the
-   * promoted type if it succeeds, otherwise null.
-   */
-  DartType tryPromoteToType(DartType to, DartType from);
-
-  /**
-   * Given a [DartType] type, return the [TypeParameterElement]s corresponding
-   * to its formal type parameters (if any).
-   *
-   * @param type the type whose type arguments are to be returned
-   * @return the type arguments associated with the given type
-   */
-  List<TypeParameterElement> typeFormalsAsElements(DartType type) {
-    if (type is FunctionType) {
-      return type.typeFormals;
-    } else if (type is InterfaceType) {
-      return type.element.typeParameters;
-    } else {
-      return const <TypeParameterElement>[];
-    }
-  }
-
-  /**
-   * Starting from the given [type], search its class hierarchy for types of the
-   * form Future<R>, and return a list of the resulting R's.
-   */
-  List<DartType> _searchTypeHierarchyForFutureTypeParameters(DartType type) {
-    List<DartType> result = <DartType>[];
-    HashSet<ClassElement> visitedClasses = HashSet<ClassElement>();
-    void recurse(InterfaceTypeImpl type) {
-      if (type.isDartAsyncFuture && type.typeArguments.isNotEmpty) {
-        result.add(type.typeArguments[0]);
-      }
-      if (visitedClasses.add(type.element)) {
-        if (type.superclass != null) {
-          recurse(type.superclass);
-        }
-        for (InterfaceType interface in type.interfaces) {
-          recurse(interface);
-        }
-        visitedClasses.remove(type.element);
-      }
-    }
-
-    recurse(type);
-    return result;
-  }
-}
-
-/**
- * The [public.TypeSystem] implementation.
- */
-class TypeSystemImpl extends TypeSystem {
-  /**
-   * False if implicit casts should always be disallowed.
-   *
-   * This affects the behavior of [isAssignableTo].
-   */
-  bool implicitCasts;
-
-  /// A flag indicating whether inference failures are allowed, off by default.
-  ///
-  /// This option is experimental and subject to change.
-  bool strictInference;
-
-  @override
-  final TypeProvider typeProvider;
-
-  /// The cached instance of `Object?`.
-  InterfaceTypeImpl _objectQuestion;
-
-  /// The cached instance of `Object*`.
-  InterfaceTypeImpl _objectStar;
-
-  /// The cached instance of `Object!`.
-  InterfaceTypeImpl _objectNone;
-
-  /// The cached instance of `Null!`.
-  InterfaceTypeImpl _nullNone;
-
-  GreatestLowerBoundHelper _greatestLowerBoundHelper;
-  LeastUpperBoundHelper _leastUpperBoundHelper;
-
-  /// The implementation of the subtyping relation.
-  SubtypeHelper _subtypeHelper;
-
-  TypeSystemImpl({
-    @required this.implicitCasts,
-    @required bool isNonNullableByDefault,
-    @required this.strictInference,
-    @required this.typeProvider,
-  }) : super(isNonNullableByDefault: isNonNullableByDefault) {
-    _greatestLowerBoundHelper = GreatestLowerBoundHelper(this);
-    _leastUpperBoundHelper = LeastUpperBoundHelper(this);
-    _subtypeHelper = SubtypeHelper(this);
-  }
-
-  InterfaceTypeImpl get nullNone =>
-      _nullNone ??= (typeProvider.nullType as TypeImpl)
-          .withNullability(NullabilitySuffix.none);
-
-  InterfaceTypeImpl get objectNone =>
-      _objectNone ??= (typeProvider.objectType as TypeImpl)
-          .withNullability(NullabilitySuffix.none);
-
-  InterfaceTypeImpl get objectQuestion =>
-      _objectQuestion ??= (typeProvider.objectType as TypeImpl)
-          .withNullability(NullabilitySuffix.question);
-
-  InterfaceTypeImpl get objectStar =>
-      _objectStar ??= (typeProvider.objectType as TypeImpl)
-          .withNullability(NullabilitySuffix.star);
-
-  /// Returns true iff the type [t] accepts function types, and requires an
-  /// implicit coercion if interface types with a `call` method are passed in.
-  ///
-  /// This is true for:
-  /// - all function types
-  /// - the special type `Function` that is a supertype of all function types
-  /// - `FutureOr<T>` where T is one of the two cases above.
-  ///
-  /// Note that this returns false if [t] is a top type such as Object.
-  bool acceptsFunctionType(DartType t) {
-    if (t == null) return false;
-    if (t.isDartAsyncFutureOr) {
-      return acceptsFunctionType((t as InterfaceType).typeArguments[0]);
-    }
-    return t is FunctionType || t.isDartCoreFunction;
-  }
-
-  bool anyParameterType(FunctionType ft, bool Function(DartType t) predicate) {
-    return ft.parameters.any((p) => predicate(p.type));
-  }
-
-  /**
-   * Eliminates type variables from the context [type], replacing them with
-   * `Null` or `Object` as appropriate.
-   *
-   * For example in `List<T> list = const []`, the context type for inferring
-   * the list should be changed from `List<T>` to `List<Null>` so the constant
-   * doesn't depend on the type variables `T` (because it can't be canonicalized
-   * at compile time, as `T` is unknown).
-   *
-   * Conceptually this is similar to the "least closure", except instead of
-   * eliminating `_` ([UnknownInferredType]) it eliminates all type variables
-   * ([TypeParameterType]).
-   *
-   * The equivalent CFE code can be found in the `TypeVariableEliminator` class.
-   */
-  DartType eliminateTypeVariables(DartType type) {
-    if (isNonNullableByDefault) {
-      return _TypeVariableEliminator(
-        objectQuestion,
-        NeverTypeImpl.instance,
-      ).substituteType(type);
-    } else {
-      return _TypeVariableEliminator(
-        objectNone,
-        typeProvider.nullType,
-      ).substituteType(type);
-    }
-  }
-
-  /// Defines the "remainder" of `T` when `S` has been removed from
-  /// consideration by an instance check.  This operation is used for type
-  /// promotion during flow analysis.
-  DartType factor(DartType T, DartType S) {
-    // * If T <: S then Never
-    if (isSubtypeOf2(T, S)) {
-      return NeverTypeImpl.instance;
-    }
-
-    var T_nullability = T.nullabilitySuffix;
-
-    // * Else if T is R? and Null <: S then factor(R, S)
-    // * Else if T is R? then factor(R, S)?
-    if (T_nullability == NullabilitySuffix.question) {
-      var R = (T as TypeImpl).withNullability(NullabilitySuffix.none);
-      var factor_RS = factor(R, S) as TypeImpl;
-      if (isSubtypeOf2(nullNone, S)) {
-        return factor_RS;
-      } else {
-        return factor_RS.withNullability(NullabilitySuffix.question);
-      }
-    }
-
-    // * Else if T is R* and Null <: S then factor(R, S)
-    // * Else if T is R* then factor(R, S)*
-    if (T_nullability == NullabilitySuffix.star) {
-      var R = (T as TypeImpl).withNullability(NullabilitySuffix.none);
-      var factor_RS = factor(R, S) as TypeImpl;
-      if (isSubtypeOf2(nullNone, S)) {
-        return factor_RS;
-      } else {
-        return factor_RS.withNullability(NullabilitySuffix.star);
-      }
-    }
-
-    // * Else if T is FutureOr<R> and Future<R> <: S then factor(R, S)
-    // * Else if T is FutureOr<R> and R <: S then factor(Future<R>, S)
-    if (T is InterfaceType && T.isDartAsyncFutureOr) {
-      var R = T.typeArguments[0];
-      var future_R = typeProvider.futureType2(R);
-      if (isSubtypeOf2(future_R, S)) {
-        return factor(R, S);
-      }
-      if (isSubtypeOf2(R, S)) {
-        return factor(future_R, S);
-      }
-    }
-
-    return T;
-  }
-
-  /// Compute "future value type" of [T].
-  ///
-  /// https://github.com/dart-lang/language/
-  /// See `nnbd/feature-specification.md`
-  /// See `#the-future-value-type-of-an-asynchronous-non-generator-function`
-  DartType futureValueType(DartType T) {
-    // futureValueType(`S?`) = futureValueType(`S`), for all `S`.
-    // futureValueType(`S*`) = futureValueType(`S`), for all `S`.
-    if (T.nullabilitySuffix != NullabilitySuffix.none) {
-      var S = (T as TypeImpl).withNullability(NullabilitySuffix.none);
-      return futureValueType(S);
-    }
-
-    // futureValueType(Future<`S`>) = `S`, for all `S`.
-    // futureValueType(FutureOr<`S`>) = `S`, for all `S`.
-    if (T is InterfaceType) {
-      if (T.isDartAsyncFuture || T.isDartAsyncFutureOr) {
-        return T.typeArguments[0];
-      }
-    }
-
-    // futureValueType(`dynamic`) = `dynamic`.
-    if (identical(T, DynamicTypeImpl.instance)) {
-      return T;
-    }
-
-    // futureValueType(`void`) = `void`.
-    if (identical(T, VoidTypeImpl.instance)) {
-      return T;
-    }
-
-    // Otherwise, for all `S`, futureValueType(`S`) = `Object?`.
-    return objectQuestion;
-  }
-
-  /// Given a type t, if t is an interface type with a call method
-  /// defined, return the function type for the call method, otherwise
-  /// return null.
-  FunctionType getCallMethodType(DartType t) {
-    if (t is InterfaceType) {
-      return t.lookUpMethod2('call', t.element.library)?.type;
-    }
-    return null;
-  }
-
-  /// Computes the greatest lower bound of [T1] and [T2].
-  DartType getGreatestLowerBound(DartType T1, DartType T2) {
-    return _greatestLowerBoundHelper.getGreatestLowerBound(T1, T2);
-  }
-
-  /**
-   * Compute the least upper bound of two types.
-   *
-   * https://github.com/dart-lang/language
-   * See `resources/type-system/upper-lower-bounds.md`
-   */
-  @override
-  DartType getLeastUpperBound(DartType T1, DartType T2) {
-    return _leastUpperBoundHelper.getLeastUpperBound(T1, T2);
-  }
-
-  /// Returns the greatest closure of the given type [schema] with respect to `_`.
-  ///
-  /// The greatest closure of a type schema `P` with respect to `_` is defined as
-  /// `P` with every covariant occurrence of `_` replaced with `Null`, and every
-  /// contravariant occurrence of `_` replaced with `Object`.
-  ///
-  /// If the schema contains no instances of `_`, the original schema object is
-  /// returned to avoid unnecessary allocation.
-  ///
-  /// Note that the closure of a type schema is a proper type.
-  ///
-  /// Note that the greatest closure of a type schema is always a supertype of
-  /// any type which matches the schema.
-  DartType greatestClosure(DartType schema) {
-    if (isNonNullableByDefault) {
-      return TypeSchemaEliminationVisitor.run(
-        topType: objectQuestion,
-        bottomType: NeverTypeImpl.instance,
-        isLeastClosure: false,
-        schema: schema,
-      );
-    } else {
-      return TypeSchemaEliminationVisitor.run(
-        topType: DynamicTypeImpl.instance,
-        bottomType: typeProvider.nullType,
-        isLeastClosure: false,
-        schema: schema,
-      );
-    }
-  }
-
-  /**
-   * Given a generic function type `F<T0, T1, ... Tn>` and a context type C,
-   * infer an instantiation of F, such that `F<S0, S1, ..., Sn>` <: C.
-   *
-   * This is similar to [inferGenericFunctionOrType], but the return type is
-   * also considered as part of the solution.
-   *
-   * If this function is called with a [contextType] that is also
-   * uninstantiated, or a [fnType] that is already instantiated, it will have
-   * no effect and return `null`.
-   */
-  List<DartType> inferFunctionTypeInstantiation(
-      FunctionType contextType, FunctionType fnType,
-      {ErrorReporter errorReporter, AstNode errorNode}) {
-    if (contextType.typeFormals.isNotEmpty || fnType.typeFormals.isEmpty) {
-      return const <DartType>[];
-    }
-
-    // Create a TypeSystem that will allow certain type parameters to be
-    // inferred. It will optimistically assume these type parameters can be
-    // subtypes (or supertypes) as necessary, and track the constraints that
-    // are implied by this.
-    var inferrer = GenericInferrer(this, fnType.typeFormals);
-    inferrer.constrainGenericFunctionInContext(fnType, contextType);
-
-    // Infer and instantiate the resulting type.
-    return inferrer.infer(
-      fnType.typeFormals,
-      errorReporter: errorReporter,
-      errorNode: errorNode,
-    );
-  }
-
-  /// Infers type arguments for a generic type, function, method, or
-  /// list/map literal, using the downward context type as well as the
-  /// argument types if available.
-  ///
-  /// For example, given a function type with generic type parameters, this
-  /// infers the type parameters from the actual argument types, and returns the
-  /// instantiated function type.
-  ///
-  /// Concretely, given a function type with parameter types P0, P1, ... Pn,
-  /// result type R, and generic type parameters T0, T1, ... Tm, use the
-  /// argument types A0, A1, ... An to solve for the type parameters.
-  ///
-  /// For each parameter Pi, we want to ensure that Ai <: Pi. We can do this by
-  /// running the subtype algorithm, and when we reach a type parameter Tj,
-  /// recording the lower or upper bound it must satisfy. At the end, all
-  /// constraints can be combined to determine the type.
-  ///
-  /// All constraints on each type parameter Tj are tracked, as well as where
-  /// they originated, so we can issue an error message tracing back to the
-  /// argument values, type parameter "extends" clause, or the return type
-  /// context.
-  List<DartType> inferGenericFunctionOrType({
-    ClassElement genericClass,
-    @required List<TypeParameterElement> typeParameters,
-    @required List<ParameterElement> parameters,
-    @required DartType declaredReturnType,
-    @required List<DartType> argumentTypes,
-    @required DartType contextReturnType,
-    ErrorReporter errorReporter,
-    AstNode errorNode,
-    bool downwards = false,
-    bool isConst = false,
-  }) {
-    if (typeParameters.isEmpty) {
-      return null;
-    }
-
-    // Create a TypeSystem that will allow certain type parameters to be
-    // inferred. It will optimistically assume these type parameters can be
-    // subtypes (or supertypes) as necessary, and track the constraints that
-    // are implied by this.
-    var inferrer = GenericInferrer(this, typeParameters);
-
-    if (contextReturnType != null) {
-      if (isConst) {
-        contextReturnType = eliminateTypeVariables(contextReturnType);
-      }
-      inferrer.constrainReturnType(declaredReturnType, contextReturnType);
-    }
-
-    for (int i = 0; i < argumentTypes.length; i++) {
-      // Try to pass each argument to each parameter, recording any type
-      // parameter bounds that were implied by this assignment.
-      inferrer.constrainArgument(
-        argumentTypes[i],
-        parameters[i].type,
-        parameters[i].name,
-        genericClass: genericClass,
-      );
-    }
-
-    return inferrer.infer(
-      typeParameters,
-      errorReporter: errorReporter,
-      errorNode: errorNode,
-      downwardsInferPhase: downwards,
-    );
-  }
-
-  /**
-   * Given a [DartType] [type], if [type] is an uninstantiated
-   * parameterized type then instantiate the parameters to their
-   * bounds. See the issue for the algorithm description.
-   *
-   * https://github.com/dart-lang/sdk/issues/27526#issuecomment-260021397
-   *
-   * TODO(scheglov) Move this method to elements for classes, typedefs,
-   * and generic functions; compute lazily and cache.
-   */
-  @override
-  DartType instantiateToBounds(DartType type,
-      {List<bool> hasError, Map<TypeParameterElement, DartType> knownTypes}) {
-    List<TypeParameterElement> typeFormals = typeFormalsAsElements(type);
-    List<DartType> arguments = instantiateTypeFormalsToBounds(typeFormals,
-        hasError: hasError, knownTypes: knownTypes);
-    if (arguments == null) {
-      return type;
-    }
-
-    return instantiateType(type, arguments);
-  }
-
-  @override
-  DartType instantiateToBounds2({
-    ClassElement classElement,
-    FunctionTypeAliasElement functionTypeAliasElement,
-    @required NullabilitySuffix nullabilitySuffix,
-  }) {
-    if (classElement != null) {
-      var typeParameters = classElement.typeParameters;
-      var typeArguments = _defaultTypeArguments(typeParameters);
-      var type = classElement.instantiate(
-        typeArguments: typeArguments,
-        nullabilitySuffix: nullabilitySuffix,
-      );
-      type = toLegacyType(type);
-      return type;
-    } else if (functionTypeAliasElement != null) {
-      var typeParameters = functionTypeAliasElement.typeParameters;
-      var typeArguments = _defaultTypeArguments(typeParameters);
-      var type = functionTypeAliasElement.instantiate(
-        typeArguments: typeArguments,
-        nullabilitySuffix: nullabilitySuffix,
-      );
-      type = toLegacyType(type);
-      return type;
-    } else {
-      throw ArgumentError('Missing element');
-    }
-  }
-
-  /**
-   * Given uninstantiated [typeFormals], instantiate them to their bounds.
-   * See the issue for the algorithm description.
-   *
-   * https://github.com/dart-lang/sdk/issues/27526#issuecomment-260021397
-   */
-  @override
-  List<DartType> instantiateTypeFormalsToBounds(
-      List<TypeParameterElement> typeFormals,
-      {List<bool> hasError,
-      Map<TypeParameterElement, DartType> knownTypes}) {
-    int count = typeFormals.length;
-    if (count == 0) {
-      return const <DartType>[];
-    }
-
-    Set<TypeParameterElement> all = <TypeParameterElement>{};
-    // all ground
-    Map<TypeParameterElement, DartType> defaults = knownTypes ?? {};
-    // not ground
-    Map<TypeParameterElement, DartType> partials = {};
-
-    for (TypeParameterElement typeParameter in typeFormals) {
-      all.add(typeParameter);
-      if (!defaults.containsKey(typeParameter)) {
-        if (typeParameter.bound == null) {
-          defaults[typeParameter] = DynamicTypeImpl.instance;
-        } else {
-          partials[typeParameter] = typeParameter.bound;
-        }
-      }
-    }
-
-    List<TypeParameterElement> getFreeParameters(DartType rootType) {
-      List<TypeParameterElement> parameters;
-      Set<DartType> visitedTypes = HashSet<DartType>();
-
-      void appendParameters(DartType type) {
-        if (type == null) {
-          return;
-        }
-        if (visitedTypes.contains(type)) {
-          return;
-        }
-        visitedTypes.add(type);
-        if (type is TypeParameterType) {
-          var element = type.element;
-          if (all.contains(element)) {
-            parameters ??= <TypeParameterElement>[];
-            parameters.add(element);
-          }
-        } else {
-          if (type is FunctionType) {
-            appendParameters(type.returnType);
-            type.parameters.map((p) => p.type).forEach(appendParameters);
-          } else if (type is InterfaceType) {
-            type.typeArguments.forEach(appendParameters);
-          }
-        }
-      }
-
-      appendParameters(rootType);
-      return parameters;
-    }
-
-    bool hasProgress = true;
-    while (hasProgress) {
-      hasProgress = false;
-      for (TypeParameterElement parameter in partials.keys) {
-        DartType value = partials[parameter];
-        List<TypeParameterElement> freeParameters = getFreeParameters(value);
-        if (freeParameters == null) {
-          defaults[parameter] = value;
-          partials.remove(parameter);
-          hasProgress = true;
-          break;
-        } else if (freeParameters.every(defaults.containsKey)) {
-          defaults[parameter] =
-              Substitution.fromMap(defaults).substituteType(value);
-          partials.remove(parameter);
-          hasProgress = true;
-          break;
-        }
-      }
-    }
-
-    // If we stopped making progress, and not all types are ground,
-    // then the whole type is malbounded and an error should be reported
-    // if errors are requested, and a partially completed type should
-    // be returned.
-    if (partials.isNotEmpty) {
-      if (hasError != null) {
-        hasError[0] = true;
-      }
-      var domain = defaults.keys.toList();
-      var range = defaults.values.toList();
-      // Build a substitution Phi mapping each uncompleted type variable to
-      // dynamic, and each completed type variable to its default.
-      for (TypeParameterElement parameter in partials.keys) {
-        domain.add(parameter);
-        range.add(DynamicTypeImpl.instance);
-      }
-      // Set the default for an uncompleted type variable (T extends B)
-      // to be Phi(B)
-      for (TypeParameterElement parameter in partials.keys) {
-        defaults[parameter] = Substitution.fromPairs(domain, range)
-            .substituteType(partials[parameter]);
-      }
-    }
-
-    List<DartType> orderedArguments =
-        typeFormals.map((p) => defaults[p]).toList();
-    return orderedArguments;
-  }
-
-  @override
-  bool isAssignableTo(DartType fromType, DartType toType) {
-    if (!NullSafetyUnderstandingFlag.isEnabled) {
-      fromType = NullabilityEliminator.perform(typeProvider, fromType);
-      toType = NullabilityEliminator.perform(typeProvider, toType);
-    }
-    return isAssignableTo2(fromType, toType);
-  }
-
-  bool isAssignableTo2(DartType fromType, DartType toType) {
-    // An actual subtype
-    if (isSubtypeOf2(fromType, toType)) {
-      return true;
-    }
-
-    // A call method tearoff
-    if (fromType is InterfaceType &&
-        !isNullable(fromType) &&
-        acceptsFunctionType(toType)) {
-      var callMethodType = getCallMethodType(fromType);
-      if (callMethodType != null && isAssignableTo2(callMethodType, toType)) {
-        return true;
-      }
-    }
-
-    // First make sure --no-implicit-casts disables all downcasts, including
-    // dynamic casts.
-    if (!implicitCasts) {
-      return false;
-    }
-
-    // Now handle NNBD default behavior, where we disable non-dynamic downcasts.
-    if (isNonNullableByDefault) {
-      return fromType.isDynamic;
-    }
-
-    // Don't allow implicit downcasts between function types
-    // and call method objects, as these will almost always fail.
-    if (fromType is FunctionType && getCallMethodType(toType) != null) {
-      return false;
-    }
-
-    // Don't allow a non-generic function where a generic one is expected. The
-    // former wouldn't know how to handle type arguments being passed to it.
-    // TODO(rnystrom): This same check also exists in FunctionTypeImpl.relate()
-    // but we don't always reliably go through that code path. This should be
-    // cleaned up to avoid the redundancy.
-    if (fromType is FunctionType &&
-        toType is FunctionType &&
-        fromType.typeFormals.isEmpty &&
-        toType.typeFormals.isNotEmpty) {
-      return false;
-    }
-
-    // If the subtype relation goes the other way, allow the implicit downcast.
-    if (isSubtypeOf2(toType, fromType)) {
-      // TODO(leafp,jmesserly): we emit warnings/hints for these in
-      // src/task/strong/checker.dart, which is a bit inconsistent. That
-      // code should be handled into places that use isAssignableTo, such as
-      // ErrorVerifier.
-      return true;
-    }
-
-    return false;
-  }
-
-  /// Return `true`  for things in the equivalence class of `Never`.
-  bool isBottom(DartType type) {
-    // BOTTOM(Never) is true
-    if (identical(type, NeverTypeImpl.instance)) {
-      return true;
-    }
-
-    // BOTTOM(X&T) is true iff BOTTOM(T)
-    // BOTTOM(X extends T) is true iff BOTTOM(T)
-    if (type is TypeParameterTypeImpl) {
-      var T = type.promotedBound;
-      if (T != null) {
-        return isBottom(T);
-      }
-
-      T = type.element.bound;
-      if (T != null) {
-        return isBottom(T);
-      }
-    }
-
-    // BOTTOM(T) is false otherwise
-    return false;
-  }
-
-  /// Defines an (almost) total order on bottom and `Null` types. This does not
-  /// currently consistently order two different type variables with the same
-  /// bound.
-  bool isMoreBottom(DartType T, DartType S) {
-    var T_impl = T as TypeImpl;
-    var S_impl = S as TypeImpl;
-
-    var T_nullability = T_impl.nullabilitySuffix;
-    var S_nullability = S_impl.nullabilitySuffix;
-
-    // MOREBOTTOM(Never, T) = true
-    if (identical(T, NeverTypeImpl.instance)) {
-      return true;
-    }
-
-    // MOREBOTTOM(T, Never) = false
-    if (identical(S, NeverTypeImpl.instance)) {
-      return false;
-    }
-
-    // MOREBOTTOM(Null, T) = true
-    if (T_nullability == NullabilitySuffix.none && T.isDartCoreNull) {
-      return true;
-    }
-
-    // MOREBOTTOM(T, Null) = false
-    if (S_nullability == NullabilitySuffix.none && S.isDartCoreNull) {
-      return false;
-    }
-
-    // MOREBOTTOM(T?, S?) = MOREBOTTOM(T, S)
-    if (T_nullability == NullabilitySuffix.question &&
-        S_nullability == NullabilitySuffix.question) {
-      var T2 = T_impl.withNullability(NullabilitySuffix.none);
-      var S2 = S_impl.withNullability(NullabilitySuffix.none);
-      return isMoreBottom(T2, S2);
-    }
-
-    // MOREBOTTOM(T, S?) = true
-    if (S_nullability == NullabilitySuffix.question) {
-      return true;
-    }
-
-    // MOREBOTTOM(T?, S) = false
-    if (T_nullability == NullabilitySuffix.question) {
-      return false;
-    }
-
-    // MOREBOTTOM(T*, S*) = MOREBOTTOM(T, S)
-    if (T_nullability == NullabilitySuffix.star &&
-        S_nullability == NullabilitySuffix.star) {
-      var T2 = T_impl.withNullability(NullabilitySuffix.none);
-      var S2 = S_impl.withNullability(NullabilitySuffix.none);
-      return isMoreBottom(T2, S2);
-    }
-
-    // MOREBOTTOM(T, S*) = true
-    if (S_nullability == NullabilitySuffix.star) {
-      return true;
-    }
-
-    // MOREBOTTOM(T*, S) = false
-    if (T_nullability == NullabilitySuffix.star) {
-      return false;
-    }
-
-    // Type parameters.
-    if (T is TypeParameterTypeImpl && S is TypeParameterTypeImpl) {
-      // We have eliminated the possibility that T_nullability or S_nullability
-      // is anything except none by this point.
-      assert(T_nullability == NullabilitySuffix.none);
-      assert(S_nullability == NullabilitySuffix.none);
-      var T_element = T.element;
-      var S_element = S.element;
-
-      // MOREBOTTOM(X&T, Y&S) = MOREBOTTOM(T, S)
-      var T_promotedBound = T.promotedBound;
-      var S_promotedBound = S.promotedBound;
-      if (T_promotedBound != null && S_promotedBound != null) {
-        return isMoreBottom(T_promotedBound, S_promotedBound);
-      }
-
-      // MOREBOTTOM(X&T, S) = true
-      if (T_promotedBound != null) {
-        return true;
-      }
-
-      // MOREBOTTOM(T, Y&S) = false
-      if (S_promotedBound != null) {
-        return false;
-      }
-
-      // MOREBOTTOM(X extends T, Y extends S) = MOREBOTTOM(T, S)
-      var T_bound = T_element.bound;
-      var S_bound = S_element.bound;
-      // The invariant of the larger algorithm that this is only called with
-      // types that satisfy `BOTTOM(T)` or `NULL(T)`, and all such types, if
-      // they are type variables, have bounds which themselves are
-      // `BOTTOM` or `NULL` types.
-      assert(T_bound != null);
-      assert(S_bound != null);
-      return isMoreBottom(T_bound, S_bound);
-    }
-
-    return false;
-  }
-
-  @override
-  bool isMoreSpecificThan(DartType t1, DartType t2) => isSubtypeOf2(t1, t2);
-
-  /// Defines a total order on top and Object types.
-  bool isMoreTop(DartType T, DartType S) {
-    var T_impl = T as TypeImpl;
-    var S_impl = S as TypeImpl;
-
-    var T_nullability = T_impl.nullabilitySuffix;
-    var S_nullability = S_impl.nullabilitySuffix;
-
-    // MORETOP(void, S) = true
-    if (identical(T, VoidTypeImpl.instance)) {
-      return true;
-    }
-
-    // MORETOP(T, void) = false
-    if (identical(S, VoidTypeImpl.instance)) {
-      return false;
-    }
-
-    // MORETOP(dynamic, S) = true
-    if (identical(T, DynamicTypeImpl.instance)) {
-      return true;
-    }
-
-    // MORETOP(T, dynamic) = false
-    if (identical(S, DynamicTypeImpl.instance)) {
-      return false;
-    }
-
-    // MORETOP(Object, S) = true
-    if (T_nullability == NullabilitySuffix.none && T.isDartCoreObject) {
-      return true;
-    }
-
-    // MORETOP(T, Object) = false
-    if (S_nullability == NullabilitySuffix.none && S.isDartCoreObject) {
-      return false;
-    }
-
-    // MORETOP(T*, S*) = MORETOP(T, S)
-    if (T_nullability == NullabilitySuffix.star &&
-        S_nullability == NullabilitySuffix.star) {
-      var T2 = T_impl.withNullability(NullabilitySuffix.none);
-      var S2 = S_impl.withNullability(NullabilitySuffix.none);
-      return isMoreTop(T2, S2);
-    }
-
-    // MORETOP(T, S*) = true
-    if (S_nullability == NullabilitySuffix.star) {
-      return true;
-    }
-
-    // MORETOP(T*, S) = false
-    if (T_nullability == NullabilitySuffix.star) {
-      return false;
-    }
-
-    // MORETOP(T?, S?) = MORETOP(T, S)
-    if (T_nullability == NullabilitySuffix.question &&
-        S_nullability == NullabilitySuffix.question) {
-      var T2 = T_impl.withNullability(NullabilitySuffix.none);
-      var S2 = S_impl.withNullability(NullabilitySuffix.none);
-      return isMoreTop(T2, S2);
-    }
-
-    // MORETOP(T, S?) = true
-    if (S_nullability == NullabilitySuffix.question) {
-      return true;
-    }
-
-    // MORETOP(T?, S) = false
-    if (T_nullability == NullabilitySuffix.question) {
-      return false;
-    }
-
-    // MORETOP(FutureOr<T>, FutureOr<S>) = MORETOP(T, S)
-    if (T is InterfaceType &&
-        T.isDartAsyncFutureOr &&
-        S is InterfaceType &&
-        S.isDartAsyncFutureOr) {
-      assert(T_nullability == NullabilitySuffix.none);
-      assert(S_nullability == NullabilitySuffix.none);
-      var T2 = T.typeArguments[0];
-      var S2 = S.typeArguments[0];
-      return isMoreTop(T2, S2);
-    }
-
-    return false;
-  }
-
-  /// Return `true` for things in the equivalence class of `Null`.
-  bool isNull(DartType type) {
-    var typeImpl = type as TypeImpl;
-    var nullabilitySuffix = typeImpl.nullabilitySuffix;
-
-    // NULL(Null) is true
-    // Also includes `Null?` and `Null*` from the rules below.
-    if (type.isDartCoreNull) {
-      return true;
-    }
-
-    // NULL(T?) is true iff NULL(T) or BOTTOM(T)
-    // NULL(T*) is true iff NULL(T) or BOTTOM(T)
-    // Cases for `Null?` and `Null*` are already checked above.
-    if (nullabilitySuffix == NullabilitySuffix.question ||
-        nullabilitySuffix == NullabilitySuffix.star) {
-      var T = typeImpl.withNullability(NullabilitySuffix.none);
-      return isBottom(T);
-    }
-
-    // NULL(T) is false otherwise
-    return false;
-  }
-
-  /// Return `true` for any type which is in the equivalence class of `Object`.
-  bool isObject(DartType type) {
-    TypeImpl typeImpl = type;
-    if (typeImpl.nullabilitySuffix != NullabilitySuffix.none) {
-      return false;
-    }
-
-    // OBJECT(Object) is true
-    if (type.isDartCoreObject) {
-      return true;
-    }
-
-    // OBJECT(FutureOr<T>) is OBJECT(T)
-    if (type is InterfaceType && type.isDartAsyncFutureOr) {
-      var T = type.typeArguments[0];
-      return isObject(T);
-    }
-
-    // OBJECT(T) is false otherwise
-    return false;
-  }
-
-  /// Check if [leftType] is a subtype of [rightType].
-  ///
-  /// Implements:
-  /// https://github.com/dart-lang/language
-  /// See `resources/type-system/subtyping.md`
-  @override
-  bool isSubtypeOf(DartType leftType, DartType rightType) {
-    if (!NullSafetyUnderstandingFlag.isEnabled) {
-      leftType = NullabilityEliminator.perform(typeProvider, leftType);
-      rightType = NullabilityEliminator.perform(typeProvider, rightType);
-    }
-    return isSubtypeOf2(leftType, rightType);
-  }
-
-  bool isSubtypeOf2(DartType leftType, DartType rightType) {
-    return _subtypeHelper.isSubtypeOf(leftType, rightType);
-  }
-
-  /// Return `true` for any type which is in the equivalence class of top types.
-  bool isTop(DartType type) {
-    // TOP(?) is true
-    if (identical(type, UnknownInferredType.instance)) {
-      return true;
-    }
-
-    // TOP(dynamic) is true
-    if (identical(type, DynamicTypeImpl.instance)) {
-      return true;
-    }
-
-    // TOP(void) is true
-    if (identical(type, VoidTypeImpl.instance)) {
-      return true;
-    }
-
-    var typeImpl = type as TypeImpl;
-    var nullabilitySuffix = typeImpl.nullabilitySuffix;
-
-    // TOP(T?) is true iff TOP(T) or OBJECT(T)
-    // TOP(T*) is true iff TOP(T) or OBJECT(T)
-    if (nullabilitySuffix == NullabilitySuffix.question ||
-        nullabilitySuffix == NullabilitySuffix.star) {
-      var T = typeImpl.withNullability(NullabilitySuffix.none);
-      return isTop(T) || isObject(T);
-    }
-
-    // TOP(FutureOr<T>) is TOP(T)
-    if (type is InterfaceType && type.isDartAsyncFutureOr) {
-      assert(nullabilitySuffix == NullabilitySuffix.none);
-      var T = type.typeArguments[0];
-      return isTop(T);
-    }
-
-    // TOP(T) is false otherwise
-    return false;
-  }
-
-  /// Returns the least closure of the given type [schema] with respect to `_`.
-  ///
-  /// The least closure of a type schema `P` with respect to `_` is defined as
-  /// `P` with every covariant occurrence of `_` replaced with `Object`, an
-  /// every contravariant occurrence of `_` replaced with `Null`.
-  ///
-  /// If the schema contains no instances of `_`, the original schema object is
-  /// returned to avoid unnecessary allocation.
-  ///
-  /// Note that the closure of a type schema is a proper type.
-  ///
-  /// Note that the least closure of a type schema is always a subtype of any
-  /// type which matches the schema.
-  DartType leastClosure(DartType schema) {
-    if (isNonNullableByDefault) {
-      return TypeSchemaEliminationVisitor.run(
-        topType: objectQuestion,
-        bottomType: NeverTypeImpl.instance,
-        isLeastClosure: true,
-        schema: schema,
-      );
-    } else {
-      return TypeSchemaEliminationVisitor.run(
-        topType: DynamicTypeImpl.instance,
-        bottomType: typeProvider.nullType,
-        isLeastClosure: true,
-        schema: schema,
-      );
-    }
-  }
-
-  /**
-   * Compute the canonical representation of [T].
-   *
-   * https://github.com/dart-lang/language
-   * See `resources/type-system/normalization.md`
-   */
-  DartType normalize(DartType T) {
-    return NormalizeHelper(this).normalize(T);
-  }
-
-  @override
-  DartType refineBinaryExpressionType(DartType leftType, TokenType operator,
-      DartType rightType, DartType currentType) {
-    if (leftType is TypeParameterType && leftType.bound.isDartCoreNum) {
-      if (rightType == leftType || rightType.isDartCoreInt) {
-        if (operator == TokenType.PLUS ||
-            operator == TokenType.MINUS ||
-            operator == TokenType.STAR ||
-            operator == TokenType.PLUS_EQ ||
-            operator == TokenType.MINUS_EQ ||
-            operator == TokenType.STAR_EQ ||
-            operator == TokenType.PLUS_PLUS ||
-            operator == TokenType.MINUS_MINUS) {
-          if (isNonNullableByDefault) {
-            return promoteToNonNull(leftType as TypeImpl);
-          }
-          return leftType;
-        }
-      }
-      if (rightType.isDartCoreDouble) {
-        if (operator == TokenType.PLUS ||
-            operator == TokenType.MINUS ||
-            operator == TokenType.STAR ||
-            operator == TokenType.SLASH) {
-          InterfaceTypeImpl doubleType = typeProvider.doubleType;
-          if (isNonNullableByDefault) {
-            return promoteToNonNull(doubleType);
-          }
-          return doubleType;
-        }
-      }
-      return currentType;
-    }
-    return super
-        .refineBinaryExpressionType(leftType, operator, rightType, currentType);
-  }
-
-  /// Return `true` if runtime types [T1] and [T2] are equal.
-  ///
-  /// nnbd/feature-specification.md#runtime-type-equality-operator
-  bool runtimeTypesEqual(DartType T1, DartType T2) {
-    return RuntimeTypeEqualityHelper(this).equal(T1, T2);
-  }
-
-  DartType toLegacyType(DartType type) {
-    if (isNonNullableByDefault) return type;
-    return NullabilityEliminator.perform(typeProvider, type);
-  }
-
-  /**
-   * Merges two types into a single type.
-   * Compute the canonical representation of [T].
-   *
-   * https://github.com/dart-lang/language/
-   * See `accepted/future-releases/nnbd/feature-specification.md`
-   * See `#classes-defined-in-opted-in-libraries`
-   */
-  DartType topMerge(DartType T, DartType S) {
-    return TopMergeHelper(this).topMerge(T, S);
-  }
-
-  @override
-  DartType tryPromoteToType(DartType to, DartType from) {
-    // Allow promoting to a subtype, for example:
-    //
-    //     f(Base b) {
-    //       if (b is SubTypeOfBase) {
-    //         // promote `b` to SubTypeOfBase for this block
-    //       }
-    //     }
-    //
-    // This allows the variable to be used wherever the supertype (here `Base`)
-    // is expected, while gaining a more precise type.
-    if (isSubtypeOf2(to, from)) {
-      return to;
-    }
-    // For a type parameter `T extends U`, allow promoting the upper bound
-    // `U` to `S` where `S <: U`, yielding a type parameter `T extends S`.
-    if (from is TypeParameterType) {
-      if (isSubtypeOf2(to, from.bound ?? DynamicTypeImpl.instance)) {
-        var declaration = from.element.declaration;
-        return TypeParameterTypeImpl(
-          element: declaration,
-          nullabilitySuffix: from.nullabilitySuffix,
-          promotedBound: to,
-        );
-      }
-    }
-
-    return null;
-  }
-
-  void updateOptions({
-    @required bool implicitCasts,
-    @required bool strictInference,
-  }) {
-    this.implicitCasts = implicitCasts;
-    this.strictInference = strictInference;
-  }
-
-  List<DartType> _defaultTypeArguments(
-    List<TypeParameterElement> typeParameters,
-  ) {
-    return typeParameters.map((typeParameter) {
-      var typeParameterImpl = typeParameter as TypeParameterElementImpl;
-      return typeParameterImpl.defaultType;
-    }).toList();
-  }
-}
-
-class _TypeVariableEliminator extends Substitution {
-  final DartType _topType;
-  final DartType _bottomType;
-
-  _TypeVariableEliminator(
-    this._topType,
-    this._bottomType,
-  );
-
-  @override
-  DartType getSubstitute(TypeParameterElement parameter, bool upperBound) {
-    return upperBound ? _bottomType : _topType;
-  }
-}
+export 'package:analyzer/src/dart/element/type_system.dart';
diff --git a/pkg/analyzer/lib/src/generated/utilities_collection.dart b/pkg/analyzer/lib/src/generated/utilities_collection.dart
index 74fbeba..59758e4 100644
--- a/pkg/analyzer/lib/src/generated/utilities_collection.dart
+++ b/pkg/analyzer/lib/src/generated/utilities_collection.dart
@@ -4,9 +4,7 @@
 
 import 'package:analyzer/src/generated/java_core.dart';
 
-/**
- * Returns `true` if a and b contain equal elements in the same order.
- */
+/// Returns `true` if a and b contain equal elements in the same order.
 bool listsEqual(List a, List b) {
   // TODO(rnystrom): package:collection also implements this, and analyzer
   // already transitively depends on that package. Consider using it instead.
@@ -27,30 +25,22 @@
   return true;
 }
 
-/**
- * Methods for operating on integers as if they were arrays of booleans. These
- * arrays can be indexed by either integers or by enumeration constants.
- */
+/// Methods for operating on integers as if they were arrays of booleans. These
+/// arrays can be indexed by either integers or by enumeration constants.
 class BooleanArray {
-  /**
-   * Return the value of the element of the given [array] at the given [index].
-   */
+  /// Return the value of the element of the given [array] at the given [index].
   static bool get(int array, int index) {
     _checkIndex(index);
     return (array & (1 << index)) > 0;
   }
 
-  /**
-   * Return the value of the element at the given index.
-   */
+  /// Return the value of the element at the given index.
   @deprecated
   static bool getEnum<E extends Enum<E>>(int array, Enum<E> index) =>
       get(array, index.ordinal);
 
-  /**
-   * Set the value of the element of the given [array] at the given [index] to
-   * the given [value].
-   */
+  /// Set the value of the element of the given [array] at the given [index] to
+  /// the given [value].
   static int set(int array, int index, bool value) {
     _checkIndex(index);
     if (value) {
@@ -60,17 +50,13 @@
     }
   }
 
-  /**
-   * Set the value of the element at the given index to the given value.
-   */
+  /// Set the value of the element at the given index to the given value.
   @deprecated
   static int setEnum<E extends Enum<E>>(int array, Enum<E> index, bool value) =>
       set(array, index.ordinal, value);
 
-  /**
-   * Throw an exception if the index is not within the bounds allowed for an
-   * integer-encoded array of boolean values.
-   */
+  /// Throw an exception if the index is not within the bounds allowed for an
+  /// integer-encoded array of boolean values.
   static void _checkIndex(int index) {
     if (index < 0 || index > 30) {
       throw RangeError("Index not between 0 and 30: $index");
diff --git a/pkg/analyzer/lib/src/generated/utilities_dart.dart b/pkg/analyzer/lib/src/generated/utilities_dart.dart
index 44d6a4e..87dede9 100644
--- a/pkg/analyzer/lib/src/generated/utilities_dart.dart
+++ b/pkg/analyzer/lib/src/generated/utilities_dart.dart
@@ -9,10 +9,8 @@
 export 'package:_fe_analyzer_shared/src/util/resolve_relative_uri.dart'
     show resolveRelativeUri;
 
-/**
- * If the given [node] has a documentation comment, remember its content
- * and range into the given [element].
- */
+/// If the given [node] has a documentation comment, remember its content
+/// and range into the given [element].
 void setElementDocumentationComment(ElementImpl element, AnnotatedNode node) {
   Comment comment = node.documentationComment;
   if (comment != null && comment.isDocumentation) {
@@ -21,10 +19,8 @@
   }
 }
 
-/**
- * Check whether [uri1] starts with (or 'is prefixed by') [uri2] by checking
- * path segments.
- */
+/// Check whether [uri1] starts with (or 'is prefixed by') [uri2] by checking
+/// path segments.
 bool startsWith(Uri uri1, Uri uri2) {
   List<String> uri1Segments = uri1.pathSegments;
   List<String> uri2Segments = uri2.pathSegments.toList();
@@ -49,10 +45,8 @@
   return true;
 }
 
-/**
- * The kind of a parameter. A parameter can be either positional or named, and
- * can be either required or optional. 
- */
+/// The kind of a parameter. A parameter can be either positional or named, and
+/// can be either required or optional.
 class ParameterKind implements Comparable<ParameterKind> {
   /// A positional required parameter.
   static const ParameterKind REQUIRED =
@@ -76,29 +70,19 @@
     NAMED
   ];
 
-  /**
-   * The name of this parameter.
-   */
+  /// The name of this parameter.
   final String name;
 
-  /**
-   * The ordinal value of the parameter.
-   */
+  /// The ordinal value of the parameter.
   final int ordinal;
 
-  /**
-   * A flag indicating whether this is a named or positional parameter.
-   */
+  /// A flag indicating whether this is a named or positional parameter.
   final bool isNamed;
 
-  /**
-   * A flag indicating whether this is an optional or required parameter.
-   */
+  /// A flag indicating whether this is an optional or required parameter.
   final bool isOptional;
 
-  /**
-   * Initialize a newly created kind with the given state.
-   */
+  /// Initialize a newly created kind with the given state.
   const ParameterKind(this.name, this.ordinal, this.isNamed, this.isOptional);
 
   @override
diff --git a/pkg/analyzer/lib/src/generated/utilities_general.dart b/pkg/analyzer/lib/src/generated/utilities_general.dart
index 3008a77..dc05c2c 100644
--- a/pkg/analyzer/lib/src/generated/utilities_general.dart
+++ b/pkg/analyzer/lib/src/generated/utilities_general.dart
@@ -8,22 +8,17 @@
 
 import 'package:yaml/yaml.dart';
 
-/**
- * Test if the given [value] is `false` or the string "false" (case-insensitive).
- */
+/// Test if the given [value] is `false` or the string "false"
+/// (case-insensitive).
 bool isFalse(Object value) =>
     value is bool ? !value : toLowerCase(value) == 'false';
 
-/**
- * Test if the given [value] is `true` or the string "true" (case-insensitive).
- */
+/// Test if the given [value] is `true` or the string "true" (case-insensitive).
 bool isTrue(Object value) =>
     value is bool ? value : toLowerCase(value) == 'true';
 
-/**
- * Safely convert the given [value] to a bool value, or return `null` if the
- * value could not be converted.
- */
+/// Safely convert the given [value] to a bool value, or return `null` if the
+/// value could not be converted.
 bool toBool(Object value) {
   if (value is YamlScalar) {
     value = (value as YamlScalar).value;
@@ -41,16 +36,12 @@
   return null;
 }
 
-/**
- * Safely convert this [value] to lower case, returning `null` if [value] is
- * null.
- */
+/// Safely convert this [value] to lower case, returning `null` if [value] is
+/// null.
 String toLowerCase(Object value) => value?.toString()?.toLowerCase();
 
-/**
- * Safely convert this [value] to upper case, returning `null` if [value] is
- * null.
- */
+/// Safely convert this [value] to upper case, returning `null` if [value] is
+/// null.
 String toUpperCase(Object value) => value?.toString()?.toUpperCase();
 
 /// Jenkins hash function, optimized for small integers.
@@ -104,15 +95,11 @@
       finish(combine(combine(combine(combine(0, a), b), c), d));
 }
 
-/**
- * A simple limited queue.
- */
+/// A simple limited queue.
 class LimitedQueue<E> extends ListQueue<E> {
   final int limit;
 
-  /**
-   * Create a queue with [limit] items.
-   */
+  /// Create a queue with [limit] items.
   LimitedQueue(this.limit);
 
   @override
@@ -124,57 +111,39 @@
   }
 }
 
-/**
- * Helper class for gathering performance statistics.  This class is modeled on
- * the UserTag class in dart:developer so that it can interoperate easily with
- * it.
- */
+/// Helper class for gathering performance statistics.  This class is modeled on
+/// the UserTag class in dart:developer so that it can interoperate easily with
+/// it.
 abstract class PerformanceTag {
-  /**
-   * Return a list of all [PerformanceTag]s which have been created.
-   */
+  /// Return a list of all [PerformanceTag]s which have been created.
   static List<PerformanceTag> get all => _PerformanceTagImpl.all.toList();
 
-  /**
-   * Return the current [PerformanceTag] for the isolate.
-   */
+  /// Return the current [PerformanceTag] for the isolate.
   static PerformanceTag get current => _PerformanceTagImpl.current;
 
-  /**
-   * Return the [PerformanceTag] that is initially current.  This is intended
-   * to track time when the system is performing unknown operations.
-   */
+  /// Return the [PerformanceTag] that is initially current.  This is intended
+  /// to track time when the system is performing unknown operations.
   static PerformanceTag get unknown => _PerformanceTagImpl.unknown;
 
-  /**
-   * Create a [PerformanceTag] having the given [label].  A [UserTag] will also
-   * be created, having the same [label], so that performance information can
-   * be queried using the observatory.
-   */
+  /// Create a [PerformanceTag] having the given [label].  A [UserTag] will also
+  /// be created, having the same [label], so that performance information can
+  /// be queried using the observatory.
   factory PerformanceTag(String label) = _PerformanceTagImpl;
 
-  /**
-   * Return the total number of milliseconds that this [PerformanceTag] has
-   * been the current [PerformanceTag] for the isolate.
-   *
-   * This call is safe even if this [PerformanceTag] is current.
-   */
+  /// Return the total number of milliseconds that this [PerformanceTag] has
+  /// been the current [PerformanceTag] for the isolate.
+  ///
+  /// This call is safe even if this [PerformanceTag] is current.
   int get elapsedMs;
 
-  /**
-   * Return the label for this [PerformanceTag].
-   */
+  /// Return the label for this [PerformanceTag].
   String get label;
 
-  /**
-   * Create a child tag of the current tag. The new tag's name will include the
-   * parent's name.
-   */
+  /// Create a child tag of the current tag. The new tag's name will include the
+  /// parent's name.
   PerformanceTag createChild(String childTagName);
 
-  /**
-   * Make this the current tag for the isolate, and return the previous tag.
-   */
+  /// Make this the current tag for the isolate, and return the previous tag.
   PerformanceTag makeCurrent();
 
   /// Make this the current tag for the isolate, run [f], and restore the
@@ -185,9 +154,7 @@
   /// previous tag. Returns the result of invoking [f].
   Future<E> makeCurrentWhileAsync<E>(Future<E> Function() f);
 
-  /**
-   * Reset the total time tracked by all [PerformanceTag]s to zero.
-   */
+  /// Reset the total time tracked by all [PerformanceTag]s to zero.
   static void reset() {
     for (_PerformanceTagImpl tag in _PerformanceTagImpl.all) {
       tag.stopwatch.reset();
@@ -196,27 +163,19 @@
 }
 
 class _PerformanceTagImpl implements PerformanceTag {
-  /**
-   * The current performance tag for the isolate.
-   */
+  /// The current performance tag for the isolate.
   static _PerformanceTagImpl current = unknown;
 
   static final _PerformanceTagImpl unknown = _PerformanceTagImpl('unknown');
 
-  /**
-   * A list of all performance tags that have been created so far.
-   */
+  /// A list of all performance tags that have been created so far.
   static List<_PerformanceTagImpl> all = <_PerformanceTagImpl>[];
 
-  /**
-   * The [UserTag] associated with this [PerformanceTag].
-   */
+  /// The [UserTag] associated with this [PerformanceTag].
   final UserTag userTag;
 
-  /**
-   * Stopwatch tracking the amount of time this [PerformanceTag] has been the
-   * current tag for the isolate.
-   */
+  /// Stopwatch tracking the amount of time this [PerformanceTag] has been the
+  /// current tag for the isolate.
   final Stopwatch stopwatch;
 
   _PerformanceTagImpl(String label)
diff --git a/pkg/analyzer/lib/src/hint/sdk_constraint_verifier.dart b/pkg/analyzer/lib/src/hint/sdk_constraint_verifier.dart
index e395d8c..e7098b5 100644
--- a/pkg/analyzer/lib/src/hint/sdk_constraint_verifier.dart
+++ b/pkg/analyzer/lib/src/hint/sdk_constraint_verifier.dart
@@ -12,7 +12,6 @@
 import 'package:analyzer/src/dart/ast/ast.dart';
 import 'package:analyzer/src/dart/resolver/scope.dart';
 import 'package:analyzer/src/error/codes.dart';
-import 'package:analyzer/src/generated/resolver.dart' show Namespace;
 import 'package:pub_semver/pub_semver.dart';
 
 /// A visitor that finds code that assumes a later version of the SDK than the
diff --git a/pkg/analyzer/lib/src/lint/config.dart b/pkg/analyzer/lib/src/lint/config.dart
index 159385c..b6c801c 100644
--- a/pkg/analyzer/lib/src/lint/config.dart
+++ b/pkg/analyzer/lib/src/lint/config.dart
@@ -5,9 +5,7 @@
 import 'package:analyzer/src/util/yaml.dart';
 import 'package:yaml/yaml.dart';
 
-/**
- * Parse the given map into a lint config.
- */
+/// Parse the given map into a lint config.
 LintConfig parseConfig(YamlMap optionsMap) {
   if (optionsMap != null) {
     var options = getValue(optionsMap, 'linter');
@@ -19,10 +17,8 @@
   return null;
 }
 
-/**
- * Process the given option [fileContents] and produce a corresponding
- * [LintConfig].
- */
+/// Process the given option [fileContents] and produce a corresponding
+/// [LintConfig].
 LintConfig processAnalysisOptionsFile(String fileContents, {String fileUrl}) {
   var yaml = loadYamlNode(fileContents, sourceUrl: fileUrl);
   if (yaml is YamlMap) {
@@ -31,9 +27,7 @@
   return null;
 }
 
-/**
- * The configuration of lint rules within an analysis options file.
- */
+/// The configuration of lint rules within an analysis options file.
 abstract class LintConfig {
   factory LintConfig.parse(String source, {String sourceUrl}) =>
       _LintConfig().._parse(source, sourceUrl: sourceUrl);
@@ -45,9 +39,7 @@
   List<RuleConfig> get ruleConfigs;
 }
 
-/**
- * The configuration of a single lint rule within an analysis options file.
- */
+/// The configuration of a single lint rule within an analysis options file.
 abstract class RuleConfig {
   Map<String, dynamic> args = <String, dynamic>{};
   String get group;
diff --git a/pkg/analyzer/lib/src/lint/linter.dart b/pkg/analyzer/lib/src/lint/linter.dart
index 17392cf..b3e9d16 100644
--- a/pkg/analyzer/lib/src/lint/linter.dart
+++ b/pkg/analyzer/lib/src/lint/linter.dart
@@ -17,6 +17,7 @@
 import 'package:analyzer/file_system/file_system.dart' as file_system;
 import 'package:analyzer/src/dart/ast/token.dart';
 import 'package:analyzer/src/dart/constant/compute.dart';
+import 'package:analyzer/src/dart/constant/constant_verifier.dart';
 import 'package:analyzer/src/dart/constant/evaluation.dart';
 import 'package:analyzer/src/dart/constant/potentially_constant.dart';
 import 'package:analyzer/src/dart/constant/utilities.dart';
@@ -31,8 +32,7 @@
         AnalysisErrorInfoImpl,
         AnalysisOptions,
         AnalysisOptionsImpl;
-import 'package:analyzer/src/generated/resolver.dart'
-    show ConstantVerifier, ScopedVisitor;
+import 'package:analyzer/src/generated/resolver.dart' show ScopedVisitor;
 import 'package:analyzer/src/generated/source.dart' show LineInfo;
 import 'package:analyzer/src/generated/source_io.dart';
 import 'package:analyzer/src/lint/analysis.dart';
@@ -143,7 +143,7 @@
   }
 
   @override
-  onError(AnalysisError error) => errors.add(error);
+  void onError(AnalysisError error) => errors.add(error);
 
   Iterable<AnalysisErrorInfo> _lintPubspecFile(File sourceFile) =>
       lintPubspecSource(
@@ -796,7 +796,7 @@
   }
 
   @override
-  onError(AnalysisError error) => errors.add(error);
+  void onError(AnalysisError error) => errors.add(error);
 
   @override
   Iterable<AnalysisErrorInfo> _lintPubspecFile(File sourceFile) =>
diff --git a/pkg/analyzer/lib/src/lint/options_rule_validator.dart b/pkg/analyzer/lib/src/lint/options_rule_validator.dart
index b0e7f64..31f27c0 100644
--- a/pkg/analyzer/lib/src/lint/options_rule_validator.dart
+++ b/pkg/analyzer/lib/src/lint/options_rule_validator.dart
@@ -11,57 +11,45 @@
 import 'package:analyzer/src/util/yaml.dart';
 import 'package:yaml/yaml.dart';
 
-/**
- * A hint code indicating reference to a deprecated lint.
- *
- * Parameters:
- * 0: the rule name
- */
+/// A hint code indicating reference to a deprecated lint.
+///
+/// Parameters:
+/// 0: the rule name
 const AnalysisOptionsHintCode DEPRECATED_LINT_HINT = AnalysisOptionsHintCode(
     'DEPRECATED_LINT_HINT',
     "'{0}' is a deprecated lint rule and should not be used");
 
-/**
- * Duplicate rules.
- *
- * Parameters:
- * 0: the rule name
- */
+/// Duplicate rules.
+///
+/// Parameters:
+/// 0: the rule name
 const AnalysisOptionsHintCode DUPLICATE_RULE_HINT = AnalysisOptionsHintCode(
     'DUPLICATE_RULE',
     "The rule {0} is already specified and doesn't need to be specified again.",
     correction: "Try removing all but one specification of the rule.");
 
-/**
- * An error code indicating an incompatible rule.
- *
- * Parameters:
- * 0: the rule name
- * 1: the incompatible rule
- */
+/// An error code indicating an incompatible rule.
+///
+/// Parameters:
+/// 0: the rule name
+/// 1: the incompatible rule
 const AnalysisOptionsWarningCode INCOMPATIBLE_LINT_WARNING =
     AnalysisOptionsWarningCode('INCOMPATIBLE_LINT_WARNING',
         "The rule '{0}' is incompatible with the rule '{1}'",
         correction: "Try removing one of the incompatible rules.");
 
-/**
- * An error code indicating an undefined lint rule.
- *
- * Parameters:
- * 0: the rule name
- */
+/// An error code indicating an undefined lint rule.
+///
+/// Parameters:
+/// 0: the rule name
 const AnalysisOptionsWarningCode UNDEFINED_LINT_WARNING =
     AnalysisOptionsWarningCode(
         'UNDEFINED_LINT_WARNING', "'{0}' is not a recognized lint rule");
 
-/**
- * Rule provider.
- */
+/// Rule provider.
 typedef LintRuleProvider = Iterable<LintRule> Function();
 
-/**
- * Validates `linter` rule configurations.
- */
+/// Validates `linter` rule configurations.
 class LinterRuleOptionsValidator extends OptionsValidator {
   static const linter = 'linter';
   static const rulesKey = 'rules';
@@ -85,7 +73,7 @@
     return errors;
   }
 
-  validateRules(YamlNode rules, ErrorReporter reporter) {
+  void validateRules(YamlNode rules, ErrorReporter reporter) {
     if (rules is YamlList) {
       final seenRules = <String>{};
 
diff --git a/pkg/analyzer/lib/src/lint/project.dart b/pkg/analyzer/lib/src/lint/project.dart
index fef8932..7498abb 100644
--- a/pkg/analyzer/lib/src/lint/project.dart
+++ b/pkg/analyzer/lib/src/lint/project.dart
@@ -8,7 +8,7 @@
 import 'package:analyzer/dart/analysis/results.dart';
 import 'package:analyzer/dart/element/element.dart';
 import 'package:analyzer/src/dart/analysis/driver.dart';
-import 'package:analyzer/src/generated/resolver.dart';
+import 'package:analyzer/src/dart/resolver/scope.dart';
 import 'package:analyzer/src/generated/source.dart';
 import 'package:analyzer/src/lint/io.dart';
 import 'package:analyzer/src/lint/pub.dart';
@@ -121,7 +121,7 @@
     return false;
   }
 
-  _calculate() async {
+  void _calculate() async {
     if (sources == null || sources.isEmpty) {
       return;
     }
diff --git a/pkg/analyzer/lib/src/lint/pub.dart b/pkg/analyzer/lib/src/lint/pub.dart
index 5b85e71..ab19e57 100644
--- a/pkg/analyzer/lib/src/lint/pub.dart
+++ b/pkg/analyzer/lib/src/lint/pub.dart
@@ -128,7 +128,7 @@
   PSEntry get homepage;
   PSEntry get name;
   PSEntry get version;
-  accept(PubspecVisitor visitor);
+  void accept(PubspecVisitor visitor);
 }
 
 abstract class PubspecVisitor<T> {
@@ -238,7 +238,7 @@
   @override
   Iterator<PSDependency> get iterator => dependencies.iterator;
 
-  add(PSDependency dependency) {
+  void add(PSDependency dependency) {
     if (dependency != null) {
       dependencies.add(dependency);
     }
@@ -388,7 +388,7 @@
     return sb.toString();
   }
 
-  _parse(String src, {Uri sourceUrl}) {
+  void _parse(String src, {Uri sourceUrl}) {
     var yaml = loadYamlNode(src, sourceUrl: sourceUrl);
     if (yaml is! YamlMap) {
       return;
@@ -439,7 +439,7 @@
   StringBuffer buffer = StringBuffer();
   @override
   String toString() => buffer.toString();
-  writelin(Object value) {
+  void writelin(Object value) {
     if (value != null) {
       buffer.writeln(value);
     }
diff --git a/pkg/analyzer/lib/src/lint/registry.dart b/pkg/analyzer/lib/src/lint/registry.dart
index b6e2350..3fd2ff3 100644
--- a/pkg/analyzer/lib/src/lint/registry.dart
+++ b/pkg/analyzer/lib/src/lint/registry.dart
@@ -7,13 +7,9 @@
 import 'package:analyzer/src/lint/config.dart';
 import 'package:analyzer/src/lint/linter.dart';
 
-/**
- * Registry of lint rules.
- */
+/// Registry of lint rules.
 class Registry with IterableMixin<LintRule> {
-  /**
-   * The default registry to be used by clients.
-   */
+  /// The default registry to be used by clients.
   static final Registry ruleRegistry = Registry();
 
   /// A table mapping rule names to rules.
@@ -22,37 +18,27 @@
   @override
   Iterator<LintRule> get iterator => _ruleMap.values.iterator;
 
-  /**
-   * Return a list of the rules that are defined.
-   */
+  /// Return a list of the rules that are defined.
   Iterable<LintRule> get rules => _ruleMap.values;
 
-  /**
-   * Return the lint rule with the given [name].
-   */
+  /// Return the lint rule with the given [name].
   LintRule operator [](String name) => _ruleMap[name];
 
-  /**
-   * Return a list of the lint rules explicitly enabled by the given [config].
-   *
-   * For example:
-   *     my_rule: true
-   *
-   * enables `my_rule`.
-   *
-   * Unspecified rules are treated as disabled by default.
-   */
+  /// Return a list of the lint rules explicitly enabled by the given [config].
+  ///
+  /// For example:
+  ///     my_rule: true
+  ///
+  /// enables `my_rule`.
+  ///
+  /// Unspecified rules are treated as disabled by default.
   Iterable<LintRule> enabled(LintConfig config) => rules
       .where((rule) => config.ruleConfigs.any((rc) => rc.enables(rule.name)));
 
-  /**
-   * Return the lint rule with the given [name].
-   */
+  /// Return the lint rule with the given [name].
   LintRule getRule(String name) => _ruleMap[name];
 
-  /**
-   * Add the given lint [rule] to this registry.
-   */
+  /// Add the given lint [rule] to this registry.
   void register(LintRule rule) {
     _ruleMap[rule.name] = rule;
   }
diff --git a/pkg/analyzer/lib/src/lint/util.dart b/pkg/analyzer/lib/src/lint/util.dart
index 25b2ec5..7325d48 100644
--- a/pkg/analyzer/lib/src/lint/util.dart
+++ b/pkg/analyzer/lib/src/lint/util.dart
@@ -137,16 +137,15 @@
   String typeInfo(Type type) => type.toString();
 
   @override
-  visitNode(AstNode node) {
+  void visitNode(AstNode node) {
     write(node);
 
     ++indent;
     node.visitChildren(this);
     --indent;
-    return null;
   }
 
-  write(AstNode node) {
+  void write(AstNode node) {
     //EOL comments
     var comments = getPrecedingComments(node.beginToken);
     comments.forEach((c) => sink.writeln('${"  " * indent}$c'));
diff --git a/pkg/analyzer/lib/src/manifest/manifest_validator.dart b/pkg/analyzer/lib/src/manifest/manifest_validator.dart
index d7927e5..820e1b2 100644
--- a/pkg/analyzer/lib/src/manifest/manifest_validator.dart
+++ b/pkg/analyzer/lib/src/manifest/manifest_validator.dart
@@ -13,20 +13,14 @@
 import 'manifest_warning_code.dart';
 
 class ManifestValidator {
-  /**
-   * The source representing the file being validated.
-   */
+  /// The source representing the file being validated.
   final Source source;
 
-  /**
-   * Initialize a newly create validator to validate the content of the given
-   * [source].
-   */
+  /// Initialize a newly create validator to validate the content of the given
+  /// [source].
   ManifestValidator(this.source);
 
-  /**
-   * Validate the [contents] of the Android Manifest file.
-   */
+  /// Validate the [contents] of the Android Manifest file.
   List<AnalysisError> validate(String contents, bool checkManifest) {
     RecordingErrorListener recorder = RecordingErrorListener();
     ErrorReporter reporter = ErrorReporter(
@@ -70,9 +64,7 @@
   bool _hasFeatureCameraAutoFocus(List<Element> features) =>
       features.any((f) => f.localName == HARDWARE_FEATURE_CAMERA_AUTOFOCUS);
 
-  /**
-   * Report an error for the given node.
-   */
+  /// Report an error for the given node.
   void _reportErrorForNode(
       ErrorReporter reporter, Node node, dynamic key, ErrorCode errorCode,
       [List<Object> arguments]) {
@@ -82,10 +74,8 @@
         errorCode, span.start.offset, span.length, arguments);
   }
 
-  /**
-   * Validate the 'activity' tags.
-   */
-  _validateActivities(List<Element> activites, ErrorReporter reporter) {
+  /// Validate the 'activity' tags.
+  void _validateActivities(List<Element> activites, ErrorReporter reporter) {
     activites.forEach((activity) {
       var attributes = activity.attributes;
       if (attributes.containsKey(ATTRIBUTE_SCREEN_ORIENTATION)) {
@@ -104,10 +94,8 @@
     });
   }
 
-  /**
-   * Validate the `uses-feature` tags.
-   */
-  _validateFeatures(List<Element> features, ErrorReporter reporter) {
+  /// Validate the `uses-feature` tags.
+  void _validateFeatures(List<Element> features, ErrorReporter reporter) {
     var unsupported = features
         .where((element) => UNSUPPORTED_HARDWARE_FEATURES
             .contains(element.attributes[ANDROID_NAME]))
@@ -131,10 +119,8 @@
     });
   }
 
-  /**
-   * Validate the `uses-permission` tags.
-   */
-  _validatePermissions(List<Element> permissions, List<Element> features,
+  /// Validate the `uses-permission` tags.
+  void _validatePermissions(List<Element> permissions, List<Element> features,
       ErrorReporter reporter) {
     permissions.forEach((permission) {
       if (permission.attributes[ANDROID_NAME] == ANDROID_PERMISSION_CAMERA) {
@@ -158,10 +144,8 @@
     });
   }
 
-  /**
-   * Validate the presence/absence of the touchscreen feature tag.
-   */
-  _validateTouchScreenFeature(
+  /// Validate the presence/absence of the touchscreen feature tag.
+  void _validateTouchScreenFeature(
       List<Element> features, Element manifest, ErrorReporter reporter) {
     var feature = features.firstWhere(
         (element) =>
diff --git a/pkg/analyzer/lib/src/manifest/manifest_warning_code.dart b/pkg/analyzer/lib/src/manifest/manifest_warning_code.dart
index 1987db0..f4d5b8f 100644
--- a/pkg/analyzer/lib/src/manifest/manifest_warning_code.dart
+++ b/pkg/analyzer/lib/src/manifest/manifest_warning_code.dart
@@ -4,54 +4,52 @@
 
 import 'package:analyzer/error/error.dart';
 
-/**
- * The error codes used for warnings in analysis options files. The convention
- * for this class is for the name of the error code to indicate the problem that
- * caused the error to be generated and for the error message to explain what is
- * wrong and, when appropriate, how the problem can be corrected.
- */
+/// The error codes used for warnings in analysis options files. The convention
+/// for this class is for the name of the error code to indicate the problem
+/// that caused the error to be generated and for the error message to explain
+/// what is wrong and, when appropriate, how the problem can be corrected.
 class ManifestWarningCode extends ErrorCode {
-  /**
-   * A code indicating that a specified hardware feature is not supported on Chrome OS.
-   */
+  /// A code indicating that a specified hardware feature is not supported on
+  /// Chrome OS.
   static const ManifestWarningCode UNSUPPORTED_CHROME_OS_HARDWARE =
-      ManifestWarningCode('UNSUPPORTED_CHROME_OS_HARDWARE',
-          "The feature {0} is not supported on Chrome OS, consider making it optional.",
+      ManifestWarningCode(
+          'UNSUPPORTED_CHROME_OS_HARDWARE',
+          'The feature {0} is not supported on Chrome OS, consider making it '
+              'optional.',
           correction:
-              "Try adding `android:required=\"false\"` for this feature.");
+              'Try adding `android:required="false"` for this feature.');
 
-  /**
-   * A code indicating that a specified feature is not supported on Chrome OS.
-   */
+  /// A code indicating that a specified feature is not supported on Chrome OS.
   static const ManifestWarningCode UNSUPPORTED_CHROME_OS_FEATURE =
-      ManifestWarningCode('UNSUPPORTED_CHROME_OS_FEATURE',
-          'The feature {0} is not supported on Chrome OS, consider making it optional.',
+      ManifestWarningCode(
+          'UNSUPPORTED_CHROME_OS_FEATURE',
+          'The feature {0} is not supported on Chrome OS, consider making it '
+              'optional.',
           correction: "Try changing to `android:required=\"false\"` for this "
               "feature.");
 
-  /**
-   * A code indicating that the touchscreen feature is not specified in the
-   * manifest.
-   */
+  /// A code indicating that the touchscreen feature is not specified in the
+  /// manifest.
   static const ManifestWarningCode NO_TOUCHSCREEN_FEATURE = ManifestWarningCode(
       'NO_TOUCHSCREEN_FEATURE',
-      "The default \"android.hardware.touchscreen\" needs to be optional for Chrome OS. ",
+      'The default "android.hardware.touchscreen" needs to be optional for '
+          'Chrome OS. ',
       correction: "Consider adding "
           "<uses-feature android:name=\"android.hardware.touchscreen\" android:required=\"false\" />"
           " to the manifest.");
 
-  /**
-   * A code indicating that a specified permission is not supported on Chrome OS.
-   */
+  /// A code indicating that a specified permission is not supported on Chrome
+  /// OS.
   static const ManifestWarningCode PERMISSION_IMPLIES_UNSUPPORTED_HARDWARE =
-      ManifestWarningCode('PERMISSION_IMPLIES_UNSUPPORTED_HARDWARE',
-          "Permission makes app incompatible for Chrome OS, consider adding optional {0} feature tag, ",
+      ManifestWarningCode(
+          'PERMISSION_IMPLIES_UNSUPPORTED_HARDWARE',
+          'Permission makes app incompatible for Chrome OS, consider adding '
+              'optional {0} feature tag, ',
           correction: " Try adding `<uses-feature "
               "android:name=\"{0}\"  android:required=\"false\">`.");
 
-  /**
-   * A code indicating that the camera permissions is not supported on Chrome OS.
-   */
+  /// A code indicating that the camera permissions is not supported on Chrome
+  /// OS.
   static const ManifestWarningCode CAMERA_PERMISSIONS_INCOMPATIBLE = ManifestWarningCode(
       'CAMERA_PERMISSIONS_INCOMPATIBLE',
       "Camera permissions make app incompatible for Chrome OS, consider adding "
@@ -61,9 +59,7 @@
           "`<uses-feature "
           "android:name=\"android.hardware.camera.autofocus\"  android:required=\"false\">`.");
 
-  /**
-   * A code indicating that the activity is set to be non resizable.
-   */
+  /// A code indicating that the activity is set to be non resizable.
   static const ManifestWarningCode NON_RESIZABLE_ACTIVITY = ManifestWarningCode(
       'NON_RESIZABLE_ACTIVITY',
       "The `<activity>` element should be allowed to be resized to allow "
@@ -71,9 +67,7 @@
       correction: "Consider declaring the corresponding "
           "activity element with `resizableActivity=\"true\"` attribute.");
 
-  /**
-   * A code indicating that the activity is locked to an orientation.
-   */
+  /// A code indicating that the activity is locked to an orientation.
   static const ManifestWarningCode SETTING_ORIENTATION_ON_ACTIVITY =
       ManifestWarningCode(
           'SETTING_ORIENTATION_ON_ACTIVITY',
@@ -84,10 +78,8 @@
               "Consider declaring the corresponding activity element with"
               " `screenOrientation=\"unspecified\"` or `\"fullSensor\"` attribute.");
 
-  /**
-   * Initialize a newly created warning code to have the given [name], [message]
-   * and [correction].
-   */
+  /// Initialize a newly created warning code to have the given [name],
+  /// [message] and [correction].
   const ManifestWarningCode(String name, String message, {String correction})
       : super.temporary(name, message, correction: correction);
 
diff --git a/pkg/analyzer/lib/src/pubspec/pubspec_validator.dart b/pkg/analyzer/lib/src/pubspec/pubspec_validator.dart
index a7a0e3bd..d9cb6c6 100644
--- a/pkg/analyzer/lib/src/pubspec/pubspec_validator.dart
+++ b/pkg/analyzer/lib/src/pubspec/pubspec_validator.dart
@@ -12,52 +12,34 @@
 import 'package:yaml/yaml.dart';
 
 class PubspecValidator {
-  /**
-   * The name of the sub-field (under `flutter`) whose value is a list of assets
-   * available to Flutter apps at runtime.
-   */
+  /// The name of the sub-field (under `flutter`) whose value is a list of
+  /// assets available to Flutter apps at runtime.
   static const String ASSETS_FIELD = 'assets';
 
-  /**
-   * The name of the field whose value is a map of dependencies.
-   */
+  /// The name of the field whose value is a map of dependencies.
   static const String DEPENDENCIES_FIELD = 'dependencies';
 
-  /**
-   * The name of the field whose value is a map of development dependencies.
-   */
+  /// The name of the field whose value is a map of development dependencies.
   static const String DEV_DEPENDENCIES_FIELD = 'dev_dependencies';
 
-  /**
-   * The name of the field whose value is a specification of Flutter-specific
-   * configuration data.
-   */
+  /// The name of the field whose value is a specification of Flutter-specific
+  /// configuration data.
   static const String FLUTTER_FIELD = 'flutter';
 
-  /**
-   * The name of the field whose value is the name of the package.
-   */
+  /// The name of the field whose value is the name of the package.
   static const String NAME_FIELD = 'name';
 
-  /**
-   * The resource provider used to access the file system.
-   */
+  /// The resource provider used to access the file system.
   final ResourceProvider provider;
 
-  /**
-   * The source representing the file being validated.
-   */
+  /// The source representing the file being validated.
   final Source source;
 
-  /**
-   * Initialize a newly create validator to validate the content of the given
-   * [source].
-   */
+  /// Initialize a newly create validator to validate the content of the given
+  /// [source].
   PubspecValidator(this.provider, this.source);
 
-  /**
-   * Validate the given [contents].
-   */
+  /// Validate the given [contents].
   List<AnalysisError> validate(Map<dynamic, YamlNode> contents) {
     RecordingErrorListener recorder = RecordingErrorListener();
     ErrorReporter reporter = ErrorReporter(
@@ -73,10 +55,8 @@
     return recorder.errors;
   }
 
-  /**
-   * Return `true` if an asset (file) exists at the given absolute, normalized
-   * [assetPath] or in a subdirectory of the parent of the file.
-   */
+  /// Return `true` if an asset (file) exists at the given absolute, normalized
+  /// [assetPath] or in a subdirectory of the parent of the file.
   bool _assetExistsAtPath(String assetPath) {
     // Check for asset directories.
     Folder assetDirectory = provider.getFolder(assetPath);
@@ -105,11 +85,9 @@
     return false;
   }
 
-  /**
-   * Return a map whose keys are the names of declared dependencies and whose
-   * values are the specifications of those dependencies. The map is extracted
-   * from the given [contents] using the given [key].
-   */
+  /// Return a map whose keys are the names of declared dependencies and whose
+  /// values are the specifications of those dependencies. The map is extracted
+  /// from the given [contents] using the given [key].
   Map<dynamic, YamlNode> _getDeclaredDependencies(
       ErrorReporter reporter, Map<dynamic, YamlNode> contents, String key) {
     YamlNode field = contents[key];
@@ -123,9 +101,7 @@
     return <String, YamlNode>{};
   }
 
-  /**
-   * Report an error for the given node.
-   */
+  /// Report an error for the given node.
   void _reportErrorForNode(
       ErrorReporter reporter, YamlNode node, ErrorCode errorCode,
       [List<Object> arguments]) {
@@ -134,9 +110,7 @@
         errorCode, span.start.offset, span.length, arguments);
   }
 
-  /**
-   * Validate the value of the required `name` field.
-   */
+  /// Validate the value of the required `name` field.
   void _validateDependencies(
       ErrorReporter reporter, Map<dynamic, YamlNode> contents) {
     Map<dynamic, YamlNode> declaredDependencies =
@@ -152,9 +126,7 @@
     }
   }
 
-  /**
-   * Validate the value of the optional `flutter` field.
-   */
+  /// Validate the value of the optional `flutter` field.
   void _validateFlutter(
       ErrorReporter reporter, Map<dynamic, YamlNode> contents) {
     YamlNode flutterField = contents[FLUTTER_FIELD];
@@ -211,9 +183,7 @@
     }
   }
 
-  /**
-   * Validate the value of the required `name` field.
-   */
+  /// Validate the value of the required `name` field.
   void _validateName(ErrorReporter reporter, Map<dynamic, YamlNode> contents) {
     YamlNode nameField = contents[NAME_FIELD];
     if (nameField == null) {
diff --git a/pkg/analyzer/lib/src/pubspec/pubspec_warning_code.dart b/pkg/analyzer/lib/src/pubspec/pubspec_warning_code.dart
index 12c8d46..7e03b42 100644
--- a/pkg/analyzer/lib/src/pubspec/pubspec_warning_code.dart
+++ b/pkg/analyzer/lib/src/pubspec/pubspec_warning_code.dart
@@ -4,89 +4,70 @@
 
 import 'package:analyzer/error/error.dart';
 
-/**
- * The error codes used for warnings in analysis options files. The convention
- * for this class is for the name of the error code to indicate the problem that
- * caused the error to be generated and for the error message to explain what is
- * wrong and, when appropriate, how the problem can be corrected.
- */
+/// The error codes used for warnings in analysis options files. The convention
+/// for this class is for the name of the error code to indicate the problem
+/// that caused the error to be generated and for the error message to explain
+/// what is wrong and, when appropriate, how the problem can be corrected.
 class PubspecWarningCode extends ErrorCode {
-  /**
-   * A code indicating that a specified asset does not exist.
-   *
-   * Parameters:
-   * 0: the path to the asset as given in the file.
-   */
+  /// A code indicating that a specified asset does not exist.
+  ///
+  /// Parameters:
+  /// 0: the path to the asset as given in the file.
   static const PubspecWarningCode ASSET_DOES_NOT_EXIST = PubspecWarningCode(
       'ASSET_DOES_NOT_EXIST', "The asset {0} does not exist.",
       correction: "Try creating the file or fixing the path to the file.");
 
-  /**
-   * A code indicating that a specified asset directory does not exist.
-   *
-   * Parameters:
-   * 0: the path to the asset directory as given in the file.
-   */
+  /// A code indicating that a specified asset directory does not exist.
+  ///
+  /// Parameters:
+  /// 0: the path to the asset directory as given in the file.
   static const PubspecWarningCode ASSET_DIRECTORY_DOES_NOT_EXIST =
       PubspecWarningCode('ASSET_DIRECTORY_DOES_NOT_EXIST',
           "The asset directory {0} does not exist.",
           correction: "Try creating the directory or fixing the path to the "
               "directory.");
 
-  /**
-   * A code indicating that the value of the asset field is not a list.
-   */
+  /// A code indicating that the value of the asset field is not a list.
   static const PubspecWarningCode ASSET_FIELD_NOT_LIST = PubspecWarningCode(
       'ASSET_FIELD_NOT_LIST',
-      "The value of the 'asset' field is expected to be a list of relative file paths.",
+      "The value of the 'asset' field is expected to be a list of relative "
+          "file paths.",
       correction:
           "Try converting the value to be a list of relative file paths.");
 
-  /**
-   * A code indicating that an element in the asset list is not a string.
-   */
+  /// A code indicating that an element in the asset list is not a string.
   static const PubspecWarningCode ASSET_NOT_STRING = PubspecWarningCode(
       'ASSET_NOT_STRING', "Assets are expected to be a file paths (strings).",
       correction: "Try converting the value to be a string.");
 
-  /**
-   * A code indicating that the value of a dependencies field is not a map.
-   */
+  /// A code indicating that the value of a dependencies field is not a map.
   static const PubspecWarningCode DEPENDENCIES_FIELD_NOT_MAP =
       PubspecWarningCode('DEPENDENCIES_FIELD_NOT_MAP',
           "The value of the '{0}' field is expected to be a map.",
           correction: "Try converting the value to be a map.");
 
-  /**
-   * A code indicating that the value of the flutter field is not a map.
-   */
+  /// A code indicating that the value of the flutter field is not a map.
   static const PubspecWarningCode FLUTTER_FIELD_NOT_MAP = PubspecWarningCode(
       'FLUTTER_FIELD_NOT_MAP',
       "The value of the 'flutter' field is expected to be a map.",
       correction: "Try converting the value to be a map.");
 
-  /**
-   * A code indicating that the name field is missing.
-   */
+  /// A code indicating that the name field is missing.
   static const PubspecWarningCode MISSING_NAME = PubspecWarningCode(
       'MISSING_NAME', "The name field is required but missing.",
       correction: "Try adding a field named 'name'.");
 
-  /**
-   * A code indicating that the name field is not a string.
-   */
+  /// A code indicating that the name field is not a string.
   static const PubspecWarningCode NAME_NOT_STRING = PubspecWarningCode(
       'NAME_NOT_STRING',
       "The value of the name field is expected to be a string.",
       correction: "Try converting the value to be a string.");
 
-  /**
-   * A code indicating that a package listed as a dev dependency is also listed
-   * as a normal dependency.
-   *
-   * Parameters:
-   * 0: the name of the package in the dev_dependency list.
-   */
+  /// A code indicating that a package listed as a dev dependency is also listed
+  /// as a normal dependency.
+  ///
+  /// Parameters:
+  /// 0: the name of the package in the dev_dependency list.
   static const PubspecWarningCode UNNECESSARY_DEV_DEPENDENCY =
       PubspecWarningCode(
           'UNNECESSARY_DEV_DEPENDENCY',
@@ -94,10 +75,8 @@
               "normal dependency on that package.",
           correction: "Try removing the dev dependency.");
 
-  /**
-   * Initialize a newly created warning code to have the given [name], [message]
-   * and [correction].
-   */
+  /// Initialize a newly created warning code to have the given [name],
+  /// [message] and [correction].
   const PubspecWarningCode(String name, String message, {String correction})
       : super.temporary(name, message, correction: correction);
 
diff --git a/pkg/analyzer/lib/src/services/lint.dart b/pkg/analyzer/lib/src/services/lint.dart
index 2fdce7b..f65130f 100644
--- a/pkg/analyzer/lib/src/services/lint.dart
+++ b/pkg/analyzer/lib/src/services/lint.dart
@@ -35,9 +35,7 @@
   /// NOTE: this is set by the framework before visit begins.
   ErrorReporter reporter;
 
-  /**
-   * Return the lint code associated with this linter.
-   */
+  /// Return the lint code associated with this linter.
   LintCode get lintCode => null;
 
   /// Linter name.
diff --git a/pkg/analyzer/lib/src/source/package_map_provider.dart b/pkg/analyzer/lib/src/source/package_map_provider.dart
index 69053ba..e4c9321 100644
--- a/pkg/analyzer/lib/src/source/package_map_provider.dart
+++ b/pkg/analyzer/lib/src/source/package_map_provider.dart
@@ -4,39 +4,29 @@
 
 import 'package:analyzer/file_system/file_system.dart';
 
-/**
- * Data structure output by PackageMapProvider.  This contains both the package
- * map and dependency information.
- */
+/// Data structure output by PackageMapProvider.  This contains both the package
+/// map and dependency information.
 class PackageMapInfo {
-  /**
-   * The package map itself.  This is a map from package name to a list of
-   * the folders containing source code for the package.
-   *
-   * `null` if an error occurred.
-   */
+  /// The package map itself.  This is a map from package name to a list of
+  /// the folders containing source code for the package.
+  ///
+  /// `null` if an error occurred.
   Map<String, List<Folder>> packageMap;
 
-  /**
-   * Dependency information.  This is a set of the paths which were consulted
-   * in order to generate the package map.  If any of these files is
-   * modified, the package map will need to be regenerated.
-   */
+  /// Dependency information.  This is a set of the paths which were consulted
+  /// in order to generate the package map.  If any of these files is
+  /// modified, the package map will need to be regenerated.
   Set<String> dependencies;
 
   PackageMapInfo(this.packageMap, this.dependencies);
 }
 
-/**
- * A PackageMapProvider is an entity capable of determining the mapping from
- * package name to source directory for a given folder.
- */
+/// A PackageMapProvider is an entity capable of determining the mapping from
+/// package name to source directory for a given folder.
 abstract class PackageMapProvider {
-  /**
-   * Compute a package map for the given folder, if possible.
-   *
-   * If a package map can't be computed (e.g. because an error occurred), a
-   * [PackageMapInfo] will still be returned, but its packageMap will be null.
-   */
+  /// Compute a package map for the given folder, if possible.
+  ///
+  /// If a package map can't be computed (e.g. because an error occurred), a
+  /// [PackageMapInfo] will still be returned, but its packageMap will be null.
   PackageMapInfo computePackageMap(Folder folder);
 }
diff --git a/pkg/analyzer/lib/src/source/package_map_resolver.dart b/pkg/analyzer/lib/src/source/package_map_resolver.dart
index c618a29..43d8ba4 100644
--- a/pkg/analyzer/lib/src/source/package_map_resolver.dart
+++ b/pkg/analyzer/lib/src/source/package_map_resolver.dart
@@ -9,33 +9,23 @@
 import 'package:analyzer/src/util/asserts.dart' as asserts;
 import 'package:path/path.dart' as pathos;
 
-/**
- * A [UriResolver] implementation for the `package:` scheme that uses a map of
- * package names to their directories.
- */
+/// A [UriResolver] implementation for the `package:` scheme that uses a map of
+/// package names to their directories.
 class PackageMapUriResolver extends UriResolver {
-  /**
-   * The name of the `package` scheme.
-   */
+  /// The name of the `package` scheme.
   static const String PACKAGE_SCHEME = "package";
 
-  /**
-   * A table mapping package names to the path of the directories containing
-   * the package.
-   */
+  /// A table mapping package names to the path of the directories containing
+  /// the package.
   final Map<String, List<Folder>> packageMap;
 
-  /**
-   * The [ResourceProvider] for this resolver.
-   */
+  /// The [ResourceProvider] for this resolver.
   final ResourceProvider resourceProvider;
 
-  /**
-   * Create a new [PackageMapUriResolver].
-   *
-   * [packageMap] is a table mapping package names to the paths of the
-   * directories containing the package
-   */
+  /// Create a new [PackageMapUriResolver].
+  ///
+  /// [packageMap] is a table mapping package names to the paths of the
+  /// directories containing the package
   PackageMapUriResolver(this.resourceProvider, this.packageMap) {
     asserts.notNull(resourceProvider);
     asserts.notNull(packageMap);
@@ -90,9 +80,7 @@
     return null;
   }
 
-  /**
-   * Returns `true` if [uri] is a `package` URI.
-   */
+  /// Returns `true` if [uri] is a `package` URI.
   static bool isPackageUri(Uri uri) {
     return uri.scheme == PACKAGE_SCHEME;
   }
diff --git a/pkg/analyzer/lib/src/source/source_resource.dart b/pkg/analyzer/lib/src/source/source_resource.dart
index d450699..e240e80 100644
--- a/pkg/analyzer/lib/src/source/source_resource.dart
+++ b/pkg/analyzer/lib/src/source/source_resource.dart
@@ -13,55 +13,37 @@
 /// clients that convert all text to an internal format.
 typedef FileReadMode = String Function(String s);
 
-/**
- * A source that represents a file.
- */
+/// A source that represents a file.
 class FileSource extends Source {
-  /**
-   * A function that changes the way that files are read off of disk.
-   */
+  /// A function that changes the way that files are read off of disk.
   static FileReadMode fileReadMode = (String s) => s;
 
-  /**
-   * Map from encoded URI/filepath pair to a unique integer identifier.  This
-   * identifier is used for equality tests and hash codes.
-   *
-   * The URI and filepath are joined into a pair by separating them with an '@'
-   * character.
-   */
+  /// Map from encoded URI/filepath pair to a unique integer identifier.  This
+  /// identifier is used for equality tests and hash codes.
+  ///
+  /// The URI and filepath are joined into a pair by separating them with an '@'
+  /// character.
   static final Map<String, int> _idTable = HashMap<String, int>();
 
-  /**
-   * The URI from which this source was originally derived.
-   */
+  /// The URI from which this source was originally derived.
   @override
   final Uri uri;
 
-  /**
-   * The unique ID associated with this source.
-   */
+  /// The unique ID associated with this source.
   final int id;
 
-  /**
-   * The file represented by this source.
-   */
+  /// The file represented by this source.
   final File file;
 
-  /**
-   * The cached absolute path of this source.
-   */
+  /// The cached absolute path of this source.
   String _absolutePath;
 
-  /**
-   * The cached encoding for this source.
-   */
+  /// The cached encoding for this source.
   String _encoding;
 
-  /**
-   * Initialize a newly created source object to represent the given [file]. If
-   * a [uri] is given, then it will be used as the URI from which the source was
-   * derived, otherwise a `file:` URI will be created based on the [file].
-   */
+  /// Initialize a newly created source object to represent the given [file]. If
+  /// a [uri] is given, then it will be used as the URI from which the source
+  /// was derived, otherwise a `file:` URI will be created based on the [file].
   FileSource(File file, [Uri uri])
       : this.uri = uri ?? file.toUri(),
         this.file = file,
@@ -75,16 +57,14 @@
     });
   }
 
-  /**
-   * Get and return the contents and timestamp of the underlying file.
-   *
-   * Clients should consider using the method [AnalysisContext.getContents]
-   * because contexts can have local overrides of the content of a source that
-   * the source is not aware of.
-   *
-   * Throws an exception if the contents of this source could not be accessed.
-   * See [contents].
-   */
+  /// Get and return the contents and timestamp of the underlying file.
+  ///
+  /// Clients should consider using the method [AnalysisContext.getContents]
+  /// because contexts can have local overrides of the content of a source that
+  /// the source is not aware of.
+  ///
+  /// Throws an exception if the contents of this source could not be accessed.
+  /// See [contents].
   TimestampedData<String> get contentsFromFile {
     return TimestampedData<String>(
         modificationStamp, fileReadMode(file.readAsStringSync()));
diff --git a/pkg/analyzer/lib/src/string_source.dart b/pkg/analyzer/lib/src/string_source.dart
index 811b493..df408cf 100644
--- a/pkg/analyzer/lib/src/string_source.dart
+++ b/pkg/analyzer/lib/src/string_source.dart
@@ -5,13 +5,9 @@
 import 'package:analyzer/src/generated/engine.dart' show TimestampedData;
 import 'package:analyzer/src/generated/source.dart';
 
-/**
- * An implementation of [Source] that's based on an in-memory Dart string.
- */
+/// An implementation of [Source] that's based on an in-memory Dart string.
 class StringSource extends Source {
-  /**
-   * The content of the source.
-   */
+  /// The content of the source.
   final String _contents;
 
   @override
@@ -47,10 +43,8 @@
   @override
   UriKind get uriKind => UriKind.FILE_URI;
 
-  /**
-   * Return `true` if the given [object] is a string source that is equal to
-   * this source.
-   */
+  /// Return `true` if the given [object] is a string source that is equal to
+  /// this source.
   @override
   bool operator ==(Object object) {
     return object is StringSource &&
diff --git a/pkg/analyzer/lib/src/summary/api_signature.dart b/pkg/analyzer/lib/src/summary/api_signature.dart
index bfa5a20..4a6d404 100644
--- a/pkg/analyzer/lib/src/summary/api_signature.dart
+++ b/pkg/analyzer/lib/src/summary/api_signature.dart
@@ -11,67 +11,51 @@
 import 'package:crypto/crypto.dart';
 import 'package:pub_semver/pub_semver.dart';
 
-/**
- * An instance of [ApiSignature] collects data in the form of primitive types
- * (strings, ints, bools, etc.) from a summary "builder" object, and uses them
- * to generate an MD5 signature of a the non-informative parts of the summary
- * (i.e. those parts representing the API of the code being summarized).
- *
- * Note that the data passed to the MD5 signature algorithm is untyped.  So, for
- * instance, an API signature built from a sequence of `false` booleans is
- * likely to match an API signature built from a sequence of zeros.  The caller
- * should take this into account; e.g. if a data structure may be represented
- * either by a boolean or an int, the caller should encode a tag distinguishing
- * the two representations before encoding the data.
- */
+/// An instance of [ApiSignature] collects data in the form of primitive types
+/// (strings, ints, bools, etc.) from a summary "builder" object, and uses them
+/// to generate an MD5 signature of a the non-informative parts of the summary
+/// (i.e. those parts representing the API of the code being summarized).
+///
+/// Note that the data passed to the MD5 signature algorithm is untyped.  So,
+/// for instance, an API signature built from a sequence of `false` booleans is
+/// likely to match an API signature built from a sequence of zeros.  The caller
+/// should take this into account; e.g. if a data structure may be represented
+/// either by a boolean or an int, the caller should encode a tag distinguishing
+/// the two representations before encoding the data.
 class ApiSignature {
-  /**
-   * Version number of the code in this class.  Any time this class is changed
-   * in a way that affects the data collected in [_data], this version number
-   * should be incremented, so that a summary signed by a newer version of the
-   * signature algorithm won't accidentally have the same signature as a summary
-   * signed by an older version.
-   */
+  /// Version number of the code in this class.  Any time this class is changed
+  /// in a way that affects the data collected in [_data], this version number
+  /// should be incremented, so that a summary signed by a newer version of the
+  /// signature algorithm won't accidentally have the same signature as a
+  /// summary signed by an older version.
   static const int _VERSION = 0;
 
-  /**
-   * Data accumulated so far.
-   */
+  /// Data accumulated so far.
   ByteData _data = ByteData(4096);
 
-  /**
-   * Offset into [_data] where the next byte should be written.
-   */
+  /// Offset into [_data] where the next byte should be written.
   int _offset = 0;
 
-  /**
-   * Create an [ApiSignature] which is ready to accept data.
-   */
+  /// Create an [ApiSignature] which is ready to accept data.
   ApiSignature() {
     addInt(_VERSION);
   }
 
-  /**
-   * For testing only: create an [ApiSignature] which doesn't include any
-   * version information.  This makes it easier to unit tests, since the data
-   * is stable even if [_VERSION] is changed.
-   */
+  /// For testing only: create an [ApiSignature] which doesn't include any
+  /// version information.  This makes it easier to unit tests, since the data
+  /// is stable even if [_VERSION] is changed.
   ApiSignature.unversioned();
 
-  /**
-   * Collect a boolean value.
-   */
+  /// Collect a boolean value.
   void addBool(bool b) {
     _makeRoom(1);
     _data.setUint8(_offset, b ? 1 : 0);
     _offset++;
   }
 
-  /**
-   * Collect a sequence of arbitrary bytes.  Note that the length is not
-   * collected, so for example `addBytes([1, 2]);` will have the same effect as
-   * `addBytes([1]); addBytes([2]);`.
-   */
+  /// Collect a sequence of arbitrary bytes.  Note that the length is not
+  /// collected, so for example `addBytes([1, 2]);` will have the same effect as
+  /// `addBytes([1]); addBytes([2]);`.
   void addBytes(List<int> bytes) {
     int length = bytes.length;
     _makeRoom(length);
@@ -81,18 +65,14 @@
     _offset += length;
   }
 
-  /**
-   * Collect a double-precision floating point value.
-   */
+  /// Collect a double-precision floating point value.
   void addDouble(double d) {
     _makeRoom(8);
     _data.setFloat64(_offset, d, Endian.little);
     _offset += 8;
   }
 
-  /**
-   * Collect a [FeatureSet].
-   */
+  /// Collect a [FeatureSet].
   void addFeatureSet(FeatureSet featureSet) {
     var knownFeatures = ExperimentStatus.knownFeatures;
     addInt(knownFeatures.length);
@@ -101,65 +81,49 @@
     }
   }
 
-  /**
-   * Collect a 32-bit unsigned integer value.
-   */
+  /// Collect a 32-bit unsigned integer value.
   void addInt(int i) {
     _makeRoom(4);
     _data.setUint32(_offset, i, Endian.little);
     _offset += 4;
   }
 
-  /**
-   * Collect a language version.
-   */
+  /// Collect a language version.
   void addLanguageVersion(Version version) {
     addInt(version.major);
     addInt(version.minor);
   }
 
-  /**
-   * Collect a string.
-   */
+  /// Collect a string.
   void addString(String s) {
     List<int> bytes = utf8.encode(s);
     addInt(bytes.length);
     addBytes(bytes);
   }
 
-  /**
-   * Collect the given [Uint32List].
-   */
+  /// Collect the given [Uint32List].
   void addUint32List(Uint32List data) {
     addBytes(data.buffer.asUint8List());
   }
 
-  /**
-   * For testing only: retrieve the internal representation of the data that
-   * has been collected.
-   */
+  /// For testing only: retrieve the internal representation of the data that
+  /// has been collected.
   List<int> getBytes_forDebug() {
     return Uint8List.view(_data.buffer, 0, _offset).toList();
   }
 
-  /**
-   * Return the bytes of the MD5 hash of the data collected so far.
-   */
+  /// Return the bytes of the MD5 hash of the data collected so far.
   List<int> toByteList() {
     return md5.convert(Uint8List.view(_data.buffer, 0, _offset)).bytes;
   }
 
-  /**
-   * Return a hex-encoded MD5 signature of the data collected so far.
-   */
+  /// Return a hex-encoded MD5 signature of the data collected so far.
   String toHex() {
     return hex.encode(toByteList());
   }
 
-  /**
-   * Ensure that [spaceNeeded] bytes can be added to [_data] at [_offset]
-   * (copying it to a larger object if necessary).
-   */
+  /// Ensure that [spaceNeeded] bytes can be added to [_data] at [_offset]
+  /// (copying it to a larger object if necessary).
   void _makeRoom(int spaceNeeded) {
     int oldLength = _data.lengthInBytes;
     if (_offset + spaceNeeded > oldLength) {
diff --git a/pkg/analyzer/lib/src/summary/base.dart b/pkg/analyzer/lib/src/summary/base.dart
index 93215cf..0174fed 100644
--- a/pkg/analyzer/lib/src/summary/base.dart
+++ b/pkg/analyzer/lib/src/summary/base.dart
@@ -2,86 +2,68 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-/**
- * Base functionality which code generated summary classes are built upon.
- */
+/// Base functionality which code generated summary classes are built upon.
 library analyzer.src.summary.base;
 
-/**
- * Annotation used in the summary IDL to indicate the id of a field.  The set
- * of ids used by a class must cover the contiguous range from 0 to N-1, where
- * N is the number of fields.
- *
- * In order to preserve forwards and backwards compatibility, id numbers must
- * be stable between releases.  So when new fields are added they should take
- * the next available id without renumbering other fields.
- */
+/// Annotation used in the summary IDL to indicate the id of a field.  The set
+/// of ids used by a class must cover the contiguous range from 0 to N-1, where
+/// N is the number of fields.
+///
+/// In order to preserve forwards and backwards compatibility, id numbers must
+/// be stable between releases.  So when new fields are added they should take
+/// the next available id without renumbering other fields.
 class Id {
   final int value;
 
   const Id(this.value);
 }
 
-/**
- * Instances of this class represent data that has been read from a summary.
- */
+/// Instances of this class represent data that has been read from a summary.
 abstract class SummaryClass {
-  /**
-   * Translate the data in this class into a JSON map, whose keys are the names
-   * of fields and whose values are the data stored in those fields,
-   * recursively converted into JSON.
-   *
-   * Fields containing their default value are elided.
-   *
-   * Intended for testing and debugging only.
-   */
+  /// Translate the data in this class into a JSON map, whose keys are the names
+  /// of fields and whose values are the data stored in those fields,
+  /// recursively converted into JSON.
+  ///
+  /// Fields containing their default value are elided.
+  ///
+  /// Intended for testing and debugging only.
   Map<String, Object> toJson();
 
-  /**
-   * Translate the data in this class into a map whose keys are the names of
-   * fields and whose values are the data stored in those fields.
-   *
-   * Intended for testing and debugging only.
-   */
+  /// Translate the data in this class into a map whose keys are the names of
+  /// fields and whose values are the data stored in those fields.
+  ///
+  /// Intended for testing and debugging only.
   Map<String, Object> toMap();
 }
 
-/**
- * Annotation used in the summary IDL to indicate that a summary class can be
- * the top level object in an encoded summary.
- */
+/// Annotation used in the summary IDL to indicate that a summary class can be
+/// the top level object in an encoded summary.
 class TopLevel {
-  /**
-   * If non-null, identifier that will be stored in bytes 4-7 of the file,
-   * prior all other file data.  Must be exactly 4 Latin1 characters.
-   */
+  /// If non-null, identifier that will be stored in bytes 4-7 of the file,
+  /// prior all other file data.  Must be exactly 4 Latin1 characters.
   final String fileIdentifier;
 
   const TopLevel([this.fileIdentifier]);
 }
 
-/**
- * Annotation used in the summary IDL to indicate the field name that is used
- * to distinguish variants, or logical views on the same physical layout of
- * fields.
- */
+/// Annotation used in the summary IDL to indicate the field name that is used
+/// to distinguish variants, or logical views on the same physical layout of
+/// fields.
 class Variant {
   final String fieldName;
 
   const Variant(this.fieldName);
 }
 
-/**
- * Annotation used in the summary IDL to indicate the id of a field that
- * represents a logical field.  The set of ids used by a class must cover the
- * contiguous range from 0 to N-1, where N is the number of fields.  All logical
- * fields must have the same type, which will become the type of the actual
- * field.
- *
- * In order to preserve forwards and backwards compatibility, id numbers must
- * be stable between releases.  So when new fields are added they should take
- * the next available id without renumbering other fields.
- */
+/// Annotation used in the summary IDL to indicate the id of a field that
+/// represents a logical field.  The set of ids used by a class must cover the
+/// contiguous range from 0 to N-1, where N is the number of fields.  All
+/// logical fields must have the same type, which will become the type of the
+/// actual field.
+///
+/// In order to preserve forwards and backwards compatibility, id numbers must
+/// be stable between releases.  So when new fields are added they should take
+/// the next available id without renumbering other fields.
 class VariantId {
   /// The ID of the actual field.
   final int value;
diff --git a/pkg/analyzer/lib/src/summary/flat_buffers.dart b/pkg/analyzer/lib/src/summary/flat_buffers.dart
index 40194dc..b939bb9 100644
--- a/pkg/analyzer/lib/src/summary/flat_buffers.dart
+++ b/pkg/analyzer/lib/src/summary/flat_buffers.dart
@@ -7,11 +7,9 @@
 import 'dart:math';
 import 'dart:typed_data';
 
-/**
- * Reader of lists of boolean values.
- *
- * The returned unmodifiable lists lazily read values on access.
- */
+/// Reader of lists of boolean values.
+///
+/// The returned unmodifiable lists lazily read values on access.
 class BoolListReader extends Reader<List<bool>> {
   const BoolListReader();
 
@@ -23,9 +21,7 @@
       _FbBoolList(bc, bc.derefObject(offset));
 }
 
-/**
- * The reader of booleans.
- */
+/// The reader of booleans.
 class BoolReader extends Reader<bool> {
   const BoolReader() : super();
 
@@ -36,9 +32,7 @@
   bool read(BufferContext bc, int offset) => bc._getInt8(offset) != 0;
 }
 
-/**
- * Buffer with data and some context about it.
- */
+/// Buffer with data and some context about it.
 class BufferContext {
   final ByteData _buffer;
 
@@ -69,10 +63,8 @@
 
   int _getUint8(int offset) => _buffer.getUint8(offset);
 
-  /**
-   * If the [byteList] is already a [Uint8List] return it.
-   * Otherwise return a [Uint8List] copy of the [byteList].
-   */
+  /// If the [byteList] is already a [Uint8List] return it.
+  /// Otherwise return a [Uint8List] copy of the [byteList].
   static Uint8List _asUint8List(List<int> byteList) {
     if (byteList is Uint8List) {
       return byteList;
@@ -82,46 +74,32 @@
   }
 }
 
-/**
- * Class that helps building flat buffers.
- */
+/// Class that helps building flat buffers.
 class Builder {
   final int initialSize;
 
-  /**
-   * The list of field tails, reused by [_VTable] instances.
-   */
+  /// The list of field tails, reused by [_VTable] instances.
   final Int32List _reusedFieldTails = Int32List(1024);
 
-  /**
-   * The list of field offsets, reused by [_VTable] instances.
-   */
+  /// The list of field offsets, reused by [_VTable] instances.
   final Int32List _reusedFieldOffsets = Int32List(1024);
 
-  /**
-   * The list of existing VTable(s).
-   */
+  /// The list of existing VTable(s).
   final List<_VTable> _vTables = <_VTable>[];
 
   ByteData _buf;
 
-  /**
-   * The maximum alignment that has been seen so far.  If [_buf] has to be
-   * reallocated in the future (to insert room at its start for more bytes) the
-   * reallocation will need to be a multiple of this many bytes.
-   */
+  /// The maximum alignment that has been seen so far.  If [_buf] has to be
+  /// reallocated in the future (to insert room at its start for more bytes) the
+  /// reallocation will need to be a multiple of this many bytes.
   int _maxAlign;
 
-  /**
-   * The number of bytes that have been written to the buffer so far.  The
-   * most recently written byte is this many bytes from the end of [_buf].
-   */
+  /// The number of bytes that have been written to the buffer so far.  The
+  /// most recently written byte is this many bytes from the end of [_buf].
   int _tail;
 
-  /**
-   * The location of the end of the current table, measured in bytes from the
-   * end of [_buf], or `null` if a table is not currently being built.
-   */
+  /// The location of the end of the current table, measured in bytes from the
+  /// end of [_buf], or `null` if a table is not currently being built.
   int _currentTableEndTail;
 
   _VTable _currentVTable;
@@ -134,11 +112,9 @@
     reset();
   }
 
-  /**
-   * Add the [field] with the given boolean [value].  The field is not added if
-   * the [value] is equal to [def].  Booleans are stored as 8-bit fields with
-   * `0` for `false` and `1` for `true`.
-   */
+  /// Add the [field] with the given boolean [value].  The field is not added if
+  /// the [value] is equal to [def].  Booleans are stored as 8-bit fields with
+  /// `0` for `false` and `1` for `true`.
   void addBool(int field, bool value, [bool def]) {
     _ensureCurrentVTable();
     if (value != null && value != def) {
@@ -149,9 +125,7 @@
     }
   }
 
-  /**
-   * Add the [field] with the given 64-bit float [value].
-   */
+  /// Add the [field] with the given 64-bit float [value].
   void addFloat64(int field, double value, [double def]) {
     _ensureCurrentVTable();
     if (value != null && value != def) {
@@ -162,10 +136,8 @@
     }
   }
 
-  /**
-   * Add the [field] with the given 32-bit signed integer [value].  The field is
-   * not added if the [value] is equal to [def].
-   */
+  /// Add the [field] with the given 32-bit signed integer [value].  The field
+  /// is not added if the [value] is equal to [def].
   void addInt32(int field, int value, [int def]) {
     _ensureCurrentVTable();
     if (value != null && value != def) {
@@ -176,10 +148,8 @@
     }
   }
 
-  /**
-   * Add the [field] with the given 8-bit signed integer [value].  The field is
-   * not added if the [value] is equal to [def].
-   */
+  /// Add the [field] with the given 8-bit signed integer [value].  The field is
+  /// not added if the [value] is equal to [def].
   void addInt8(int field, int value, [int def]) {
     _ensureCurrentVTable();
     if (value != null && value != def) {
@@ -190,9 +160,7 @@
     }
   }
 
-  /**
-   * Add the [field] referencing an object with the given [offset].
-   */
+  /// Add the [field] referencing an object with the given [offset].
   void addOffset(int field, Offset offset) {
     _ensureCurrentVTable();
     if (offset != null) {
@@ -202,10 +170,8 @@
     }
   }
 
-  /**
-   * Add the [field] with the given 32-bit unsigned integer [value].  The field
-   * is not added if the [value] is equal to [def].
-   */
+  /// Add the [field] with the given 32-bit unsigned integer [value].  The field
+  /// is not added if the [value] is equal to [def].
   void addUint32(int field, int value, [int def]) {
     _ensureCurrentVTable();
     if (value != null && value != def) {
@@ -216,10 +182,8 @@
     }
   }
 
-  /**
-   * Add the [field] with the given 8-bit unsigned integer [value].  The field
-   * is not added if the [value] is equal to [def].
-   */
+  /// Add the [field] with the given 8-bit unsigned integer [value].  The field
+  /// is not added if the [value] is equal to [def].
   void addUint8(int field, int value, [int def]) {
     _ensureCurrentVTable();
     if (value != null && value != def) {
@@ -230,9 +194,7 @@
     }
   }
 
-  /**
-   * End the current table and return its offset.
-   */
+  /// End the current table and return its offset.
   Offset endTable() {
     if (_currentVTable == null) {
       throw StateError('Start a table before ending it.');
@@ -271,13 +233,11 @@
     return Offset(tableTail);
   }
 
-  /**
-   * Finish off the creation of the buffer.  The given [offset] is used as the
-   * root object offset, and usually references directly or indirectly every
-   * written object.  If [fileIdentifier] is specified (and not `null`), it is
-   * interpreted as a 4-byte Latin-1 encoded string that should be placed at
-   * bytes 4-7 of the file.
-   */
+  /// Finish off the creation of the buffer.  The given [offset] is used as the
+  /// root object offset, and usually references directly or indirectly every
+  /// written object.  If [fileIdentifier] is specified (and not `null`), it is
+  /// interpreted as a 4-byte Latin-1 encoded string that should be placed at
+  /// bytes 4-7 of the file.
   Uint8List finish(Offset offset, [String fileIdentifier]) {
     _prepare(max(4, _maxAlign), fileIdentifier == null ? 1 : 2);
     int alignedTail = _tail + ((-_tail) % _maxAlign);
@@ -291,42 +251,32 @@
     return _buf.buffer.asUint8List(_buf.lengthInBytes - alignedTail);
   }
 
-  /**
-   * This is a low-level method, it should not be invoked by clients.
-   */
+  /// This is a low-level method, it should not be invoked by clients.
   Uint8List lowFinish() {
     int alignedTail = _tail + ((-_tail) % _maxAlign);
     return _buf.buffer.asUint8List(_buf.lengthInBytes - alignedTail);
   }
 
-  /**
-   * This is a low-level method, it should not be invoked by clients.
-   */
+  /// This is a low-level method, it should not be invoked by clients.
   void lowReset() {
     _buf = ByteData(initialSize);
     _maxAlign = 1;
     _tail = 0;
   }
 
-  /**
-   * This is a low-level method, it should not be invoked by clients.
-   */
+  /// This is a low-level method, it should not be invoked by clients.
   void lowWriteUint32(int value) {
     _prepare(4, 1);
     _setUint32AtTail(_buf, _tail, value);
   }
 
-  /**
-   * This is a low-level method, it should not be invoked by clients.
-   */
+  /// This is a low-level method, it should not be invoked by clients.
   void lowWriteUint8(int value) {
     _prepare(1, 1);
     _buf.setUint8(_buf.lengthInBytes - _tail, value);
   }
 
-  /**
-   * Reset the builder and make it ready for filling a new buffer.
-   */
+  /// Reset the builder and make it ready for filling a new buffer.
   void reset() {
     _buf = ByteData(initialSize);
     _maxAlign = 1;
@@ -334,9 +284,7 @@
     _currentVTable = null;
   }
 
-  /**
-   * Start a new table.  Must be finished with [endTable] invocation.
-   */
+  /// Start a new table.  Must be finished with [endTable] invocation.
   void startTable() {
     if (_currentVTable != null) {
       throw StateError('Inline tables are not supported.');
@@ -345,9 +293,7 @@
     _currentTableEndTail = _tail;
   }
 
-  /**
-   * Write the given list of [values].
-   */
+  /// Write the given list of [values].
   Offset writeList(List<Offset> values) {
     _ensureNoVTable();
     _prepare(4, 1 + values.length);
@@ -362,9 +308,7 @@
     return result;
   }
 
-  /**
-   * Write the given list of boolean [values].
-   */
+  /// Write the given list of boolean [values].
   Offset writeListBool(List<bool> values) {
     int bitLength = values.length;
     int padding = (-bitLength) % 8;
@@ -394,9 +338,7 @@
     return writeListUint8(bytes);
   }
 
-  /**
-   * Write the given list of 64-bit float [values].
-   */
+  /// Write the given list of 64-bit float [values].
   Offset writeListFloat64(List<double> values) {
     _ensureNoVTable();
     _prepare(8, 1 + values.length);
@@ -411,9 +353,7 @@
     return result;
   }
 
-  /**
-   * Write the given list of signed 32-bit integer [values].
-   */
+  /// Write the given list of signed 32-bit integer [values].
   Offset writeListInt32(List<int> values) {
     _ensureNoVTable();
     _prepare(4, 1 + values.length);
@@ -428,9 +368,7 @@
     return result;
   }
 
-  /**
-   * Write the given list of unsigned 32-bit integer [values].
-   */
+  /// Write the given list of unsigned 32-bit integer [values].
   Offset writeListUint32(List<int> values) {
     _ensureNoVTable();
     _prepare(4, 1 + values.length);
@@ -445,9 +383,7 @@
     return result;
   }
 
-  /**
-   * Write the given list of unsigned 8-bit integer [values].
-   */
+  /// Write the given list of unsigned 8-bit integer [values].
   Offset writeListUint8(List<int> values) {
     _ensureNoVTable();
     _prepare(4, 1, additionalBytes: values.length);
@@ -462,10 +398,8 @@
     return result;
   }
 
-  /**
-   * Write the given string [value] and return its [Offset], or `null` if
-   * the [value] is equal to [def].
-   */
+  /// Write the given string [value] and return its [Offset], or `null` if
+  /// the [value] is equal to [def].
   Offset<String> writeString(String value, [String def]) {
     _ensureNoVTable();
     if (value != def) {
@@ -486,18 +420,14 @@
     return null;
   }
 
-  /**
-   * Throw an exception if there is not currently a vtable.
-   */
+  /// Throw an exception if there is not currently a vtable.
   void _ensureCurrentVTable() {
     if (_currentVTable == null) {
       throw StateError('Start a table before adding values.');
     }
   }
 
-  /**
-   * Throw an exception if there is currently a vtable.
-   */
+  /// Throw an exception if there is currently a vtable.
   void _ensureNoVTable() {
     if (_currentVTable != null) {
       throw StateError(
@@ -505,11 +435,9 @@
     }
   }
 
-  /**
-   * Prepare for writing the given [count] of scalars of the given [size].
-   * Additionally allocate the specified [additionalBytes]. Update the current
-   * tail pointer to point at the allocated space.
-   */
+  /// Prepare for writing the given [count] of scalars of the given [size].
+  /// Additionally allocate the specified [additionalBytes]. Update the current
+  /// tail pointer to point at the allocated space.
   void _prepare(int size, int count, {int additionalBytes = 0}) {
     // Update the alignment.
     if (_maxAlign < size) {
@@ -538,9 +466,7 @@
     _tail += bufSize;
   }
 
-  /**
-   * Record the offset of the given [field].
-   */
+  /// Record the offset of the given [field].
   void _trackField(int field) {
     _currentVTable.addField(field, _tail);
   }
@@ -562,11 +488,9 @@
   }
 }
 
-/**
- * The reader of lists of 64-bit float values.
- *
- * The returned unmodifiable lists lazily read values on access.
- */
+/// The reader of lists of 64-bit float values.
+///
+/// The returned unmodifiable lists lazily read values on access.
 class Float64ListReader extends Reader<List<double>> {
   const Float64ListReader();
 
@@ -578,9 +502,7 @@
       _FbFloat64List(bc, bc.derefObject(offset));
 }
 
-/**
- * The reader of 64-bit floats.
- */
+/// The reader of 64-bit floats.
 class Float64Reader extends Reader<double> {
   const Float64Reader() : super();
 
@@ -591,9 +513,7 @@
   double read(BufferContext bc, int offset) => bc._getFloat64(offset);
 }
 
-/**
- * The reader of signed 32-bit integers.
- */
+/// The reader of signed 32-bit integers.
 class Int32Reader extends Reader<int> {
   const Int32Reader() : super();
 
@@ -604,9 +524,7 @@
   int read(BufferContext bc, int offset) => bc._getInt32(offset);
 }
 
-/**
- * The reader of 8-bit signed integers.
- */
+/// The reader of 8-bit signed integers.
 class Int8Reader extends Reader<int> {
   const Int8Reader() : super();
 
@@ -617,11 +535,9 @@
   int read(BufferContext bc, int offset) => bc._getInt8(offset);
 }
 
-/**
- * The reader of lists of objects.
- *
- * The returned unmodifiable lists lazily read objects on access.
- */
+/// The reader of lists of objects.
+///
+/// The returned unmodifiable lists lazily read objects on access.
 class ListReader<E> extends Reader<List<E>> {
   final Reader<E> _elementReader;
 
@@ -635,34 +551,25 @@
       _FbGenericList<E>(_elementReader, bc, bc.derefObject(offset));
 }
 
-/**
- * The offset from the end of the buffer to a serialized object of the type [T].
- */
+/// The offset from the end of the buffer to a serialized object of the type
+/// [T].
 class Offset<T> {
   final int _tail;
 
   Offset(this._tail);
 }
 
-/**
- * Object that can read a value at a [BufferContext].
- */
+/// Object that can read a value at a [BufferContext].
 abstract class Reader<T> {
   const Reader();
 
-  /**
-   * The size of the value in bytes.
-   */
+  /// The size of the value in bytes.
   int get size;
 
-  /**
-   * Read the value at the given [offset] in [bc].
-   */
+  /// Read the value at the given [offset] in [bc].
   T read(BufferContext bc, int offset);
 
-  /**
-   * Read the value of the given [field] in the given [object].
-   */
+  /// Read the value of the given [field] in the given [object].
   T vTableGet(BufferContext object, int offset, int field, [T defaultValue]) {
     int vTableSOffset = object._getInt32(offset);
     int vTableOffset = offset - vTableSOffset;
@@ -679,9 +586,7 @@
   }
 }
 
-/**
- * The reader of string values.
- */
+/// The reader of string values.
 class StringReader extends Reader<String> {
   const StringReader() : super();
 
@@ -710,18 +615,14 @@
   }
 }
 
-/**
- * An abstract reader for tables.
- */
+/// An abstract reader for tables.
 abstract class TableReader<T> extends Reader<T> {
   const TableReader();
 
   @override
   int get size => 4;
 
-  /**
-   * Return the object at [offset].
-   */
+  /// Return the object at [offset].
   T createObject(BufferContext bc, int offset);
 
   @override
@@ -731,11 +632,9 @@
   }
 }
 
-/**
- * Reader of lists of unsigned 32-bit integer values.
- *
- * The returned unmodifiable lists lazily read values on access.
- */
+/// Reader of lists of unsigned 32-bit integer values.
+///
+/// The returned unmodifiable lists lazily read values on access.
 class Uint32ListReader extends Reader<List<int>> {
   const Uint32ListReader();
 
@@ -747,9 +646,7 @@
       _FbUint32List(bc, bc.derefObject(offset));
 }
 
-/**
- * The reader of unsigned 32-bit integers.
- */
+/// The reader of unsigned 32-bit integers.
 class Uint32Reader extends Reader<int> {
   const Uint32Reader() : super();
 
@@ -760,11 +657,9 @@
   int read(BufferContext bc, int offset) => bc._getUint32(offset);
 }
 
-/**
- * Reader of lists of unsigned 8-bit integer values.
- *
- * The returned unmodifiable lists lazily read values on access.
- */
+/// Reader of lists of unsigned 8-bit integer values.
+///
+/// The returned unmodifiable lists lazily read values on access.
 class Uint8ListReader extends Reader<List<int>> {
   const Uint8ListReader();
 
@@ -776,9 +671,7 @@
       _FbUint8List(bc, bc.derefObject(offset));
 }
 
-/**
- * The reader of unsigned 8-bit integers.
- */
+/// The reader of unsigned 8-bit integers.
 class Uint8Reader extends Reader<int> {
   const Uint8Reader() : super();
 
@@ -789,9 +682,7 @@
   int read(BufferContext bc, int offset) => bc._getUint8(offset);
 }
 
-/**
- * List of booleans backed by 8-bit unsigned integers.
- */
+/// List of booleans backed by 8-bit unsigned integers.
 class _FbBoolList with ListMixin<bool> implements List<bool> {
   final BufferContext bc;
   final int offset;
@@ -825,9 +716,7 @@
   int _getByte(int index) => bc._getUint8(offset + 4 + index);
 }
 
-/**
- * The list backed by 64-bit values - Uint64 length and Float64.
- */
+/// The list backed by 64-bit values - Uint64 length and Float64.
 class _FbFloat64List extends _FbList<double> {
   _FbFloat64List(BufferContext bc, int offset) : super(bc, offset);
 
@@ -837,9 +726,7 @@
   }
 }
 
-/**
- * List backed by a generic object which may have any size.
- */
+/// List backed by a generic object which may have any size.
 class _FbGenericList<E> extends _FbList<E> {
   final Reader<E> elementReader;
 
@@ -860,9 +747,7 @@
   }
 }
 
-/**
- * The base class for immutable lists read from flat buffers.
- */
+/// The base class for immutable lists read from flat buffers.
 abstract class _FbList<E> with ListMixin<E> implements List<E> {
   final BufferContext bc;
   final int offset;
@@ -884,9 +769,7 @@
       throw StateError('Attempt to modify immutable list');
 }
 
-/**
- * List backed by 32-bit unsigned integers.
- */
+/// List backed by 32-bit unsigned integers.
 class _FbUint32List extends _FbList<int> {
   _FbUint32List(BufferContext bc, int offset) : super(bc, offset);
 
@@ -896,9 +779,7 @@
   }
 }
 
-/**
- * List backed by 8-bit unsigned integers.
- */
+/// List backed by 8-bit unsigned integers.
 class _FbUint8List extends _FbList<int> {
   _FbUint8List(BufferContext bc, int offset) : super(bc, offset);
 
@@ -908,33 +789,23 @@
   }
 }
 
-/**
- * Class that describes the structure of a table.
- */
+/// Class that describes the structure of a table.
 class _VTable {
   final Int32List _reusedFieldTails;
   final Int32List _reusedFieldOffsets;
 
-  /**
-   * The number of fields in [_reusedFieldTails].
-   */
+  /// The number of fields in [_reusedFieldTails].
   int _fieldCount = 0;
 
-  /**
-   * The private copy of [_reusedFieldOffsets], which is made only when we
-   * find that this table is unique.
-   */
+  /// The private copy of [_reusedFieldOffsets], which is made only when we
+  /// find that this table is unique.
   Int32List _fieldOffsets;
 
-  /**
-   * The size of the table that uses this VTable.
-   */
+  /// The size of the table that uses this VTable.
   int tableSize;
 
-  /**
-   * The tail of this VTable.  It is used to share the same VTable between
-   * multiple tables of identical structure.
-   */
+  /// The tail of this VTable.  It is used to share the same VTable between
+  /// multiple tables of identical structure.
   int tail;
 
   _VTable(this._reusedFieldTails, this._reusedFieldOffsets);
@@ -948,9 +819,7 @@
     _reusedFieldTails[field] = offset;
   }
 
-  /**
-   * Return `true` if the [existing] VTable can be used instead of this.
-   */
+  /// Return `true` if the [existing] VTable can be used instead of this.
   bool canUseExistingVTable(_VTable existing) {
     assert(tail == null);
     assert(existing.tail != null);
@@ -966,9 +835,7 @@
     return false;
   }
 
-  /**
-   * Fill the [_reusedFieldOffsets] field.
-   */
+  /// Fill the [_reusedFieldOffsets] field.
   void computeFieldOffsets(int tableTail) {
     for (int i = 0; i < _fieldCount; ++i) {
       int fieldTail = _reusedFieldTails[i];
@@ -976,10 +843,8 @@
     }
   }
 
-  /**
-   * Outputs this VTable to [buf], which is is expected to be aligned to 16-bit
-   * and have at least [numOfUint16] 16-bit words available.
-   */
+  /// Outputs this VTable to [buf], which is is expected to be aligned to 16-bit
+  /// and have at least [numOfUint16] 16-bit words available.
   void output(ByteData buf, int bufOffset) {
     // VTable size.
     buf.setUint16(bufOffset, numOfUint16 * 2, Endian.little);
@@ -994,9 +859,7 @@
     }
   }
 
-  /**
-   * Fill the [_fieldOffsets] field.
-   */
+  /// Fill the [_fieldOffsets] field.
   void takeFieldOffsets() {
     assert(_fieldOffsets == null);
     _fieldOffsets = Int32List(_fieldCount);
diff --git a/pkg/analyzer/lib/src/summary/link.dart b/pkg/analyzer/lib/src/summary/link.dart
index d0bd245..0d492d2 100644
--- a/pkg/analyzer/lib/src/summary/link.dart
+++ b/pkg/analyzer/lib/src/summary/link.dart
@@ -2,33 +2,25 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-/**
- * An instance of [DependencyWalker] contains the core algorithms for
- * walking a dependency graph and evaluating nodes in a safe order.
- */
+/// An instance of [DependencyWalker] contains the core algorithms for
+/// walking a dependency graph and evaluating nodes in a safe order.
 abstract class DependencyWalker<NodeType extends Node<NodeType>> {
-  /**
-   * Called by [walk] to evaluate a single non-cyclical node, after
-   * all that node's dependencies have been evaluated.
-   */
+  /// Called by [walk] to evaluate a single non-cyclical node, after
+  /// all that node's dependencies have been evaluated.
   void evaluate(NodeType v);
 
-  /**
-   * Called by [walk] to evaluate a strongly connected component
-   * containing one or more nodes.  All dependencies of the strongly
-   * connected component have been evaluated.
-   */
+  /// Called by [walk] to evaluate a strongly connected component
+  /// containing one or more nodes.  All dependencies of the strongly
+  /// connected component have been evaluated.
   void evaluateScc(List<NodeType> scc);
 
-  /**
-   * Walk the dependency graph starting at [startingPoint], finding
-   * strongly connected components and evaluating them in a safe order
-   * by calling [evaluate] and [evaluateScc].
-   *
-   * This is an implementation of Tarjan's strongly connected
-   * components algorithm
-   * (https://en.wikipedia.org/wiki/Tarjan%27s_strongly_connected_components_algorithm).
-   */
+  /// Walk the dependency graph starting at [startingPoint], finding
+  /// strongly connected components and evaluating them in a safe order
+  /// by calling [evaluate] and [evaluateScc].
+  ///
+  /// This is an implementation of Tarjan's strongly connected
+  /// components algorithm
+  /// (https://en.wikipedia.org/wiki/Tarjan%27s_strongly_connected_components_algorithm).
   void walk(NodeType startingPoint) {
     // TODO(paulberry): consider rewriting in a non-recursive way so
     // that long dependency chains don't cause stack overflow.
@@ -128,42 +120,30 @@
   }
 }
 
-/**
- * Instances of [Node] represent nodes in a dependency graph.  The
- * type parameter, [NodeType], is the derived type (this affords some
- * extra type safety by making it difficult to accidentally construct
- * bridges between unrelated dependency graphs).
- */
+/// Instances of [Node] represent nodes in a dependency graph.  The
+/// type parameter, [NodeType], is the derived type (this affords some
+/// extra type safety by making it difficult to accidentally construct
+/// bridges between unrelated dependency graphs).
 abstract class Node<NodeType> {
-  /**
-   * Index used by Tarjan's strongly connected components algorithm.
-   * Zero means the node has not been visited yet; a nonzero value
-   * counts the order in which the node was visited.
-   */
+  /// Index used by Tarjan's strongly connected components algorithm.
+  /// Zero means the node has not been visited yet; a nonzero value
+  /// counts the order in which the node was visited.
   int _index = 0;
 
-  /**
-   * Low link used by Tarjan's strongly connected components
-   * algorithm.  This represents the smallest [_index] of all the nodes
-   * in the strongly connected component to which this node belongs.
-   */
+  /// Low link used by Tarjan's strongly connected components
+  /// algorithm.  This represents the smallest [_index] of all the nodes
+  /// in the strongly connected component to which this node belongs.
   int _lowLink = 0;
 
   List<NodeType> _dependencies;
 
-  /**
-   * Indicates whether this node has been evaluated yet.
-   */
+  /// Indicates whether this node has been evaluated yet.
   bool get isEvaluated;
 
-  /**
-   * Compute the dependencies of this node.
-   */
+  /// Compute the dependencies of this node.
   List<NodeType> computeDependencies();
 
-  /**
-   * Gets the dependencies of the given node, computing them if necessary.
-   */
+  /// Gets the dependencies of the given node, computing them if necessary.
   static List<NodeType> getDependencies<NodeType>(Node<NodeType> node) {
     return node._dependencies ??= node.computeDependencies();
   }
diff --git a/pkg/analyzer/lib/src/summary/package_bundle_reader.dart b/pkg/analyzer/lib/src/summary/package_bundle_reader.dart
index d125f72..0aa30cd 100644
--- a/pkg/analyzer/lib/src/summary/package_bundle_reader.dart
+++ b/pkg/analyzer/lib/src/summary/package_bundle_reader.dart
@@ -11,10 +11,8 @@
 import 'package:analyzer/src/generated/source_io.dart';
 import 'package:analyzer/src/summary/idl.dart';
 
-/**
- * A [ConflictingSummaryException] indicates that two different summaries
- * provided to a [SummaryDataStore] conflict.
- */
+/// A [ConflictingSummaryException] indicates that two different summaries
+/// provided to a [SummaryDataStore] conflict.
 class ConflictingSummaryException implements Exception {
   final String duplicatedUri;
   final String summary1Uri;
@@ -62,15 +60,11 @@
   }
 }
 
-/**
- * A placeholder of a source that is part of a package whose analysis results
- * are served from its summary.  This source uses its URI as [fullName] and has
- * empty contents.
- */
+/// A placeholder of a source that is part of a package whose analysis results
+/// are served from its summary.  This source uses its URI as [fullName] and has
+/// empty contents.
 class InSummarySource extends BasicSource {
-  /**
-   * The summary file where this source was defined.
-   */
+  /// The summary file where this source was defined.
   final String summaryPath;
 
   InSummarySource(Uri uri, this.summaryPath) : super(uri);
@@ -91,10 +85,8 @@
   String toString() => uri.toString();
 }
 
-/**
- * The [UriResolver] that knows about sources that are served from their
- * summaries.
- */
+/// The [UriResolver] that knows about sources that are served from their
+/// summaries.
 class InSummaryUriResolver extends UriResolver {
   ResourceProvider resourceProvider;
   final SummaryDataStore _dataStore;
@@ -113,37 +105,27 @@
   }
 }
 
-/**
- * A [SummaryDataStore] is a container for the data extracted from a set of
- * summary package bundles.  It contains maps which can be used to find linked
- * and unlinked summaries by URI.
- */
+/// A [SummaryDataStore] is a container for the data extracted from a set of
+/// summary package bundles.  It contains maps which can be used to find linked
+/// and unlinked summaries by URI.
 class SummaryDataStore {
-  /**
-   * List of all [PackageBundle]s.
-   */
+  /// List of all [PackageBundle]s.
   final List<PackageBundle> bundles = <PackageBundle>[];
 
-  /**
-   * Map from the URI of a unit to the summary path that contained it.
-   */
+  /// Map from the URI of a unit to the summary path that contained it.
   final Map<String, String> uriToSummaryPath = <String, String>{};
 
   final Set<String> _libraryUris = <String>{};
   final Set<String> _partUris = <String>{};
 
-  /**
-   * Create a [SummaryDataStore] and populate it with the summaries in
-   * [summaryPaths].
-   */
+  /// Create a [SummaryDataStore] and populate it with the summaries in
+  /// [summaryPaths].
   SummaryDataStore(Iterable<String> summaryPaths,
       {ResourceProvider resourceProvider}) {
     summaryPaths.forEach((String path) => _fillMaps(path, resourceProvider));
   }
 
-  /**
-   * Add the given [bundle] loaded from the file with the given [path].
-   */
+  /// Add the given [bundle] loaded from the file with the given [path].
   void addBundle(String path, PackageBundle bundle) {
     bundles.add(bundle);
 
@@ -162,25 +144,19 @@
     }
   }
 
-  /**
-   * Return `true` if the store contains the linked summary for the library
-   * with the given absolute [uri].
-   */
+  /// Return `true` if the store contains the linked summary for the library
+  /// with the given absolute [uri].
   bool hasLinkedLibrary(String uri) {
     return _libraryUris.contains(uri);
   }
 
-  /**
-   * Return `true` if the store contains the unlinked summary for the unit
-   * with the given absolute [uri].
-   */
+  /// Return `true` if the store contains the unlinked summary for the unit
+  /// with the given absolute [uri].
   bool hasUnlinkedUnit(String uri) {
     return uriToSummaryPath.containsKey(uri);
   }
 
-  /**
-   * Return `true` if the unit with the [uri] is a part unit in the store.
-   */
+  /// Return `true` if the unit with the [uri] is a part unit in the store.
   bool isPartUnit(String uri) {
     return _partUris.contains(uri);
   }
diff --git a/pkg/analyzer/lib/src/summary/summarize_elements.dart b/pkg/analyzer/lib/src/summary/summarize_elements.dart
index 20b0456..508743d 100644
--- a/pkg/analyzer/lib/src/summary/summarize_elements.dart
+++ b/pkg/analyzer/lib/src/summary/summarize_elements.dart
@@ -4,16 +4,12 @@
 
 import 'package:analyzer/src/summary/format.dart';
 
-/**
- * Object that gathers information uses it to assemble a new
- * [PackageBundleBuilder].
- */
+/// Object that gathers information uses it to assemble a new
+/// [PackageBundleBuilder].
 class PackageBundleAssembler {
   LinkedNodeBundleBuilder _bundle2;
 
-  /**
-   * Assemble a new [PackageBundleBuilder] using the gathered information.
-   */
+  /// Assemble a new [PackageBundleBuilder] using the gathered information.
   PackageBundleBuilder assemble() {
     return PackageBundleBuilder(bundle2: _bundle2);
   }
diff --git a/pkg/analyzer/lib/src/summary/summary_file_builder.dart b/pkg/analyzer/lib/src/summary/summary_file_builder.dart
index 431ff50..92b577f 100644
--- a/pkg/analyzer/lib/src/summary/summary_file_builder.dart
+++ b/pkg/analyzer/lib/src/summary/summary_file_builder.dart
@@ -2,26 +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:_fe_analyzer_shared/src/sdk/allowed_experiments.dart';
-import 'package:analyzer/dart/analysis/features.dart';
-import 'package:analyzer/dart/analysis/utilities.dart';
-import 'package:analyzer/dart/ast/ast.dart';
-import 'package:analyzer/dart/element/element.dart';
+@Deprecated('Use package:analyzer/dart/sdk/build_sdk_summary.dart instead')
+library summary_file_builder;
+
+import 'package:analyzer/dart/sdk/build_sdk_summary.dart' as api;
 import 'package:analyzer/file_system/file_system.dart';
-import 'package:analyzer/file_system/physical_file_system.dart';
-import 'package:analyzer/src/dart/analysis/experiments.dart';
-import 'package:analyzer/src/dart/analysis/session.dart';
-import 'package:analyzer/src/dart/ast/ast.dart';
-import 'package:analyzer/src/dart/sdk/sdk.dart';
-import 'package:analyzer/src/generated/engine.dart';
-import 'package:analyzer/src/generated/source.dart';
-import 'package:analyzer/src/summary/format.dart';
-import 'package:analyzer/src/summary/summarize_elements.dart';
-import 'package:analyzer/src/summary2/link.dart' as summary2;
-import 'package:analyzer/src/summary2/linked_element_factory.dart' as summary2;
-import 'package:analyzer/src/summary2/reference.dart' as summary2;
 import 'package:meta/meta.dart';
-import 'package:yaml/yaml.dart';
 
 /// Build summary for SDK the at the given [sdkPath].
 ///
@@ -32,235 +18,9 @@
   @required String sdkPath,
   String embedderYamlPath,
 }) {
-  var sdk = FolderBasedDartSdk(
-    resourceProvider,
-    resourceProvider.getFolder(sdkPath),
+  return api.buildSdkSummary(
+    resourceProvider: resourceProvider,
+    sdkPath: sdkPath,
+    embedderYamlPath: embedderYamlPath,
   );
-  sdk.useSummary = false;
-  sdk.analysisOptions = AnalysisOptionsImpl();
-
-  // Append libraries from the embedder.
-  if (embedderYamlPath != null) {
-    var file = resourceProvider.getFile(embedderYamlPath);
-    var content = file.readAsStringSync();
-    var map = loadYaml(content) as YamlMap;
-    var embedderSdk = EmbedderSdk(resourceProvider, {file.parent: map});
-    for (var library in embedderSdk.sdkLibraries) {
-      var uriStr = library.shortName;
-      if (sdk.libraryMap.getLibrary(uriStr) == null) {
-        sdk.libraryMap.setLibrary(uriStr, library);
-      }
-    }
-  }
-
-  var librarySources = sdk.sdkLibraries.map((e) {
-    return sdk.mapDartUri(e.shortName);
-  }).toList();
-
-  return _Builder(
-    sdk.context,
-    sdk.allowedExperimentsJson,
-    librarySources,
-  ).build();
-}
-
-@Deprecated('Use buildSdkSummary()')
-class SummaryBuilder {
-  final ResourceProvider resourceProvider;
-  final String sdkPath;
-
-  /// The list of SDK summaries, might also include Flutter libraries.
-  /// Used for backward compatibility with `build_resolvers`.
-  /// TODO(scheglov) Create a better API for this, and remove it.
-  Iterable<Source> _librarySources;
-
-  /// The formal analysis context.
-  /// Used for backward compatibility with `build_resolvers`.
-  /// TODO(scheglov) Remove it.
-  AnalysisContext _context;
-
-  /**
-   * Create a summary builder for these [librarySources] and [context].
-   */
-  SummaryBuilder(Iterable<Source> librarySources, AnalysisContext context)
-      : _librarySources = librarySources,
-        _context = context,
-        resourceProvider = PhysicalResourceProvider.INSTANCE,
-        sdkPath = null;
-
-  factory SummaryBuilder.forSdk(String sdkPath) {
-    return SummaryBuilder.forSdk2(
-      resourceProvider: PhysicalResourceProvider.INSTANCE,
-      sdkPath: sdkPath,
-    );
-  }
-
-  SummaryBuilder.forSdk2({
-    @required this.resourceProvider,
-    @required this.sdkPath,
-  });
-
-  /**
-   * Build the linked bundle and return its bytes.
-   */
-  List<int> build({@deprecated FeatureSet featureSet}) {
-    if (_librarySources != null) {
-      return _build();
-    }
-
-    return buildSdkSummary(
-      resourceProvider: resourceProvider,
-      sdkPath: sdkPath,
-    );
-  }
-
-  /// The implementation that provides backward compatibility for
-  /// `build_resolvers`.
-  List<int> _build() {
-    var dartCorePath = _librarySources
-        .singleWhere((element) => '${element.uri}' == 'dart:core')
-        .fullName;
-    var sdkLib = resourceProvider.getFile(dartCorePath).parent.parent;
-
-    String allowedExperimentsJson;
-    try {
-      allowedExperimentsJson = sdkLib
-          .getChildAssumingFolder('_internal')
-          .getChildAssumingFile('allowed_experiments.json')
-          .readAsStringSync();
-    } catch (_) {}
-
-    return _Builder(
-      _context,
-      allowedExperimentsJson,
-      _librarySources,
-    ).build();
-  }
-}
-
-class _Builder {
-  final AnalysisContext context;
-  final String allowedExperimentsJson;
-  final Iterable<Source> librarySources;
-
-  final Set<String> libraryUris = <String>{};
-  final List<summary2.LinkInputLibrary> inputLibraries = [];
-
-  AllowedExperiments allowedExperiments;
-  final PackageBundleAssembler bundleAssembler = PackageBundleAssembler();
-
-  _Builder(
-    this.context,
-    this.allowedExperimentsJson,
-    this.librarySources,
-  ) {
-    allowedExperiments = _parseAllowedExperiments(allowedExperimentsJson);
-  }
-
-  /**
-   * Build the linked bundle and return its bytes.
-   */
-  List<int> build() {
-    librarySources.forEach(_addLibrary);
-
-    var elementFactory = summary2.LinkedElementFactory(
-      context,
-      AnalysisSessionImpl(null),
-      summary2.Reference.root(),
-    );
-
-    var linkResult = summary2.link(elementFactory, inputLibraries);
-    bundleAssembler.setBundle2(linkResult.bundle);
-
-    return PackageBundleBuilder(
-      bundle2: linkResult.bundle,
-      sdk: PackageBundleSdkBuilder(
-        allowedExperimentsJson: allowedExperimentsJson,
-      ),
-    ).toBuffer();
-  }
-
-  void _addLibrary(Source source) {
-    String uriStr = source.uri.toString();
-    if (!libraryUris.add(uriStr)) {
-      return;
-    }
-
-    var inputUnits = <summary2.LinkInputUnit>[];
-
-    CompilationUnit definingUnit = _parse(source);
-    inputUnits.add(
-      summary2.LinkInputUnit(null, source, false, definingUnit),
-    );
-
-    for (Directive directive in definingUnit.directives) {
-      if (directive is NamespaceDirective) {
-        String libUri = directive.uri.stringValue;
-        Source libSource = context.sourceFactory.resolveUri(source, libUri);
-        _addLibrary(libSource);
-      } else if (directive is PartDirective) {
-        String partUri = directive.uri.stringValue;
-        Source partSource = context.sourceFactory.resolveUri(source, partUri);
-        CompilationUnit partUnit = _parse(partSource);
-        inputUnits.add(
-          summary2.LinkInputUnit(partUri, partSource, false, partUnit),
-        );
-      }
-    }
-
-    inputLibraries.add(
-      summary2.LinkInputLibrary(source, inputUnits),
-    );
-  }
-
-  /// Return the [FeatureSet] for the given [uri], must be a `dart:` URI.
-  FeatureSet _featureSet(Uri uri) {
-    if (uri.isScheme('dart')) {
-      var pathSegments = uri.pathSegments;
-      if (pathSegments.isNotEmpty) {
-        var libraryName = pathSegments.first;
-        var experiments = allowedExperiments.forSdkLibrary(libraryName);
-        return FeatureSet.fromEnableFlags(experiments);
-      }
-    }
-    throw StateError('Expected a valid dart: URI: $uri');
-  }
-
-  CompilationUnit _parse(Source source) {
-    var result = parseString(
-      content: source.contents.data,
-      featureSet: _featureSet(source.uri),
-      throwIfDiagnostics: false,
-    );
-
-    if (result.errors.isNotEmpty) {
-      var errorsStr = result.errors.map((e) {
-        var location = result.lineInfo.getLocation(e.offset);
-        return '${source.fullName}:$location - ${e.message}';
-      }).join('\n');
-      throw StateError(
-        'Unexpected diagnostics:\n$errorsStr',
-      );
-    }
-
-    var unit = result.unit as CompilationUnitImpl;
-    unit.languageVersion = LibraryLanguageVersion(
-      package: ExperimentStatus.currentVersion,
-      override: null,
-    );
-
-    return result.unit;
-  }
-
-  static AllowedExperiments _parseAllowedExperiments(String content) {
-    if (content == null) {
-      return AllowedExperiments(
-        sdkDefaultExperiments: [],
-        sdkLibraryExperiments: {},
-        packageExperiments: {},
-      );
-    }
-
-    return parseAllowedExperiments(content);
-  }
 }
diff --git a/pkg/analyzer/lib/src/summary/summary_sdk.dart b/pkg/analyzer/lib/src/summary/summary_sdk.dart
index 15743d5..3315a88 100644
--- a/pkg/analyzer/lib/src/summary/summary_sdk.dart
+++ b/pkg/analyzer/lib/src/summary/summary_sdk.dart
@@ -11,21 +11,17 @@
 import 'package:analyzer/src/summary/idl.dart';
 import 'package:analyzer/src/summary/package_bundle_reader.dart';
 
-/**
- * An implementation of [DartSdk] which provides analysis results for `dart:`
- * libraries from the given summary file.  This implementation is limited and
- * suitable only for command-line tools, but not for IDEs - it does not
- * implement [sdkLibraries], [sdkVersion], [uris] and [fromFileUri].
- */
+/// An implementation of [DartSdk] which provides analysis results for `dart:`
+/// libraries from the given summary file.  This implementation is limited and
+/// suitable only for command-line tools, but not for IDEs - it does not
+/// implement [sdkLibraries], [sdkVersion], [uris] and [fromFileUri].
 class SummaryBasedDartSdk implements DartSdk {
   SummaryDataStore _dataStore;
   InSummaryUriResolver _uriResolver;
   PackageBundle _bundle;
   ResourceProvider resourceProvider;
 
-  /**
-   * The [AnalysisContext] which is used for all of the sources in this sdk.
-   */
+  /// The [AnalysisContext] which is used for all of the sources in this sdk.
   SdkAnalysisContext _analysisContext;
 
   SummaryBasedDartSdk(String summaryPath, bool _, {this.resourceProvider}) {
@@ -48,9 +44,7 @@
     return _bundle.sdk?.allowedExperimentsJson;
   }
 
-  /**
-   * Return the [PackageBundle] for this SDK, not `null`.
-   */
+  /// Return the [PackageBundle] for this SDK, not `null`.
   PackageBundle get bundle => _bundle;
 
   @override
diff --git a/pkg/analyzer/lib/src/summary2/ast_resolver.dart b/pkg/analyzer/lib/src/summary2/ast_resolver.dart
index 4883af9..06b0f40 100644
--- a/pkg/analyzer/lib/src/summary2/ast_resolver.dart
+++ b/pkg/analyzer/lib/src/summary2/ast_resolver.dart
@@ -7,6 +7,7 @@
 import 'package:analyzer/error/listener.dart';
 import 'package:analyzer/src/dart/resolver/flow_analysis_visitor.dart';
 import 'package:analyzer/src/dart/resolver/resolution_visitor.dart';
+import 'package:analyzer/src/dart/resolver/scope.dart';
 import 'package:analyzer/src/generated/resolver.dart';
 import 'package:analyzer/src/summary2/link.dart';
 
diff --git a/pkg/analyzer/lib/src/summary2/ast_text_printer.dart b/pkg/analyzer/lib/src/summary2/ast_text_printer.dart
index fd7b111..0cd8fa6 100644
--- a/pkg/analyzer/lib/src/summary2/ast_text_printer.dart
+++ b/pkg/analyzer/lib/src/summary2/ast_text_printer.dart
@@ -1087,7 +1087,7 @@
     _token(maybe);
   }
 
-  _typedLiteral(TypedLiteral node) {
+  void _typedLiteral(TypedLiteral node) {
     _token(node.constKeyword);
     node.typeArguments?.accept(this);
   }
diff --git a/pkg/analyzer/lib/src/summary2/constructor_initializer_resolver.dart b/pkg/analyzer/lib/src/summary2/constructor_initializer_resolver.dart
index 2f7d62e..7a858a8 100644
--- a/pkg/analyzer/lib/src/summary2/constructor_initializer_resolver.dart
+++ b/pkg/analyzer/lib/src/summary2/constructor_initializer_resolver.dart
@@ -6,7 +6,6 @@
 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/resolver.dart';
 import 'package:analyzer/src/summary2/ast_resolver.dart';
 import 'package:analyzer/src/summary2/link.dart';
 import 'package:analyzer/src/summary2/linking_node_scope.dart';
diff --git a/pkg/analyzer/lib/src/summary2/default_value_resolver.dart b/pkg/analyzer/lib/src/summary2/default_value_resolver.dart
index 3a68f9e..f3cee91 100644
--- a/pkg/analyzer/lib/src/summary2/default_value_resolver.dart
+++ b/pkg/analyzer/lib/src/summary2/default_value_resolver.dart
@@ -5,10 +5,9 @@
 import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/element/element.dart';
 import 'package:analyzer/src/dart/element/element.dart';
+import 'package:analyzer/src/dart/element/type_system.dart';
 import 'package:analyzer/src/dart/resolver/scope.dart';
-import 'package:analyzer/src/generated/resolver.dart'
-    show InferenceContext, Scope;
-import 'package:analyzer/src/generated/type_system.dart';
+import 'package:analyzer/src/generated/resolver.dart' show InferenceContext;
 import 'package:analyzer/src/summary2/ast_resolver.dart';
 import 'package:analyzer/src/summary2/link.dart';
 import 'package:analyzer/src/summary2/linking_node_scope.dart';
diff --git a/pkg/analyzer/lib/src/summary2/linking_bundle_context.dart b/pkg/analyzer/lib/src/summary2/linking_bundle_context.dart
index cc27e44..f2fa94d 100644
--- a/pkg/analyzer/lib/src/summary2/linking_bundle_context.dart
+++ b/pkg/analyzer/lib/src/summary2/linking_bundle_context.dart
@@ -7,7 +7,6 @@
 import 'package:analyzer/dart/element/type.dart';
 import 'package:analyzer/src/dart/element/element.dart';
 import 'package:analyzer/src/dart/element/member.dart';
-import 'package:analyzer/src/dart/element/type.dart';
 import 'package:analyzer/src/dart/element/type_algebra.dart';
 import 'package:analyzer/src/summary/format.dart';
 import 'package:analyzer/src/summary/idl.dart';
diff --git a/pkg/analyzer/lib/src/summary2/linking_node_scope.dart b/pkg/analyzer/lib/src/summary2/linking_node_scope.dart
index 7617125..8c8e6e9 100644
--- a/pkg/analyzer/lib/src/summary2/linking_node_scope.dart
+++ b/pkg/analyzer/lib/src/summary2/linking_node_scope.dart
@@ -3,7 +3,7 @@
 // BSD-style license that can be found in the LICENSE file.
 
 import 'package:analyzer/dart/ast/ast.dart';
-import 'package:analyzer/src/generated/resolver.dart';
+import 'package:analyzer/src/dart/resolver/scope.dart';
 
 /// This class provides access to [Scope]s corresponding to [AstNode]s.
 class LinkingNodeContext {
diff --git a/pkg/analyzer/lib/src/summary2/metadata_resolver.dart b/pkg/analyzer/lib/src/summary2/metadata_resolver.dart
index 7f3a04b..219a1e6 100644
--- a/pkg/analyzer/lib/src/summary2/metadata_resolver.dart
+++ b/pkg/analyzer/lib/src/summary2/metadata_resolver.dart
@@ -6,7 +6,7 @@
 import 'package:analyzer/dart/ast/visitor.dart';
 import 'package:analyzer/dart/element/element.dart';
 import 'package:analyzer/src/dart/element/element.dart';
-import 'package:analyzer/src/generated/resolver.dart';
+import 'package:analyzer/src/dart/resolver/scope.dart';
 import 'package:analyzer/src/summary2/ast_resolver.dart';
 import 'package:analyzer/src/summary2/link.dart';
 import 'package:analyzer/src/summary2/linking_node_scope.dart';
diff --git a/pkg/analyzer/lib/src/summary2/named_type_builder.dart b/pkg/analyzer/lib/src/summary2/named_type_builder.dart
index 654da0a..0edea72 100644
--- a/pkg/analyzer/lib/src/summary2/named_type_builder.dart
+++ b/pkg/analyzer/lib/src/summary2/named_type_builder.dart
@@ -9,7 +9,7 @@
 import 'package:analyzer/src/dart/element/element.dart';
 import 'package:analyzer/src/dart/element/type.dart';
 import 'package:analyzer/src/dart/element/type_algebra.dart';
-import 'package:analyzer/src/generated/type_system.dart';
+import 'package:analyzer/src/dart/element/type_system.dart';
 import 'package:analyzer/src/summary2/lazy_ast.dart';
 import 'package:analyzer/src/summary2/type_builder.dart';
 import 'package:meta/meta.dart';
diff --git a/pkg/analyzer/lib/src/summary2/reference_resolver.dart b/pkg/analyzer/lib/src/summary2/reference_resolver.dart
index 07f4fc9..3e93c70 100644
--- a/pkg/analyzer/lib/src/summary2/reference_resolver.dart
+++ b/pkg/analyzer/lib/src/summary2/reference_resolver.dart
@@ -10,8 +10,8 @@
 import 'package:analyzer/src/dart/ast/ast.dart';
 import 'package:analyzer/src/dart/element/element.dart';
 import 'package:analyzer/src/dart/element/type.dart';
+import 'package:analyzer/src/dart/element/type_system.dart';
 import 'package:analyzer/src/dart/resolver/scope.dart';
-import 'package:analyzer/src/generated/type_system.dart';
 import 'package:analyzer/src/summary/idl.dart';
 import 'package:analyzer/src/summary2/function_type_builder.dart';
 import 'package:analyzer/src/summary2/lazy_ast.dart';
diff --git a/pkg/analyzer/lib/src/summary2/top_level_inference.dart b/pkg/analyzer/lib/src/summary2/top_level_inference.dart
index 5bbcce9..20ab4a3 100644
--- a/pkg/analyzer/lib/src/summary2/top_level_inference.dart
+++ b/pkg/analyzer/lib/src/summary2/top_level_inference.dart
@@ -9,6 +9,7 @@
 import 'package:analyzer/src/dart/element/element.dart';
 import 'package:analyzer/src/dart/element/type.dart';
 import 'package:analyzer/src/dart/element/type_demotion.dart';
+import 'package:analyzer/src/dart/element/type_system.dart';
 import 'package:analyzer/src/dart/resolver/scope.dart';
 import 'package:analyzer/src/generated/element_type_provider.dart';
 import 'package:analyzer/src/generated/resolver.dart';
@@ -218,7 +219,7 @@
   }
 
   @override
-  noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation);
+  dynamic noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation);
 }
 
 class _InferenceDependenciesCollector extends RecursiveAstVisitor<void> {
diff --git a/pkg/analyzer/lib/src/summary2/type_builder.dart b/pkg/analyzer/lib/src/summary2/type_builder.dart
index 0050247..b9a0b93 100644
--- a/pkg/analyzer/lib/src/summary2/type_builder.dart
+++ b/pkg/analyzer/lib/src/summary2/type_builder.dart
@@ -14,7 +14,5 @@
   DartType build();
 
   @override
-  noSuchMethod(Invocation invocation) {
-    return super.noSuchMethod(invocation);
-  }
+  dynamic noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation);
 }
diff --git a/pkg/analyzer/lib/src/summary2/types_builder.dart b/pkg/analyzer/lib/src/summary2/types_builder.dart
index 16af95c..517f976 100644
--- a/pkg/analyzer/lib/src/summary2/types_builder.dart
+++ b/pkg/analyzer/lib/src/summary2/types_builder.dart
@@ -10,7 +10,7 @@
 import 'package:analyzer/src/dart/analysis/session.dart';
 import 'package:analyzer/src/dart/element/element.dart';
 import 'package:analyzer/src/dart/element/type.dart';
-import 'package:analyzer/src/generated/type_system.dart';
+import 'package:analyzer/src/dart/element/type_system.dart';
 import 'package:analyzer/src/summary2/default_types_builder.dart';
 import 'package:analyzer/src/summary2/lazy_ast.dart';
 import 'package:analyzer/src/summary2/type_builder.dart';
diff --git a/pkg/analyzer/lib/src/task/api/model.dart b/pkg/analyzer/lib/src/task/api/model.dart
index da0d3db..d3d1fac 100644
--- a/pkg/analyzer/lib/src/task/api/model.dart
+++ b/pkg/analyzer/lib/src/task/api/model.dart
@@ -4,23 +4,17 @@
 
 import 'package:analyzer/src/generated/source.dart';
 
-/**
- * An object with which an analysis result can be associated.
- *
- * Clients may implement this class when creating new kinds of targets.
- * Instances of this type are used in hashed data structures, so subtypes are
- * required to correctly implement [==] and [hashCode].
- */
+/// An object with which an analysis result can be associated.
+///
+/// Clients may implement this class when creating new kinds of targets.
+/// Instances of this type are used in hashed data structures, so subtypes are
+/// required to correctly implement [==] and [hashCode].
 abstract class AnalysisTarget {
-  /**
-   * If this target is associated with a library, return the source of the
-   * library's defining compilation unit; otherwise return `null`.
-   */
+  /// If this target is associated with a library, return the source of the
+  /// library's defining compilation unit; otherwise return `null`.
   Source get librarySource;
 
-  /**
-   * Return the source associated with this target, or `null` if this target is
-   * not associated with a source.
-   */
+  /// Return the source associated with this target, or `null` if this target is
+  /// not associated with a source.
   Source get source;
 }
diff --git a/pkg/analyzer/lib/src/task/options.dart b/pkg/analyzer/lib/src/task/options.dart
index ddaf18a..96d633fb 100644
--- a/pkg/analyzer/lib/src/task/options.dart
+++ b/pkg/analyzer/lib/src/task/options.dart
@@ -577,9 +577,8 @@
 }
 
 class _OptionsProcessor {
-  /**
-   * Apply the options in the given [optionMap] to the given analysis [options].
-   */
+  /// Apply the options in the given [optionMap] to the given analysis
+  /// [options].
   void applyToAnalysisOptions(AnalysisOptionsImpl options, YamlMap optionMap) {
     if (optionMap == null) {
       return;
diff --git a/pkg/analyzer/lib/src/task/strong/checker.dart b/pkg/analyzer/lib/src/task/strong/checker.dart
index c087b8e..0d1d5b3 100644
--- a/pkg/analyzer/lib/src/task/strong/checker.dart
+++ b/pkg/analyzer/lib/src/task/strong/checker.dart
@@ -16,8 +16,8 @@
 import 'package:analyzer/src/dart/element/element.dart';
 import 'package:analyzer/src/dart/element/inheritance_manager3.dart';
 import 'package:analyzer/src/dart/element/type.dart';
+import 'package:analyzer/src/dart/element/type_system.dart';
 import 'package:analyzer/src/error/codes.dart' show StrongModeCode;
-import 'package:analyzer/src/generated/type_system.dart';
 import 'package:analyzer/src/summary/idl.dart';
 
 /// Given an [expression] and a corresponding [typeSystem] and [typeProvider],
diff --git a/pkg/analyzer/lib/src/task/strong_mode.dart b/pkg/analyzer/lib/src/task/strong_mode.dart
index 16e0810..d4f9bc9 100644
--- a/pkg/analyzer/lib/src/task/strong_mode.dart
+++ b/pkg/analyzer/lib/src/task/strong_mode.dart
@@ -11,15 +11,13 @@
 import 'package:analyzer/src/dart/element/type.dart';
 import 'package:analyzer/src/dart/element/type_algebra.dart';
 import 'package:analyzer/src/dart/element/type_demotion.dart';
-import 'package:analyzer/src/generated/type_system.dart';
+import 'package:analyzer/src/dart/element/type_system.dart';
 import 'package:analyzer/src/summary/format.dart';
 import 'package:analyzer/src/summary/idl.dart';
 import 'package:analyzer/src/summary2/lazy_ast.dart';
 
-/**
- * An object used to infer the type of instance fields and the return types of
- * instance methods within a single compilation unit.
- */
+/// An object used to infer the type of instance fields and the return types of
+/// instance methods within a single compilation unit.
 class InstanceMemberInferrer {
   final InheritanceManager3 inheritance;
   final Set<ClassElement> elementsBeingInferred = HashSet<ClassElement>();
@@ -28,17 +26,13 @@
   bool isNonNullableByDefault;
   ClassElement currentClassElement;
 
-  /**
-   * Initialize a newly create inferrer.
-   */
+  /// Initialize a newly create inferrer.
   InstanceMemberInferrer(this.inheritance);
 
   DartType get _dynamicType => DynamicTypeImpl.instance;
 
-  /**
-   * Infer type information for all of the instance members in the given
-   * compilation [unit].
-   */
+  /// Infer type information for all of the instance members in the given
+  /// compilation [unit].
   void inferCompilationUnit(CompilationUnitElement unit) {
     typeSystem = unit.library.typeSystem;
     isNonNullableByDefault = typeSystem.isNonNullableByDefault;
@@ -46,10 +40,8 @@
     _inferClasses(unit.types);
   }
 
-  /**
-   * Return `true` if the elements corresponding to the [elements] have the same
-   * kind as the [element].
-   */
+  /// Return `true` if the elements corresponding to the [elements] have the
+  /// same kind as the [element].
   bool _allSameElementKind(
       ExecutableElement element, List<ExecutableElement> elements) {
     var elementKind = element.kind;
@@ -61,12 +53,9 @@
     return true;
   }
 
-  /**
-   * Given a method, return the parameter in the method that corresponds to the
-   * given [parameter]. If the parameter is positional, then
-   * it appears at the given [index] in its enclosing element's list of
-   * parameters.
-   */
+  /// Given a method, return the parameter in the method that corresponds to the
+  /// given [parameter]. If the parameter is positional, then it appears at the
+  /// given [index] in its enclosing element's list of parameters.
   ParameterElement _getCorrespondingParameter(ParameterElement parameter,
       int index, List<ParameterElement> methodParameters) {
     //
@@ -95,13 +84,11 @@
     return null;
   }
 
-  /**
-   * If the given [accessor] represents a non-synthetic instance property
-   * accessor for which no type was provided, infer its types.
-   *
-   * If the given [field] represents a non-synthetic instance field for
-   * which no type was provided, infer the type of the field.
-   */
+  /// If the given [accessor] represents a non-synthetic instance property
+  /// accessor for which no type was provided, infer its types.
+  ///
+  /// If the given [field] represents a non-synthetic instance field for
+  /// which no type was provided, infer the type of the field.
   void _inferAccessorOrField({
     PropertyAccessorElementImpl accessor,
     FieldElementImpl field,
@@ -319,10 +306,8 @@
     }
   }
 
-  /**
-   * Infer type information for all of the instance members in the given
-   * [classElement].
-   */
+  /// Infer type information for all of the instance members in the given
+  /// [classElement].
   void _inferClass(ClassElement classElement) {
     if (classElement is ClassElementImpl) {
       if (classElement.hasBeenInferred) {
@@ -393,11 +378,9 @@
     }
   }
 
-  /**
-   * If the given [element] represents a non-synthetic instance method,
-   * getter or setter, infer the return type and any parameter type(s) where
-   * they were not provided.
-   */
+  /// If the given [element] represents a non-synthetic instance method,
+  /// getter or setter, infer the return type and any parameter type(s) where
+  /// they were not provided.
   void _inferExecutable(MethodElementImpl element) {
     if (element.isSynthetic || element.isStatic) {
       return;
@@ -487,9 +470,7 @@
     _resetOperatorEqualParameterTypeToDynamic(element, overriddenElements);
   }
 
-  /**
-   * If a parameter is covariant, any parameters that override it are too.
-   */
+  /// If a parameter is covariant, any parameters that override it are too.
   void _inferParameterCovariance(ParameterElementImpl parameter, int index,
       Iterable<ExecutableElement> overridden) {
     parameter.inheritsCovariant = overridden.any((f) {
@@ -498,11 +479,9 @@
     });
   }
 
-  /**
-   * Set the type for the [parameter] at the given [index] from the given
-   * [combinedSignatureType], which might be `null` if there is no valid
-   * combined signature for signatures from direct superinterfaces.
-   */
+  /// Set the type for the [parameter] at the given [index] from the given
+  /// [combinedSignatureType], which might be `null` if there is no valid
+  /// combined signature for signatures from direct superinterfaces.
   void _inferParameterType(ParameterElementImpl parameter, int index,
       FunctionType combinedSignatureType) {
     if (combinedSignatureType != null) {
@@ -523,10 +502,8 @@
     }
   }
 
-  /**
-   * Infer type information for all of the instance members in the given
-   * interface [type].
-   */
+  /// Infer type information for all of the instance members in the given
+  /// interface [type].
   void _inferType(InterfaceType type) {
     if (type != null) {
       ClassElement element = type.element;
@@ -586,18 +563,16 @@
     element.isOperatorEqualWithParameterTypeFromObject = true;
   }
 
-  /**
-   * Return the [FunctionType] of the [overriddenElement] that [element]
-   * overrides. Return `null`, in case of type parameters inconsistency.
-   *
-   * The overridden element must have the same number of generic type
-   * parameters as the target element, or none.
-   *
-   * If we do have generic type parameters on the element we're inferring,
-   * we must express its parameter and return types in terms of its own
-   * parameters. For example, given `m<T>(t)` overriding `m<S>(S s)` we
-   * should infer this as `m<T>(T t)`.
-   */
+  /// Return the [FunctionType] of the [overriddenElement] that [element]
+  /// overrides. Return `null`, in case of type parameters inconsistency.
+  ///
+  /// The overridden element must have the same number of generic type
+  /// parameters as the target element, or none.
+  ///
+  /// If we do have generic type parameters on the element we're inferring,
+  /// we must express its parameter and return types in terms of its own
+  /// parameters. For example, given `m<T>(t)` overriding `m<S>(S s)` we
+  /// should infer this as `m<T>(T t)`.
   FunctionType _toOverriddenFunctionType(
       ExecutableElement element, ExecutableElement overriddenElement) {
     var elementTypeParameters = element.typeParameters;
@@ -624,7 +599,5 @@
   }
 }
 
-/**
- * A class of exception that is not used anywhere else.
- */
+/// A class of exception that is not used anywhere else.
 class _CycleException implements Exception {}
diff --git a/pkg/analyzer/lib/src/test_utilities/resource_provider_mixin.dart b/pkg/analyzer/lib/src/test_utilities/resource_provider_mixin.dart
index 97b1c50..b02dfaf 100644
--- a/pkg/analyzer/lib/src/test_utilities/resource_provider_mixin.dart
+++ b/pkg/analyzer/lib/src/test_utilities/resource_provider_mixin.dart
@@ -6,11 +6,9 @@
 import 'package:analyzer/file_system/memory_file_system.dart';
 import 'package:analyzer/src/dart/analysis/context_locator.dart';
 
-/**
- * A mixin for test classes that adds a [ResourceProvider] and utility methods
- * for manipulating the file system. The utility methods all take a posix style
- * path and convert it as appropriate for the actual platform.
- */
+/// A mixin for test classes that adds a [ResourceProvider] and utility methods
+/// for manipulating the file system. The utility methods all take a posix style
+/// path and convert it as appropriate for the actual platform.
 mixin ResourceProviderMixin {
   MemoryResourceProvider resourceProvider = MemoryResourceProvider();
 
diff --git a/pkg/analyzer/lib/src/util/asserts.dart b/pkg/analyzer/lib/src/util/asserts.dart
index b5a2158..3c251d3 100644
--- a/pkg/analyzer/lib/src/util/asserts.dart
+++ b/pkg/analyzer/lib/src/util/asserts.dart
@@ -2,11 +2,9 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-/**
- * Ensures that the given [value] is not null.
- * Otherwise throws an [ArgumentError].
- * An optional [description] is used in the error message.
- */
+/// Ensures that the given [value] is not null.
+/// Otherwise throws an [ArgumentError].
+/// An optional [description] is used in the error message.
 void notNull(Object value, [String description]) {
   if (value == null) {
     if (description == null) {
diff --git a/pkg/analyzer/lib/src/util/ast_data_extractor.dart b/pkg/analyzer/lib/src/util/ast_data_extractor.dart
index 8682c65..06fdab9 100644
--- a/pkg/analyzer/lib/src/util/ast_data_extractor.dart
+++ b/pkg/analyzer/lib/src/util/ast_data_extractor.dart
@@ -9,9 +9,7 @@
 
 /// Abstract IR visitor for computing data corresponding to a node or element,
 /// and record it with a generic [Id]
-/// TODO(paulberry): if I try to extend GeneralizingAstVisitor<void>, the VM
-/// crashes.
-abstract class AstDataExtractor<T> extends GeneralizingAstVisitor<dynamic>
+abstract class AstDataExtractor<T> extends GeneralizingAstVisitor<void>
     with DataRegistry<T> {
   final Uri uri;
 
@@ -110,46 +108,46 @@
   }
 
   @override
-  visitClassDeclaration(ClassDeclaration node) {
+  void visitClassDeclaration(ClassDeclaration node) {
     computeForClass(node, createClassId(node));
-    return super.visitClassDeclaration(node);
+    super.visitClassDeclaration(node);
   }
 
   @override
-  visitCollectionElement(CollectionElement node) {
+  void visitCollectionElement(CollectionElement node) {
     computeForCollectionElement(node, computeDefaultNodeId(node));
     super.visitCollectionElement(node);
   }
 
   @override
-  visitCompilationUnit(CompilationUnit node) {
+  void visitCompilationUnit(CompilationUnit node) {
     var library = node.declaredElement.library;
     computeForLibrary(library, createLibraryId(library));
-    return super.visitCompilationUnit(node);
+    super.visitCompilationUnit(node);
   }
 
   @override
-  visitConstructorDeclaration(ConstructorDeclaration node) {
+  void visitConstructorDeclaration(ConstructorDeclaration node) {
     computeForMember(node, createMemberId(node));
-    return super.visitConstructorDeclaration(node);
+    super.visitConstructorDeclaration(node);
   }
 
   @override
-  visitFunctionDeclaration(FunctionDeclaration node) {
+  void visitFunctionDeclaration(FunctionDeclaration node) {
     if (node.parent is CompilationUnit) {
       computeForMember(node, createMemberId(node));
     }
-    return super.visitFunctionDeclaration(node);
+    super.visitFunctionDeclaration(node);
   }
 
   @override
-  visitMethodDeclaration(MethodDeclaration node) {
+  void visitMethodDeclaration(MethodDeclaration node) {
     computeForMember(node, createMemberId(node));
-    return super.visitMethodDeclaration(node);
+    super.visitMethodDeclaration(node);
   }
 
   @override
-  visitStatement(Statement node) {
+  void visitStatement(Statement node) {
     computeForStatement(
         node,
         node is ExpressionStatement
@@ -159,13 +157,13 @@
   }
 
   @override
-  visitVariableDeclaration(VariableDeclaration node) {
+  void visitVariableDeclaration(VariableDeclaration node) {
     if (node.parent.parent is TopLevelVariableDeclaration) {
       computeForMember(node, createMemberId(node));
     } else if (node.parent.parent is FieldDeclaration) {
       computeForMember(node, createMemberId(node));
     }
-    return super.visitVariableDeclaration(node);
+    super.visitVariableDeclaration(node);
   }
 
   int _nodeOffset(AstNode node) {
diff --git a/pkg/analyzer/lib/src/util/glob.dart b/pkg/analyzer/lib/src/util/glob.dart
index 5af8f46..2edfd89 100644
--- a/pkg/analyzer/lib/src/util/glob.dart
+++ b/pkg/analyzer/lib/src/util/glob.dart
@@ -2,32 +2,24 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-/**
- * A pattern that matches against filesystem path-like strings with wildcards.
- *
- * The pattern matches strings as follows:
- *   * The pattern must use `/` as the path separator.
- *   * The whole string must match, not a substring.
- *   * Any non wildcard is matched as a literal.
- *   * '*' matches one or more characters except '/'.
- *   * '?' matches exactly one character except '/'.
- *   * '**' matches one or more characters including '/'.
- */
+/// A pattern that matches against filesystem path-like strings with wildcards.
+///
+/// The pattern matches strings as follows:
+///   * The pattern must use `/` as the path separator.
+///   * The whole string must match, not a substring.
+///   * Any non wildcard is matched as a literal.
+///   * '*' matches one or more characters except '/'.
+///   * '?' matches exactly one character except '/'.
+///   * '**' matches one or more characters including '/'.
 class Glob {
-  /**
-   * The special characters are: \ ^ $ . | + [ ] ( ) { }
-   * as defined here: http://ecma-international.org/ecma-262/5.1/#sec-15.10
-   */
+  /// The special characters are: \ ^ $ . | + [ ] ( ) { }
+  /// as defined here: http://ecma-international.org/ecma-262/5.1/#sec-15.10
   static final RegExp _specialChars = RegExp(r'([\\\^\$\.\|\+\[\]\(\)\{\}])');
 
-  /**
-   * The path separator used to separate components in file paths.
-   */
+  /// The path separator used to separate components in file paths.
   final String _separator;
 
-  /**
-   * The pattern string.
-   */
+  /// The pattern string.
   final String _pattern;
 
   String _suffix;
@@ -49,10 +41,8 @@
   @override
   bool operator ==(other) => other is Glob && _pattern == other._pattern;
 
-  /**
-   * Return `true` if the given [path] matches this glob.
-   * The given [path] must use the same [_separator] as the glob.
-   */
+  /// Return `true` if the given [path] matches this glob.
+  /// The given [path] must use the same [_separator] as the glob.
   bool matches(String path) {
     String posixPath = _toPosixPath(path);
     if (_suffix != null) {
@@ -64,9 +54,7 @@
   @override
   String toString() => _pattern;
 
-  /**
-   * Return the Posix version of the given [path].
-   */
+  /// Return the Posix version of the given [path].
   String _toPosixPath(String path) {
     if (_separator == '/') {
       return path;
@@ -74,10 +62,8 @@
     return path.replaceAll(_separator, '/');
   }
 
-  /**
-   * Return `true` if the [pattern] start with the given [prefix] and does
-   * not have `*` or `?` characters after the [prefix].
-   */
+  /// Return `true` if the [pattern] start with the given [prefix] and does
+  /// not have `*` or `?` characters after the [prefix].
   static bool _hasJustPrefix(String pattern, String prefix) {
     if (pattern.startsWith(prefix)) {
       int prefixLength = prefix.length;
diff --git a/pkg/analyzer/lib/src/util/lru_map.dart b/pkg/analyzer/lib/src/util/lru_map.dart
index 7ac69e7..006b02c 100644
--- a/pkg/analyzer/lib/src/util/lru_map.dart
+++ b/pkg/analyzer/lib/src/util/lru_map.dart
@@ -7,12 +7,10 @@
 /// This handler is notified when an item is evicted from the cache.
 typedef EvictionHandler<K, V> = Function(K key, V value);
 
-/**
- * A hash-table based cache implementation.
- *
- * When it reaches the specified number of items, the item that has not been
- * accessed (both get and put) recently is evicted.
- */
+/// A hash-table based cache implementation.
+///
+/// When it reaches the specified number of items, the item that has not been
+/// accessed (both get and put) recently is evicted.
 class LRUMap<K, V> {
   final LinkedHashMap<K, V> _map = LinkedHashMap<K, V>();
   final int _maxSize;
@@ -20,10 +18,8 @@
 
   LRUMap(this._maxSize, [this._handler]);
 
-  /**
-   * Returns the value for the given [key] or null if [key] is not
-   * in the cache.
-   */
+  /// Returns the value for the given [key] or null if [key] is not
+  /// in the cache.
   V get(K key) {
     V value = _map.remove(key);
     if (value != null) {
@@ -32,12 +28,10 @@
     return value;
   }
 
-  /**
-   * Associates the [key] with the given [value].
-   *
-   * If the cache is full, an item that has not been accessed recently is
-   * evicted.
-   */
+  /// Associates the [key] with the given [value].
+  ///
+  /// If the cache is full, an item that has not been accessed recently is
+  /// evicted.
   void put(K key, V value) {
     _map.remove(key);
     _map[key] = value;
@@ -50,9 +44,7 @@
     }
   }
 
-  /**
-   * Removes the association for the given [key].
-   */
+  /// Removes the association for the given [key].
   void remove(K key) {
     _map.remove(key);
   }
diff --git a/pkg/analyzer/lib/src/util/performance/operation_performance.dart b/pkg/analyzer/lib/src/util/performance/operation_performance.dart
new file mode 100644
index 0000000..1764514
--- /dev/null
+++ b/pkg/analyzer/lib/src/util/performance/operation_performance.dart
@@ -0,0 +1,132 @@
+// Copyright (c) 2020, the Dart project authors. Please see the AUTHORS file
+// for 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:meta/meta.dart';
+
+/// The performance of an operation.
+abstract class OperationPerformance {
+  /// The child operations, might be empty.
+  List<OperationPerformance> get children;
+
+  /// The duration of this operation, including its children.
+  Duration get elapsed;
+
+  /// The duration of this operation, excluding its children.
+  Duration get elapsedSelf;
+
+  /// The name of the operation.
+  String get name;
+
+  OperationPerformance getChild(String name);
+
+  /// Write this operation and its children into the [buffer].
+  void write({
+    @required StringBuffer buffer,
+    String indent = '',
+  });
+}
+
+class OperationPerformanceImpl implements OperationPerformance {
+  @override
+  final String name;
+
+  final Stopwatch _timer = Stopwatch();
+  final List<OperationPerformance> _children = [];
+
+  OperationPerformanceImpl(this.name);
+
+  @override
+  List<OperationPerformance> get children {
+    return _children;
+  }
+
+  @override
+  Duration get elapsed {
+    return _timer.elapsed;
+  }
+
+  @override
+  Duration get elapsedSelf {
+    return elapsed - _elapsedChildren;
+  }
+
+  Duration get _elapsedChildren {
+    return children.fold<Duration>(
+      Duration.zero,
+      (sum, child) => sum + child.elapsed,
+    );
+  }
+
+  @override
+  OperationPerformance getChild(String name) {
+    return children.firstWhere(
+      (child) => child.name == name,
+      orElse: () => null,
+    );
+  }
+
+  /// Run the [operation] as a child with the given [name].
+  ///
+  /// If there is no such child, a new one is created, with a new timer.
+  ///
+  /// If there is already a child with that name, its timer will resume and
+  /// then stop. So, it will accumulate time across all runs.
+  T run<T>(
+    String name,
+    T Function(OperationPerformanceImpl) operation,
+  ) {
+    OperationPerformanceImpl child = _existingOrNewChild(name);
+    child._timer.start();
+
+    try {
+      return operation(child);
+    } finally {
+      child._timer.stop();
+    }
+  }
+
+  /// Run the [operation] as a child with the given [name].
+  ///
+  /// If there is no such child, a new one is created, with a new timer.
+  ///
+  /// If there is already a child with that name, its timer will resume and
+  /// then stop. So, it will accumulate time across all runs.
+  Future<T> runAsync<T>(
+    String name,
+    Future<T> Function(OperationPerformanceImpl) operation,
+  ) async {
+    var child = _existingOrNewChild(name);
+    child._timer.start();
+
+    try {
+      return await operation(child);
+    } finally {
+      child._timer.stop();
+    }
+  }
+
+  @override
+  String toString() {
+    return '(name: $name, elapsed: $elapsed, elapsedSelf: $elapsedSelf)';
+  }
+
+  @override
+  void write({StringBuffer buffer, String indent = ''}) {
+    buffer.writeln('$indent${toString()}');
+
+    var childIndent = '$indent  ';
+    for (var child in children) {
+      child.write(buffer: buffer, indent: childIndent);
+    }
+  }
+
+  OperationPerformanceImpl _existingOrNewChild(String name) {
+    var child = getChild(name);
+    if (child == null) {
+      child = OperationPerformanceImpl(name);
+      _children.add(child);
+    }
+    return child;
+  }
+}
diff --git a/pkg/analyzer/lib/src/util/performance/utilities_timing.dart b/pkg/analyzer/lib/src/util/performance/utilities_timing.dart
new file mode 100644
index 0000000..95a9a44
--- /dev/null
+++ b/pkg/analyzer/lib/src/util/performance/utilities_timing.dart
@@ -0,0 +1,29 @@
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+/// A `CountedStopwatch` is a [Stopwatch] that counts the number of times the
+/// stop method has been invoked.
+class CountedStopwatch extends Stopwatch {
+  /// The number of times the [stop] method has been invoked.
+  int stopCount = 0;
+
+  /// Initialize a newly created stopwatch.
+  CountedStopwatch();
+
+  /// The average number of millisecond that were recorded each time the [start]
+  /// and [stop] methods were invoked.
+  int get averageMilliseconds => elapsedMilliseconds ~/ stopCount;
+
+  @override
+  void reset() {
+    super.reset();
+    stopCount = 0;
+  }
+
+  @override
+  void stop() {
+    super.stop();
+    stopCount++;
+  }
+}
diff --git a/pkg/analyzer/lib/src/util/utilities_timing.dart b/pkg/analyzer/lib/src/util/utilities_timing.dart
deleted file mode 100644
index 0ade452..0000000
--- a/pkg/analyzer/lib/src/util/utilities_timing.dart
+++ /dev/null
@@ -1,37 +0,0 @@
-// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-/**
- * A `CountedStopwatch` is a [Stopwatch] that counts the number of times the
- * stop method has been invoked.
- */
-class CountedStopwatch extends Stopwatch {
-  /**
-   * The number of times the [stop] method has been invoked.
-   */
-  int stopCount = 0;
-
-  /**
-   * Initialize a newly created stopwatch.
-   */
-  CountedStopwatch();
-
-  /**
-   * The average number of millisecond that were recorded each time the [start]
-   * and [stop] methods were invoked.
-   */
-  int get averageMilliseconds => elapsedMilliseconds ~/ stopCount;
-
-  @override
-  void reset() {
-    super.reset();
-    stopCount = 0;
-  }
-
-  @override
-  void stop() {
-    super.stop();
-    stopCount++;
-  }
-}
diff --git a/pkg/analyzer/lib/src/workspace/basic.dart b/pkg/analyzer/lib/src/workspace/basic.dart
index f5ef805..8b3e3c8 100644
--- a/pkg/analyzer/lib/src/workspace/basic.dart
+++ b/pkg/analyzer/lib/src/workspace/basic.dart
@@ -8,17 +8,13 @@
 import 'package:analyzer/src/workspace/simple.dart';
 import 'package:analyzer/src/workspace/workspace.dart';
 
-/**
- * Information about a default Dart workspace.
- *
- * A BasicWorkspace should only be used when no other workspace type is valid.
- */
+/// Information about a default Dart workspace.
+///
+/// A BasicWorkspace should only be used when no other workspace type is valid.
 class BasicWorkspace extends SimpleWorkspace {
-  /**
-   * The singular package in this workspace.
-   *
-   * Each basic workspace is itself one package.
-   */
+  /// The singular package in this workspace.
+  ///
+  /// Each basic workspace is itself one package.
   BasicWorkspacePackage _theOnlyPackage;
 
   BasicWorkspace._(
@@ -38,13 +34,11 @@
     }
   }
 
-  /**
-   * Find the basic workspace that contains the given [path].
-   *
-   * As a [BasicWorkspace] is not defined by any marker files or build
-   * artifacts, this simply creates a BasicWorkspace with [path] as the [root]
-   * (or [path]'s parent if [path] points to a file).
-   */
+  /// Find the basic workspace that contains the given [path].
+  ///
+  /// As a [BasicWorkspace] is not defined by any marker files or build
+  /// artifacts, this simply creates a BasicWorkspace with [path] as the [root]
+  /// (or [path]'s parent if [path] points to a file).
   static BasicWorkspace find(
     ResourceProvider provider,
     Map<String, List<Folder>> packageMap,
@@ -58,13 +52,11 @@
   }
 }
 
-/**
- * Information about a package defined in a [BasicWorkspace].
- *
- * Separate from [Packages] or package maps, this class is designed to simply
- * understand whether arbitrary file paths represent libraries declared within
- * a given package in a [BasicWorkspace].
- */
+/// Information about a package defined in a [BasicWorkspace].
+///
+/// Separate from [Packages] or package maps, this class is designed to simply
+/// understand whether arbitrary file paths represent libraries declared within
+/// a given package in a [BasicWorkspace].
 class BasicWorkspacePackage extends WorkspacePackage {
   @override
   final String root;
diff --git a/pkg/analyzer/lib/src/workspace/bazel.dart b/pkg/analyzer/lib/src/workspace/bazel.dart
index 2b009b8..5b6bd92 100644
--- a/pkg/analyzer/lib/src/workspace/bazel.dart
+++ b/pkg/analyzer/lib/src/workspace/bazel.dart
@@ -15,11 +15,9 @@
 import 'package:analyzer/src/workspace/workspace.dart';
 import 'package:path/path.dart' as path;
 
-/**
- * Instances of the class `BazelFileUriResolver` resolve `file` URI's by first
- * resolving file uri's in the expected way, and then by looking in the
- * corresponding generated directories.
- */
+/// Instances of the class `BazelFileUriResolver` resolve `file` URI's by first
+/// resolving file uri's in the expected way, and then by looking in the
+/// corresponding generated directories.
 class BazelFileUriResolver extends ResourceUriResolver {
   final BazelWorkspace workspace;
 
@@ -41,16 +39,12 @@
   }
 }
 
-/**
- * The [UriResolver] that can resolve `package` URIs in [BazelWorkspace].
- */
+/// The [UriResolver] that can resolve `package` URIs in [BazelWorkspace].
 class BazelPackageUriResolver extends UriResolver {
   final BazelWorkspace _workspace;
   final path.Context _context;
 
-  /**
-   * The cache of absolute [Uri]s to [Source]s mappings.
-   */
+  /// The cache of absolute [Uri]s to [Source]s mappings.
   final Map<Uri, Source> _sourceCache = HashMap<Uri, Source>();
 
   BazelPackageUriResolver(BazelWorkspace workspace)
@@ -145,42 +139,32 @@
   }
 }
 
-/**
- * Information about a Bazel workspace.
- */
+/// Information about a Bazel workspace.
 class BazelWorkspace extends Workspace
     implements WorkspaceWithDefaultAnalysisOptions {
   static const String _WORKSPACE = 'WORKSPACE';
   static const String _READONLY = 'READONLY';
 
-  /**
-   * The name of the file that identifies a set of Bazel Targets.
-   *
-   * For Dart package purposes, a BUILD file identifies a package.
-   */
+  /// The name of the file that identifies a set of Bazel Targets.
+  ///
+  /// For Dart package purposes, a BUILD file identifies a package.
   static const String _buildFileName = 'BUILD';
 
-  /**
-   * Default prefix for "-genfiles" and "-bin" that will be assumed if no build
-   * output symlinks are found.
-   */
+  /// Default prefix for "-genfiles" and "-bin" that will be assumed if no build
+  /// output symlinks are found.
   static const defaultSymlinkPrefix = 'bazel';
 
   final ResourceProvider provider;
 
-  /**
-   * The absolute workspace root path.
-   *
-   * It contains the `WORKSPACE` file or its parent contains the `READONLY`
-   * folder.
-   */
+  /// The absolute workspace root path.
+  ///
+  /// It contains the `WORKSPACE` file or its parent contains the `READONLY`
+  /// folder.
   @override
   final String root;
 
-  /**
-   * The absolute path to the optional read only workspace root, in the
-   * `READONLY` folder if a git-based workspace, or `null`.
-   */
+  /// The absolute path to the optional read only workspace root, in the
+  /// `READONLY` folder if a git-based workspace, or `null`.
   final String readonly;
 
   /// The absolute paths to all `bazel-bin` folders.
@@ -189,9 +173,7 @@
   /// on distributed build systems. It is very rare to have more than two.
   final List<String> binPaths;
 
-  /**
-   * The absolute path to the `bazel-genfiles` folder.
-   */
+  /// The absolute path to the `bazel-genfiles` folder.
   final String genfiles;
 
   BazelWorkspace._(
@@ -217,13 +199,11 @@
     return SourceFactory(resolvers);
   }
 
-  /**
-   * Return the file with the given [absolutePath], looking first into
-   * directories for generated files: `bazel-bin` and `bazel-genfiles`, and
-   * then into the workspace root. The file in the workspace root is returned
-   * even if it does not exist. Return `null` if the given [absolutePath] is
-   * not in the workspace [root].
-   */
+  /// Return the file with the given [absolutePath], looking first into
+  /// directories for generated files: `bazel-bin` and `bazel-genfiles`, and
+  /// then into the workspace root. The file in the workspace root is returned
+  /// even if it does not exist. Return `null` if the given [absolutePath] is
+  /// not in the workspace [root].
   File findFile(String absolutePath) {
     path.Context context = provider.pathContext;
     try {
@@ -455,13 +435,11 @@
       .firstWhere((folder) => folder.exists, orElse: () => null);
 }
 
-/**
- * Information about a package defined in a BazelWorkspace.
- *
- * Separate from [Packages] or package maps, this class is designed to simply
- * understand whether arbitrary file paths represent libraries declared within
- * a given package in a BazelWorkspace.
- */
+/// Information about a package defined in a BazelWorkspace.
+///
+/// Separate from [Packages] or package maps, this class is designed to simply
+/// understand whether arbitrary file paths represent libraries declared within
+/// a given package in a BazelWorkspace.
 class BazelWorkspacePackage extends WorkspacePackage {
   /// A prefix for any URI of a path in this package.
   final String _uriPrefix;
diff --git a/pkg/analyzer/lib/src/workspace/gn.dart b/pkg/analyzer/lib/src/workspace/gn.dart
index 62482bd..235418e 100644
--- a/pkg/analyzer/lib/src/workspace/gn.dart
+++ b/pkg/analyzer/lib/src/workspace/gn.dart
@@ -16,37 +16,25 @@
 import 'package:meta/meta.dart';
 import 'package:path/path.dart' as path;
 
-/**
- * Information about a Gn workspace.
- */
+/// Information about a Gn workspace.
 class GnWorkspace extends Workspace {
-  /**
-   * The name of the directory that identifies the root of the workspace.
-   */
+  /// The name of the directory that identifies the root of the workspace.
   static const String _jiriRootName = '.jiri_root';
 
-  /**
-   * The name of the file that identifies a set of GN Targets.
-   *
-   * For Dart package purposes, a BUILD.gn file identifies a package.
-   */
+  /// The name of the file that identifies a set of GN Targets.
+  ///
+  /// For Dart package purposes, a BUILD.gn file identifies a package.
   static const String _buildFileName = 'BUILD.gn';
 
-  /**
-   * The resource provider used to access the file system.
-   */
+  /// The resource provider used to access the file system.
   final ResourceProvider provider;
 
-  /**
-   * The absolute workspace root path (the directory containing the `.jiri_root`
-   * directory).
-   */
+  /// The absolute workspace root path (the directory containing the
+  /// `.jiri_root` directory).
   @override
   final String root;
 
-  /**
-   * The map from a package name to the list of its `lib/` folders.
-   */
+  /// The map from a package name to the list of its `lib/` folders.
   final Map<String, List<Folder>> _packageMap;
 
   GnWorkspace._(this.provider, this.root, this._packageMap);
@@ -73,11 +61,9 @@
     return SourceFactory(resolvers);
   }
 
-  /**
-   * Return the file with the given [absolutePath].
-   *
-   * Return `null` if the given [absolutePath] is not in the workspace [root].
-   */
+  /// Return the file with the given [absolutePath].
+  ///
+  /// Return `null` if the given [absolutePath] is not in the workspace [root].
   File findFile(String absolutePath) {
     try {
       File writableFile = provider.getFile(absolutePath);
@@ -112,13 +98,11 @@
     }
   }
 
-  /**
-   * Find the GN workspace that contains the given [filePath].
-   *
-   * Return `null` if a workspace could not be found. For a workspace to be
-   * found, both a `.jiri_root` file must be found, and at least one "packages"
-   * file must be found in [filePath]'s output directory.
-   */
+  /// Find the GN workspace that contains the given [filePath].
+  ///
+  /// Return `null` if a workspace could not be found. For a workspace to be
+  /// found, both a `.jiri_root` file must be found, and at least one "packages"
+  /// file must be found in [filePath]'s output directory.
   static GnWorkspace find(ResourceProvider provider, String filePath) {
     Resource resource = provider.getResource(filePath);
     if (resource is File) {
@@ -156,15 +140,13 @@
     }
   }
 
-  /**
-   * For a source at `$root/foo/bar`, the packages files are generated in
-   * `$root/out/<debug|release>-XYZ/dartlang/gen/foo/bar`.
-   *
-   * Note that in some cases multiple .packages files can be found at that
-   * location, for example if the package contains both a library and a binary
-   * target. For a complete view of the package, all of these files need to be
-   * taken into account.
-   */
+  /// For a source at `$root/foo/bar`, the packages files are generated in
+  /// `$root/out/<debug|release>-XYZ/dartlang/gen/foo/bar`.
+  ///
+  /// Note that in some cases multiple .packages files can be found at that
+  /// location, for example if the package contains both a library and a binary
+  /// target. For a complete view of the package, all of these files need to be
+  /// taken into account.
   static List<File> _findPackagesFile(
     ResourceProvider provider,
     String root,
@@ -188,13 +170,11 @@
         .toList();
   }
 
-  /**
-   * Returns the output directory of the build, or `null` if it could not be
-   * found.
-   *
-   * First attempts to read a config file at the root of the source tree. If
-   * that file cannot be found, looks for standard output directory locations.
-   */
+  /// Returns the output directory of the build, or `null` if it could not be
+  /// found.
+  ///
+  /// First attempts to read a config file at the root of the source tree. If
+  /// that file cannot be found, looks for standard output directory locations.
   static Folder _getOutDirectory(String root, ResourceProvider provider) {
     const String fuchsiaDirConfigFile = '.fx-build-dir';
 
@@ -223,13 +203,11 @@
   }
 }
 
-/**
- * Information about a package defined in a GnWorkspace.
- *
- * Separate from [Packages] or package maps, this class is designed to simply
- * understand whether arbitrary file paths represent libraries declared within
- * a given package in a GnWorkspace.
- */
+/// Information about a package defined in a GnWorkspace.
+///
+/// Separate from [Packages] or package maps, this class is designed to simply
+/// understand whether arbitrary file paths represent libraries declared within
+/// a given package in a GnWorkspace.
 class GnWorkspacePackage extends WorkspacePackage {
   @override
   final String root;
diff --git a/pkg/analyzer/lib/src/workspace/package_build.dart b/pkg/analyzer/lib/src/workspace/package_build.dart
index effc784..d274ccb 100644
--- a/pkg/analyzer/lib/src/workspace/package_build.dart
+++ b/pkg/analyzer/lib/src/workspace/package_build.dart
@@ -17,11 +17,9 @@
 import 'package:path/path.dart' as path;
 import 'package:yaml/yaml.dart';
 
-/**
- * Instances of the class `PackageBuildFileUriResolver` resolve `file` URI's by
- * first resolving file uri's in the expected way, and then by looking in the
- * corresponding generated directories.
- */
+/// Instances of the class `PackageBuildFileUriResolver` resolve `file` URI's by
+/// first resolving file uri's in the expected way, and then by looking in the
+/// corresponding generated directories.
 class PackageBuildFileUriResolver extends ResourceUriResolver {
   final PackageBuildWorkspace workspace;
 
@@ -47,9 +45,8 @@
   }
 }
 
-/**
- * The [UriResolver] that can resolve `package` URIs in [PackageBuildWorkspace].
- */
+/// The [UriResolver] that can resolve `package` URIs in
+/// [PackageBuildWorkspace].
 class PackageBuildPackageUriResolver extends UriResolver {
   final PackageBuildWorkspace _workspace;
   final UriResolver _normalUriResolver;
@@ -124,58 +121,40 @@
   }
 }
 
-/**
- * Information about a package:build workspace.
- */
+/// Information about a package:build workspace.
 class PackageBuildWorkspace extends Workspace {
-  /**
-   * The name of the directory that identifies the root of the workspace. Note,
-   * the presence of this file does not show package:build is used. For that,
-   * the subdirectory [_dartToolBuildName] must exist. A `pub` subdirectory
-   * will usually exist in non-package:build projects too.
-   */
+  /// The name of the directory that identifies the root of the workspace. Note,
+  /// the presence of this file does not show package:build is used. For that,
+  /// the subdirectory [_dartToolBuildName] must exist. A `pub` subdirectory
+  /// will usually exist in non-package:build projects too.
   static const String _dartToolRootName = '.dart_tool';
 
-  /**
-   * The name of the subdirectory in [_dartToolName] that distinguishes projects
-   * built with package:build.
-   */
+  /// The name of the subdirectory in [_dartToolName] that distinguishes
+  /// projects built with package:build.
   static const String _dartToolBuildName = 'build';
 
-  /**
-   * We use pubspec.yaml to get the package name to be consistent with how
-   * package:build does it.
-   */
+  /// We use pubspec.yaml to get the package name to be consistent with how
+  /// package:build does it.
   static const String _pubspecName = 'pubspec.yaml';
 
-  /**
-   * The resource provider used to access the file system.
-   */
+  /// The resource provider used to access the file system.
   final ResourceProvider provider;
 
-  /**
-   * The map from a package name to the list of its `lib/` folders.
-   */
+  /// The map from a package name to the list of its `lib/` folders.
   final Map<String, List<Folder>> _packageMap;
 
-  /**
-   * The absolute workspace root path (the directory containing the `.dart_tool`
-   * directory).
-   */
+  /// The absolute workspace root path (the directory containing the
+  /// `.dart_tool` directory).
   @override
   final String root;
 
-  /**
-   * The name of the package under development as defined in pubspec.yaml. This
-   * matches the behavior of package:build.
-   */
+  /// The name of the package under development as defined in pubspec.yaml. This
+  /// matches the behavior of package:build.
   final String projectPackageName;
 
-  /**
-   * The singular package in this workspace.
-   *
-   * Each "package:build" workspace is itself one package.
-   */
+  /// The singular package in this workspace.
+  ///
+  /// Each "package:build" workspace is itself one package.
   PackageBuildWorkspacePackage _theOnlyPackage;
 
   PackageBuildWorkspace._(
@@ -185,15 +164,13 @@
   UriResolver get packageUriResolver => PackageBuildPackageUriResolver(
       this, PackageMapUriResolver(provider, _packageMap));
 
-  /**
-   * For some package file, which may or may not be a package source (it could
-   * be in `bin/`, `web/`, etc), find where its built counterpart will exist if
-   * its a generated source.
-   *
-   * To get a [builtPath] for a package source file to use in this method,
-   * use [builtPackageSourcePath]. For `bin/`, `web/`, etc, it must be relative
-   * to the project root.
-   */
+  /// For some package file, which may or may not be a package source (it could
+  /// be in `bin/`, `web/`, etc), find where its built counterpart will exist if
+  /// its a generated source.
+  ///
+  /// To get a [builtPath] for a package source file to use in this method,
+  /// use [builtPackageSourcePath]. For `bin/`, `web/`, etc, it must be relative
+  /// to the project root.
   File builtFile(String builtPath, String packageName) {
     if (!_packageMap.containsKey(packageName)) {
       return null;
@@ -204,13 +181,11 @@
     return provider.getFile(fullBuiltPath);
   }
 
-  /**
-   * Unlike the way that sources are resolved against `.packages` (if foo points
-   * to folder bar, then `foo:baz.dart` is found at `bar/baz.dart`), the built
-   * sources for a package require the `lib/` prefix first. This is because
-   * `bin/`, `web/`, and `test/` etc can all be built as well. This method
-   * exists to give a name to that prefix processing step.
-   */
+  /// Unlike the way that sources are resolved against `.packages` (if foo
+  /// points to folder bar, then `foo:baz.dart` is found at `bar/baz.dart`), the
+  /// built sources for a package require the `lib/` prefix first. This is
+  /// because `bin/`, `web/`, and `test/` etc can all be built as well. This
+  /// method exists to give a name to that prefix processing step.
   String builtPackageSourcePath(String filePath) {
     path.Context context = provider.pathContext;
     assert(context.isRelative(filePath), 'Not a relative path: $filePath');
@@ -232,14 +207,12 @@
     return SourceFactory(resolvers);
   }
 
-  /**
-   * Return the file with the given [filePath], looking first in the generated
-   * directory `.dart_tool/build/generated/$projectPackageName/`, then in
-   * source directories.
-   *
-   * The file in the workspace [root] is returned even if it does not exist.
-   * Return `null` if the given [filePath] is not in the workspace root.
-   */
+  /// Return the file with the given [filePath], looking first in the generated
+  /// directory `.dart_tool/build/generated/$projectPackageName/`, then in
+  /// source directories.
+  ///
+  /// The file in the workspace [root] is returned even if it does not exist.
+  /// Return `null` if the given [filePath] is not in the workspace root.
   File findFile(String filePath) {
     path.Context context = provider.pathContext;
     assert(context.isAbsolute(filePath), 'Not an absolute path: $filePath');
@@ -269,11 +242,9 @@
     }
   }
 
-  /**
-   * Find the package:build workspace that contains the given [filePath].
-   *
-   * Return `null` if the filePath is not in a package:build workspace.
-   */
+  /// Find the package:build workspace that contains the given [filePath].
+  ///
+  /// Return `null` if the filePath is not in a package:build workspace.
   static PackageBuildWorkspace find(ResourceProvider provider,
       Map<String, List<Folder>> packageMap, String filePath) {
     Folder folder = provider.getFolder(filePath);
@@ -305,13 +276,11 @@
   }
 }
 
-/**
- * Information about a package defined in a PackageBuildWorkspace.
- *
- * Separate from [Packages] or package maps, this class is designed to simply
- * understand whether arbitrary file paths represent libraries declared within
- * a given package in a PackageBuildWorkspace.
- */
+/// Information about a package defined in a PackageBuildWorkspace.
+///
+/// Separate from [Packages] or package maps, this class is designed to simply
+/// understand whether arbitrary file paths represent libraries declared within
+/// a given package in a PackageBuildWorkspace.
 class PackageBuildWorkspacePackage extends WorkspacePackage {
   @override
   final String root;
diff --git a/pkg/analyzer/lib/src/workspace/workspace.dart b/pkg/analyzer/lib/src/workspace/workspace.dart
index 51b67b3..5b64e10 100644
--- a/pkg/analyzer/lib/src/workspace/workspace.dart
+++ b/pkg/analyzer/lib/src/workspace/workspace.dart
@@ -7,50 +7,36 @@
 import 'package:analyzer/src/summary/package_bundle_reader.dart';
 import 'package:analyzer/src/workspace/bazel.dart';
 
-/**
- * Abstract superclass of classes that provide information about the workspace
- * in which analysis is being performed.
- */
+/// Abstract superclass of classes that provide information about the workspace
+/// in which analysis is being performed.
 abstract class Workspace {
-  /**
-   * Return true iff this [Workspace] is a [BazelWorkspace].
-   */
+  /// Return true iff this [Workspace] is a [BazelWorkspace].
   bool get isBazel => false;
 
-  /**
-   * The [UriResolver] that can resolve `package` URIs.
-   */
+  /// The [UriResolver] that can resolve `package` URIs.
   UriResolver get packageUriResolver;
 
-  /**
-   * The absolute workspace root path.
-   */
+  /// The absolute workspace root path.
   String get root;
 
-  /**
-   * Create the source factory that should be used to resolve Uris to [Source]s.
-   * The [sdk] may be `null`. The [summaryData] can also be `null`.
-   */
+  /// Create the source factory that should be used to resolve Uris to
+  /// [Source]s. The [sdk] may be `null`. The [summaryData] can also be `null`.
   SourceFactory createSourceFactory(DartSdk sdk, SummaryDataStore summaryData);
 
-  /**
-   * Find the [WorkspacePackage] where the library at [path] is defined.
-   *
-   * Separate from [Packages] or [packageMap], this method is designed to find
-   * the package, by its root, in which a library at an arbitrary path is
-   * defined.
-   */
+  /// Find the [WorkspacePackage] where the library at [path] is defined.
+  ///
+  /// Separate from [Packages] or [packageMap], this method is designed to find
+  /// the package, by its root, in which a library at an arbitrary path is
+  /// defined.
   WorkspacePackage findPackageFor(String path);
 }
 
-/**
- * Abstract superclass of classes that provide information about a package
- * defined in a Workspace.
- *
- * Separate from [Packages] or package maps, this class is designed to simply
- * understand whether arbitrary file paths represent libraries declared within
- * a given package in a Workspace.
- */
+/// Abstract superclass of classes that provide information about a package
+/// defined in a Workspace.
+///
+/// Separate from [Packages] or package maps, this class is designed to simply
+/// understand whether arbitrary file paths represent libraries declared within
+/// a given package in a Workspace.
 abstract class WorkspacePackage {
   String get root;
 
@@ -72,20 +58,14 @@
   }
 }
 
-/**
- * An interface for a workspace that contains a default analysis options file.
- * Classes that provide information of such a workspace should implement this
- * interface.
- */
+/// An interface for a workspace that contains a default analysis options file.
+/// Classes that provide information of such a workspace should implement this
+/// interface.
 class WorkspaceWithDefaultAnalysisOptions {
-  /**
-   * The uri for the default analysis options file.
-   */
+  /// The uri for the default analysis options file.
   static const String uri = 'package:dart.analysis_options/default.yaml';
 
-  /**
-   *  The uri for third_party analysis options file.
-   */
+  ///  The uri for third_party analysis options file.
   static const String thirdPartyUri =
       'package:dart.analysis_options/third_party.yaml';
 }
diff --git a/pkg/analyzer/pubspec.yaml b/pkg/analyzer/pubspec.yaml
index 533c75d..4044ff8 100644
--- a/pkg/analyzer/pubspec.yaml
+++ b/pkg/analyzer/pubspec.yaml
@@ -1,5 +1,5 @@
 name: analyzer
-version: 0.39.11-dev
+version: 0.39.13-dev
 description: This package provides a library that performs static analysis of Dart code.
 homepage: https://github.com/dart-lang/sdk/tree/master/pkg/analyzer
 
@@ -7,7 +7,7 @@
   sdk: '>=2.6.0 <3.0.0'
 
 dependencies:
-  _fe_analyzer_shared: ^4.0.0
+  _fe_analyzer_shared: ^5.0.0
   args: ^1.0.0
   charcode: ^1.1.0
   collection: ^1.10.1
diff --git a/pkg/analyzer/test/dart/analysis/from_environment_evaluator_test.dart b/pkg/analyzer/test/dart/analysis/from_environment_evaluator_test.dart
index 5ff1042..8ff2783 100644
--- a/pkg/analyzer/test/dart/analysis/from_environment_evaluator_test.dart
+++ b/pkg/analyzer/test/dart/analysis/from_environment_evaluator_test.dart
@@ -6,14 +6,14 @@
 import 'package:analyzer/dart/element/type.dart';
 import 'package:analyzer/dart/element/type_provider.dart';
 import 'package:analyzer/src/dart/constant/from_environment_evaluator.dart';
+import 'package:analyzer/src/dart/element/type_system.dart';
 import 'package:analyzer/src/generated/constant.dart';
-import 'package:analyzer/src/generated/type_system.dart';
 import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
 import '../../generated/test_analysis_context.dart';
 
-main() {
+void main() {
   defineReflectiveSuite(() {
     defineReflectiveTests(FromEnvironmentEvaluatorTest);
   });
diff --git a/pkg/analyzer/test/dart/ast/ast_test.dart b/pkg/analyzer/test/dart/ast/ast_test.dart
index c243a08..3fdfab1 100644
--- a/pkg/analyzer/test/dart/ast/ast_test.dart
+++ b/pkg/analyzer/test/dart/ast/ast_test.dart
@@ -1053,12 +1053,11 @@
     return identifier;
   }
 
-  /**
-   * Return the top-most node in the AST structure containing the given identifier.
-   *
-   * @param identifier the identifier in the AST structure being traversed
-   * @return the root of the AST structure containing the identifier
-   */
+  /// Return the top-most node in the AST structure containing the given
+  /// identifier.
+  ///
+  /// @param identifier the identifier in the AST structure being traversed
+  /// @return the root of the AST structure containing the identifier
   AstNode _topMostNode(SimpleIdentifier identifier) {
     AstNode child = identifier;
     AstNode parent = identifier.parent;
diff --git a/pkg/analyzer/test/dart/ast/visitor_test.dart b/pkg/analyzer/test/dart/ast/visitor_test.dart
index 6b524fe..9a14730 100644
--- a/pkg/analyzer/test/dart/ast/visitor_test.dart
+++ b/pkg/analyzer/test/dart/ast/visitor_test.dart
@@ -52,10 +52,8 @@
   }
 }
 
-/**
- * A helper class used to collect the nodes that were visited and to preserve
- * the order in which they were visited.
- */
+/// A helper class used to collect the nodes that were visited and to preserve
+/// the order in which they were visited.
 class _BreadthFirstVisitorTestHelper extends BreadthFirstVisitor<void> {
   List<AstNode> nodes;
 
diff --git a/pkg/analyzer/test/file_system/file_system_test_support.dart b/pkg/analyzer/test/file_system/file_system_test_support.dart
index 19ec201..9fcb311 100644
--- a/pkg/analyzer/test/file_system/file_system_test_support.dart
+++ b/pkg/analyzer/test/file_system/file_system_test_support.dart
@@ -617,9 +617,7 @@
     expect(folder.toUri(), Uri.directory(defaultFolderPath));
   }
 
-  /**
-   * Verify that the [copy] has the same name and content as the [source].
-   */
+  /// Verify that the [copy] has the same name and content as the [source].
   void _verifyStructure(Folder copy, Folder source) {
     expect(copy.shortName, source.shortName);
     Map<String, File> sourceFiles = <String, File>{};
diff --git a/pkg/analyzer/test/file_system/overlay_file_system_test.dart b/pkg/analyzer/test/file_system/overlay_file_system_test.dart
index 952f5f3..e3bb73d 100644
--- a/pkg/analyzer/test/file_system/overlay_file_system_test.dart
+++ b/pkg/analyzer/test/file_system/overlay_file_system_test.dart
@@ -631,9 +631,7 @@
     expect(folder.resolveSymbolicLinksSync(), folder);
   }
 
-  /**
-   * Verify that the [copy] has the same name and content as the [source].
-   */
+  /// Verify that the [copy] has the same name and content as the [source].
   void _verifyStructure(Folder copy, Folder source) {
     expect(copy.shortName, source.shortName);
     Map<String, File> sourceFiles = <String, File>{};
diff --git a/pkg/analyzer/test/generated/element_resolver_test.dart b/pkg/analyzer/test/generated/element_resolver_test.dart
index 2df2529..0636397 100644
--- a/pkg/analyzer/test/generated/element_resolver_test.dart
+++ b/pkg/analyzer/test/generated/element_resolver_test.dart
@@ -13,6 +13,7 @@
 import 'package:analyzer/dart/element/type_provider.dart';
 import 'package:analyzer/src/dart/element/element.dart';
 import 'package:analyzer/src/dart/element/inheritance_manager3.dart';
+import 'package:analyzer/src/dart/resolver/scope.dart';
 import 'package:analyzer/src/generated/element_resolver.dart';
 import 'package:analyzer/src/generated/resolver.dart';
 import 'package:analyzer/src/generated/source.dart';
@@ -297,29 +298,19 @@
 
 @reflectiveTest
 class ElementResolverTest with ResourceProviderMixin, ElementsTypesMixin {
-  /**
-   * The error listener to which errors will be reported.
-   */
+  /// The error listener to which errors will be reported.
   GatheringErrorListener _listener;
 
-  /**
-   * The type provider used to access the types.
-   */
+  /// The type provider used to access the types.
   TypeProvider _typeProvider;
 
-  /**
-   * The library containing the code being resolved.
-   */
+  /// The library containing the code being resolved.
   LibraryElementImpl _definingLibrary;
 
-  /**
-   * The resolver visitor that maintains the state for the resolver.
-   */
+  /// The resolver visitor that maintains the state for the resolver.
   ResolverVisitor _visitor;
 
-  /**
-   * The resolver being used to resolve the test cases.
-   */
+  /// The resolver being used to resolve the test cases.
   ElementResolver _resolver;
 
   @override
@@ -960,9 +951,7 @@
     _listener.assertNoErrors();
   }
 
-  /**
-   * Create and return the resolver used by the tests.
-   */
+  /// Create and return the resolver used by the tests.
   void _createResolver() {
     var context = TestAnalysisContext();
     _typeProvider = context.typeProviderLegacy;
@@ -991,56 +980,50 @@
     }
   }
 
-  /**
-   * Return the element associated with the label of [statement] after the
-   * resolver has resolved it.  [labelElement] is the label element to be
-   * defined in the statement's label scope, and [labelTarget] is the statement
-   * the label resolves to.
-   */
+  /// Return the element associated with the label of [statement] after the
+  /// resolver has resolved it.  [labelElement] is the label element to be
+  /// defined in the statement's label scope, and [labelTarget] is the statement
+  /// the label resolves to.
   Element _resolveBreak(BreakStatement statement, LabelElementImpl labelElement,
       Statement labelTarget) {
     _resolveStatement(statement, labelElement, labelTarget);
     return statement.label.staticElement;
   }
 
-  /**
-   * Return the element associated with the label [statement] after the
-   * resolver has resolved it.  [labelElement] is the label element to be
-   * defined in the statement's label scope, and [labelTarget] is the AST node
-   * the label resolves to.
-   *
-   * @param statement the statement to be resolved
-   * @param labelElement the label element to be defined in the statement's label scope
-   * @return the element to which the statement's label was resolved
-   */
+  /// Return the element associated with the label [statement] after the
+  /// resolver has resolved it.  [labelElement] is the label element to be
+  /// defined in the statement's label scope, and [labelTarget] is the AST node
+  /// the label resolves to.
+  ///
+  /// @param statement the statement to be resolved
+  /// @param labelElement the label element to be defined in the statement's
+  ///          label scope
+  /// @return the element to which the statement's label was resolved
   Element _resolveContinue(ContinueStatement statement,
       LabelElementImpl labelElement, AstNode labelTarget) {
     _resolveStatement(statement, labelElement, labelTarget);
     return statement.label.staticElement;
   }
 
-  /**
-   * Return the element associated with the given identifier after the resolver has resolved the
-   * identifier.
-   *
-   * @param node the expression to be resolved
-   * @param definedElements the elements that are to be defined in the scope in which the element is
-   *          being resolved
-   * @return the element to which the expression was resolved
-   */
+  /// Return the element associated with the given identifier after the resolver
+  /// has resolved the identifier.
+  ///
+  /// @param node the expression to be resolved
+  /// @param definedElements the elements that are to be defined in the scope in
+  ///          which the element is being resolved
+  /// @return the element to which the expression was resolved
   Element _resolveIdentifier(Identifier node, [List<Element> definedElements]) {
     _resolveNode(node, definedElements);
     return node.staticElement;
   }
 
-  /**
-   * Return the element associated with the given identifier after the resolver has resolved the
-   * identifier.
-   *
-   * @param node the expression to be resolved
-   * @param enclosingClass the element representing the class enclosing the identifier
-   * @return the element to which the expression was resolved
-   */
+  /// Return the element associated with the given identifier after the resolver
+  /// has resolved the identifier.
+  ///
+  /// @param node the expression to be resolved
+  /// @param enclosingClass the element representing the class enclosing the
+  ///          identifier
+  /// @return the element to which the expression was resolved
   void _resolveInClass(AstNode node, ClassElement enclosingClass) {
     Scope outerScope = _visitor.nameScope;
     try {
@@ -1055,30 +1038,26 @@
     }
   }
 
-  /**
-   * Return the element associated with the given expression after the resolver has resolved the
-   * expression.
-   *
-   * @param node the expression to be resolved
-   * @param definedElements the elements that are to be defined in the scope in which the element is
-   *          being resolved
-   * @return the element to which the expression was resolved
-   */
+  /// Return the element associated with the given expression after the resolver
+  /// has resolved the expression.
+  ///
+  /// @param node the expression to be resolved
+  /// @param definedElements the elements that are to be defined in the scope in
+  ///          which the element is being resolved
+  /// @return the element to which the expression was resolved
   Element _resolveIndexExpression(IndexExpression node,
       [List<Element> definedElements]) {
     _resolveNode(node, definedElements);
     return node.staticElement;
   }
 
-  /**
-   * Return the element associated with the given identifier after the resolver has resolved the
-   * identifier.
-   *
-   * @param node the expression to be resolved
-   * @param definedElements the elements that are to be defined in the scope in which the element is
-   *          being resolved
-   * @return the element to which the expression was resolved
-   */
+  /// Return the element associated with the given identifier after the resolver
+  /// has resolved the identifier.
+  ///
+  /// @param node the expression to be resolved
+  /// @param definedElements the elements that are to be defined in the scope in
+  ///          which the element is being resolved
+  /// @return the element to which the expression was resolved
   void _resolveNode(AstNode node, [List<Element> definedElements]) {
     Scope outerScope = _visitor.nameScope;
     try {
@@ -1095,14 +1074,13 @@
     }
   }
 
-  /**
-   * Return the element associated with the label of the given statement after the resolver has
-   * resolved the statement.
-   *
-   * @param statement the statement to be resolved
-   * @param labelElement the label element to be defined in the statement's label scope
-   * @return the element to which the statement's label was resolved
-   */
+  /// Return the element associated with the label of the given statement after
+  /// the resolver has resolved the statement.
+  ///
+  /// @param statement the statement to be resolved
+  /// @param labelElement the label element to be defined in the statement's
+  ///          label scope
+  /// @return the element to which the statement's label was resolved
   void _resolveStatement(
       Statement statement, LabelElementImpl labelElement, AstNode labelTarget) {
     LabelScope outerScope = _visitor.labelScope;
diff --git a/pkg/analyzer/test/generated/elements_types_mixin.dart b/pkg/analyzer/test/generated/elements_types_mixin.dart
index 34bcb47..e4010b2 100644
--- a/pkg/analyzer/test/generated/elements_types_mixin.dart
+++ b/pkg/analyzer/test/generated/elements_types_mixin.dart
@@ -9,10 +9,10 @@
 import 'package:analyzer/src/dart/analysis/session.dart';
 import 'package:analyzer/src/dart/element/element.dart';
 import 'package:analyzer/src/dart/element/type.dart';
+import 'package:analyzer/src/dart/element/type_system.dart';
 import 'package:analyzer/src/dart/resolver/variance.dart';
 import 'package:analyzer/src/generated/engine.dart';
 import 'package:analyzer/src/generated/source.dart';
-import 'package:analyzer/src/generated/type_system.dart';
 import 'package:analyzer/src/generated/utilities_dart.dart';
 import 'package:meta/meta.dart';
 
diff --git a/pkg/analyzer/test/generated/parser_fasta_listener.dart b/pkg/analyzer/test/generated/parser_fasta_listener.dart
index 8fc3828..b75416d 100644
--- a/pkg/analyzer/test/generated/parser_fasta_listener.dart
+++ b/pkg/analyzer/test/generated/parser_fasta_listener.dart
@@ -8,27 +8,25 @@
 import 'package:_fe_analyzer_shared/src/scanner/token.dart';
 import 'package:test/test.dart';
 
-/**
- * Proxy implementation of the fasta parser listener that
- * asserts begin/end pairs of events and forwards all events
- * to the specified listener.
- *
- * When `parseUnit` is called, then all events are generated as expected.
- * When "lower level" parse methods are called, then some "higher level"
- * begin/end event pairs will not be generated. In this case,
- * construct a new listener and call `begin('higher-level-event')`
- * before calling the "lower level" parse method. Once the parse method returns,
- * call `end('higher-level-event')` to assert that the stack is in the
- * expected state.
- *
- * For example, when calling `parseTopLevelDeclaration`, the
- * [beginCompilationUnit] and [endCompilationUnit] event pair is not generated.
- * In this case, call `begin('CompilationUnit')` before calling
- * `parseTopLevelDeclaration`, and call `end('CompilationUnit')` afterward.
- *
- * When calling `parseUnit`, do not call `begin` or `end`,
- * but call `expectEmpty` after `parseUnit` returns.
- */
+/// Proxy implementation of the fasta parser listener that
+/// asserts begin/end pairs of events and forwards all events
+/// to the specified listener.
+///
+/// When `parseUnit` is called, then all events are generated as expected.
+/// When "lower level" parse methods are called, then some "higher level"
+/// begin/end event pairs will not be generated. In this case,
+/// construct a new listener and call `begin('higher-level-event')`
+/// before calling the "lower level" parse method. Once the parse method
+/// returns, call `end('higher-level-event')` to assert that the stack is in the
+/// expected state.
+///
+/// For example, when calling `parseTopLevelDeclaration`, the
+/// [beginCompilationUnit] and [endCompilationUnit] event pair is not generated.
+/// In this case, call `begin('CompilationUnit')` before calling
+/// `parseTopLevelDeclaration`, and call `end('CompilationUnit')` afterward.
+///
+/// When calling `parseUnit`, do not call `begin` or `end`,
+/// but call `expectEmpty` after `parseUnit` returns.
 class ForwardingTestListener extends ForwardingListener {
   final _stack = <String>[];
 
diff --git a/pkg/analyzer/test/generated/parser_fasta_test.dart b/pkg/analyzer/test/generated/parser_fasta_test.dart
index 3ac63ba..9bd30a8 100644
--- a/pkg/analyzer/test/generated/parser_fasta_test.dart
+++ b/pkg/analyzer/test/generated/parser_fasta_test.dart
@@ -348,9 +348,7 @@
   }
 }
 
-/**
- * Tests of the fasta parser based on [ExpressionParserTestMixin].
- */
+/// Tests of the fasta parser based on [ExpressionParserTestMixin].
 @reflectiveTest
 class CollectionLiteralParserTest extends FastaParserTestCase {
   Expression parseCollectionLiteral(String source,
@@ -976,9 +974,7 @@
   }
 }
 
-/**
- * Tests of the fasta parser based on [ComplexParserTestMixin].
- */
+/// Tests of the fasta parser based on [ComplexParserTestMixin].
 @reflectiveTest
 class ComplexParserTest_Fasta extends FastaParserTestCase
     with ComplexParserTestMixin {
@@ -1044,9 +1040,7 @@
   }
 }
 
-/**
- * Tests of the fasta parser based on [ErrorParserTest].
- */
+/// Tests of the fasta parser based on [ErrorParserTest].
 @reflectiveTest
 class ErrorParserTest_Fasta extends FastaParserTestCase
     with ErrorParserTestMixin {
@@ -1252,9 +1246,7 @@
   }
 }
 
-/**
- * Tests of the fasta parser based on [ExpressionParserTestMixin].
- */
+/// Tests of the fasta parser based on [ExpressionParserTestMixin].
 @reflectiveTest
 class ExpressionParserTest_Fasta extends FastaParserTestCase
     with ExpressionParserTestMixin {
@@ -1882,10 +1874,8 @@
   }
 }
 
-/**
- * Implementation of [AbstractParserTestCase] specialized for testing the
- * Fasta parser.
- */
+/// Implementation of [AbstractParserTestCase] specialized for testing the
+/// Fasta parser.
 class FastaParserTestCase
     with ParserTestHelpers
     implements AbstractParserTestCase {
@@ -2411,9 +2401,7 @@
       expectedErrorCodes.map(_toFastaGeneratedAnalyzerErrorCode).toList();
 }
 
-/**
- * Tests of the fasta parser based on [FormalParameterParserTestMixin].
- */
+/// Tests of the fasta parser based on [FormalParameterParserTestMixin].
 @reflectiveTest
 class FormalParameterParserTest_Fasta extends FastaParserTestCase
     with FormalParameterParserTestMixin {
@@ -2677,9 +2665,7 @@
   }
 }
 
-/**
- * Tests of the fasta parser based on [ComplexParserTestMixin].
- */
+/// Tests of the fasta parser based on [ComplexParserTestMixin].
 @reflectiveTest
 class NNBDParserTest_Fasta extends FastaParserTestCase {
   @override
@@ -3514,27 +3500,21 @@
   }
 }
 
-/**
- * Proxy implementation of the analyzer parser, implemented in terms of the
- * Fasta parser.
- *
- * This allows many of the analyzer parser tests to be run on Fasta, even if
- * they call into the analyzer parser class directly.
- */
+/// Proxy implementation of the analyzer parser, implemented in terms of the
+/// Fasta parser.
+///
+/// This allows many of the analyzer parser tests to be run on Fasta, even if
+/// they call into the analyzer parser class directly.
 class ParserProxy extends analyzer.ParserAdapter {
-  /**
-   * The error listener to which scanner and parser errors will be reported.
-   */
+  /// The error listener to which scanner and parser errors will be reported.
   final GatheringErrorListener _errorListener;
 
   ForwardingTestListener _eventListener;
 
   final int expectedEndOffset;
 
-  /**
-   * Creates a [ParserProxy] which is prepared to begin parsing at the given
-   * Fasta token.
-   */
+  /// Creates a [ParserProxy] which is prepared to begin parsing at the given
+  /// Fasta token.
   factory ParserProxy(analyzer.Token firstToken, FeatureSet featureSet,
       {bool allowNativeClause = false, int expectedEndOffset}) {
     TestSource source = TestSource();
@@ -3916,9 +3896,7 @@
   }
 }
 
-/**
- * Tests of the fasta parser based on [StatementParserTestMixin].
- */
+/// Tests of the fasta parser based on [StatementParserTestMixin].
 @reflectiveTest
 class StatementParserTest_Fasta extends FastaParserTestCase
     with StatementParserTestMixin {
@@ -4323,9 +4301,7 @@
   }
 }
 
-/**
- * Tests of the fasta parser based on [TopLevelParserTestMixin].
- */
+/// Tests of the fasta parser based on [TopLevelParserTestMixin].
 @reflectiveTest
 class TopLevelParserTest_Fasta extends FastaParserTestCase
     with TopLevelParserTestMixin {
diff --git a/pkg/analyzer/test/generated/parser_test.dart b/pkg/analyzer/test/generated/parser_test.dart
index 705447b..8bb5a73 100644
--- a/pkg/analyzer/test/generated/parser_test.dart
+++ b/pkg/analyzer/test/generated/parser_test.dart
@@ -49,68 +49,50 @@
   });
 }
 
-/**
- * Abstract base class for parser tests, which does not make assumptions about
- * which parser is used.
- */
+/// Abstract base class for parser tests, which does not make assumptions about
+/// which parser is used.
 abstract class AbstractParserTestCase implements ParserTestHelpers {
   bool get allowNativeClause;
 
   set allowNativeClause(bool value);
 
-  /**
-   * Set a flag indicating whether the parser should parse instance creation
-   * expressions that lack either the `new` or `const` keyword.
-   */
+  /// Set a flag indicating whether the parser should parse instance creation
+  /// expressions that lack either the `new` or `const` keyword.
   set enableOptionalNewAndConst(bool value);
 
-  /**
-   * Set a flag indicating whether the parser is to parse part-of directives
-   * that specify a URI rather than a library name.
-   */
+  /// Set a flag indicating whether the parser is to parse part-of directives
+  /// that specify a URI rather than a library name.
   set enableUriInPartOf(bool value);
 
-  /**
-   * The error listener to which scanner and parser errors will be reported.
-   *
-   * This field is typically initialized by invoking [createParser].
-   */
+  /// The error listener to which scanner and parser errors will be reported.
+  ///
+  /// This field is typically initialized by invoking [createParser].
   GatheringErrorListener get listener;
 
-  /**
-   * Get the parser used by the test.
-   *
-   * Caller must first invoke [createParser].
-   */
+  /// Get the parser used by the test.
+  ///
+  /// Caller must first invoke [createParser].
   Parser get parser;
 
-  /**
-   * Flag indicating whether the fasta parser is being used.
-   */
+  /// Flag indicating whether the fasta parser is being used.
   bool get usingFastaParser;
 
-  /**
-   * Assert that the number and codes of errors occurred during parsing is the
-   * same as the [expectedErrorCodes].
-   */
+  /// Assert that the number and codes of errors occurred during parsing is the
+  /// same as the [expectedErrorCodes].
   void assertErrorsWithCodes(List<ErrorCode> expectedErrorCodes);
 
-  /**
-   * Asserts that no errors occurred during parsing.
-   */
+  /// Asserts that no errors occurred during parsing.
   void assertNoErrors();
 
-  /**
-   * Prepares to parse using tokens scanned from the given [content] string.
-   *
-   * [expectedEndOffset] is the expected offset of the next token to be parsed
-   * after the parser has finished parsing,
-   * or `null` (the default) if EOF is expected.
-   * In general, the analyzer tests do not assert that the last token is EOF,
-   * but the fasta parser adapter tests do assert this.
-   * For any analyzer test where the last token is not EOF, set this value.
-   * It is ignored when not using the fasta parser.
-   */
+  /// Prepares to parse using tokens scanned from the given [content] string.
+  ///
+  /// [expectedEndOffset] is the expected offset of the next token to be parsed
+  /// after the parser has finished parsing,
+  /// or `null` (the default) if EOF is expected.
+  /// In general, the analyzer tests do not assert that the last token is EOF,
+  /// but the fasta parser adapter tests do assert this.
+  /// For any analyzer test where the last token is not EOF, set this value.
+  /// It is ignored when not using the fasta parser.
   void createParser(
     String content, {
     int expectedEndOffset,
@@ -150,15 +132,15 @@
 
   ConstructorInitializer parseConstructorInitializer(String code);
 
-  /**
-   * Parse the given source as a compilation unit.
-   *
-   * @param source the source to be parsed
-   * @param errorCodes the error codes of the errors that are expected to be found
-   * @return the compilation unit that was parsed
-   * @throws Exception if the source could not be parsed, if the compilation errors in the source do
-   *           not match those that are expected, or if the result would have been `null`
-   */
+  /// Parse the given source as a compilation unit.
+  ///
+  /// @param source the source to be parsed
+  /// @param errorCodes the error codes of the errors that are expected to be
+  ///          found
+  /// @return the compilation unit that was parsed
+  /// @throws Exception if the source could not be parsed, if the compilation
+  ///           errors in the source do not match those that are expected, or if
+  ///           the result would have been `null`
   CompilationUnit parseDirectives(String source,
       [List<ErrorCode> errorCodes = const <ErrorCode>[]]);
 
@@ -181,16 +163,12 @@
       List<ErrorCode> errorCodes = const <ErrorCode>[],
       List<ExpectedError> errors});
 
-  /**
-   * Parses a single top level member of a compilation unit (other than a
-   * directive), including any comment and/or metadata that precedes it.
-   */
+  /// Parses a single top level member of a compilation unit (other than a
+  /// directive), including any comment and/or metadata that precedes it.
   CompilationUnitMember parseFullCompilationUnitMember();
 
-  /**
-   * Parses a single top level directive, including any comment and/or metadata
-   * that precedes it.
-   */
+  /// Parses a single top level directive, including any comment and/or metadata
+  /// that precedes it.
   Directive parseFullDirective();
 
   FunctionExpression parseFunctionExpression(String code);
@@ -250,10 +228,8 @@
   VariableDeclarationList parseVariableDeclarationList(String source);
 }
 
-/**
- * Instances of the class `AstValidator` are used to validate the correct construction of an
- * AST structure.
- */
+/// Instances of the class `AstValidator` are used to validate the correct
+/// construction of an AST structure.
 class AstValidator extends UnifyingAstVisitor<void> {
   /// A list containing the errors found while traversing the AST structure.
   final List<String> _errors = <String>[];
@@ -278,11 +254,9 @@
     super.visitNode(node);
   }
 
-  /**
-   * Validate that the given AST node is correctly constructed.
-   *
-   * @param node the AST node being validated
-   */
+  /// Validate that the given AST node is correctly constructed.
+  ///
+  /// @param node the AST node being validated
   void _validate(AstNode node) {
     AstNode parent = node.parent;
     if (node is CompilationUnit) {
@@ -331,9 +305,7 @@
   }
 }
 
-/**
- * Tests which exercise the parser using a class member.
- */
+/// Tests which exercise the parser using a class member.
 mixin ClassMemberParserTestMixin implements AbstractParserTestCase {
   void test_parseAwaitExpression_asStatement_inAsync() {
     createParser('m() async { await x; }');
@@ -1833,9 +1805,7 @@
     expectCommentText(parameter.documentationComment, '/// Doc');
   }
 
-  /**
-   * Assert that the given [name] is in declaration context.
-   */
+  /// Assert that the given [name] is in declaration context.
   void _assertIsDeclarationName(SimpleIdentifier name, [bool expected = true]) {
     expect(name.inDeclarationContext(), expected);
   }
@@ -1865,19 +1835,16 @@
   }
 }
 
-/**
- * Tests of the analyzer parser based on [ComplexParserTestMixin].
- */
+/// Tests of the analyzer parser based on [ComplexParserTestMixin].
 @reflectiveTest
 class ComplexParserTest extends ParserTestCase with ComplexParserTestMixin {}
 
-/**
- * The class `ComplexParserTest` defines parser tests that test the parsing of more complex
- * code fragments or the interactions between multiple parsing methods. For example, tests to ensure
- * that the precedence of operations is being handled correctly should be defined in this class.
- *
- * Simpler tests should be defined in the class [SimpleParserTest].
- */
+/// The class `ComplexParserTest` defines parser tests that test the parsing of
+/// more complex code fragments or the interactions between multiple parsing
+/// methods. For example, tests to ensure that the precedence of operations is
+/// being handled correctly should be defined in this class.
+///
+/// Simpler tests should be defined in the class [SimpleParserTest].
 mixin ComplexParserTestMixin implements AbstractParserTestCase {
   void test_additiveExpression_normal() {
     BinaryExpression expression = parseExpression("x + y - z");
@@ -2356,11 +2323,9 @@
   }
 }
 
-/**
- * The class `ErrorParserTest` defines parser tests that test the parsing
- * of code to ensure that errors are correctly reported,
- * and in some cases, not reported.
- */
+/// The class `ErrorParserTest` defines parser tests that test the parsing
+/// of code to ensure that errors are correctly reported,
+/// and in some cases, not reported.
 @reflectiveTest
 class ErrorParserTest extends ParserTestCase with ErrorParserTestMixin {
   void test_missingIdentifier_number() {
@@ -8231,17 +8196,13 @@
   }
 }
 
-/**
- * Tests of the analyzer parser based on [FormalParameterParserTestMixin].
- */
+/// Tests of the analyzer parser based on [FormalParameterParserTestMixin].
 @reflectiveTest
 class FormalParameterParserTest extends ParserTestCase
     with FormalParameterParserTestMixin {}
 
-/**
- * The class [FormalParameterParserTestMixin] defines parser tests that test
- * the parsing of formal parameters.
- */
+/// The class [FormalParameterParserTestMixin] defines parser tests that test
+/// the parsing of formal parameters.
 mixin FormalParameterParserTestMixin implements AbstractParserTestCase {
   void test_parseConstructorParameter_this() {
     parseCompilationUnit('''
@@ -9419,50 +9380,36 @@
   }
 }
 
-/**
- * Implementation of [AbstractParserTestCase] specialized for testing the
- * analyzer parser.
- */
+/// Implementation of [AbstractParserTestCase] specialized for testing the
+/// analyzer parser.
 class ParserTestCase with ParserTestHelpers implements AbstractParserTestCase {
-  /**
-   * A flag indicating whether parser is to parse function bodies.
-   */
+  /// A flag indicating whether parser is to parse function bodies.
   static bool parseFunctionBodies = true;
 
   @override
   bool allowNativeClause = true;
 
-  /**
-   * A flag indicating whether parser is to parse async.
-   */
+  /// A flag indicating whether parser is to parse async.
   bool parseAsync = true;
 
-  /**
-   * A flag indicating whether the parser should parse instance creation
-   * expressions that lack either the `new` or `const` keyword.
-   */
+  /// A flag indicating whether the parser should parse instance creation
+  /// expressions that lack either the `new` or `const` keyword.
   bool enableOptionalNewAndConst = false;
 
-  /**
-   * A flag indicating whether the parser should parse mixin declarations.
-   * https://github.com/dart-lang/language/issues/12
-   */
+  /// A flag indicating whether the parser should parse mixin declarations.
+  /// https://github.com/dart-lang/language/issues/12
   bool isMixinSupportEnabled = false;
 
-  /**
-   * A flag indicating whether the parser is to parse part-of directives that
-   * specify a URI rather than a library name.
-   */
+  /// A flag indicating whether the parser is to parse part-of directives that
+  /// specify a URI rather than a library name.
   bool enableUriInPartOf = false;
 
   @override
   GatheringErrorListener listener;
 
-  /**
-   * The parser used by the test.
-   *
-   * This field is typically initialized by invoking [createParser].
-   */
+  /// The parser used by the test.
+  ///
+  /// This field is typically initialized by invoking [createParser].
   @override
   Parser parser;
 
@@ -9479,10 +9426,8 @@
     listener.assertNoErrors();
   }
 
-  /**
-   * Create the [parser] and [listener] used by a test. The [parser] will be
-   * prepared to parse the tokens scanned from the given [content].
-   */
+  /// Create the [parser] and [listener] used by a test. The [parser] will be
+  /// prepared to parse the tokens scanned from the given [content].
   @override
   void createParser(
     String content, {
@@ -9612,15 +9557,15 @@
     }
   }
 
-  /**
-   * Parse the given source as a compilation unit.
-   *
-   * @param source the source to be parsed
-   * @param errorCodes the error codes of the errors that are expected to be found
-   * @return the compilation unit that was parsed
-   * @throws Exception if the source could not be parsed, if the compilation errors in the source do
-   *           not match those that are expected, or if the result would have been `null`
-   */
+  /// Parse the given source as a compilation unit.
+  ///
+  /// @param source the source to be parsed
+  /// @param errorCodes the error codes of the errors that are expected to be
+  ///          found
+  /// @return the compilation unit that was parsed
+  /// @throws Exception if the source could not be parsed, if the compilation
+  ///           errors in the source do not match those that are expected, or if
+  ///           the result would have been `null`
   @override
   CompilationUnit parseCompilationUnit(String content,
       {List<ErrorCode> codes, List<ExpectedError> errors}) {
@@ -9648,9 +9593,7 @@
     return unit;
   }
 
-  /**
-   * Parse the given [content] as a compilation unit.
-   */
+  /// Parse the given [content] as a compilation unit.
   CompilationUnit parseCompilationUnit2(String content,
       {AnalysisErrorListener listener}) {
     Source source = NonExistingSource.unknown;
@@ -9707,12 +9650,10 @@
     return parser.parseEqualityExpression();
   }
 
-  /**
-   * Parse the given [source] as an expression. If a list of error [codes] is
-   * provided, then assert that the produced errors matches the list. Otherwise,
-   * if a list of [errors] is provided, the assert that the produced errors
-   * matches the list. Otherwise, assert that there are no errors.
-   */
+  /// Parse the given [source] as an expression. If a list of error [codes] is
+  /// provided, then assert that the produced errors matches the list.
+  /// Otherwise, if a list of [errors] is provided, the assert that the produced
+  /// errors matches the list. Otherwise, assert that there are no errors.
   @override
   Expression parseExpression(String source,
       {List<ErrorCode> codes,
@@ -9791,10 +9732,8 @@
     return list;
   }
 
-  /**
-   * Parses a single top level member of a compilation unit (other than a
-   * directive), including any comment and/or metadata that precedes it.
-   */
+  /// Parses a single top level member of a compilation unit (other than a
+  /// directive), including any comment and/or metadata that precedes it.
   @override
   CompilationUnitMember parseFullCompilationUnitMember() => usingFastaParser
       ? parser.parseCompilationUnit2().declarations.first
@@ -9986,10 +9925,9 @@
     return parser.parseSimpleIdentifier();
   }
 
-  /**
-   * Parse the given [content] as a statement. If [enableLazyAssignmentOperators]
-   * is `true`, then lazy assignment operators should be enabled.
-   */
+  /// Parse the given [content] as a statement. If
+  /// [enableLazyAssignmentOperators] is `true`, then lazy assignment operators
+  /// should be enabled.
   @override
   Statement parseStatement(String content, {int expectedEndOffset}) {
     Source source = TestSource();
@@ -10009,17 +9947,17 @@
     return statement;
   }
 
-  /**
-   * Parse the given source as a sequence of statements.
-   *
-   * @param source the source to be parsed
-   * @param expectedCount the number of statements that are expected
-   * @param errorCodes the error codes of the errors that are expected to be found
-   * @return the statements that were parsed
-   * @throws Exception if the source could not be parsed, if the number of statements does not match
-   *           the expected count, if the compilation errors in the source do not match those that
-   *           are expected, or if the result would have been `null`
-   */
+  /// Parse the given source as a sequence of statements.
+  ///
+  /// @param source the source to be parsed
+  /// @param expectedCount the number of statements that are expected
+  /// @param errorCodes the error codes of the errors that are expected to be
+  ///          found
+  /// @return the statements that were parsed
+  /// @throws Exception if the source could not be parsed, if the number of
+  ///           statements does not match the expected count, if the compilation
+  ///           errors in the source do not match those that are expected, or if
+  ///           the result would have been `null`
   List<Statement> parseStatements(String content, int expectedCount,
       [List<ErrorCode> errorCodes = const <ErrorCode>[]]) {
     Source source = TestSource();
@@ -10088,11 +10026,9 @@
   }
 }
 
-/**
- * Helper methods that aid in parser tests.
- *
- * Intended to be mixed in to parser test case classes.
- */
+/// Helper methods that aid in parser tests.
+///
+/// Intended to be mixed in to parser test case classes.
 mixin ParserTestHelpers {
   void expectCommentText(Comment comment, String expectedText) {
     expect(comment.beginToken, same(comment.endToken));
@@ -10111,17 +10047,13 @@
   }
 }
 
-/**
- * Tests of the analyzer parser based on [RecoveryParserTestMixin].
- */
+/// Tests of the analyzer parser based on [RecoveryParserTestMixin].
 @reflectiveTest
 class RecoveryParserTest extends ParserTestCase with RecoveryParserTestMixin {}
 
-/**
- * The class `RecoveryParserTest` defines parser tests that test the parsing of
- * invalid code sequences to ensure that the correct recovery steps are taken in
- * the parser.
- */
+/// The class `RecoveryParserTest` defines parser tests that test the parsing of
+/// invalid code sequences to ensure that the correct recovery steps are taken
+/// in the parser.
 mixin RecoveryParserTestMixin implements AbstractParserTestCase {
   void test_additiveExpression_missing_LHS() {
     BinaryExpression expression =
@@ -11841,9 +11773,7 @@
   }
 }
 
-/**
- * Tests of the analyzer parser based on [SimpleParserTestMixin].
- */
+/// Tests of the analyzer parser based on [SimpleParserTestMixin].
 @reflectiveTest
 class SimpleParserTest extends ParserTestCase with SimpleParserTestMixin {
   void test_computeStringValue_emptyInterpolationPrefix() {
@@ -12577,15 +12507,14 @@
     expect(following.type, TokenType.PLUS);
   }
 
-  /**
-   * Invoke the method [Parser.computeStringValue] with the given argument.
-   *
-   * @param lexeme the argument to the method
-   * @param first `true` if this is the first token in a string literal
-   * @param last `true` if this is the last token in a string literal
-   * @return the result of invoking the method
-   * @throws Exception if the method could not be invoked or throws an exception
-   */
+  /// Invoke the method [Parser.computeStringValue] with the given argument.
+  ///
+  /// @param lexeme the argument to the method
+  /// @param first `true` if this is the first token in a string literal
+  /// @param last `true` if this is the last token in a string literal
+  /// @return the result of invoking the method
+  /// @throws Exception if the method could not be invoked or throws an
+  ///           exception
   String _computeStringValue(String lexeme, bool first, bool last) {
     createParser('');
     String value = parser.computeStringValue(lexeme, first, last);
@@ -12593,14 +12522,14 @@
     return value;
   }
 
-  /**
-   * Invoke the method [Parser.isFunctionDeclaration] with the parser set to the token
-   * stream produced by scanning the given source.
-   *
-   * @param source the source to be scanned to produce the token stream being tested
-   * @return the result of invoking the method
-   * @throws Exception if the method could not be invoked or throws an exception
-   */
+  /// Invoke the method [Parser.isFunctionDeclaration] with the parser set to
+  /// the token stream produced by scanning the given source.
+  ///
+  /// @param source the source to be scanned to produce the token stream being
+  ///          tested
+  /// @return the result of invoking the method
+  /// @throws Exception if the method could not be invoked or throws an
+  ///           exception
   bool _isFunctionDeclaration(String source) {
     createParser(source);
     bool result = parser.isFunctionDeclaration();
@@ -12608,27 +12537,27 @@
     return result;
   }
 
-  /**
-   * Invoke the method [Parser.isFunctionExpression] with the parser set to the token stream
-   * produced by scanning the given source.
-   *
-   * @param source the source to be scanned to produce the token stream being tested
-   * @return the result of invoking the method
-   * @throws Exception if the method could not be invoked or throws an exception
-   */
+  /// Invoke the method [Parser.isFunctionExpression] with the parser set to the
+  /// token stream produced by scanning the given source.
+  ///
+  /// @param source the source to be scanned to produce the token stream being
+  ///          tested
+  /// @return the result of invoking the method
+  /// @throws Exception if the method could not be invoked or throws an
+  ///           exception
   bool _isFunctionExpression(String source) {
     createParser(source);
     return parser.isFunctionExpression(parser.currentToken);
   }
 
-  /**
-   * Invoke the method [Parser.isInitializedVariableDeclaration] with the parser set to the
-   * token stream produced by scanning the given source.
-   *
-   * @param source the source to be scanned to produce the token stream being tested
-   * @return the result of invoking the method
-   * @throws Exception if the method could not be invoked or throws an exception
-   */
+  /// Invoke the method [Parser.isInitializedVariableDeclaration] with the
+  /// parser set to the token stream produced by scanning the given source.
+  ///
+  /// @param source the source to be scanned to produce the token stream being
+  ///          tested
+  /// @return the result of invoking the method
+  /// @throws Exception if the method could not be invoked or throws an
+  ///           exception
   bool _isInitializedVariableDeclaration(String source) {
     createParser(source);
     bool result = parser.isInitializedVariableDeclaration();
@@ -12636,14 +12565,14 @@
     return result;
   }
 
-  /**
-   * Invoke the method [Parser.isSwitchMember] with the parser set to the token stream
-   * produced by scanning the given source.
-   *
-   * @param source the source to be scanned to produce the token stream being tested
-   * @return the result of invoking the method
-   * @throws Exception if the method could not be invoked or throws an exception
-   */
+  /// Invoke the method [Parser.isSwitchMember] with the parser set to the token
+  /// stream produced by scanning the given source.
+  ///
+  /// @param source the source to be scanned to produce the token stream being
+  ///          tested
+  /// @return the result of invoking the method
+  /// @throws Exception if the method could not be invoked or throws an
+  ///           exception
   bool _isSwitchMember(String source) {
     createParser(source);
     bool result = parser.isSwitchMember();
@@ -12652,13 +12581,11 @@
   }
 }
 
-/**
- * Parser tests that test individual parsing methods. The code fragments should
- * be as minimal as possible in order to test the method, but should not test
- * the interactions between the method under test and other methods.
- *
- * More complex tests should be defined in the class [ComplexParserTest].
- */
+/// Parser tests that test individual parsing methods. The code fragments should
+/// be as minimal as possible in order to test the method, but should not test
+/// the interactions between the method under test and other methods.
+///
+/// More complex tests should be defined in the class [ComplexParserTest].
 mixin SimpleParserTestMixin implements AbstractParserTestCase {
   ConstructorName parseConstructorName(String name) {
     createParser('new $name();');
@@ -12705,12 +12632,10 @@
     return directive.name;
   }
 
-  /**
-   * Parse the given [content] as a sequence of statements by enclosing it in a
-   * block. The [expectedCount] is the number of statements that are expected to
-   * be parsed. If [errorCodes] are provided, verify that the error codes of the
-   * errors that are expected are found.
-   */
+  /// Parse the given [content] as a sequence of statements by enclosing it in a
+  /// block. The [expectedCount] is the number of statements that are expected
+  /// to be parsed. If [errorCodes] are provided, verify that the error codes of
+  /// the errors that are expected are found.
   void parseStatementList(String content, int expectedCount) {
     Statement statement = parseStatement('{$content}');
     expect(statement, isBlock);
@@ -14605,10 +14530,8 @@
 class StatementParserTest extends ParserTestCase with StatementParserTestMixin {
 }
 
-/**
- * The class [FormalParameterParserTestMixin] defines parser tests that test
- * the parsing statements.
- */
+/// The class [FormalParameterParserTestMixin] defines parser tests that test
+/// the parsing statements.
 mixin StatementParserTestMixin implements AbstractParserTestCase {
   void test_invalid_typeParamAnnotation() {
     parseCompilationUnit('main() { C<@Foo T> v; }',
@@ -16012,10 +15935,8 @@
 @reflectiveTest
 class TopLevelParserTest extends ParserTestCase with TopLevelParserTestMixin {}
 
-/**
- * Tests which exercise the parser using a complete compilation unit or
- * compilation unit member.
- */
+/// Tests which exercise the parser using a complete compilation unit or
+/// compilation unit member.
 mixin TopLevelParserTestMixin implements AbstractParserTestCase {
   void test_function_literal_allowed_at_toplevel() {
     parseCompilationUnit("var x = () {};");
@@ -18114,9 +18035,7 @@
     expectCommentText(typeVariable.documentationComment, '/// Doc');
   }
 
-  /**
-   * Assert that the given [name] is in declaration context.
-   */
+  /// Assert that the given [name] is in declaration context.
   void _assertIsDeclarationName(SimpleIdentifier name) {
     expect(name.inDeclarationContext(), isTrue);
   }
diff --git a/pkg/analyzer/test/generated/resolver_test.dart b/pkg/analyzer/test/generated/resolver_test.dart
index b182640..fc7ab58 100644
--- a/pkg/analyzer/test/generated/resolver_test.dart
+++ b/pkg/analyzer/test/generated/resolver_test.dart
@@ -9,10 +9,10 @@
 import 'package:analyzer/dart/element/element.dart';
 import 'package:analyzer/dart/element/type.dart';
 import 'package:analyzer/src/dart/element/element.dart';
+import 'package:analyzer/src/dart/resolver/scope.dart';
 import 'package:analyzer/src/error/codes.dart';
 import 'package:analyzer/src/generated/engine.dart';
 import 'package:analyzer/src/generated/parser.dart' show ParserErrorCode;
-import 'package:analyzer/src/generated/resolver.dart';
 import 'package:analyzer/src/generated/testing/ast_test_factory.dart';
 import 'package:analyzer/src/generated/testing/element_factory.dart';
 import 'package:test/test.dart';
@@ -100,9 +100,8 @@
   }
 }
 
-/**
- * Tests for generic method and function resolution that do not use strong mode.
- */
+/// Tests for generic method and function resolution that do not use strong
+/// mode.
 @reflectiveTest
 class GenericMethodResolverTest extends StaticTypeAnalyzer2TestShared {
   test_genericMethod_propagatedType_promotion() async {
@@ -470,14 +469,10 @@
   /// The TypeAnnotation nodes that were not resolved.
   final List<TypeAnnotation> _unresolvedTypes = <TypeAnnotation>[];
 
-  /**
-   * Counter for the number of Expression nodes visited that are resolved.
-   */
+  /// Counter for the number of Expression nodes visited that are resolved.
   int _resolvedExpressionCount = 0;
 
-  /**
-   * Counter for the number of TypeName nodes visited that are resolved.
-   */
+  /// Counter for the number of TypeName nodes visited that are resolved.
   int _resolvedTypeCount = 0;
 
   /// Assert that all of the visited nodes have a static type associated with
@@ -633,10 +628,8 @@
   }
 }
 
-/**
- * The class `StrictModeTest` contains tests to ensure that the correct errors
- * and warnings are reported when the analysis engine is run in strict mode.
- */
+/// The class `StrictModeTest` contains tests to ensure that the correct errors
+/// and warnings are reported when the analysis engine is run in strict mode.
 @reflectiveTest
 class StrictModeTest extends DriverResolutionTest {
   test_assert_is() async {
diff --git a/pkg/analyzer/test/generated/resolver_test_case.dart b/pkg/analyzer/test/generated/resolver_test_case.dart
index 06b15dd..cb180fe 100644
--- a/pkg/analyzer/test/generated/resolver_test_case.dart
+++ b/pkg/analyzer/test/generated/resolver_test_case.dart
@@ -20,11 +20,11 @@
 import 'package:analyzer/src/dart/analysis/performance_logger.dart';
 import 'package:analyzer/src/dart/element/element.dart';
 import 'package:analyzer/src/dart/element/type.dart';
+import 'package:analyzer/src/dart/element/type_system.dart';
 import 'package:analyzer/src/error/codes.dart';
 import 'package:analyzer/src/file_system/file_system.dart';
 import 'package:analyzer/src/generated/engine.dart';
 import 'package:analyzer/src/generated/java_engine.dart';
-import 'package:analyzer/src/generated/resolver.dart' show TypeSystemImpl;
 import 'package:analyzer/src/generated/sdk.dart';
 import 'package:analyzer/src/generated/source_io.dart';
 import 'package:analyzer/src/generated/testing/element_factory.dart';
@@ -39,15 +39,11 @@
 
 const String _defaultSourceName = "/test.dart";
 
-/**
- * An AST visitor used to verify that all of the nodes in an AST structure that
- * should have been resolved were resolved.
- */
+/// An AST visitor used to verify that all of the nodes in an AST structure that
+/// should have been resolved were resolved.
 class ResolutionVerifier extends RecursiveAstVisitor<void> {
-  /**
-   * A set containing nodes that are known to not be resolvable and should
-   * therefore not cause the test to fail.
-   */
+  /// A set containing nodes that are known to not be resolvable and should
+  /// therefore not cause the test to fail.
   final Set<AstNode> _knownExceptions;
 
   /// A list containing all of the AST nodes that were not resolved.
@@ -57,18 +53,14 @@
   /// the wrong type.
   final List<AstNode> _wrongTypedNodes = <AstNode>[];
 
-  /**
-   * Initialize a newly created verifier to verify that all of the identifiers
-   * in the visited AST structures that are expected to have been resolved have
-   * an element associated with them. Nodes in the set of [_knownExceptions] are
-   * not expected to have been resolved, even if they normally would have been
-   * expected to have been resolved.
-   */
+  /// Initialize a newly created verifier to verify that all of the identifiers
+  /// in the visited AST structures that are expected to have been resolved have
+  /// an element associated with them. Nodes in the set of [_knownExceptions]
+  /// are not expected to have been resolved, even if they normally would have
+  /// been expected to have been resolved.
   ResolutionVerifier([this._knownExceptions]);
 
-  /**
-   * Assert that all of the visited identifiers were resolved.
-   */
+  /// Assert that all of the visited identifiers were resolved.
   void assertResolved() {
     if (_unresolvedNodes.isNotEmpty || _wrongTypedNodes.isNotEmpty) {
       StringBuffer buffer = StringBuffer();
@@ -307,10 +299,8 @@
 }
 
 class ResolverTestCase with ResourceProviderMixin {
-  /**
-   * Specifies if [assertErrors] should check for [HintCode.UNUSED_ELEMENT] and
-   * [HintCode.UNUSED_FIELD].
-   */
+  /// Specifies if [assertErrors] should check for [HintCode.UNUSED_ELEMENT] and
+  /// [HintCode.UNUSED_FIELD].
   bool enableUnusedElement = false;
 
   /// Specifies if [assertErrors] should check for
@@ -325,22 +315,16 @@
 
   AnalysisOptions get analysisOptions => driver?.analysisOptions;
 
-  /**
-   * The default [AnalysisOptions] that should be used by [reset].
-   */
+  /// The default [AnalysisOptions] that should be used by [reset].
   AnalysisOptions get defaultAnalysisOptions => AnalysisOptionsImpl();
 
-  /**
-   * Return the list of experiments that are to be enabled for tests in this
-   * class.
-   */
+  /// Return the list of experiments that are to be enabled for tests in this
+  /// class.
   List<String> get enabledExperiments => null;
 
-  /**
-   * Return a type provider that can be used to test the results of resolution.
-   *
-   * Throws an [AnalysisException] if `dart:core` cannot be resolved.
-   */
+  /// Return a type provider that can be used to test the results of resolution.
+  ///
+  /// Throws an [AnalysisException] if `dart:core` cannot be resolved.
   TypeProvider get typeProvider {
     if (analysisResults.isEmpty) {
       fail('typeProvider called before computing an analysis result.');
@@ -348,9 +332,7 @@
     return analysisResults.values.first.typeProvider;
   }
 
-  /**
-   * Return a type system that can be used to test the results of resolution.
-   */
+  /// Return a type system that can be used to test the results of resolution.
   TypeSystemImpl get typeSystem {
     if (analysisResults.isEmpty) {
       fail('typeSystem called before computing an analysis result.');
@@ -358,11 +340,10 @@
     return analysisResults.values.first.typeSystem;
   }
 
-  /**
-   * Add a source file with the given [filePath] in the root of the file system.
-   * The file path should be absolute. The file will have the given [contents]
-   * set in the content provider. Return the source representing the added file.
-   */
+  /// Add a source file with the given [filePath] in the root of the file
+  /// system. The file path should be absolute. The file will have the given
+  /// [contents] set in the content provider. Return the source representing the
+  /// added file.
   Source addNamedSource(String filePath, String contents) {
     filePath = convertPath(filePath);
     File file = newFile(filePath, content: contents);
@@ -371,20 +352,16 @@
     return source;
   }
 
-  /**
-   * Add a source file named 'test.dart' in the root of the file system. The
-   * file will have the given [contents] set in the content provider. Return the
-   * source representing the added file.
-   */
+  /// Add a source file named 'test.dart' in the root of the file system. The
+  /// file will have the given [contents] set in the content provider. Return
+  /// the source representing the added file.
   Source addSource(String contents) =>
       addNamedSource(_defaultSourceName, contents);
 
-  /**
-   * Assert that the number of errors reported against the given
-   * [source] matches the number of errors that are given and that they have
-   * the expected error codes. The order in which the errors were gathered is
-   * ignored.
-   */
+  /// Assert that the number of errors reported against the given
+  /// [source] matches the number of errors that are given and that they have
+  /// the expected error codes. The order in which the errors were gathered is
+  /// ignored.
   void assertErrors(Source source,
       [List<ErrorCode> expectedErrorCodes = const <ErrorCode>[]]) {
     TestAnalysisResult result = analysisResults[source];
@@ -410,11 +387,9 @@
     errorListener.assertErrorsWithCodes(expectedErrorCodes);
   }
 
-  /**
-   * Asserts that [code] verifies, but has errors with the given error codes.
-   *
-   * Like [assertErrors], but takes a string of source code.
-   */
+  /// Asserts that [code] verifies, but has errors with the given error codes.
+  ///
+  /// Like [assertErrors], but takes a string of source code.
   // TODO(rnystrom): Use this in more tests that have the same structure.
   Future<void> assertErrorsInCode(String code, List<ErrorCode> errors,
       {bool verify = true, String sourceName = _defaultSourceName}) async {
@@ -426,11 +401,9 @@
     }
   }
 
-  /**
-   * Asserts that [code] has errors with the given error codes.
-   *
-   * Like [assertErrors], but takes a string of source code.
-   */
+  /// Asserts that [code] has errors with the given error codes.
+  ///
+  /// Like [assertErrors], but takes a string of source code.
   Future<void> assertErrorsInUnverifiedCode(
       String code, List<ErrorCode> errors) async {
     Source source = addSource(code);
@@ -438,20 +411,16 @@
     assertErrors(source, errors);
   }
 
-  /**
-   * Assert that no errors have been reported against the given source.
-   *
-   * @param source the source against which no errors should have been reported
-   * @throws AnalysisException if the reported errors could not be computed
-   * @throws AssertionFailedError if any errors have been reported
-   */
+  /// Assert that no errors have been reported against the given source.
+  ///
+  /// @param source the source against which no errors should have been reported
+  /// @throws AnalysisException if the reported errors could not be computed
+  /// @throws AssertionFailedError if any errors have been reported
   void assertNoErrors(Source source) {
     assertErrors(source);
   }
 
-  /**
-   * Asserts that [code] has no errors or warnings.
-   */
+  /// Asserts that [code] has no errors or warnings.
   // TODO(rnystrom): Use this in more tests that have the same structure.
   Future<void> assertNoErrorsInCode(String code) async {
     Source source = addSource(code);
@@ -468,37 +437,29 @@
     return analysisResult;
   }
 
-  /**
-   * Compute the analysis result to the given [code] in '/test.dart'.
-   */
+  /// Compute the analysis result to the given [code] in '/test.dart'.
   Future<TestAnalysisResult> computeTestAnalysisResult(String code) async {
     Source source = addSource(code);
     return await computeAnalysisResult(source);
   }
 
-  /**
-   * Create a library element that represents a library named `"test"` containing a single
-   * empty compilation unit.
-   *
-   * @return the library element that was created
-   */
+  /// Create a library element that represents a library named `"test"`
+  /// containing a single empty compilation unit.
+  ///
+  /// @return the library element that was created
   LibraryElementImpl createDefaultTestLibrary() =>
       createTestLibrary(TestAnalysisContext(), "test");
 
-  /**
-   * Return a source object representing a file with the given [fileName].
-   */
+  /// Return a source object representing a file with the given [fileName].
   Source createNamedSource(String fileName) {
     return getFile(fileName).createSource();
   }
 
-  /**
-   * Create a library element that represents a library with the given name containing a single
-   * empty compilation unit.
-   *
-   * @param libraryName the name of the library to be created
-   * @return the library element that was created
-   */
+  /// Create a library element that represents a library with the given name
+  /// containing a single empty compilation unit.
+  ///
+  /// @param libraryName the name of the library to be created
+  /// @return the library element that was created
   LibraryElementImpl createTestLibrary(
       AnalysisContext context, String libraryName,
       [List<String> typeNames]) {
@@ -557,17 +518,13 @@
     // Not found
   }
 
-  /**
-   * Re-create the analysis context being used by the test case.
-   */
+  /// Re-create the analysis context being used by the test case.
   void reset() {
     resetWith();
   }
 
-  /**
-   * Re-create the analysis context being used by the test with the either given
-   * [options] or [packages].
-   */
+  /// Re-create the analysis context being used by the test with the either
+  /// given [options] or [packages].
   void resetWith({AnalysisOptions options, List<List<String>> packages}) {
     if (options != null && packages != null) {
       fail('Only packages or options can be specified.');
@@ -667,10 +624,8 @@
     AnalysisEngine.instance.clearCaches();
   }
 
-  /**
-   * Verify that all of the identifiers in the compilation units associated with
-   * the given [sources] have been resolved.
-   */
+  /// Verify that all of the identifiers in the compilation units associated
+  /// with the given [sources] have been resolved.
   void verify(List<Source> sources) {
     ResolutionVerifier verifier = ResolutionVerifier();
     for (Source source in sources) {
@@ -682,29 +637,23 @@
   }
 }
 
-/**
- * Shared infrastructure for [StaticTypeAnalyzer2Test] and
- * [StrongModeStaticTypeAnalyzer2Test].
- */
+/// Shared infrastructure for [StaticTypeAnalyzer2Test] and
+/// [StrongModeStaticTypeAnalyzer2Test].
 class StaticTypeAnalyzer2TestShared extends DriverResolutionTest {
-  /**
-   * Find the expression that starts at the offset of [search] and validate its
-   * that its static type matches the given [type].
-   *
-   * If [type] is a string, validates that the expression's static type
-   * stringifies to that text. Otherwise, [type] is used directly a [Matcher]
-   * to match the type.
-   */
+  /// Find the expression that starts at the offset of [search] and validate its
+  /// that its static type matches the given [type].
+  ///
+  /// If [type] is a string, validates that the expression's static type
+  /// stringifies to that text. Otherwise, [type] is used directly a [Matcher]
+  /// to match the type.
   void expectExpressionType(String search, type) {
     Expression expression = findNode.expression(search);
     _expectType(expression.staticType, type);
   }
 
-  /**
-   * Looks up the identifier with [name] and validates that its type type
-   * stringifies to [type] and that its generics match the given stringified
-   * output.
-   */
+  /// Looks up the identifier with [name] and validates that its type type
+  /// stringifies to [type] and that its generics match the given stringified
+  /// output.
   FunctionTypeImpl expectFunctionType(String name, String type,
       {String typeParams = '[]',
       String typeArgs = '[]',
@@ -728,11 +677,9 @@
     return functionType;
   }
 
-  /**
-   * Looks up the identifier with [name] and validates that its element type
-   * stringifies to [type] and that its generics match the given stringified
-   * output.
-   */
+  /// Looks up the identifier with [name] and validates that its element type
+  /// stringifies to [type] and that its generics match the given stringified
+  /// output.
   FunctionTypeImpl expectFunctionType2(String name, String type) {
     var identifier = findNode.simple(name);
     var functionType = _getFunctionTypedElementType(identifier);
@@ -740,26 +687,22 @@
     return functionType;
   }
 
-  /**
-   * Looks up the identifier with [name] and validates its static [type].
-   *
-   * If [type] is a string, validates that the identifier's static type
-   * stringifies to that text. Otherwise, [type] is used directly a [Matcher]
-   * to match the type.
-   */
+  /// Looks up the identifier with [name] and validates its static [type].
+  ///
+  /// If [type] is a string, validates that the identifier's static type
+  /// stringifies to that text. Otherwise, [type] is used directly a [Matcher]
+  /// to match the type.
   void expectIdentifierType(String name, type) {
     SimpleIdentifier identifier = findNode.simple(name);
     _expectType(identifier.staticType, type);
   }
 
-  /**
-   * Looks up the initializer for the declaration containing [identifier] and
-   * validates its static [type].
-   *
-   * If [type] is a string, validates that the identifier's static type
-   * stringifies to that text. Otherwise, [type] is used directly a [Matcher]
-   * to match the type.
-   */
+  /// Looks up the initializer for the declaration containing [identifier] and
+  /// validates its static [type].
+  ///
+  /// If [type] is a string, validates that the identifier's static type
+  /// stringifies to that text. Otherwise, [type] is used directly a [Matcher]
+  /// to match the type.
   void expectInitializerType(String name, type) {
     SimpleIdentifier identifier = findNode.simple(name);
     VariableDeclaration declaration =
@@ -768,12 +711,11 @@
     _expectType(initializer.staticType, type);
   }
 
-  /**
-   * Validates that [type] matches [expected].
-   *
-   * If [expected] is a string, validates that the type stringifies to that
-   * text. Otherwise, [expected] is used directly a [Matcher] to match the type.
-   */
+  /// Validates that [type] matches [expected].
+  ///
+  /// If [expected] is a string, validates that the type stringifies to that
+  /// text. Otherwise, [expected] is used directly a [Matcher] to match the
+  /// type.
   _expectType(DartType type, expected) {
     if (expected is String) {
       assertType(type, expected);
diff --git a/pkg/analyzer/test/generated/scanner_test.dart b/pkg/analyzer/test/generated/scanner_test.dart
index 7a612f2..824959c 100644
--- a/pkg/analyzer/test/generated/scanner_test.dart
+++ b/pkg/analyzer/test/generated/scanner_test.dart
@@ -250,10 +250,8 @@
   }
 }
 
-/**
- * An `ExpectedLocation` encodes information about the expected location of a
- * given offset in source code.
- */
+/// An `ExpectedLocation` encodes information about the expected location of a
+/// given offset in source code.
 class ScannerTest_ExpectedLocation {
   final int _offset;
 
@@ -265,15 +263,11 @@
       this._offset, this._lineNumber, this._columnNumber);
 }
 
-/**
- * A `TokenStreamValidator` is used to validate the correct construction of a
- * stream of tokens.
- */
+/// A `TokenStreamValidator` is used to validate the correct construction of a
+/// stream of tokens.
 class TokenStreamValidator {
-  /**
-   * Validate that the stream of tokens that starts with the given [token] is
-   * correct.
-   */
+  /// Validate that the stream of tokens that starts with the given [token] is
+  /// correct.
   void validate(Token token) {
     StringBuffer buffer = StringBuffer();
     _validateStream(buffer, token);
diff --git a/pkg/analyzer/test/generated/sdk_test.dart b/pkg/analyzer/test/generated/sdk_test.dart
index 30cbb54..a5b3fef 100644
--- a/pkg/analyzer/test/generated/sdk_test.dart
+++ b/pkg/analyzer/test/generated/sdk_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.
 
-import 'package:analyzer/src/generated/engine.dart';
 import 'package:analyzer/src/generated/sdk.dart';
 import 'package:analyzer/src/test_utilities/mock_sdk.dart';
 import 'package:analyzer/src/test_utilities/resource_provider_mixin.dart';
@@ -19,24 +18,25 @@
 @reflectiveTest
 class DartSdkManagerTest with ResourceProviderMixin {
   void test_anySdk() {
-    DartSdkManager manager = DartSdkManager('/a/b/c', false);
+    DartSdkManager manager = DartSdkManager('/a/b/c');
     expect(manager.anySdk, isNull);
 
-    AnalysisOptions options = AnalysisOptionsImpl();
-    SdkDescription description = SdkDescription(<String>['/c/d'], options);
+    SdkDescription description = SdkDescription('/c/d');
     DartSdk sdk = MockSdk(resourceProvider: resourceProvider);
     manager.getSdk(description, () => sdk);
+
     expect(manager.anySdk, same(sdk));
   }
 
   void test_getSdk_differentDescriptors() {
-    DartSdkManager manager = DartSdkManager('/a/b/c', false);
-    AnalysisOptions options = AnalysisOptionsImpl();
-    SdkDescription description1 = SdkDescription(<String>['/c/d'], options);
+    DartSdkManager manager = DartSdkManager('/a/b/c');
+
+    SdkDescription description1 = SdkDescription('/c/d');
     DartSdk sdk1 = MockSdk(resourceProvider: resourceProvider);
     DartSdk result1 = manager.getSdk(description1, () => sdk1);
     expect(result1, same(sdk1));
-    SdkDescription description2 = SdkDescription(<String>['/e/f'], options);
+
+    SdkDescription description2 = SdkDescription('/e/f');
     DartSdk sdk2 = MockSdk(resourceProvider: resourceProvider);
     DartSdk result2 = manager.getSdk(description2, () => sdk2);
     expect(result2, same(sdk2));
@@ -46,12 +46,13 @@
   }
 
   void test_getSdk_sameDescriptor() {
-    DartSdkManager manager = DartSdkManager('/a/b/c', false);
-    AnalysisOptions options = AnalysisOptionsImpl();
-    SdkDescription description = SdkDescription(<String>['/c/d'], options);
+    DartSdkManager manager = DartSdkManager('/a/b/c');
+
+    SdkDescription description = SdkDescription('/c/d');
     DartSdk sdk = MockSdk(resourceProvider: resourceProvider);
     DartSdk result = manager.getSdk(description, () => sdk);
     expect(result, same(sdk));
+
     manager.getSdk(description, _failIfAbsent);
   }
 
@@ -63,53 +64,21 @@
 @reflectiveTest
 class SdkDescriptionTest {
   void test_equals_differentPaths_nested() {
-    AnalysisOptions options = AnalysisOptionsImpl();
-    SdkDescription left = SdkDescription(<String>['/a/b/c'], options);
-    SdkDescription right = SdkDescription(<String>['/a/b'], options);
+    SdkDescription left = SdkDescription('/a/b/c');
+    SdkDescription right = SdkDescription('/a/b');
     expect(left == right, isFalse);
   }
 
   void test_equals_differentPaths_unrelated() {
-    AnalysisOptions options = AnalysisOptionsImpl();
-    SdkDescription left = SdkDescription(<String>['/a/b/c'], options);
-    SdkDescription right = SdkDescription(<String>['/d/e'], options);
+    SdkDescription left = SdkDescription('/a/b/c');
+    SdkDescription right = SdkDescription('/d/e');
     expect(left == right, isFalse);
   }
 
-  void test_equals_noPaths() {
-    AnalysisOptions options = AnalysisOptionsImpl();
-    SdkDescription left = SdkDescription(<String>[], options);
-    SdkDescription right = SdkDescription(<String>[], options);
-    expect(left == right, isTrue);
-  }
-
-  void test_equals_samePaths_differentOptions() {
-    String path = '/a/b/c';
-    AnalysisOptionsImpl leftOptions = AnalysisOptionsImpl()
-      ..useFastaParser = false;
-    AnalysisOptionsImpl rightOptions = AnalysisOptionsImpl()
-      ..useFastaParser = true;
-    SdkDescription left = SdkDescription(<String>[path], leftOptions);
-    SdkDescription right = SdkDescription(<String>[path], rightOptions);
-    expect(left == right, isFalse);
-  }
-
-  void test_equals_samePaths_sameOptions_multiple() {
-    String leftPath = '/a/b/c';
-    String rightPath = '/d/e';
-    AnalysisOptions options = AnalysisOptionsImpl();
-    SdkDescription left =
-        SdkDescription(<String>[leftPath, rightPath], options);
-    SdkDescription right =
-        SdkDescription(<String>[leftPath, rightPath], options);
-    expect(left == right, isTrue);
-  }
-
   void test_equals_samePaths_sameOptions_single() {
     String path = '/a/b/c';
-    AnalysisOptions options = AnalysisOptionsImpl();
-    SdkDescription left = SdkDescription(<String>[path], options);
-    SdkDescription right = SdkDescription(<String>[path], options);
+    SdkDescription left = SdkDescription(path);
+    SdkDescription right = SdkDescription(path);
     expect(left == right, isTrue);
   }
 }
diff --git a/pkg/analyzer/test/generated/simple_resolver_test.dart b/pkg/analyzer/test/generated/simple_resolver_test.dart
index 9754f24..4ff5151 100644
--- a/pkg/analyzer/test/generated/simple_resolver_test.dart
+++ b/pkg/analyzer/test/generated/simple_resolver_test.dart
@@ -1244,34 +1244,33 @@
     verifyTestResolved();
   }
 
-  /**
-   * Verify that all of the identifiers in the [result] have been resolved.
-   */
+  /// Verify that all of the identifiers in the [result] have been resolved.
   void verifyTestResolved() {
     var verifier = ResolutionVerifier();
     result.unit.accept(verifier);
     verifier.assertResolved();
   }
 
-  /**
-   * Resolve the test file and verify that the arguments in a specific method
-   * invocation were correctly resolved.
-   *
-   * The file is expected to define a method named `g`, and has exactly one
-   * [MethodInvocation] in a statement ending with `);`. It is the arguments to
-   * that method invocation that are tested. The method invocation can contain
-   * errors.
-   *
-   * The arguments were resolved correctly if the number of expressions in the list matches the
-   * length of the array of indices and if, for each index in the array of indices, the parameter to
-   * which the argument expression was resolved is the parameter in the invoked method's list of
-   * parameters at that index. Arguments that should not be resolved to a parameter because of an
-   * error can be denoted by including a negative index in the array of indices.
-   *
-   * @param indices the array of indices used to associate arguments with parameters
-   * @throws Exception if the source could not be resolved or if the structure of the source is not
-   *           valid
-   */
+  /// Resolve the test file and verify that the arguments in a specific method
+  /// invocation were correctly resolved.
+  ///
+  /// The file is expected to define a method named `g`, and has exactly one
+  /// [MethodInvocation] in a statement ending with `);`. It is the arguments to
+  /// that method invocation that are tested. The method invocation can contain
+  /// errors.
+  ///
+  /// The arguments were resolved correctly if the number of expressions in the
+  /// list matches the length of the array of indices and if, for each index in
+  /// the array of indices, the parameter to which the argument expression was
+  /// resolved is the parameter in the invoked method's list of parameters at
+  /// that index. Arguments that should not be resolved to a parameter because
+  /// of an error can be denoted by including a negative index in the array of
+  /// indices.
+  ///
+  /// @param indices the array of indices used to associate arguments with
+  ///          parameters
+  /// @throws Exception if the source could not be resolved or if the structure
+  ///           of the source is not valid
   Future<void> _validateArgumentResolution(List<int> indices) async {
     var g = findElement.method('g');
     var parameters = g.parameters;
diff --git a/pkg/analyzer/test/generated/static_type_analyzer_test.dart b/pkg/analyzer/test/generated/static_type_analyzer_test.dart
index 4e183c3..e47e3aa 100644
--- a/pkg/analyzer/test/generated/static_type_analyzer_test.dart
+++ b/pkg/analyzer/test/generated/static_type_analyzer_test.dart
@@ -10,9 +10,10 @@
 import 'package:analyzer/src/dart/element/element.dart';
 import 'package:analyzer/src/dart/element/inheritance_manager3.dart';
 import 'package:analyzer/src/dart/element/type.dart';
+import 'package:analyzer/src/dart/element/type_system.dart';
+import 'package:analyzer/src/dart/resolver/scope.dart';
 import 'package:analyzer/src/error/codes.dart';
-import 'package:analyzer/src/generated/resolver.dart'
-    show LibraryScope, ResolverVisitor, TypeSystemImpl;
+import 'package:analyzer/src/generated/resolver.dart' show ResolverVisitor;
 import 'package:analyzer/src/generated/source.dart';
 import 'package:analyzer/src/generated/static_type_analyzer.dart';
 import 'package:analyzer/src/generated/testing/ast_test_factory.dart';
@@ -60,9 +61,7 @@
   }
 }
 
-/**
- * Like [StaticTypeAnalyzerTest], but as end-to-end tests.
- */
+/// Like [StaticTypeAnalyzerTest], but as end-to-end tests.
 @reflectiveTest
 class StaticTypeAnalyzer2Test extends StaticTypeAnalyzer2TestShared {
   test_FunctionExpressionInvocation_block() async {
@@ -170,9 +169,7 @@
   }
 }
 
-/**
- * End-to-end tests of the static type analyzer that use the new driver.
- */
+/// End-to-end tests of the static type analyzer that use the new driver.
 @reflectiveTest
 class StaticTypeAnalyzer3Test extends StaticTypeAnalyzer2TestShared {
   test_emptyMapLiteral_initializer_var() async {
@@ -200,37 +197,25 @@
 
 @reflectiveTest
 class StaticTypeAnalyzerTest with ResourceProviderMixin, ElementsTypesMixin {
-  /**
-   * The error listener to which errors will be reported.
-   */
+  /// The error listener to which errors will be reported.
   GatheringErrorListener _listener;
 
-  /**
-   * The resolver visitor used to create the analyzer.
-   */
+  /// The resolver visitor used to create the analyzer.
   ResolverVisitor _visitor;
 
-  /**
-   * The library containing the code being resolved.
-   */
+  /// The library containing the code being resolved.
   LibraryElementImpl _definingLibrary;
 
-  /**
-   * The analyzer being used to analyze the test cases.
-   */
+  /// The analyzer being used to analyze the test cases.
   StaticTypeAnalyzer _analyzer;
 
-  /**
-   * The type provider used to access the types.
-   */
+  /// The type provider used to access the types.
   TypeProvider _typeProvider;
 
   @override
   TypeProvider get typeProvider => _definingLibrary.typeProvider;
 
-  /**
-   * The type system used to analyze the test cases.
-   */
+  /// The type system used to analyze the test cases.
   TypeSystemImpl get _typeSystem => _definingLibrary.typeSystem;
 
   void fail_visitFunctionExpressionInvocation() {
@@ -682,11 +667,9 @@
     _listener.assertNoErrors();
   }
 
-  /**
-   * Return the type associated with the given [node] after the static type
-   * analyzer has computed a type for it. If [thisType] is provided, it is the
-   * type of 'this'.
-   */
+  /// Return the type associated with the given [node] after the static type
+  /// analyzer has computed a type for it. If [thisType] is provided, it is the
+  /// type of 'this'.
   DartType _analyze(Expression node, [InterfaceType thisType]) {
     _visitor.setThisInterfaceType(thisType);
     node.accept(_analyzer);
@@ -714,9 +697,7 @@
     // utility method.
   }
 
-  /**
-   * Create the analyzer used by the tests.
-   */
+  /// Create the analyzer used by the tests.
   void _createAnalyzer() {
     var context = TestAnalysisContext();
     var inheritance = InheritanceManager3();
@@ -743,49 +724,43 @@
 
   DartType _flatten(DartType type) => _typeSystem.flatten(type);
 
-  /**
-   * Return an integer literal that has been resolved to the correct type.
-   *
-   * @param value the value of the literal
-   * @return an integer literal that has been resolved to the correct type
-   */
+  /// Return an integer literal that has been resolved to the correct type.
+  ///
+  /// @param value the value of the literal
+  /// @return an integer literal that has been resolved to the correct type
   DoubleLiteral _resolvedDouble(double value) {
     DoubleLiteral literal = AstTestFactory.doubleLiteral(value);
     literal.staticType = _typeProvider.doubleType;
     return literal;
   }
 
-  /**
-   * Return an integer literal that has been resolved to the correct type.
-   *
-   * @param value the value of the literal
-   * @return an integer literal that has been resolved to the correct type
-   */
+  /// Return an integer literal that has been resolved to the correct type.
+  ///
+  /// @param value the value of the literal
+  /// @return an integer literal that has been resolved to the correct type
   IntegerLiteral _resolvedInteger(int value) {
     IntegerLiteral literal = AstTestFactory.integer(value);
     literal.staticType = _typeProvider.intType;
     return literal;
   }
 
-  /**
-   * Return a string literal that has been resolved to the correct type.
-   *
-   * @param value the value of the literal
-   * @return a string literal that has been resolved to the correct type
-   */
+  /// Return a string literal that has been resolved to the correct type.
+  ///
+  /// @param value the value of the literal
+  /// @return a string literal that has been resolved to the correct type
   SimpleStringLiteral _resolvedString(String value) {
     SimpleStringLiteral string = AstTestFactory.string2(value);
     string.staticType = _typeProvider.stringType;
     return string;
   }
 
-  /**
-   * Return a simple identifier that has been resolved to a variable element with the given type.
-   *
-   * @param type the type of the variable being represented
-   * @param variableName the name of the variable
-   * @return a simple identifier that has been resolved to a variable element with the given type
-   */
+  /// Return a simple identifier that has been resolved to a variable element
+  /// with the given type.
+  ///
+  /// @param type the type of the variable being represented
+  /// @param variableName the name of the variable
+  /// @return a simple identifier that has been resolved to a variable element
+  ///           with the given type
   SimpleIdentifier _resolvedVariable(InterfaceType type, String variableName) {
     SimpleIdentifier identifier = AstTestFactory.identifier3(variableName);
     VariableElementImpl element =
@@ -797,10 +772,8 @@
   }
 }
 
-/**
- * End-to-end tests of the static type analyzer that use the new driver and
- * enable the set-literals experiment.
- */
+/// End-to-end tests of the static type analyzer that use the new driver and
+/// enable the set-literals experiment.
 @reflectiveTest
 class StaticTypeAnalyzerWithSetLiteralsTest
     extends StaticTypeAnalyzer2TestShared {
diff --git a/pkg/analyzer/test/generated/static_type_warning_code_test.dart b/pkg/analyzer/test/generated/static_type_warning_code_test.dart
index 013ef08..6d659a6 100644
--- a/pkg/analyzer/test/generated/static_type_warning_code_test.dart
+++ b/pkg/analyzer/test/generated/static_type_warning_code_test.dart
@@ -492,228 +492,6 @@
     ]);
   }
 
-  test_invalidAssignment_compoundAssignment() async {
-    await assertErrorsInCode(r'''
-class byte {
-  int _value;
-  byte(this._value);
-  int operator +(int val) { return 0; }
-}
-
-void main() {
-  byte b = new byte(52);
-  b += 3;
-}
-''', [
-      error(HintCode.UNUSED_FIELD, 19, 6),
-      error(HintCode.UNUSED_LOCAL_VARIABLE, 112, 1),
-      error(StaticTypeWarningCode.INVALID_ASSIGNMENT, 137, 1),
-    ]);
-  }
-
-  test_invalidAssignment_defaultValue_named() async {
-    await assertErrorsInCode(r'''
-f({String x: 0}) {
-}
-''', [
-      error(StaticTypeWarningCode.INVALID_ASSIGNMENT, 13, 1),
-    ]);
-  }
-
-  test_invalidAssignment_defaultValue_optional() async {
-    await assertErrorsInCode(r'''
-f([String x = 0]) {
-}''', [
-      error(StaticTypeWarningCode.INVALID_ASSIGNMENT, 14, 1),
-    ]);
-  }
-
-  test_invalidAssignment_dynamic() async {
-    await assertErrorsInCode(r'''
-main() {
-  dynamic = 1;
-}
-''', [
-      error(StaticTypeWarningCode.INVALID_ASSIGNMENT, 21, 1),
-    ]);
-  }
-
-  test_invalidAssignment_functionExpressionInvocation() async {
-    await assertErrorsInCode('''
-main() {
-  String x = (() => 5)();
-}
-''', [
-      error(HintCode.UNUSED_LOCAL_VARIABLE, 18, 1),
-      error(StaticTypeWarningCode.INVALID_ASSIGNMENT, 22, 11),
-    ]);
-  }
-
-  test_invalidAssignment_ifNullAssignment() async {
-    await assertErrorsInCode('''
-void f(int i) {
-  double d;
-  d ??= i;
-}
-''', [
-      error(StaticTypeWarningCode.INVALID_ASSIGNMENT, 36, 1),
-    ]);
-  }
-
-  test_invalidAssignment_instanceVariable() async {
-    await assertErrorsInCode(r'''
-class A {
-  int x;
-}
-f() {
-  A a;
-  a.x = '0';
-}
-''', [
-      error(StaticTypeWarningCode.INVALID_ASSIGNMENT, 42, 3),
-    ]);
-  }
-
-  test_invalidAssignment_localVariable() async {
-    await assertErrorsInCode(r'''
-f() {
-  int x;
-  x = '0';
-}
-''', [
-      error(HintCode.UNUSED_LOCAL_VARIABLE, 12, 1),
-      error(StaticTypeWarningCode.INVALID_ASSIGNMENT, 21, 3),
-    ]);
-  }
-
-  test_invalidAssignment_postfixExpression_localVariable() async {
-    await assertErrorsInCode(r'''
-class A {
-  B operator+(_) => new B();
-}
-
-class B {}
-
-f(A a) {
-  a++;
-}
-''', [
-      error(StaticTypeWarningCode.INVALID_ASSIGNMENT, 65, 3),
-    ]);
-  }
-
-  test_invalidAssignment_postfixExpression_property() async {
-    await assertErrorsInCode(r'''
-class A {
-  B operator+(_) => new B();
-}
-
-class B {}
-
-class C {
-  A a;
-}
-
-f(C c) {
-  c.a++;
-}
-''', [
-      error(StaticTypeWarningCode.INVALID_ASSIGNMENT, 85, 5),
-    ]);
-  }
-
-  test_invalidAssignment_prefixExpression_localVariable() async {
-    await assertErrorsInCode(r'''
-class A {
-  B operator+(_) => new B();
-}
-
-class B {}
-
-f(A a) {
-  ++a;
-}
-''', [
-      error(StaticTypeWarningCode.INVALID_ASSIGNMENT, 65, 3),
-    ]);
-  }
-
-  test_invalidAssignment_prefixExpression_property() async {
-    await assertErrorsInCode(r'''
-class A {
-  B operator+(_) => new B();
-}
-
-class B {}
-
-class C {
-  A a;
-}
-
-f(C c) {
-  ++c.a;
-}
-''', [
-      error(StaticTypeWarningCode.INVALID_ASSIGNMENT, 85, 5),
-    ]);
-  }
-
-  test_invalidAssignment_regressionInIssue18468Fix() async {
-    // https://code.google.com/p/dart/issues/detail?id=18628
-    await assertErrorsInCode(r'''
-class C<T> {
-  T t = int;
-}
-''', [
-      error(StaticTypeWarningCode.INVALID_ASSIGNMENT, 21, 3),
-    ]);
-  }
-
-  test_invalidAssignment_staticVariable() async {
-    await assertErrorsInCode(r'''
-class A {
-  static int x;
-}
-f() {
-  A.x = '0';
-}
-''', [
-      error(StaticTypeWarningCode.INVALID_ASSIGNMENT, 42, 3),
-    ]);
-  }
-
-  test_invalidAssignment_topLevelVariableDeclaration() async {
-    await assertErrorsInCode('''
-int x = 'string';
-''', [
-      error(StaticTypeWarningCode.INVALID_ASSIGNMENT, 8, 8),
-    ]);
-  }
-
-  test_invalidAssignment_typeParameter() async {
-    // 14221
-    await assertErrorsInCode(r'''
-class B<T> {
-  T value;
-  void test(num n) {
-    value = n;
-  }
-}
-''', [
-      error(StaticTypeWarningCode.INVALID_ASSIGNMENT, 57, 1),
-    ]);
-  }
-
-  test_invalidAssignment_variableDeclaration() async {
-    await assertErrorsInCode(r'''
-class A {
-  int x = 'string';
-}
-''', [
-      error(StaticTypeWarningCode.INVALID_ASSIGNMENT, 20, 8),
-    ]);
-  }
-
   test_invocationOfNonFunctionExpression_literal() async {
     await assertErrorsInCode(r'''
 f() {
@@ -724,137 +502,6 @@
     ]);
   }
 
-  test_nonBoolCondition_conditional() async {
-    await assertErrorsInCode('''
-f() { return 3 ? 2 : 1; }
-''', [
-      error(StaticTypeWarningCode.NON_BOOL_CONDITION, 13, 1),
-    ]);
-  }
-
-  test_nonBoolCondition_do() async {
-    await assertErrorsInCode(r'''
-f() {
-  do {} while (3);
-}
-''', [
-      error(StaticTypeWarningCode.NON_BOOL_CONDITION, 21, 1),
-    ]);
-  }
-
-  test_nonBoolCondition_for() async {
-    // https://github.com/dart-lang/sdk/issues/24713
-    await assertErrorsInCode(r'''
-f() {
-  for (;3;) {}
-}
-''', [
-      error(StaticTypeWarningCode.NON_BOOL_CONDITION, 14, 1),
-    ]);
-  }
-
-  test_nonBoolCondition_if() async {
-    await assertErrorsInCode(r'''
-f() {
-  if (3) return 2; else return 1;
-}
-''', [
-      error(StaticTypeWarningCode.NON_BOOL_CONDITION, 12, 1),
-    ]);
-  }
-
-  test_nonBoolCondition_while() async {
-    await assertErrorsInCode(r'''
-f() {
-  while (3) {}
-}
-''', [
-      error(StaticTypeWarningCode.NON_BOOL_CONDITION, 15, 1),
-    ]);
-  }
-
-  test_nonBoolExpression_functionType_bool() async {
-    await assertErrorsInCode(r'''
-bool makeAssertion() => true;
-f() {
-  assert(makeAssertion);
-}
-''', [
-      error(StaticTypeWarningCode.NON_BOOL_EXPRESSION, 45, 13),
-    ]);
-  }
-
-  test_nonBoolExpression_functionType_int() async {
-    await assertErrorsInCode(r'''
-int makeAssertion() => 1;
-f() {
-  assert(makeAssertion);
-}
-''', [
-      error(StaticTypeWarningCode.NON_BOOL_EXPRESSION, 41, 13),
-    ]);
-  }
-
-  test_nonBoolExpression_interfaceType() async {
-    await assertErrorsInCode(r'''
-f() {
-  assert(0);
-}
-''', [
-      error(StaticTypeWarningCode.NON_BOOL_EXPRESSION, 15, 1),
-    ]);
-  }
-
-  test_nonBoolNegationExpression() async {
-    await assertErrorsInCode(r'''
-f() {
-  !42;
-}
-''', [
-      error(StaticTypeWarningCode.NON_BOOL_NEGATION_EXPRESSION, 9, 2),
-    ]);
-  }
-
-  test_nonBoolOperand_and_left() async {
-    await assertErrorsInCode(r'''
-bool f(int left, bool right) {
-  return left && right;
-}
-''', [
-      error(StaticTypeWarningCode.NON_BOOL_OPERAND, 40, 4),
-    ]);
-  }
-
-  test_nonBoolOperand_and_right() async {
-    await assertErrorsInCode(r'''
-bool f(bool left, String right) {
-  return left && right;
-}
-''', [
-      error(StaticTypeWarningCode.NON_BOOL_OPERAND, 51, 5),
-    ]);
-  }
-
-  test_nonBoolOperand_or_left() async {
-    await assertErrorsInCode(r'''
-bool f(List<int> left, bool right) {
-  return left || right;
-}
-''', [
-      error(StaticTypeWarningCode.NON_BOOL_OPERAND, 46, 4),
-    ]);
-  }
-
-  test_nonBoolOperand_or_right() async {
-    await assertErrorsInCode(r'''
-bool f(bool left, double right) {
-  return left || right;
-}
-''', [
-      error(StaticTypeWarningCode.NON_BOOL_OPERAND, 51, 5),
-    ]);
-  }
-
   test_nonTypeAsTypeArgument_notAType() async {
     await assertErrorsInCode(r'''
 int A;
diff --git a/pkg/analyzer/test/generated/test_analysis_context.dart b/pkg/analyzer/test/generated/test_analysis_context.dart
index 2f7f926..b68806a 100644
--- a/pkg/analyzer/test/generated/test_analysis_context.dart
+++ b/pkg/analyzer/test/generated/test_analysis_context.dart
@@ -9,8 +9,8 @@
 import 'package:analyzer/src/dart/element/element.dart';
 import 'package:analyzer/src/dart/element/inheritance_manager3.dart';
 import 'package:analyzer/src/dart/element/type_provider.dart';
+import 'package:analyzer/src/dart/element/type_system.dart';
 import 'package:analyzer/src/generated/engine.dart';
-import 'package:analyzer/src/generated/resolver.dart' show TypeSystemImpl;
 import 'package:analyzer/src/generated/source_io.dart';
 import 'package:analyzer/src/test_utilities/mock_sdk_elements.dart';
 
diff --git a/pkg/analyzer/test/generated/type_system_test.dart b/pkg/analyzer/test/generated/type_system_test.dart
index 8561e3c..3929a49 100644
--- a/pkg/analyzer/test/generated/type_system_test.dart
+++ b/pkg/analyzer/test/generated/type_system_test.dart
@@ -10,8 +10,8 @@
 import 'package:analyzer/src/dart/element/element.dart';
 import 'package:analyzer/src/dart/element/least_upper_bound.dart';
 import 'package:analyzer/src/dart/element/type.dart';
+import 'package:analyzer/src/dart/element/type_system.dart';
 import 'package:analyzer/src/dart/resolver/variance.dart';
-import 'package:analyzer/src/generated/resolver.dart';
 import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
@@ -441,9 +441,7 @@
   }
 }
 
-/**
- * Base class for testing LUB and GLB in spec and strong mode.
- */
+/// Base class for testing LUB and GLB in spec and strong mode.
 abstract class BoundTestBase extends AbstractTypeSystemTest {
   void _checkLeastUpperBound(DartType T1, DartType T2, DartType expected) {
     var expectedStr = _typeString(expected);
diff --git a/pkg/analyzer/test/generated/utilities_test.dart b/pkg/analyzer/test/generated/utilities_test.dart
index e916b69..abf0107 100644
--- a/pkg/analyzer/test/generated/utilities_test.dart
+++ b/pkg/analyzer/test/generated/utilities_test.dart
@@ -1118,13 +1118,12 @@
     _assertCloneUnitMember('main() async* { yield 42; }');
   }
 
-  /**
-   * Assert that an `AstCloner` will produce the expected AST structure when
-   * visiting the given [node].
-   *
-   * @param node the AST node being visited to produce the cloned structure
-   * @throws AFE if the visitor does not produce the expected source for the given node
-   */
+  /// Assert that an `AstCloner` will produce the expected AST structure when
+  /// visiting the given [node].
+  ///
+  /// @param node the AST node being visited to produce the cloned structure
+  /// @throws AFE if the visitor does not produce the expected source for the
+  ///           given node
   void _assertClone(AstNode node) {
     {
       AstNode clone = node.accept(AstCloner());
@@ -1255,10 +1254,8 @@
     }
   }
 
-  /**
-   * Assert that the [token] has `previous` set, and if it `EOF`, then it
-   * points itself.
-   */
+  /// Assert that the [token] has `previous` set, and if it `EOF`, then it
+  /// points itself.
   static void _assertHasPrevious(Token token) {
     expect(token, isNotNull);
     if (token.type == TokenType.EOF) {
@@ -2609,9 +2606,7 @@
 
 @reflectiveTest
 class NodeReplacerTest {
-  /**
-   * An empty list of tokens.
-   */
+  /// An empty list of tokens.
   static const List<Token> EMPTY_TOKEN_LIST = <Token>[];
 
   void test_adjacentStrings() {
diff --git a/pkg/analyzer/test/id_tests/reachability_test.dart b/pkg/analyzer/test/id_tests/reachability_test.dart
index 833f131..c8751ff 100644
--- a/pkg/analyzer/test/id_tests/reachability_test.dart
+++ b/pkg/analyzer/test/id_tests/reachability_test.dart
@@ -116,7 +116,8 @@
   const _ReachabilityDataInterpreter();
 
   @override
-  String getText(Set<_ReachabilityAssertion> actualData, [String indentation]) =>
+  String getText(Set<_ReachabilityAssertion> actualData,
+          [String indentation]) =>
       _sortedRepresentation(_toStrings(actualData));
 
   @override
diff --git a/pkg/analyzer/test/resource_utils.dart b/pkg/analyzer/test/resource_utils.dart
index 8bc0583..f991767 100644
--- a/pkg/analyzer/test/resource_utils.dart
+++ b/pkg/analyzer/test/resource_utils.dart
@@ -13,35 +13,27 @@
 
 bool get isWindows => path.Style.platform == path.Style.windows;
 
-/**
- * Assert that the given path is posix and absolute.
- */
+/// Assert that the given path is posix and absolute.
 void expectAbsolutePosixPath(String posixPath) {
   expect(posixPath, startsWith('/'),
       reason: 'Expected absolute posix path, but found $posixPath');
 }
 
-/**
- * Assert that the given path is posix.
- */
+/// Assert that the given path is posix.
 void expectPosixPath(String posixPath) {
   expect(posixPath.indexOf('\\'), -1,
       reason: 'Expected posix path, but found $posixPath');
 }
 
-/**
- * Translate the given posixPath to a file URI appropriate for the
- * platform on which the tests are executing.
- */
+/// Translate the given posixPath to a file URI appropriate for the
+/// platform on which the tests are executing.
 String posixToOSFileUri(String posixPath) {
   expectPosixPath(posixPath);
   return isWindows ? 'file:///C:$posixPath' : 'file://$posixPath';
 }
 
-/**
- * Translate the given posixPath to a path appropriate for the
- * platform on which the tests are executing.
- */
+/// Translate the given posixPath to a path appropriate for the
+/// platform on which the tests are executing.
 String posixToOSPath(String posixPath) {
   expectPosixPath(posixPath);
   if (isWindows) {
@@ -54,16 +46,14 @@
   return posixPath;
 }
 
-/**
- * A convenience utility for setting up a test [MemoryResourceProvider].
- * All supplied paths are assumed to be in [path.posix] format
- * and are automatically translated to [path.context].
- *
- * This class intentionally does not implement [ResourceProvider]
- * directly or indirectly so that it cannot be used as a resource provider.
- * We do not want functionality under test to interact with a resource provider
- * that automatically translates paths.
- */
+/// A convenience utility for setting up a test [MemoryResourceProvider].
+/// All supplied paths are assumed to be in [path.posix] format
+/// and are automatically translated to [path.context].
+///
+/// This class intentionally does not implement [ResourceProvider]
+/// directly or indirectly so that it cannot be used as a resource provider.
+/// We do not want functionality under test to interact with a resource provider
+/// that automatically translates paths.
 class TestPathTranslator {
   final MemoryResourceProvider _provider;
 
@@ -82,10 +72,8 @@
       _provider.newFolder(posixToOSPath(posixPath));
 }
 
-/**
- * A resource provider for testing that asserts that any supplied paths
- * are appropriate for the OS platform on which the tests are running.
- */
+/// A resource provider for testing that asserts that any supplied paths
+/// are appropriate for the OS platform on which the tests are running.
 class TestResourceProvider implements ResourceProvider {
   final ResourceProvider _provider;
 
@@ -112,10 +100,8 @@
   Folder getStateLocation(String pluginId) =>
       _provider.getStateLocation(pluginId);
 
-  /**
-   * Assert that the given path is valid for the OS platform on which the
-   * tests are running.
-   */
+  /// Assert that the given path is valid for the OS platform on which the
+  /// tests are running.
   String _assertPath(String path) {
     if (isWindows) {
       if (path.contains('/')) {
diff --git a/pkg/analyzer/test/src/command_line/arguments_test.dart b/pkg/analyzer/test/src/command_line/arguments_test.dart
index 362cc48..38ccc7c 100644
--- a/pkg/analyzer/test/src/command_line/arguments_test.dart
+++ b/pkg/analyzer/test/src/command_line/arguments_test.dart
@@ -71,55 +71,25 @@
     expect(defaultOptions.implicitDynamic, true);
   }
 
-  void test_createDartSdkManager_noPath_noSummaries() {
+  void test_createDartSdkManager_noPath() {
     ArgParser parser = ArgParser();
     defineAnalysisArguments(parser);
     List<String> args = [];
     ArgResults result = parse(resourceProvider, parser, args);
-    DartSdkManager manager =
-        createDartSdkManager(resourceProvider, false, result);
+    DartSdkManager manager = createDartSdkManager(resourceProvider, result);
     expect(manager, isNotNull);
     expect(manager.defaultSdkDirectory,
         FolderBasedDartSdk.defaultSdkDirectory(resourceProvider)?.path);
-    expect(manager.canUseSummaries, false);
   }
 
-  void test_createDartSdkManager_noPath_summaries() {
-    ArgParser parser = ArgParser();
-    defineAnalysisArguments(parser);
-    List<String> args = [];
-    ArgResults result = parse(resourceProvider, parser, args);
-    DartSdkManager manager =
-        createDartSdkManager(resourceProvider, true, result);
-    expect(manager, isNotNull);
-
-    expect(manager.defaultSdkDirectory,
-        FolderBasedDartSdk.defaultSdkDirectory(resourceProvider)?.path);
-    expect(manager.canUseSummaries, true);
-  }
-
-  void test_createDartSdkManager_path_noSummaries() {
+  void test_createDartSdkManager_path() {
     ArgParser parser = ArgParser();
     defineAnalysisArguments(parser);
     List<String> args = ['--dart-sdk=x'];
     ArgResults result = parse(resourceProvider, parser, args);
-    DartSdkManager manager =
-        createDartSdkManager(resourceProvider, false, result);
+    DartSdkManager manager = createDartSdkManager(resourceProvider, result);
     expect(manager, isNotNull);
     expect(manager.defaultSdkDirectory, 'x');
-    expect(manager.canUseSummaries, false);
-  }
-
-  void test_createDartSdkManager_path_summaries() {
-    ArgParser parser = ArgParser();
-    defineAnalysisArguments(parser);
-    List<String> args = ['--dart-sdk=y'];
-    ArgResults result = parse(resourceProvider, parser, args);
-    DartSdkManager manager =
-        createDartSdkManager(resourceProvider, true, result);
-    expect(manager, isNotNull);
-    expect(manager.defaultSdkDirectory, 'y');
-    expect(manager.canUseSummaries, true);
   }
 
   void test_defineAnalysisArguments() {
diff --git a/pkg/analyzer/test/src/context/builder_test.dart b/pkg/analyzer/test/src/context/builder_test.dart
index 227862f..63c88ec 100644
--- a/pkg/analyzer/test/src/context/builder_test.dart
+++ b/pkg/analyzer/test/src/context/builder_test.dart
@@ -40,30 +40,20 @@
 
 @reflectiveTest
 class ContextBuilderTest with ResourceProviderMixin {
-  /**
-   * The SDK manager used by the tests;
-   */
+  /// The SDK manager used by the tests;
   DartSdkManager sdkManager;
 
-  /**
-   * The content cache used by the tests.
-   */
+  /// The content cache used by the tests.
   ContentCache contentCache;
 
-  /**
-   * The options passed to the context builder.
-   */
+  /// The options passed to the context builder.
   ContextBuilderOptions builderOptions = ContextBuilderOptions();
 
-  /**
-   * The context builder to be used in the test.
-   */
+  /// The context builder to be used in the test.
   ContextBuilder builder;
 
-  /**
-   * The path to the default SDK, or `null` if the test has not explicitly
-   * invoked [createDefaultSdk].
-   */
+  /// The path to the default SDK, or `null` if the test has not explicitly
+  /// invoked [createDefaultSdk].
   String defaultSdkPath;
 
   _MockLintRule _mockLintRule;
@@ -86,14 +76,14 @@
   "core": const LibraryInfo("core/core.dart"),
 };
 ''');
-    sdkManager = DartSdkManager(defaultSdkPath, false);
+    sdkManager = DartSdkManager(defaultSdkPath);
     builder = ContextBuilder(resourceProvider, sdkManager, contentCache,
         options: builderOptions);
   }
 
   void setUp() {
     MockSdk(resourceProvider: resourceProvider);
-    sdkManager = DartSdkManager(convertPath('/sdk'), false);
+    sdkManager = DartSdkManager(convertPath('/sdk'));
     contentCache = ContentCache();
     builder = ContextBuilder(
       resourceProvider,
diff --git a/pkg/analyzer/test/src/dart/analysis/base.dart b/pkg/analyzer/test/src/dart/analysis/base.dart
index 7961835..5f2f5b7 100644
--- a/pkg/analyzer/test/src/dart/analysis/base.dart
+++ b/pkg/analyzer/test/src/dart/analysis/base.dart
@@ -24,9 +24,7 @@
 import 'package:analyzer/src/test_utilities/resource_provider_mixin.dart';
 import 'package:test/test.dart';
 
-/**
- * Finds an [Element] with the given [name].
- */
+/// Finds an [Element] with the given [name].
 Element findChildElement(Element root, String name, [ElementKind kind]) {
   Element result;
   root.accept(_ElementVisitorFunctionWrapper((Element element) {
@@ -68,8 +66,6 @@
 
   List<String> enabledExperiments = [];
 
-  bool get disableChangesAndCacheAllResults => false;
-
   void addTestFile(String content, {bool priority = false}) {
     testCode = content;
     newFile(testFile, content: content);
@@ -102,7 +98,6 @@
         ]),
         createAnalysisOptions(),
         packages: Packages.empty,
-        disableChangesAndCacheAllResults: disableChangesAndCacheAllResults,
         enableIndex: true,
         externalSummaries: externalSummaries);
   }
@@ -156,9 +151,7 @@
   void tearDown() {}
 }
 
-/**
- * Wraps an [_ElementVisitorFunction] into a [GeneralizingElementVisitor].
- */
+/// Wraps an [_ElementVisitorFunction] into a [GeneralizingElementVisitor].
 class _ElementVisitorFunctionWrapper extends GeneralizingElementVisitor {
   final _ElementVisitorFunction function;
 
diff --git a/pkg/analyzer/test/src/dart/analysis/driver_caching_test.dart b/pkg/analyzer/test/src/dart/analysis/driver_caching_test.dart
new file mode 100644
index 0000000..0faaff9
--- /dev/null
+++ b/pkg/analyzer/test/src/dart/analysis/driver_caching_test.dart
@@ -0,0 +1,88 @@
+// Copyright (c) 2020, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/error/error.dart';
+import 'package:analyzer/src/dart/error/lint_codes.dart';
+import 'package:analyzer/src/generated/engine.dart';
+import 'package:analyzer/src/lint/registry.dart';
+import 'package:linter/src/rules.dart';
+import 'package:test/test.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import '../resolution/driver_resolution.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(AnalysisDriverCachingTest);
+  });
+}
+
+@reflectiveTest
+class AnalysisDriverCachingTest extends DriverResolutionTest {
+  List<Set<String>> get _linkedCycles {
+    return driver.test.libraryContext.linkedCycles;
+  }
+
+  @override
+  void setUp() {
+    super.setUp();
+    registerLintRules();
+  }
+
+  test_lints() async {
+    var path = convertPath('/test/lib/test.dart');
+
+    newFile(path, content: r'''
+void f() {
+  ![0].isEmpty;
+}
+''');
+
+    // We don't have any lints configured, so no errors.
+    assertErrorsInList(
+      (await driver.getErrors(path)).errors,
+      [],
+    );
+
+    // The summary for the library was linked.
+    _assertHasLinkedCycle({path}, andClear: true);
+
+    // Configure to run a lint.
+    driver.configure(
+      analysisOptions: AnalysisOptionsImpl()
+        ..lint = true
+        ..lintRules = [
+          Registry.ruleRegistry.getRule('prefer_is_not_empty'),
+        ],
+    );
+
+    // Check that the lint was run, and reported.
+    _assertHasLintReported(
+      (await driver.getErrors(path)).errors,
+      'prefer_is_not_empty',
+    );
+
+    // Lints don't affect summaries, nothing should be linked.
+    _assertNoLinkedCycles();
+  }
+
+  void _assertHasLinkedCycle(Set<String> expected, {bool andClear = false}) {
+    expect(_linkedCycles, contains(unorderedEquals(expected)));
+    if (andClear) {
+      _linkedCycles.clear();
+    }
+  }
+
+  void _assertHasLintReported(List<AnalysisError> errors, String name) {
+    var matching = errors.where((element) {
+      var errorCode = element.errorCode;
+      return errorCode is LintCode && errorCode.name == name;
+    }).toList();
+    expect(matching, hasLength(1));
+  }
+
+  void _assertNoLinkedCycles() {
+    expect(_linkedCycles, isEmpty);
+  }
+}
diff --git a/pkg/analyzer/test/src/dart/analysis/driver_resolution_test.dart b/pkg/analyzer/test/src/dart/analysis/driver_resolution_test.dart
index e4a8348..9984659 100644
--- a/pkg/analyzer/test/src/dart/analysis/driver_resolution_test.dart
+++ b/pkg/analyzer/test/src/dart/analysis/driver_resolution_test.dart
@@ -36,9 +36,7 @@
 
 final isVoidType = TypeMatcher<VoidTypeImpl>();
 
-/**
- * Integration tests for resolution.
- */
+/// Integration tests for resolution.
 @reflectiveTest
 class AnalysisDriverResolutionTest extends DriverResolutionTest
     with ElementsTypesMixin {
@@ -8610,9 +8608,7 @@
   }
 }
 
-/**
- * Resolution tests that are run with all of the experiments enabled.
- */
+/// Resolution tests that are run with all of the experiments enabled.
 @reflectiveTest
 class DriverResolutionWithExperimentsTest extends BaseAnalysisDriverTest {
   @override
diff --git a/pkg/analyzer/test/src/dart/analysis/driver_test.dart b/pkg/analyzer/test/src/dart/analysis/driver_test.dart
index c9d26a4..4e30908 100644
--- a/pkg/analyzer/test/src/dart/analysis/driver_test.dart
+++ b/pkg/analyzer/test/src/dart/analysis/driver_test.dart
@@ -36,15 +36,12 @@
   defineReflectiveSuite(() {
     defineReflectiveTests(AnalysisDriverSchedulerTest);
     defineReflectiveTests(AnalysisDriverTest);
-    defineReflectiveTests(CacheAllAnalysisDriverTest);
   });
 }
 
-/**
- * Returns a [Future] that completes after pumping the event queue [times]
- * times. By default, this should pump the event queue enough times to allow
- * any code to run, as long as it's not waiting on some external event.
- */
+/// Returns a [Future] that completes after pumping the event queue [times]
+/// times. By default, this should pump the event queue enough times to allow
+/// any code to run, as long as it's not waiting on some external event.
 Future pumpEventQueue([int times = 5000]) {
   if (times == 0) return Future.value();
   // We use a delayed future to allow microtask events to finish. The
@@ -3170,96 +3167,6 @@
   }
 }
 
-@reflectiveTest
-class CacheAllAnalysisDriverTest extends BaseAnalysisDriverTest {
-  @override
-  bool get disableChangesAndCacheAllResults => true;
-
-  test_addFile() async {
-    var a = convertPath('/test/lib/a.dart');
-    var b = convertPath('/test/lib/b.dart');
-    driver.addFile(a);
-    driver.addFile(b);
-  }
-
-  test_changeFile() async {
-    var path = convertPath('/test.dart');
-    expect(() {
-      driver.changeFile(path);
-    }, throwsStateError);
-  }
-
-  test_getResult_libraryUnits() async {
-    var lib = convertPath('/lib.dart');
-    var part1 = convertPath('/part1.dart');
-    var part2 = convertPath('/part2.dart');
-
-    newFile(lib, content: r'''
-library test;
-part 'part1.dart';
-part 'part2.dart';
-''');
-    newFile(part1, content: 'part of test; class A {}');
-    newFile(part2, content: 'part of test; class B {}');
-
-    driver.addFile(lib);
-    driver.addFile(part1);
-    driver.addFile(part2);
-
-    // No analyzed libraries initially.
-    expect(driver.test.numOfAnalyzedLibraries, 0);
-
-    ResolvedUnitResult libResult = await driver.getResult(lib);
-    ResolvedUnitResult partResult1 = await driver.getResult(part1);
-    ResolvedUnitResult partResult2 = await driver.getResult(part2);
-
-    // Just one library was analyzed, results for parts are cached.
-    expect(driver.test.numOfAnalyzedLibraries, 1);
-
-    expect(libResult.path, lib);
-    expect(partResult1.path, part1);
-    expect(partResult2.path, part2);
-
-    expect(libResult.unit, isNotNull);
-    expect(partResult1.unit, isNotNull);
-    expect(partResult2.unit, isNotNull);
-
-    // The parts uses the same resynthesized library element.
-    var libLibrary = libResult.unit.declaredElement.library;
-    var partLibrary1 = partResult1.unit.declaredElement.library;
-    var partLibrary2 = partResult2.unit.declaredElement.library;
-    expect(partLibrary1, same(libLibrary));
-    expect(partLibrary2, same(libLibrary));
-  }
-
-  test_getResult_singleFile() async {
-    var path = convertPath('/test.dart');
-    newFile(path, content: 'main() {}');
-    driver.addFile(path);
-
-    ResolvedUnitResult result1 = await driver.getResult(path);
-    expect(driver.test.numOfAnalyzedLibraries, 1);
-    var unit1 = result1.unit;
-    var unitElement1 = unit1.declaredElement;
-    expect(result1.path, path);
-    expect(unit1, isNotNull);
-    expect(unitElement1, isNotNull);
-
-    ResolvedUnitResult result2 = await driver.getResult(path);
-    expect(driver.test.numOfAnalyzedLibraries, 1);
-    expect(result2.path, path);
-    expect(result2.unit, same(unit1));
-    expect(result2.unit.declaredElement, same(unitElement1));
-  }
-
-  test_removeFile() async {
-    var path = convertPath('/test.dart');
-    expect(() {
-      driver.removeFile(path);
-    }, throwsStateError);
-  }
-}
-
 class _SourceMock implements Source {
   @override
   final String fullName;
diff --git a/pkg/analyzer/test/src/dart/analysis/experiments_test.dart b/pkg/analyzer/test/src/dart/analysis/experiments_test.dart
index ff4627b..dee7327 100644
--- a/pkg/analyzer/test/src/dart/analysis/experiments_test.dart
+++ b/pkg/analyzer/test/src/dart/analysis/experiments_test.dart
@@ -48,68 +48,147 @@
 
   test_fromStrings_conflicting_flags_disable_then_enable() {
     // Enable takes precedence because it's last
-    knownFeatures['a'] = ExperimentalFeature(0, 'a', false, false, 'a');
+    knownFeatures['a'] = ExperimentalFeature(
+      index: 0,
+      enableString: 'a',
+      isEnabledByDefault: false,
+      isExpired: false,
+      documentation: 'a',
+      firstSupportedVersion: null,
+    );
     expect(getFlags(fromStrings(['no-a', 'a'])), [true]);
   }
 
   test_fromStrings_conflicting_flags_enable_then_disable() {
     // Disable takes precedence because it's last
-    knownFeatures['a'] = ExperimentalFeature(0, 'a', false, false, 'a');
+    knownFeatures['a'] = ExperimentalFeature(
+      index: 0,
+      enableString: 'a',
+      isEnabledByDefault: false,
+      isExpired: false,
+      documentation: 'a',
+      firstSupportedVersion: null,
+    );
     expect(getFlags(fromStrings(['a', 'no-a'])), [false]);
   }
 
   test_fromStrings_default_values() {
-    knownFeatures['a'] = ExperimentalFeature(0, 'a', false, false, 'a');
-    knownFeatures['b'] = ExperimentalFeature(1, 'b', true, false, 'b',
-        firstSupportedVersion: '1.0.0');
+    knownFeatures['a'] = ExperimentalFeature(
+      index: 0,
+      enableString: 'a',
+      isEnabledByDefault: false,
+      isExpired: false,
+      documentation: 'a',
+      firstSupportedVersion: null,
+    );
+    knownFeatures['b'] = ExperimentalFeature(
+      index: 1,
+      enableString: 'b',
+      isEnabledByDefault: true,
+      isExpired: false,
+      documentation: 'b',
+      firstSupportedVersion: '1.0.0',
+    );
     expect(getFlags(fromStrings([])), [false, true]);
   }
 
   test_fromStrings_disable_disabled_feature() {
-    knownFeatures['a'] = ExperimentalFeature(0, 'a', false, false, 'a');
+    knownFeatures['a'] = ExperimentalFeature(
+      index: 0,
+      enableString: 'a',
+      isEnabledByDefault: false,
+      isExpired: false,
+      documentation: 'a',
+      firstSupportedVersion: null,
+    );
     expect(getFlags(fromStrings(['no-a'])), [false]);
   }
 
   test_fromStrings_disable_enabled_feature() {
-    knownFeatures['a'] = ExperimentalFeature(0, 'a', true, false, 'a',
-        firstSupportedVersion: '1.0.0');
+    knownFeatures['a'] = ExperimentalFeature(
+      index: 0,
+      enableString: 'a',
+      isEnabledByDefault: true,
+      isExpired: false,
+      documentation: 'a',
+      firstSupportedVersion: '1.0.0',
+    );
     expect(getFlags(fromStrings(['no-a'])), [false]);
   }
 
   test_fromStrings_enable_disabled_feature() {
-    knownFeatures['a'] = ExperimentalFeature(0, 'a', false, false, 'a');
+    knownFeatures['a'] = ExperimentalFeature(
+      index: 0,
+      enableString: 'a',
+      isEnabledByDefault: false,
+      isExpired: false,
+      documentation: 'a',
+      firstSupportedVersion: null,
+    );
     expect(getFlags(fromStrings(['a'])), [true]);
   }
 
   test_fromStrings_enable_enabled_feature() {
-    knownFeatures['a'] = ExperimentalFeature(0, 'a', true, false, 'a',
-        firstSupportedVersion: '1.0.0');
+    knownFeatures['a'] = ExperimentalFeature(
+      index: 0,
+      enableString: 'a',
+      isEnabledByDefault: true,
+      isExpired: false,
+      documentation: 'a',
+      firstSupportedVersion: '1.0.0',
+    );
     expect(getFlags(fromStrings(['a'])), [true]);
   }
 
   test_fromStrings_illegal_use_of_expired_flag_disable() {
     // Expired flags are ignored even if they would fail validation.
-    knownFeatures['a'] = ExperimentalFeature(0, 'a', true, true, 'a',
-        firstSupportedVersion: '1.0.0');
+    knownFeatures['a'] = ExperimentalFeature(
+      index: 0,
+      enableString: 'a',
+      isEnabledByDefault: true,
+      isExpired: true,
+      documentation: 'a',
+      firstSupportedVersion: '1.0.0',
+    );
     expect(getFlags(fromStrings(['no-a'])), [true]);
   }
 
   test_fromStrings_illegal_use_of_expired_flag_enable() {
     // Expired flags are ignored even if they would fail validation.
-    knownFeatures['a'] = ExperimentalFeature(0, 'a', false, true, 'a');
+    knownFeatures['a'] = ExperimentalFeature(
+      index: 0,
+      enableString: 'a',
+      isEnabledByDefault: false,
+      isExpired: true,
+      documentation: 'a',
+      firstSupportedVersion: null,
+    );
     expect(getFlags(fromStrings(['a'])), [false]);
   }
 
   test_fromStrings_unnecessary_use_of_expired_flag_disable() {
     // Expired flags are ignored.
-    knownFeatures['a'] = ExperimentalFeature(0, 'a', false, true, 'a');
+    knownFeatures['a'] = ExperimentalFeature(
+      index: 0,
+      enableString: 'a',
+      isEnabledByDefault: false,
+      isExpired: true,
+      documentation: 'a',
+      firstSupportedVersion: null,
+    );
     expect(getFlags(fromStrings(['no-a'])), [false]);
   }
 
   test_fromStrings_unnecessary_use_of_expired_flag_enable() {
     // Expired flags are ignored.
-    knownFeatures['a'] = ExperimentalFeature(0, 'a', true, true, 'a',
-        firstSupportedVersion: '1.0.0');
+    knownFeatures['a'] = ExperimentalFeature(
+      index: 0,
+      enableString: 'a',
+      isEnabledByDefault: true,
+      isExpired: true,
+      documentation: 'a',
+      firstSupportedVersion: '1.0.0',
+    );
     expect(getFlags(fromStrings(['a'])), [true]);
   }
 
@@ -119,9 +198,30 @@
   }
 
   test_validateFlagCombination_disable_then_enable() {
-    knownFeatures['a'] = ExperimentalFeature(0, 'a', false, false, 'a');
-    knownFeatures['b'] = ExperimentalFeature(1, 'b', false, false, 'b');
-    knownFeatures['c'] = ExperimentalFeature(2, 'c', false, false, 'c');
+    knownFeatures['a'] = ExperimentalFeature(
+      index: 0,
+      enableString: 'a',
+      isEnabledByDefault: false,
+      isExpired: false,
+      documentation: 'a',
+      firstSupportedVersion: null,
+    );
+    knownFeatures['b'] = ExperimentalFeature(
+      index: 1,
+      enableString: 'b',
+      isEnabledByDefault: false,
+      isExpired: false,
+      documentation: 'b',
+      firstSupportedVersion: null,
+    );
+    knownFeatures['c'] = ExperimentalFeature(
+      index: 2,
+      enableString: 'c',
+      isEnabledByDefault: false,
+      isExpired: false,
+      documentation: 'c',
+      firstSupportedVersion: null,
+    );
     var validationResult =
         getValidateCombinationResult(['a', 'no-c'], ['no-b', 'c']);
     expect(validationResult, hasLength(1));
@@ -131,9 +231,30 @@
   }
 
   test_validateFlagCombination_enable_then_disable() {
-    knownFeatures['a'] = ExperimentalFeature(0, 'a', false, false, 'a');
-    knownFeatures['b'] = ExperimentalFeature(1, 'b', false, false, 'b');
-    knownFeatures['c'] = ExperimentalFeature(2, 'c', false, false, 'c');
+    knownFeatures['a'] = ExperimentalFeature(
+      index: 0,
+      enableString: 'a',
+      isEnabledByDefault: false,
+      isExpired: false,
+      documentation: 'a',
+      firstSupportedVersion: null,
+    );
+    knownFeatures['b'] = ExperimentalFeature(
+      index: 1,
+      enableString: 'b',
+      isEnabledByDefault: false,
+      isExpired: false,
+      documentation: 'b',
+      firstSupportedVersion: null,
+    );
+    knownFeatures['c'] = ExperimentalFeature(
+      index: 2,
+      enableString: 'c',
+      isEnabledByDefault: false,
+      isExpired: false,
+      documentation: 'c',
+      firstSupportedVersion: null,
+    );
     var validationResult =
         getValidateCombinationResult(['a', 'c'], ['no-b', 'no-c']);
     expect(validationResult, hasLength(1));
@@ -143,14 +264,42 @@
   }
 
   test_validateFlagCombination_ok() {
-    knownFeatures['a'] = ExperimentalFeature(0, 'a', false, false, 'a');
-    knownFeatures['b'] = ExperimentalFeature(1, 'b', false, false, 'b');
-    knownFeatures['c'] = ExperimentalFeature(2, 'c', false, false, 'c');
+    knownFeatures['a'] = ExperimentalFeature(
+      index: 0,
+      enableString: 'a',
+      isEnabledByDefault: false,
+      isExpired: false,
+      documentation: 'a',
+      firstSupportedVersion: null,
+    );
+    knownFeatures['b'] = ExperimentalFeature(
+      index: 1,
+      enableString: 'b',
+      isEnabledByDefault: false,
+      isExpired: false,
+      documentation: 'b',
+      firstSupportedVersion: null,
+    );
+    knownFeatures['c'] = ExperimentalFeature(
+      index: 2,
+      enableString: 'c',
+      isEnabledByDefault: false,
+      isExpired: false,
+      documentation: 'c',
+      firstSupportedVersion: null,
+    );
     expect(getValidateCombinationResult(['a', 'c'], ['no-b', 'c']), isEmpty);
   }
 
   test_validateFlags_conflicting_flags_disable_then_enable() {
-    knownFeatures['a'] = ExperimentalFeature(0, 'a', false, false, 'a');
+    knownFeatures['a'] = ExperimentalFeature(
+      index: 0,
+      enableString: 'a',
+      isEnabledByDefault: false,
+      isExpired: false,
+      documentation: 'a',
+      firstSupportedVersion: null,
+    );
     var validationResult = getValidationResult(['no-a', 'a']);
     expect(validationResult, hasLength(1));
     var error = validationResult[0] as ConflictingFlags;
@@ -163,7 +312,14 @@
   }
 
   test_validateFlags_conflicting_flags_enable_then_disable() {
-    knownFeatures['a'] = ExperimentalFeature(0, 'a', false, false, 'a');
+    knownFeatures['a'] = ExperimentalFeature(
+      index: 0,
+      enableString: 'a',
+      isEnabledByDefault: false,
+      isExpired: false,
+      documentation: 'a',
+      firstSupportedVersion: null,
+    );
     var validationResult = getValidationResult(['a', 'no-a']);
     expect(validationResult, hasLength(1));
     var error = validationResult[0] as ConflictingFlags;
@@ -176,19 +332,38 @@
   }
 
   test_validateFlags_ignore_redundant_disable_flags() {
-    knownFeatures['a'] = ExperimentalFeature(0, 'a', true, false, 'a',
-        firstSupportedVersion: '1.0.0');
+    knownFeatures['a'] = ExperimentalFeature(
+      index: 0,
+      enableString: 'a',
+      isEnabledByDefault: true,
+      isExpired: false,
+      documentation: 'a',
+      firstSupportedVersion: '1.0.0',
+    );
     expect(getValidationResult(['no-a', 'no-a']), isEmpty);
   }
 
   test_validateFlags_ignore_redundant_enable_flags() {
-    knownFeatures['a'] = ExperimentalFeature(0, 'a', false, false, 'a');
+    knownFeatures['a'] = ExperimentalFeature(
+      index: 0,
+      enableString: 'a',
+      isEnabledByDefault: false,
+      isExpired: false,
+      documentation: 'a',
+      firstSupportedVersion: null,
+    );
     expect(getValidationResult(['a', 'a']), isEmpty);
   }
 
   test_validateFlags_illegal_use_of_expired_flag_disable() {
-    knownFeatures['a'] = ExperimentalFeature(0, 'a', true, true, 'a',
-        firstSupportedVersion: '1.0.0');
+    knownFeatures['a'] = ExperimentalFeature(
+      index: 0,
+      enableString: 'a',
+      isEnabledByDefault: true,
+      isExpired: true,
+      documentation: 'a',
+      firstSupportedVersion: '1.0.0',
+    );
     var validationResult = getValidationResult(['no-a']);
     expect(validationResult, hasLength(1));
     var error = validationResult[0] as IllegalUseOfExpiredFlag;
@@ -199,7 +374,14 @@
   }
 
   test_validateFlags_illegal_use_of_expired_flag_enable() {
-    knownFeatures['a'] = ExperimentalFeature(0, 'a', false, true, 'a');
+    knownFeatures['a'] = ExperimentalFeature(
+      index: 0,
+      enableString: 'a',
+      isEnabledByDefault: false,
+      isExpired: true,
+      documentation: 'a',
+      firstSupportedVersion: null,
+    );
     var validationResult = getValidationResult(['a']);
     expect(validationResult, hasLength(1));
     var error = validationResult[0] as IllegalUseOfExpiredFlag;
@@ -210,7 +392,14 @@
   }
 
   test_validateFlags_unnecessary_use_of_expired_flag_disable() {
-    knownFeatures['a'] = ExperimentalFeature(0, 'a', false, true, 'a');
+    knownFeatures['a'] = ExperimentalFeature(
+      index: 0,
+      enableString: 'a',
+      isEnabledByDefault: false,
+      isExpired: true,
+      documentation: 'a',
+      firstSupportedVersion: null,
+    );
     var validationResult = getValidationResult(['no-a']);
     expect(validationResult, hasLength(1));
     var error = validationResult[0] as UnnecessaryUseOfExpiredFlag;
@@ -221,8 +410,14 @@
   }
 
   test_validateFlags_unnecessary_use_of_expired_flag_enable() {
-    knownFeatures['a'] = ExperimentalFeature(0, 'a', true, true, 'a',
-        firstSupportedVersion: '1.0.0');
+    knownFeatures['a'] = ExperimentalFeature(
+      index: 0,
+      enableString: 'a',
+      isEnabledByDefault: true,
+      isExpired: true,
+      documentation: 'a',
+      firstSupportedVersion: '1.0.0',
+    );
     var validationResult = getValidationResult(['a']);
     expect(validationResult, hasLength(1));
     var error = validationResult[0] as UnnecessaryUseOfExpiredFlag;
diff --git a/pkg/analyzer/test/src/dart/analysis/index_test.dart b/pkg/analyzer/test/src/dart/analysis/index_test.dart
index fc60ff0d..6f31683 100644
--- a/pkg/analyzer/test/src/dart/analysis/index_test.dart
+++ b/pkg/analyzer/test/src/dart/analysis/index_test.dart
@@ -911,13 +911,11 @@
     assertThat(element)..isReferencedAt('A p) {', false);
   }
 
-  /**
-   * There was a bug in the AST structure, when single [Comment] was cloned and
-   * assigned to both [FieldDeclaration] and [VariableDeclaration].
-   *
-   * This caused duplicate indexing.
-   * Here we test that the problem is fixed one way or another.
-   */
+  /// There was a bug in the AST structure, when single [Comment] was cloned and
+  /// assigned to both [FieldDeclaration] and [VariableDeclaration].
+  ///
+  /// This caused duplicate indexing.
+  /// Here we test that the problem is fixed one way or another.
   test_isReferencedBy_identifierInComment() async {
     await _indexTestUnit('''
 class A {}
@@ -1409,9 +1407,7 @@
       ..isUsed('x();', IndexRelationKind.IS_INVOKED_BY);
   }
 
-  /**
-   * Asserts that [index] has an item with the expected properties.
-   */
+  /// Asserts that [index] has an item with the expected properties.
   void _assertHasRelation(
       Element element,
       List<_Relation> relations,
@@ -1474,9 +1470,7 @@
     fail('$msg in\n' + packageIndexJsonString);
   }
 
-  /**
-   * Return the [element] identifier in [index] or fail.
-   */
+  /// Return the [element] identifier in [index] or fail.
   int _findElementId(Element element) {
     var unitId = _getUnitId(element);
 
@@ -1506,9 +1500,7 @@
     return 0;
   }
 
-  /**
-   * Return all relations with [element] in [index].
-   */
+  /// Return all relations with [element] in [index].
   List<_Relation> _getElementRelations(Element element) {
     int elementId = _findElementId(element);
     List<_Relation> relations = <_Relation>[];
diff --git a/pkg/analyzer/test/src/dart/analysis/search_test.dart b/pkg/analyzer/test/src/dart/analysis/search_test.dart
index ec7fe9f..ce1dd18 100644
--- a/pkg/analyzer/test/src/dart/analysis/search_test.dart
+++ b/pkg/analyzer/test/src/dart/analysis/search_test.dart
@@ -1752,18 +1752,14 @@
         isResolved: isResolved, isQualified: isQualified);
   }
 
-  /**
-   * Create [ExpectedResult] for a qualified and resolved match.
-   */
+  /// Create [ExpectedResult] for a qualified and resolved match.
   ExpectedResult _expectIdQ(
       Element element, SearchResultKind kind, String search,
       {int length, bool isResolved = true}) {
     return _expectId(element, kind, search, isQualified: true, length: length);
   }
 
-  /**
-   * Create [ExpectedResult] for a qualified and unresolved match.
-   */
+  /// Create [ExpectedResult] for a qualified and unresolved match.
   ExpectedResult _expectIdQU(
       Element element, SearchResultKind kind, String search,
       {int length}) {
@@ -1771,9 +1767,7 @@
         isQualified: true, isResolved: false, length: length);
   }
 
-  /**
-   * Create [ExpectedResult] for a unqualified and unresolved match.
-   */
+  /// Create [ExpectedResult] for a unqualified and unresolved match.
   ExpectedResult _expectIdU(
       Element element, SearchResultKind kind, String search,
       {int length}) {
diff --git a/pkg/analyzer/test/src/dart/analysis/test_all.dart b/pkg/analyzer/test/src/dart/analysis/test_all.dart
index b4f01ec..fbbd8d5 100644
--- a/pkg/analyzer/test/src/dart/analysis/test_all.dart
+++ b/pkg/analyzer/test/src/dart/analysis/test_all.dart
@@ -13,6 +13,7 @@
 import 'crc32_test.dart' as crc32_test;
 import 'defined_names_test.dart' as defined_names;
 import 'dependency/test_all.dart' as dependency_test;
+import 'driver_caching_test.dart' as driver_caching;
 import 'driver_resolution_test.dart' as driver_resolution;
 import 'driver_test.dart' as driver;
 import 'experiments_test.dart' as experiments_test;
@@ -42,6 +43,7 @@
     defined_names.main();
     dependency_test.main();
     driver.main();
+    driver_caching.main();
     driver_resolution.main();
     experiments_test.main();
     feature_set_provider.main();
diff --git a/pkg/analyzer/test/src/dart/ast/to_source_visitor_test.dart b/pkg/analyzer/test/src/dart/ast/to_source_visitor_test.dart
index 311aed8..8207f4e 100644
--- a/pkg/analyzer/test/src/dart/ast/to_source_visitor_test.dart
+++ b/pkg/analyzer/test/src/dart/ast/to_source_visitor_test.dart
@@ -2834,10 +2834,8 @@
         AstTestFactory.yieldEachStatement(AstTestFactory.identifier3("e")));
   }
 
-  /**
-   * Assert that a `ToSourceVisitor2` will produce the [expectedSource] when
-   * visiting the given [node].
-   */
+  /// Assert that a `ToSourceVisitor2` will produce the [expectedSource] when
+  /// visiting the given [node].
   void _assertSource(String expectedSource, AstNode node) {
     StringBuffer buffer = StringBuffer();
     node.accept(ToSourceVisitor(buffer));
diff --git a/pkg/analyzer/test/src/dart/constant/utilities_test.dart b/pkg/analyzer/test/src/dart/constant/utilities_test.dart
index 30e04ca..cc8199f 100644
--- a/pkg/analyzer/test/src/dart/constant/utilities_test.dart
+++ b/pkg/analyzer/test/src/dart/constant/utilities_test.dart
@@ -40,10 +40,8 @@
     _source = TestSource();
   }
 
-  /**
-   * Test an annotation that consists solely of an identifier (and hence
-   * represents a reference to a compile-time constant variable).
-   */
+  /// Test an annotation that consists solely of an identifier (and hence
+  /// represents a reference to a compile-time constant variable).
   void test_visitAnnotation_constantVariable() {
     CompilationUnitElement compilationUnitElement =
         ElementFactory.compilationUnit('/test.dart', _source)..source = _source;
@@ -66,10 +64,8 @@
     expect(_findConstants(), isEmpty);
   }
 
-  /**
-   * Test an annotation that represents the invocation of a constant
-   * constructor.
-   */
+  /// Test an annotation that represents the invocation of a constant
+  /// constructor.
   void test_visitAnnotation_invocation() {
     CompilationUnitElement compilationUnitElement =
         ElementFactory.compilationUnit('/test.dart', _source)..source = _source;
diff --git a/pkg/analyzer/test/src/dart/constant/value_test.dart b/pkg/analyzer/test/src/dart/constant/value_test.dart
index 3b90604..7c3ae1a 100644
--- a/pkg/analyzer/test/src/dart/constant/value_test.dart
+++ b/pkg/analyzer/test/src/dart/constant/value_test.dart
@@ -5,8 +5,8 @@
 import 'package:analyzer/dart/element/nullability_suffix.dart';
 import 'package:analyzer/dart/element/type.dart';
 import 'package:analyzer/dart/element/type_provider.dart';
+import 'package:analyzer/src/dart/element/type_system.dart';
 import 'package:analyzer/src/generated/constant.dart';
-import 'package:analyzer/src/generated/type_system.dart';
 import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
@@ -1575,11 +1575,9 @@
     _assertTimes(_intValue(null), _intValue(null), _intValue(3));
   }
 
-  /**
-   * Assert that the result of adding the [left] and [right] operands is the
-   * [expected] value, or that the operation throws an exception if the expected
-   * value is `null`.
-   */
+  /// Assert that the result of adding the [left] and [right] operands is the
+  /// [expected] value, or that the operation throws an exception if the
+  /// expected value is `null`.
   void _assertAdd(
       DartObjectImpl expected, DartObjectImpl left, DartObjectImpl right) {
     if (expected == null) {
@@ -1593,10 +1591,8 @@
     }
   }
 
-  /**
-   * Assert that the bit-not of the [operand] is the [expected] value, or that
-   * the operation throws an exception if the expected value is `null`.
-   */
+  /// Assert that the bit-not of the [operand] is the [expected] value, or that
+  /// the operation throws an exception if the expected value is `null`.
   void _assertBitNot(DartObjectImpl expected, DartObjectImpl operand) {
     if (expected == null) {
       expect(() {
@@ -1609,11 +1605,9 @@
     }
   }
 
-  /**
-   * Assert that the result of concatenating the [left] and [right] operands is
-   * the [expected] value, or that the operation throws an exception if the
-   * expected value is `null`.
-   */
+  /// Assert that the result of concatenating the [left] and [right] operands is
+  /// the [expected] value, or that the operation throws an exception if the
+  /// expected value is `null`.
   void _assertConcatenate(
       DartObjectImpl expected, DartObjectImpl left, DartObjectImpl right) {
     if (expected == null) {
@@ -1627,11 +1621,9 @@
     }
   }
 
-  /**
-   * Assert that the result of dividing the [left] and [right] operands is the
-   * [expected] value, or that the operation throws an exception if the expected
-   * value is `null`.
-   */
+  /// Assert that the result of dividing the [left] and [right] operands is the
+  /// [expected] value, or that the operation throws an exception if the
+  /// expected value is `null`.
   void _assertDivide(
       DartObjectImpl expected, DartObjectImpl left, DartObjectImpl right) {
     if (expected == null) {
@@ -1645,11 +1637,9 @@
     }
   }
 
-  /**
-   * Assert that the result of bit-anding the [left] and [right] operands is the
-   * [expected] value, or that the operation throws an exception if the expected
-   * value is `null`.
-   */
+  /// Assert that the result of bit-anding the [left] and [right] operands is
+  /// the [expected] value, or that the operation throws an exception if the
+  /// expected value is `null`.
   void _assertEagerAnd(
       DartObjectImpl expected, DartObjectImpl left, DartObjectImpl right) {
     if (expected == null) {
@@ -1663,11 +1653,9 @@
     }
   }
 
-  /**
-   * Assert that the result of bit-oring the [left] and [right] operands is the
-   * [expected] value, or that the operation throws an exception if the expected
-   * value is `null`.
-   */
+  /// Assert that the result of bit-oring the [left] and [right] operands is the
+  /// [expected] value, or that the operation throws an exception if the
+  /// expected value is `null`.
   void _assertEagerOr(
       DartObjectImpl expected, DartObjectImpl left, DartObjectImpl right) {
     if (expected == null) {
@@ -1681,11 +1669,9 @@
     }
   }
 
-  /**
-   * Assert that the result of bit-xoring the [left] and [right] operands is the
-   * [expected] value, or that the operation throws an exception if the expected
-   * value is `null`.
-   */
+  /// Assert that the result of bit-xoring the [left] and [right] operands is
+  /// the [expected] value, or that the operation throws an exception if the
+  /// expected value is `null`.
   void _assertEagerXor(
       DartObjectImpl expected, DartObjectImpl left, DartObjectImpl right) {
     if (expected == null) {
@@ -1699,11 +1685,9 @@
     }
   }
 
-  /**
-   * Assert that the result of comparing the [left] and [right] operands for
-   * equality is the [expected] value, or that the operation throws an exception
-   * if the expected value is `null`.
-   */
+  /// Assert that the result of comparing the [left] and [right] operands for
+  /// equality is the [expected] value, or that the operation throws an
+  /// exception if the expected value is `null`.
   void _assertEqualEqual(
       DartObjectImpl expected, DartObjectImpl left, DartObjectImpl right) {
     if (expected == null) {
@@ -1717,11 +1701,9 @@
     }
   }
 
-  /**
-   * Assert that the result of comparing the [left] and [right] operands is the
-   * [expected] value, or that the operation throws an exception if the expected
-   * value is `null`.
-   */
+  /// Assert that the result of comparing the [left] and [right] operands is the
+  /// [expected] value, or that the operation throws an exception if the
+  /// expected value is `null`.
   void _assertGreaterThan(
       DartObjectImpl expected, DartObjectImpl left, DartObjectImpl right) {
     if (expected == null) {
@@ -1735,11 +1717,9 @@
     }
   }
 
-  /**
-   * Assert that the result of comparing the [left] and [right] operands is the
-   * [expected] value, or that the operation throws an exception if the expected
-   * value is `null`.
-   */
+  /// Assert that the result of comparing the [left] and [right] operands is the
+  /// [expected] value, or that the operation throws an exception if the
+  /// expected value is `null`.
   void _assertGreaterThanOrEqual(
       DartObjectImpl expected, DartObjectImpl left, DartObjectImpl right) {
     if (expected == null) {
@@ -1753,10 +1733,8 @@
     }
   }
 
-  /**
-   * Assert that the result of comparing the [left] and [right] operands using
-   * identical() is the expected value.
-   */
+  /// Assert that the result of comparing the [left] and [right] operands using
+  /// identical() is the expected value.
   void _assertIdentical(
       DartObjectImpl expected, DartObjectImpl left, DartObjectImpl right) {
     DartObjectImpl result = left.isIdentical2(_typeSystem, right);
@@ -1768,11 +1746,9 @@
     // TODO(scheglov) implement
   }
 
-  /**
-   * Assert that the result of dividing the [left] and [right] operands as
-   * integers is the [expected] value, or that the operation throws an exception
-   * if the expected value is `null`.
-   */
+  /// Assert that the result of dividing the [left] and [right] operands as
+  /// integers is the [expected] value, or that the operation throws an
+  /// exception if the expected value is `null`.
   void _assertIntegerDivide(
       DartObjectImpl expected, DartObjectImpl left, DartObjectImpl right) {
     if (expected == null) {
@@ -1786,11 +1762,9 @@
     }
   }
 
-  /**
-   * Assert that the result of logical-anding the [left] and [right] operands is
-   * the [expected] value, or that the operation throws an exception if the
-   * expected value is `null`.
-   */
+  /// Assert that the result of logical-anding the [left] and [right] operands
+  /// is the [expected] value, or that the operation throws an exception if the
+  /// expected value is `null`.
   void _assertLazyAnd(
       DartObjectImpl expected, DartObjectImpl left, DartObjectImpl right) {
     if (expected == null) {
@@ -1804,11 +1778,9 @@
     }
   }
 
-  /**
-   * Assert that the result of logical-oring the [left] and [right] operands is
-   * the [expected] value, or that the operation throws an exception if the
-   * expected value is `null`.
-   */
+  /// Assert that the result of logical-oring the [left] and [right] operands is
+  /// the [expected] value, or that the operation throws an exception if the
+  /// expected value is `null`.
   void _assertLazyOr(
       DartObjectImpl expected, DartObjectImpl left, DartObjectImpl right) {
     if (expected == null) {
@@ -1822,11 +1794,9 @@
     }
   }
 
-  /**
-   * Assert that the result of comparing the [left] and [right] operands is the
-   * [expected] value, or that the operation throws an exception if the expected
-   * value is `null`.
-   */
+  /// Assert that the result of comparing the [left] and [right] operands is the
+  /// [expected] value, or that the operation throws an exception if the
+  /// expected value is `null`.
   void _assertLessThan(
       DartObjectImpl expected, DartObjectImpl left, DartObjectImpl right) {
     if (expected == null) {
@@ -1840,11 +1810,9 @@
     }
   }
 
-  /**
-   * Assert that the result of comparing the [left] and [right] operands is the
-   * [expected] value, or that the operation throws an exception if the expected
-   * value is `null`.
-   */
+  /// Assert that the result of comparing the [left] and [right] operands is the
+  /// [expected] value, or that the operation throws an exception if the
+  /// expected value is `null`.
   void _assertLessThanOrEqual(
       DartObjectImpl expected, DartObjectImpl left, DartObjectImpl right) {
     if (expected == null) {
@@ -1858,10 +1826,8 @@
     }
   }
 
-  /**
-   * Assert that the logical-not of the [operand] is the [expected] value, or
-   * that the operation throws an exception if the expected value is `null`.
-   */
+  /// Assert that the logical-not of the [operand] is the [expected] value, or
+  /// that the operation throws an exception if the expected value is `null`.
   void _assertLogicalNot(DartObjectImpl expected, DartObjectImpl operand) {
     if (expected == null) {
       expect(() {
@@ -1874,11 +1840,9 @@
     }
   }
 
-  /**
-   * Assert that the result of subtracting the [left] and [right] operands is
-   * the [expected] value, or that the operation throws an exception if the
-   * expected value is `null`.
-   */
+  /// Assert that the result of subtracting the [left] and [right] operands is
+  /// the [expected] value, or that the operation throws an exception if the
+  /// expected value is `null`.
   void _assertMinus(
       DartObjectImpl expected, DartObjectImpl left, DartObjectImpl right) {
     if (expected == null) {
@@ -1892,10 +1856,8 @@
     }
   }
 
-  /**
-   * Assert that the negation of the [operand] is the [expected] value, or that
-   * the operation throws an exception if the expected value is `null`.
-   */
+  /// Assert that the negation of the [operand] is the [expected] value, or that
+  /// the operation throws an exception if the expected value is `null`.
   void _assertNegated(DartObjectImpl expected, DartObjectImpl operand) {
     if (expected == null) {
       expect(() {
@@ -1908,11 +1870,9 @@
     }
   }
 
-  /**
-   * Assert that the result of comparing the [left] and [right] operands for
-   * inequality is the [expected] value, or that the operation throws an
-   * exception if the expected value is `null`.
-   */
+  /// Assert that the result of comparing the [left] and [right] operands for
+  /// inequality is the [expected] value, or that the operation throws an
+  /// exception if the expected value is `null`.
   void _assertNotEqual(
       DartObjectImpl expected, DartObjectImpl left, DartObjectImpl right) {
     if (expected == null) {
@@ -1926,10 +1886,8 @@
     }
   }
 
-  /**
-   * Assert that converting the [operand] to a string is the [expected] value,
-   * or that the operation throws an exception if the expected value is `null`.
-   */
+  /// Assert that converting the [operand] to a string is the [expected] value,
+  /// or that the operation throws an exception if the expected value is `null`.
   void _assertPerformToString(DartObjectImpl expected, DartObjectImpl operand) {
     if (expected == null) {
       expect(() {
@@ -1942,11 +1900,9 @@
     }
   }
 
-  /**
-   * Assert that the result of taking the remainder of the [left] and [right]
-   * operands is the [expected] value, or that the operation throws an exception
-   * if the expected value is `null`.
-   */
+  /// Assert that the result of taking the remainder of the [left] and [right]
+  /// operands is the [expected] value, or that the operation throws an
+  /// exception if the expected value is `null`.
   void _assertRemainder(
       DartObjectImpl expected, DartObjectImpl left, DartObjectImpl right) {
     if (expected == null) {
@@ -1960,11 +1916,9 @@
     }
   }
 
-  /**
-   * Assert that the result of multiplying the [left] and [right] operands is
-   * the [expected] value, or that the operation throws an exception if the
-   * expected value is `null`.
-   */
+  /// Assert that the result of multiplying the [left] and [right] operands is
+  /// the [expected] value, or that the operation throws an exception if the
+  /// expected value is `null`.
   void _assertShiftLeft(
       DartObjectImpl expected, DartObjectImpl left, DartObjectImpl right) {
     if (expected == null) {
@@ -1978,11 +1932,9 @@
     }
   }
 
-  /**
-   * Assert that the result of multiplying the [left] and [right] operands is
-   * the [expected] value, or that the operation throws an exception if the
-   * expected value is `null`.
-   */
+  /// Assert that the result of multiplying the [left] and [right] operands is
+  /// the [expected] value, or that the operation throws an exception if the
+  /// expected value is `null`.
   void _assertShiftRight(
       DartObjectImpl expected, DartObjectImpl left, DartObjectImpl right) {
     if (expected == null) {
@@ -1996,10 +1948,8 @@
     }
   }
 
-  /**
-   * Assert that the length of the [operand] is the [expected] value, or that
-   * the operation throws an exception if the expected value is `null`.
-   */
+  /// Assert that the length of the [operand] is the [expected] value, or that
+  /// the operation throws an exception if the expected value is `null`.
   void _assertStringLength(DartObjectImpl expected, DartObjectImpl operand) {
     if (expected == null) {
       expect(() {
@@ -2012,11 +1962,9 @@
     }
   }
 
-  /**
-   * Assert that the result of multiplying the [left] and [right] operands is
-   * the [expected] value, or that the operation throws an exception if the
-   * expected value is `null`.
-   */
+  /// Assert that the result of multiplying the [left] and [right] operands is
+  /// the [expected] value, or that the operation throws an exception if the
+  /// expected value is `null`.
   void _assertTimes(
       DartObjectImpl expected, DartObjectImpl left, DartObjectImpl right) {
     if (expected == null) {
diff --git a/pkg/analyzer/test/src/dart/element/element_test.dart b/pkg/analyzer/test/src/dart/element/element_test.dart
index 06e4bb6..e4d0ac4 100644
--- a/pkg/analyzer/test/src/dart/element/element_test.dart
+++ b/pkg/analyzer/test/src/dart/element/element_test.dart
@@ -10,10 +10,10 @@
 import 'package:analyzer/dart/element/type_provider.dart';
 import 'package:analyzer/src/dart/element/element.dart';
 import 'package:analyzer/src/dart/element/type.dart';
+import 'package:analyzer/src/dart/element/type_system.dart';
 import 'package:analyzer/src/generated/engine.dart' show AnalysisContext;
 import 'package:analyzer/src/generated/testing/element_factory.dart';
 import 'package:analyzer/src/generated/testing/test_type_provider.dart';
-import 'package:analyzer/src/generated/type_system.dart';
 import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
@@ -982,9 +982,7 @@
     expect(location.encoding, encoding);
   }
 
-  /**
-   * For example unnamed constructor.
-   */
+  /// For example unnamed constructor.
   void test_create_encoding_emptyLast() {
     String encoding = "a;b;c;";
     ElementLocationImpl location = ElementLocationImpl.con2(encoding);
diff --git a/pkg/analyzer/test/src/dart/element/factor_type_test.dart b/pkg/analyzer/test/src/dart/element/factor_type_test.dart
index f3ad7cc..cfd1420 100644
--- a/pkg/analyzer/test/src/dart/element/factor_type_test.dart
+++ b/pkg/analyzer/test/src/dart/element/factor_type_test.dart
@@ -7,7 +7,7 @@
 import 'package:analyzer/dart/element/type.dart';
 import 'package:analyzer/dart/element/type_provider.dart';
 import 'package:analyzer/src/dart/element/type.dart';
-import 'package:analyzer/src/generated/resolver.dart' show TypeSystemImpl;
+import 'package:analyzer/src/dart/element/type_system.dart';
 import 'package:test/test.dart' as test;
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
diff --git a/pkg/analyzer/test/src/dart/element/flatten_type_test.dart b/pkg/analyzer/test/src/dart/element/flatten_type_test.dart
index 685c771..878bcb0 100644
--- a/pkg/analyzer/test/src/dart/element/flatten_type_test.dart
+++ b/pkg/analyzer/test/src/dart/element/flatten_type_test.dart
@@ -6,8 +6,7 @@
 import 'package:analyzer/dart/element/type.dart';
 import 'package:analyzer/dart/element/type_provider.dart';
 import 'package:analyzer/src/dart/element/type_schema.dart';
-import 'package:analyzer/src/generated/resolver.dart' show TypeSystemImpl;
-import 'package:analyzer/src/generated/type_system.dart';
+import 'package:analyzer/src/dart/element/type_system.dart';
 import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
diff --git a/pkg/analyzer/test/src/dart/element/normalize_type_test.dart b/pkg/analyzer/test/src/dart/element/normalize_type_test.dart
index 8748bf1..a687593 100644
--- a/pkg/analyzer/test/src/dart/element/normalize_type_test.dart
+++ b/pkg/analyzer/test/src/dart/element/normalize_type_test.dart
@@ -8,8 +8,8 @@
 import 'package:analyzer/dart/element/type.dart';
 import 'package:analyzer/dart/element/type_provider.dart';
 import 'package:analyzer/src/dart/element/type.dart';
+import 'package:analyzer/src/dart/element/type_system.dart';
 import 'package:analyzer/src/dart/element/type_visitor.dart';
-import 'package:analyzer/src/generated/resolver.dart' show TypeSystemImpl;
 import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
diff --git a/pkg/analyzer/test/src/dart/element/nullable_test.dart b/pkg/analyzer/test/src/dart/element/nullable_test.dart
index 94e8814..6c98f54 100644
--- a/pkg/analyzer/test/src/dart/element/nullable_test.dart
+++ b/pkg/analyzer/test/src/dart/element/nullable_test.dart
@@ -8,7 +8,7 @@
 import 'package:analyzer/dart/element/type.dart';
 import 'package:analyzer/dart/element/type_provider.dart';
 import 'package:analyzer/src/dart/element/type.dart';
-import 'package:analyzer/src/generated/resolver.dart' show TypeSystemImpl;
+import 'package:analyzer/src/dart/element/type_system.dart';
 import 'package:meta/meta.dart';
 import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
diff --git a/pkg/analyzer/test/src/dart/element/runtime_type_equality_test.dart b/pkg/analyzer/test/src/dart/element/runtime_type_equality_test.dart
index 8a1b16f..600019f 100644
--- a/pkg/analyzer/test/src/dart/element/runtime_type_equality_test.dart
+++ b/pkg/analyzer/test/src/dart/element/runtime_type_equality_test.dart
@@ -7,7 +7,7 @@
 import 'package:analyzer/dart/element/type.dart';
 import 'package:analyzer/dart/element/type_provider.dart';
 import 'package:analyzer/src/dart/element/type.dart';
-import 'package:analyzer/src/generated/resolver.dart' show TypeSystemImpl;
+import 'package:analyzer/src/dart/element/type_system.dart';
 import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
diff --git a/pkg/analyzer/test/src/dart/element/top_merge_test.dart b/pkg/analyzer/test/src/dart/element/top_merge_test.dart
index 008ed17..8dec084 100644
--- a/pkg/analyzer/test/src/dart/element/top_merge_test.dart
+++ b/pkg/analyzer/test/src/dart/element/top_merge_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/dart/analysis/features.dart';
 import 'package:analyzer/dart/element/type.dart';
 import 'package:analyzer/dart/element/type_provider.dart';
-import 'package:analyzer/src/generated/resolver.dart' show TypeSystemImpl;
+import 'package:analyzer/src/dart/element/type_system.dart';
 import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
diff --git a/pkg/analyzer/test/src/dart/element/upper_lower_bound_test.dart b/pkg/analyzer/test/src/dart/element/upper_lower_bound_test.dart
index c41a840..072e3ef 100644
--- a/pkg/analyzer/test/src/dart/element/upper_lower_bound_test.dart
+++ b/pkg/analyzer/test/src/dart/element/upper_lower_bound_test.dart
@@ -8,9 +8,8 @@
 import 'package:analyzer/dart/element/type.dart';
 import 'package:analyzer/src/dart/element/type.dart';
 import 'package:analyzer/src/dart/element/type_schema.dart';
+import 'package:analyzer/src/dart/element/type_system.dart';
 import 'package:analyzer/src/dart/element/type_visitor.dart';
-import 'package:analyzer/src/generated/resolver.dart' show TypeSystemImpl;
-import 'package:analyzer/src/generated/type_system.dart';
 import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
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 4368918..a312c17 100644
--- a/pkg/analyzer/test/src/dart/resolution/non_nullable_test.dart
+++ b/pkg/analyzer/test/src/dart/resolution/non_nullable_test.dart
@@ -4,10 +4,10 @@
 
 import 'package:analyzer/dart/analysis/features.dart';
 import 'package:analyzer/src/dart/analysis/experiments.dart';
+import 'package:analyzer/src/dart/element/type_system.dart';
 import 'package:analyzer/src/dart/error/hint_codes.dart';
 import 'package:analyzer/src/dart/error/syntactic_errors.dart';
 import 'package:analyzer/src/generated/engine.dart';
-import 'package:analyzer/src/generated/type_system.dart';
 import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
diff --git a/pkg/analyzer/test/src/dart/resolution/resolution.dart b/pkg/analyzer/test/src/dart/resolution/resolution.dart
index cf03581..63c6e6d 100644
--- a/pkg/analyzer/test/src/dart/resolution/resolution.dart
+++ b/pkg/analyzer/test/src/dart/resolution/resolution.dart
@@ -17,7 +17,7 @@
 import 'package:analyzer/src/dart/element/member.dart';
 import 'package:analyzer/src/dart/element/type.dart';
 import 'package:analyzer/src/dart/element/type_algebra.dart';
-import 'package:analyzer/src/generated/type_system.dart';
+import 'package:analyzer/src/dart/element/type_system.dart';
 import 'package:analyzer/src/test_utilities/find_element.dart';
 import 'package:analyzer/src/test_utilities/find_node.dart';
 import 'package:analyzer/src/test_utilities/resource_provider_mixin.dart';
diff --git a/pkg/analyzer/test/src/dart/resolver/exit_detector_test.dart b/pkg/analyzer/test/src/dart/resolver/exit_detector_test.dart
index 46c0d8d..d9b7c1b 100644
--- a/pkg/analyzer/test/src/dart/resolver/exit_detector_test.dart
+++ b/pkg/analyzer/test/src/dart/resolver/exit_detector_test.dart
@@ -3,7 +3,7 @@
 // BSD-style license that can be found in the LICENSE file.
 
 import 'package:analyzer/dart/ast/ast.dart';
-import 'package:analyzer/src/generated/resolver.dart';
+import 'package:analyzer/src/dart/resolver/exit_detector.dart';
 import 'package:analyzer/src/test_utilities/find_node.dart';
 import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
diff --git a/pkg/analyzer/test/src/dart/sdk/sdk_test.dart b/pkg/analyzer/test/src/dart/sdk/sdk_test.dart
index 233301b..06d671d 100644
--- a/pkg/analyzer/test/src/dart/sdk/sdk_test.dart
+++ b/pkg/analyzer/test/src/dart/sdk/sdk_test.dart
@@ -220,10 +220,8 @@
     expect(version.isNotEmpty, isTrue);
   }
 
-  /**
-   * The "part" format should result in the same source as the non-part format
-   * when the file is the library file.
-   */
+  /// The "part" format should result in the same source as the non-part format
+  /// when the file is the library file.
   void test_mapDartUri_partFormatForLibrary() {
     FolderBasedDartSdk sdk = _createDartSdk();
     Source normalSource = sdk.mapDartUri('dart:core');
@@ -231,20 +229,6 @@
     expect(partSource, normalSource);
   }
 
-  void test_useSummary_afterContextCreation() {
-    FolderBasedDartSdk sdk = _createDartSdk();
-    sdk.context;
-    expect(() {
-      sdk.useSummary = true;
-    }, throwsStateError);
-  }
-
-  void test_useSummary_beforeContextCreation() {
-    FolderBasedDartSdk sdk = _createDartSdk();
-    sdk.useSummary = true;
-    sdk.context;
-  }
-
   FolderBasedDartSdk _createDartSdk() {
     Folder sdkDirectory = getFolder('/sdk');
     _createFile(sdkDirectory,
diff --git a/pkg/analyzer/test/src/diagnostics/const_constructor_with_field_initialized_by_non_const_test.dart b/pkg/analyzer/test/src/diagnostics/const_constructor_with_field_initialized_by_non_const_test.dart
index 8ac4dfe..a8a7a79 100644
--- a/pkg/analyzer/test/src/diagnostics/const_constructor_with_field_initialized_by_non_const_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/const_constructor_with_field_initialized_by_non_const_test.dart
@@ -46,7 +46,7 @@
           CompileTimeErrorCode
               .CONST_CONSTRUCTOR_WITH_FIELD_INITIALIZED_BY_NON_CONST,
           33,
-          10),
+          5),
     ]);
   }
 
diff --git a/pkg/analyzer/test/src/diagnostics/extends_disallowed_class_test.dart b/pkg/analyzer/test/src/diagnostics/extends_disallowed_class_test.dart
index 4b6905f..8f7c596 100644
--- a/pkg/analyzer/test/src/diagnostics/extends_disallowed_class_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/extends_disallowed_class_test.dart
@@ -19,7 +19,6 @@
     await assertErrorsInCode('''
 class A extends bool {}
 ''', [
-      error(CompileTimeErrorCode.NO_DEFAULT_SUPER_CONSTRUCTOR_IMPLICIT, 6, 1),
       error(CompileTimeErrorCode.EXTENDS_DISALLOWED_CLASS, 16, 4),
     ]);
   }
@@ -63,7 +62,6 @@
     await assertErrorsInCode('''
 class A extends int {}
 ''', [
-      error(CompileTimeErrorCode.NO_DEFAULT_SUPER_CONSTRUCTOR_IMPLICIT, 6, 1),
       error(CompileTimeErrorCode.EXTENDS_DISALLOWED_CLASS, 16, 3),
     ]);
   }
@@ -72,7 +70,6 @@
     await assertErrorsInCode('''
 class A extends Null {}
 ''', [
-      error(CompileTimeErrorCode.NO_DEFAULT_SUPER_CONSTRUCTOR_IMPLICIT, 6, 1),
       error(CompileTimeErrorCode.EXTENDS_DISALLOWED_CLASS, 16, 4),
     ]);
   }
@@ -89,7 +86,6 @@
     await assertErrorsInCode('''
 class A extends String {}
 ''', [
-      error(CompileTimeErrorCode.NO_DEFAULT_SUPER_CONSTRUCTOR_IMPLICIT, 6, 1),
       error(CompileTimeErrorCode.EXTENDS_DISALLOWED_CLASS, 16, 6),
     ]);
   }
diff --git a/pkg/analyzer/test/src/diagnostics/invalid_assignment_test.dart b/pkg/analyzer/test/src/diagnostics/invalid_assignment_test.dart
index 312f892..6137d28f 100644
--- a/pkg/analyzer/test/src/diagnostics/invalid_assignment_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/invalid_assignment_test.dart
@@ -24,6 +24,18 @@
         sdkVersion: '2.7.0', additionalFeatures: [Feature.non_nullable]);
 
   @override
+  test_ifNullAssignment() async {
+    await assertErrorsInCode('''
+void f(int i) {
+  double? d;
+  d ??= i;
+}
+''', [
+      error(StaticTypeWarningCode.INVALID_ASSIGNMENT, 37, 1),
+    ]);
+  }
+
+  @override
   test_ifNullAssignment_sameType() async {
     // This test is overridden solely to make [j] nullable.
     await assertNoErrorsInCode('''
@@ -68,6 +80,22 @@
       error(StaticTypeWarningCode.INVALID_ASSIGNMENT, 37, 4),
     ]);
   }
+
+  @override
+  test_typeParameter() async {
+    // This test is overridden solely to make [value] nullable.
+    // https://github.com/dart-lang/sdk/issues/14221
+    await assertErrorsInCode(r'''
+class B<T> {
+  T? value;
+  void test(num n) {
+    value = n;
+  }
+}
+''', [
+      error(StaticTypeWarningCode.INVALID_ASSIGNMENT, 58, 1),
+    ]);
+  }
 }
 
 @reflectiveTest
@@ -102,18 +130,66 @@
   }
 
   test_defaultValue_named() async {
+    await assertErrorsInCode(r'''
+f({String x: 0}) {
+}
+''', [
+      error(StaticTypeWarningCode.INVALID_ASSIGNMENT, 13, 1),
+    ]);
+  }
+
+  test_defaultValue_named_sameType() async {
     await assertNoErrorsInCode(r'''
 f({String x: '0'}) {
 }''');
   }
 
   test_defaultValue_optional() async {
+    await assertErrorsInCode(r'''
+f([String x = 0]) {
+}''', [
+      error(StaticTypeWarningCode.INVALID_ASSIGNMENT, 14, 1),
+    ]);
+  }
+
+  test_defaultValue_optional_sameType() async {
     await assertNoErrorsInCode(r'''
 f([String x = '0']) {
 }
 ''');
   }
 
+  test_dynamic() async {
+    await assertErrorsInCode(r'''
+main() {
+  dynamic = 1;
+}
+''', [
+      error(StaticTypeWarningCode.INVALID_ASSIGNMENT, 21, 1),
+    ]);
+  }
+
+  test_functionExpressionInvocation() async {
+    await assertErrorsInCode('''
+class C {
+  String x = (() => 5)();
+}
+''', [
+      error(StaticTypeWarningCode.INVALID_ASSIGNMENT, 23, 11),
+    ]);
+  }
+
+  test_ifNullAssignment() async {
+    await assertErrorsInCode('''
+void f(int i) {
+  double d;
+  d ??= i;
+}
+''', [
+      error(StaticTypeWarningCode.INVALID_ASSIGNMENT, 36, 1),
+    ]);
+  }
+
   test_ifNullAssignment_sameType() async {
     await assertNoErrorsInCode('''
 void f(int i) {
@@ -239,6 +315,18 @@
 
   test_localVariable() async {
     await assertErrorsInCode(r'''
+f() {
+  int x;
+  x = '0';
+}
+''', [
+      error(HintCode.UNUSED_LOCAL_VARIABLE, 12, 1),
+      error(StaticTypeWarningCode.INVALID_ASSIGNMENT, 21, 3),
+    ]);
+  }
+
+  test_localVariable_promotion() async {
+    await assertErrorsInCode(r'''
 f(var y) {
   if (y is String) {
     int x = y;
@@ -251,6 +339,22 @@
   }
 
   test_postfixExpression_localVariable() async {
+    await assertErrorsInCode(r'''
+class A {
+  B operator+(_) => new B();
+}
+
+class B {}
+
+f(A a) {
+  a++;
+}
+''', [
+      error(StaticTypeWarningCode.INVALID_ASSIGNMENT, 65, 3),
+    ]);
+  }
+
+  test_postfixExpression_localVariable_sameType() async {
     await assertNoErrorsInCode(r'''
 class A {
   A operator+(_) => this;
@@ -263,6 +367,26 @@
   }
 
   test_postfixExpression_property() async {
+    await assertErrorsInCode(r'''
+class A {
+  B operator+(_) => new B();
+}
+
+class B {}
+
+class C {
+  A a = A();
+}
+
+f(C c) {
+  c.a++;
+}
+''', [
+      error(StaticTypeWarningCode.INVALID_ASSIGNMENT, 91, 5),
+    ]);
+  }
+
+  test_postfixExpression_property_sameType() async {
     await assertNoErrorsInCode(r'''
 class A {
   A operator+(_) => this;
@@ -279,6 +403,22 @@
   }
 
   test_prefixExpression_localVariable() async {
+    await assertErrorsInCode(r'''
+class A {
+  B operator+(_) => new B();
+}
+
+class B {}
+
+f(A a) {
+  ++a;
+}
+''', [
+      error(StaticTypeWarningCode.INVALID_ASSIGNMENT, 65, 3),
+    ]);
+  }
+
+  test_prefixExpression_localVariable_sameType() async {
     await assertNoErrorsInCode(r'''
 class A {
   A operator+(_) => this;
@@ -291,6 +431,26 @@
   }
 
   test_prefixExpression_property() async {
+    await assertErrorsInCode(r'''
+class A {
+  B operator+(_) => new B();
+}
+
+class B {}
+
+class C {
+  A a = A();
+}
+
+f(C c) {
+  ++c.a;
+}
+''', [
+      error(StaticTypeWarningCode.INVALID_ASSIGNMENT, 91, 5),
+    ]);
+  }
+
+  test_prefixExpression_property_sameType() async {
     await assertNoErrorsInCode(r'''
 class A {
   A operator+(_) => this;
@@ -329,9 +489,33 @@
     ]);
   }
 
+  test_regressionInIssue18468Fix() async {
+    // https://code.google.com/p/dart/issues/detail?id=18628
+    await assertErrorsInCode(r'''
+class C<T> {
+  T t = int;
+}
+''', [
+      error(StaticTypeWarningCode.INVALID_ASSIGNMENT, 21, 3),
+    ]);
+  }
+
   test_staticVariable() async {
     await assertErrorsInCode(r'''
 class A {
+  static int x = 1;
+}
+f() {
+  A.x = '0';
+}
+''', [
+      error(StaticTypeWarningCode.INVALID_ASSIGNMENT, 46, 3),
+    ]);
+  }
+
+  test_staticVariable_promoted() async {
+    await assertErrorsInCode(r'''
+class A {
   static int x = 7;
 }
 f(var y) {
@@ -344,6 +528,28 @@
     ]);
   }
 
+  test_topLevelVariableDeclaration() async {
+    await assertErrorsInCode('''
+int x = 'string';
+''', [
+      error(StaticTypeWarningCode.INVALID_ASSIGNMENT, 8, 8),
+    ]);
+  }
+
+  test_typeParameter() async {
+    // https://github.com/dart-lang/sdk/issues/14221
+    await assertErrorsInCode(r'''
+class B<T> {
+  T value;
+  void test(num n) {
+    value = n;
+  }
+}
+''', [
+      error(StaticTypeWarningCode.INVALID_ASSIGNMENT, 57, 1),
+    ]);
+  }
+
   test_typeParameterRecursion_regress35306() async {
     await assertErrorsInCode(r'''
 class A {}
@@ -363,7 +569,17 @@
   }
 
   test_variableDeclaration() async {
-    // 17971
+    await assertErrorsInCode(r'''
+class A {
+  int x = 'string';
+}
+''', [
+      error(StaticTypeWarningCode.INVALID_ASSIGNMENT, 20, 8),
+    ]);
+  }
+
+  test_variableDeclaration_overriddenOperator() async {
+    // https://github.com/dart-lang/sdk/issues/17971
     await assertErrorsInCode(r'''
 class Point {
   final num x, y;
diff --git a/pkg/analyzer/test/src/diagnostics/non_bool_condition_test.dart b/pkg/analyzer/test/src/diagnostics/non_bool_condition_test.dart
index 6f55ee1..f209280 100644
--- a/pkg/analyzer/test/src/diagnostics/non_bool_condition_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/non_bool_condition_test.dart
@@ -13,13 +13,41 @@
 main() {
   defineReflectiveSuite(() {
     defineReflectiveTests(NonBoolConditionTest);
-    defineReflectiveTests(NonBoolConditionWithConstantsTest);
     defineReflectiveTests(NonBoolConditionTest_NNBD);
   });
 }
 
 @reflectiveTest
 class NonBoolConditionTest extends DriverResolutionTest {
+  test_conditional() async {
+    await assertErrorsInCode('''
+f() { return 3 ? 2 : 1; }
+''', [
+      error(StaticTypeWarningCode.NON_BOOL_CONDITION, 13, 1),
+    ]);
+  }
+
+  test_do() async {
+    await assertErrorsInCode(r'''
+f() {
+  do {} while (3);
+}
+''', [
+      error(StaticTypeWarningCode.NON_BOOL_CONDITION, 21, 1),
+    ]);
+  }
+
+  test_for() async {
+    // https://github.com/dart-lang/sdk/issues/24713
+    await assertErrorsInCode(r'''
+f() {
+  for (;3;) {}
+}
+''', [
+      error(StaticTypeWarningCode.NON_BOOL_CONDITION, 14, 1),
+    ]);
+  }
+
   test_forElement() async {
     await assertErrorsInCode('''
 var v = [for (; 0;) 1];
@@ -28,6 +56,16 @@
     ]);
   }
 
+  test_if() async {
+    await assertErrorsInCode(r'''
+f() {
+  if (3) return 2; else return 1;
+}
+''', [
+      error(StaticTypeWarningCode.NON_BOOL_CONDITION, 12, 1),
+    ]);
+  }
+
   test_ifElement() async {
     await assertErrorsInCode('''
 var v = [if (3) 1];
@@ -35,6 +73,16 @@
       error(StaticTypeWarningCode.NON_BOOL_CONDITION, 13, 1),
     ]);
   }
+
+  test_while() async {
+    await assertErrorsInCode(r'''
+f() {
+  while (3) {}
+}
+''', [
+      error(StaticTypeWarningCode.NON_BOOL_CONDITION, 15, 1),
+    ]);
+  }
 }
 
 @reflectiveTest
@@ -67,12 +115,3 @@
     ]);
   }
 }
-
-@reflectiveTest
-class NonBoolConditionWithConstantsTest extends NonBoolConditionTest {
-  @override
-  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
-    ..contextFeatures = FeatureSet.fromEnableFlags(
-      [EnableString.constant_update_2018],
-    );
-}
diff --git a/pkg/analyzer/test/src/diagnostics/non_bool_expression_test.dart b/pkg/analyzer/test/src/diagnostics/non_bool_expression_test.dart
new file mode 100644
index 0000000..258accb
--- /dev/null
+++ b/pkg/analyzer/test/src/diagnostics/non_bool_expression_test.dart
@@ -0,0 +1,49 @@
+// Copyright (c) 2020, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/src/error/codes.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import '../dart/resolution/driver_resolution.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(NonBoolExpressionTest);
+  });
+}
+
+@reflectiveTest
+class NonBoolExpressionTest extends DriverResolutionTest {
+  test_functionType_bool() async {
+    await assertErrorsInCode(r'''
+bool makeAssertion() => true;
+f() {
+  assert(makeAssertion);
+}
+''', [
+      error(StaticTypeWarningCode.NON_BOOL_EXPRESSION, 45, 13),
+    ]);
+  }
+
+  test_functionType_int() async {
+    await assertErrorsInCode(r'''
+int makeAssertion() => 1;
+f() {
+  assert(makeAssertion);
+}
+''', [
+      error(StaticTypeWarningCode.NON_BOOL_EXPRESSION, 41, 13),
+    ]);
+  }
+
+  test_interfaceType() async {
+    await assertErrorsInCode(r'''
+f() {
+  assert(0);
+}
+''', [
+      error(StaticTypeWarningCode.NON_BOOL_EXPRESSION, 15, 1),
+    ]);
+  }
+}
diff --git a/pkg/analyzer/test/src/diagnostics/non_bool_negation_expression_test.dart b/pkg/analyzer/test/src/diagnostics/non_bool_negation_expression_test.dart
index 66db5e4..d8d9af0 100644
--- a/pkg/analyzer/test/src/diagnostics/non_bool_negation_expression_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/non_bool_negation_expression_test.dart
@@ -12,11 +12,25 @@
 
 main() {
   defineReflectiveSuite(() {
+    defineReflectiveTests(NonBoolNegationExpressionTest);
     defineReflectiveTests(NonBoolNegationExpressionTest_NNBD);
   });
 }
 
 @reflectiveTest
+class NonBoolNegationExpressionTest extends DriverResolutionTest {
+  test_nonBool() async {
+    await assertErrorsInCode(r'''
+f() {
+  !42;
+}
+''', [
+      error(StaticTypeWarningCode.NON_BOOL_NEGATION_EXPRESSION, 9, 2),
+    ]);
+  }
+}
+
+@reflectiveTest
 class NonBoolNegationExpressionTest_NNBD extends DriverResolutionTest {
   @override
   AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
diff --git a/pkg/analyzer/test/src/diagnostics/non_bool_operand_test.dart b/pkg/analyzer/test/src/diagnostics/non_bool_operand_test.dart
index 8f01e71..f322a56 100644
--- a/pkg/analyzer/test/src/diagnostics/non_bool_operand_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/non_bool_operand_test.dart
@@ -12,11 +12,55 @@
 
 main() {
   defineReflectiveSuite(() {
+    defineReflectiveTests(NonBoolOperandTest);
     defineReflectiveTests(NonBoolOperandTest_NNBD);
   });
 }
 
 @reflectiveTest
+class NonBoolOperandTest extends DriverResolutionTest {
+  test_and_left() async {
+    await assertErrorsInCode(r'''
+bool f(int left, bool right) {
+  return left && right;
+}
+''', [
+      error(StaticTypeWarningCode.NON_BOOL_OPERAND, 40, 4),
+    ]);
+  }
+
+  test_and_right() async {
+    await assertErrorsInCode(r'''
+bool f(bool left, String right) {
+  return left && right;
+}
+''', [
+      error(StaticTypeWarningCode.NON_BOOL_OPERAND, 51, 5),
+    ]);
+  }
+
+  test_or_left() async {
+    await assertErrorsInCode(r'''
+bool f(List<int> left, bool right) {
+  return left || right;
+}
+''', [
+      error(StaticTypeWarningCode.NON_BOOL_OPERAND, 46, 4),
+    ]);
+  }
+
+  test_or_right() async {
+    await assertErrorsInCode(r'''
+bool f(bool left, double right) {
+  return left || right;
+}
+''', [
+      error(StaticTypeWarningCode.NON_BOOL_OPERAND, 51, 5),
+    ]);
+  }
+}
+
+@reflectiveTest
 class NonBoolOperandTest_NNBD extends DriverResolutionTest {
   @override
   AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
diff --git a/pkg/analyzer/test/src/diagnostics/test_all.dart b/pkg/analyzer/test/src/diagnostics/test_all.dart
index 8beac00..496937e 100644
--- a/pkg/analyzer/test/src/diagnostics/test_all.dart
+++ b/pkg/analyzer/test/src/diagnostics/test_all.dart
@@ -321,6 +321,7 @@
 import 'non_abstract_class_inherits_abstract_member_test.dart'
     as non_abstract_class_inherits_abstract_member;
 import 'non_bool_condition_test.dart' as non_bool_condition;
+import 'non_bool_expression_test.dart' as non_bool_expression;
 import 'non_bool_negation_expression_test.dart' as non_bool_negation_expression;
 import 'non_bool_operand_test.dart' as non_bool_operand;
 import 'non_constant_case_expression_from_deferred_library_test.dart'
@@ -750,6 +751,7 @@
     no_default_super_constructor.main();
     non_abstract_class_inherits_abstract_member.main();
     non_bool_condition.main();
+    non_bool_expression.main();
     non_bool_negation_expression.main();
     non_bool_operand.main();
     non_constant_list_element.main();
diff --git a/pkg/analyzer/test/src/diagnostics/unnecessary_cast_test.dart b/pkg/analyzer/test/src/diagnostics/unnecessary_cast_test.dart
index da75c05..544a047 100644
--- a/pkg/analyzer/test/src/diagnostics/unnecessary_cast_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/unnecessary_cast_test.dart
@@ -5,11 +5,13 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
+import '../dart/constant/potentially_constant_test.dart';
 import '../dart/resolution/driver_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
     defineReflectiveTests(UnnecessaryCastTest);
+    defineReflectiveTests(UnnecessaryCastTestWithNullSafety);
   });
 }
 
@@ -96,24 +98,54 @@
 ''');
   }
 
-  test_function() async {
+  test_function_toSubtype_viaParameter() async {
     await assertNoErrorsInCode(r'''
-void f() {
-  Function(Null) a = (String x) {};
-  (a as Function(int))(3);
+void f(void Function(int) a) {
+  (a as void Function(num))(3);
 }
 ''');
   }
 
-  test_function2() async {
+  test_function_toSubtype_viaReturnType() async {
     await assertNoErrorsInCode(r'''
-class A {}
-
-class B<T extends A> {
-  void foo() {
-    T Function(T) f;
-    f as A Function(A);
+void f(num Function() a) {
+  (a as int Function())();
+}
+''');
   }
+
+  test_function_toSupertype_viaParameter() async {
+    await assertErrorsInCode(r'''
+void f(void Function(num) a) {
+  (a as void Function(int))(3);
+}
+''', [
+      error(HintCode.UNNECESSARY_CAST, 34, 23),
+    ]);
+  }
+
+  test_function_toSupertype_viaReturnType() async {
+    await assertErrorsInCode(r'''
+void f(int Function() a) {
+  (a as num Function())();
+}
+''', [
+      error(HintCode.UNNECESSARY_CAST, 30, 19),
+    ]);
+  }
+
+  test_function_toUnrelated() async {
+    await assertNoErrorsInCode(r'''
+void f(num Function(num) a) {
+  (a as int Function(int))(3);
+}
+''');
+  }
+
+  test_function_toUnrelated_generic() async {
+    await assertNoErrorsInCode(r'''
+void f<T extends num>(T Function(T) a) {
+  (a as int Function(int))(3);
 }
 ''');
   }
@@ -182,3 +214,41 @@
 ''');
   }
 }
+
+@reflectiveTest
+class UnnecessaryCastTestWithNullSafety extends UnnecessaryCastTest
+    with WithNullSafetyMixin {
+  test_interfaceType_star_toNone() async {
+    newFile('/test/lib/a.dart', content: r'''
+// @dart = 2.7
+int a = 0;
+''');
+
+    await assertErrorsInCode(r'''
+import 'a.dart';
+
+void f() {
+  var b = a as int;
+  b;
+}
+''', [
+      error(HintCode.UNNECESSARY_CAST, 39, 8),
+    ]);
+  }
+
+  test_interfaceType_star_toQuestion() async {
+    newFile('/test/lib/a.dart', content: r'''
+// @dart = 2.7
+int a = 0;
+''');
+
+    await assertNoErrorsInCode(r'''
+import 'a.dart';
+
+void f() {
+  var b = a as int?;
+  b;
+}
+''');
+  }
+}
diff --git a/pkg/analyzer/test/src/fasta/message_coverage_test.dart b/pkg/analyzer/test/src/fasta/message_coverage_test.dart
index 1bac940..ad28b0e 100644
--- a/pkg/analyzer/test/src/fasta/message_coverage_test.dart
+++ b/pkg/analyzer/test/src/fasta/message_coverage_test.dart
@@ -22,12 +22,10 @@
 
 @reflectiveTest
 class AbstractRecoveryTest extends FastaParserTestCase {
-  /**
-   * Given the path to the file containing the declaration of the fasta Parser,
-   * return a set containing the names of all the messages and templates that
-   * are referenced (presumably because they are being generated) within that
-   * file.
-   */
+  /// Given the path to the file containing the declaration of the fasta Parser,
+  /// return a set containing the names of all the messages and templates that
+  /// are referenced (presumably because they are being generated) within that
+  /// file.
   Set<String> getGeneratedNames(String parserPath) {
     String content = io.File(parserPath).readAsStringSync();
     CompilationUnit unit = parseCompilationUnit(content);
@@ -37,10 +35,8 @@
     return visitor.generatedNames;
   }
 
-  /**
-   * Given the path to the file 'messages.yaml', return a list of the top-level
-   * keys defined in that file that define an 'analyzerCode'.
-   */
+  /// 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) {
     String content = io.File(messagesPath).readAsStringSync();
     YamlDocument document = loadYamlDocument(content);
@@ -60,10 +56,8 @@
     return codes.toList();
   }
 
-  /**
-   * Given the path to the file 'messages.yaml', return a list of the analyzer
-   * codes defined in that file.
-   */
+  /// Given the path to the file 'messages.yaml', return a list of the analyzer
+  /// codes defined in that file.
   List<String> getReferencedCodes(String messagesPath) {
     String content = io.File(messagesPath).readAsStringSync();
     YamlDocument document = loadYamlDocument(content);
@@ -84,10 +78,8 @@
     return codes.toList();
   }
 
-  /**
-   * Given the path to the file containing the declaration of the AstBuilder,
-   * return a list of the analyzer codes that are translated by the builder.
-   */
+  /// Given the path to the file containing the declaration of the AstBuilder,
+  /// return a list of the analyzer codes that are translated by the builder.
   List<String> getTranslatedCodes(String astBuilderPath) {
     String content = io.File(astBuilderPath).readAsStringSync();
     CompilationUnit unit = parseCompilationUnit(content);
@@ -190,15 +182,11 @@
   }
 }
 
-/**
- * A visitor that gathers the names of all the message codes that are generated
- * in the visited AST. This assumes that the codes are accessed via the prefix
- * 'fasta'.
- */
+/// A visitor that gathers the names of all the message codes that are generated
+/// in the visited AST. This assumes that the codes are accessed via the prefix
+/// 'fasta'.
 class GeneratedCodesVisitor extends RecursiveAstVisitor {
-  /**
-   * The names of the message codes that are generated in the visited AST.
-   */
+  /// The names of the message codes that are generated in the visited AST.
   Set<String> generatedNames = <String>{};
 
   @override
diff --git a/pkg/analyzer/test/src/fasta/recovery/code_order_test.dart b/pkg/analyzer/test/src/fasta/recovery/code_order_test.dart
index 0958f78..78a2452 100644
--- a/pkg/analyzer/test/src/fasta/recovery/code_order_test.dart
+++ b/pkg/analyzer/test/src/fasta/recovery/code_order_test.dart
@@ -19,10 +19,8 @@
   });
 }
 
-/**
- * Test how well the parser recovers when the clauses in a class declaration are
- * out of order.
- */
+/// Test how well the parser recovers when the clauses in a class declaration
+/// are out of order.
 @reflectiveTest
 class ClassDeclarationTest extends AbstractRecoveryTest {
   void test_implementsBeforeExtends() {
@@ -106,10 +104,8 @@
   }
 }
 
-/**
- * Test how well the parser recovers when the members of a compilation unit are
- * out of order.
- */
+/// Test how well the parser recovers when the members of a compilation unit are
+/// out of order.
 @reflectiveTest
 class CompilationUnitMemberTest extends AbstractRecoveryTest {
   void test_declarationBeforeDirective_export() {
@@ -214,10 +210,8 @@
   }
 }
 
-/**
- * Test how well the parser recovers when the members of an import directive are
- * out of order.
- */
+/// Test how well the parser recovers when the members of an import directive
+/// are out of order.
 @reflectiveTest
 class ImportDirectiveTest extends AbstractRecoveryTest {
   void test_combinatorsBeforeAndAfterPrefix() {
@@ -299,9 +293,7 @@
   }
 }
 
-/**
- * Test how well the parser recovers when metadata appears in invalid places.
- */
+/// Test how well the parser recovers when metadata appears in invalid places.
 @reflectiveTest
 class MisplacedMetadataTest extends AbstractRecoveryTest {
   @failingTest
@@ -327,10 +319,8 @@
   }
 }
 
-/**
- * Test how well the parser recovers when the clauses in a mixin declaration are
- * out of order.
- */
+/// Test how well the parser recovers when the clauses in a mixin declaration
+/// are out of order.
 @reflectiveTest
 class MixinDeclarationTest extends AbstractRecoveryTest {
   void test_implementsBeforeOn() {
@@ -379,10 +369,8 @@
   }
 }
 
-/**
- * Test how well the parser recovers when the clauses in a try statement are
- * out of order.
- */
+/// Test how well the parser recovers when the clauses in a try statement are
+/// out of order.
 @reflectiveTest
 class TryStatementTest extends AbstractRecoveryTest {
   @failingTest
diff --git a/pkg/analyzer/test/src/fasta/recovery/extra_code_test.dart b/pkg/analyzer/test/src/fasta/recovery/extra_code_test.dart
index e189d2c..c1b492b 100644
--- a/pkg/analyzer/test/src/fasta/recovery/extra_code_test.dart
+++ b/pkg/analyzer/test/src/fasta/recovery/extra_code_test.dart
@@ -21,10 +21,8 @@
   });
 }
 
-/**
- * Test how well the parser recovers when annotations are included in places
- * where they are not allowed.
- */
+/// Test how well the parser recovers when annotations are included in places
+/// where they are not allowed.
 @reflectiveTest
 class AnnotationTest extends AbstractRecoveryTest {
   void test_typeArgument() {
@@ -44,9 +42,7 @@
   }
 }
 
-/**
- * Test how well the parser recovers in other cases.
- */
+/// Test how well the parser recovers in other cases.
 @reflectiveTest
 class MiscellaneousTest extends AbstractRecoveryTest {
   void test_classTypeAlias_withBody() {
@@ -153,9 +149,7 @@
   }
 }
 
-/**
- * Test how well the parser recovers when extra modifiers are provided.
- */
+/// Test how well the parser recovers when extra modifiers are provided.
 @reflectiveTest
 class ModifiersTest extends AbstractRecoveryTest {
   @failingTest
@@ -200,10 +194,8 @@
   }
 }
 
-/**
- * Test how well the parser recovers when multiple type annotations are
- * provided.
- */
+/// Test how well the parser recovers when multiple type annotations are
+/// provided.
 @reflectiveTest
 class MultipleTypeTest extends AbstractRecoveryTest {
   @failingTest
@@ -219,9 +211,7 @@
   }
 }
 
-/**
- * Test how well the parser recovers when there is extra punctuation.
- */
+/// Test how well the parser recovers when there is extra punctuation.
 @reflectiveTest
 class PunctuationTest extends AbstractRecoveryTest {
   @failingTest
@@ -310,9 +300,7 @@
   }
 }
 
-/**
- * Test how well the parser recovers when there is extra variance modifiers.
- */
+/// Test how well the parser recovers when there is extra variance modifiers.
 @reflectiveTest
 class VarianceModifierTest extends AbstractRecoveryTest {
   void test_extraModifier_inClass() {
diff --git a/pkg/analyzer/test/src/fasta/recovery/missing_code_test.dart b/pkg/analyzer/test/src/fasta/recovery/missing_code_test.dart
index ba3ae38..345e3f2 100644
--- a/pkg/analyzer/test/src/fasta/recovery/missing_code_test.dart
+++ b/pkg/analyzer/test/src/fasta/recovery/missing_code_test.dart
@@ -18,9 +18,7 @@
   });
 }
 
-/**
- * Test how well the parser recovers when tokens are missing in a list literal.
- */
+/// Test how well the parser recovers when tokens are missing in a list literal.
 @reflectiveTest
 class ListLiteralTest extends AbstractRecoveryTest {
   void test_extraComma() {
@@ -56,9 +54,7 @@
   }
 }
 
-/**
- * Test how well the parser recovers when tokens are missing in a map literal.
- */
+/// Test how well the parser recovers when tokens are missing in a map literal.
 @reflectiveTest
 class MapLiteralTest extends AbstractRecoveryTest {
   final beforeUiAsCode = FeatureSet.forTesting(sdkVersion: '2.2.0');
@@ -132,9 +128,7 @@
   }
 }
 
-/**
- * Test how well the parser recovers when non-paired tokens are missing.
- */
+/// Test how well the parser recovers when non-paired tokens are missing.
 @reflectiveTest
 class MissingCodeTest extends AbstractRecoveryTest {
   void test_ampersand() {
@@ -539,10 +533,8 @@
   }
 }
 
-/**
- * Test how well the parser recovers when tokens are missing in a parameter
- * list.
- */
+/// Test how well the parser recovers when tokens are missing in a parameter
+/// list.
 @reflectiveTest
 class ParameterListTest extends AbstractRecoveryTest {
   @failingTest
@@ -804,9 +796,7 @@
   }
 }
 
-/**
- * Test how well the parser recovers when tokens are missing in a typedef.
- */
+/// Test how well the parser recovers when tokens are missing in a typedef.
 @reflectiveTest
 class TypedefTest extends AbstractRecoveryTest {
   @failingTest
diff --git a/pkg/analyzer/test/src/fasta/recovery/paired_tokens_test.dart b/pkg/analyzer/test/src/fasta/recovery/paired_tokens_test.dart
index 0a202ed..60b0183 100644
--- a/pkg/analyzer/test/src/fasta/recovery/paired_tokens_test.dart
+++ b/pkg/analyzer/test/src/fasta/recovery/paired_tokens_test.dart
@@ -17,10 +17,8 @@
   });
 }
 
-/**
- * Test how well the parser recovers when angle brackets (`<` and `>`) are
- * mismatched.
- */
+/// Test how well the parser recovers when angle brackets (`<` and `>`) are
+/// mismatched.
 @reflectiveTest
 class AngleBracketsTest extends AbstractRecoveryTest {
   @failingTest
@@ -160,9 +158,7 @@
   }
 }
 
-/**
- * Test how well the parser recovers when curly braces are mismatched.
- */
+/// Test how well the parser recovers when curly braces are mismatched.
 @reflectiveTest
 class BracesTest extends AbstractRecoveryTest {
   void test_statement_if_last() {
@@ -238,9 +234,7 @@
   }
 }
 
-/**
- * Test how well the parser recovers when square brackets are mismatched.
- */
+/// Test how well the parser recovers when square brackets are mismatched.
 @reflectiveTest
 class BracketsTest extends AbstractRecoveryTest {
   void test_indexOperator() {
@@ -294,9 +288,7 @@
   }
 }
 
-/**
- * Test how well the parser recovers when parentheses are mismatched.
- */
+/// Test how well the parser recovers when parentheses are mismatched.
 @reflectiveTest
 class ParenthesesTest extends AbstractRecoveryTest {
   @failingTest
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 91b4cc4..9b357b4 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
@@ -14,23 +14,19 @@
 typedef AdjustValidUnitBeforeComparison = CompilationUnit Function(
     CompilationUnit unit);
 
-/**
- * A base class that adds support for tests that test how well the parser
- * recovers when the user has entered an incomplete (but otherwise correct)
- * construct (such as a top-level declaration, class member, or statement).
- *
- * Because users often add new constructs between two existing constructs, these
- * tests effectively test whether the parser is able to recognize where the
- * partially entered construct ends and where the next fully entered construct
- * begins. (The preceding construct is irrelevant.) Given the large number of
- * following constructs the are valid in most contexts, these tests are designed
- * to programmatically generate tests based on a list of possible following
- * constructs.
- */
+/// A base class that adds support for tests that test how well the parser
+/// recovers when the user has entered an incomplete (but otherwise correct)
+/// construct (such as a top-level declaration, class member, or statement).
+///
+/// Because users often add new constructs between two existing constructs,
+/// these tests effectively test whether the parser is able to recognize where
+/// the partially entered construct ends and where the next fully entered
+/// construct begins. (The preceding construct is irrelevant.) Given the large
+/// number of following constructs the are valid in most contexts, these tests
+/// are designed to programmatically generate tests based on a list of possible
+/// following constructs.
 abstract class PartialCodeTest extends AbstractRecoveryTest {
-  /**
-   * A list of suffixes that can be used by tests of class members.
-   */
+  /// A list of suffixes that can be used by tests of class members.
   static final List<TestSuffix> classMemberSuffixes = <TestSuffix>[
     TestSuffix('annotation', '@annotation var f;'),
     TestSuffix('field', 'var f;'),
@@ -42,10 +38,8 @@
     TestSuffix('setter', 'set a(b) {}')
   ];
 
-  /**
-   * A list of suffixes that can be used by tests of top-level constructs that
-   * can validly be followed by any declaration.
-   */
+  /// A list of suffixes that can be used by tests of top-level constructs that
+  /// can validly be followed by any declaration.
   static final List<TestSuffix> declarationSuffixes = <TestSuffix>[
     TestSuffix('class', 'class A {}'),
     TestSuffix('enum', 'enum E { v }'),
@@ -61,29 +55,23 @@
     TestSuffix('setter', 'set a(b) {}')
   ];
 
-  /**
-   * A list of suffixes that can be used by tests of top-level constructs that
-   * can validly be followed by anything that is valid after a part directive.
-   */
+  /// A list of suffixes that can be used by tests of top-level constructs that
+  /// can validly be followed by anything that is valid after a part directive.
   static final List<TestSuffix> postPartSuffixes = <TestSuffix>[
     TestSuffix('part', "part 'a.dart';"),
     ...declarationSuffixes
   ];
 
-  /**
-   * A list of suffixes that can be used by tests of top-level constructs that
-   * can validly be followed by any directive or declaration other than a
-   * library directive.
-   */
+  /// A list of suffixes that can be used by tests of top-level constructs that
+  /// can validly be followed by any directive or declaration other than a
+  /// library directive.
   static final List<TestSuffix> prePartSuffixes = <TestSuffix>[
     TestSuffix('import', "import 'a.dart';"),
     TestSuffix('export', "export 'a.dart';"),
     ...postPartSuffixes
   ];
 
-  /**
-   * A list of suffixes that can be used by tests of statements.
-   */
+  /// A list of suffixes that can be used by tests of statements.
   static final List<TestSuffix> statementSuffixes = <TestSuffix>[
     TestSuffix('assert', "assert (true);"),
     TestSuffix('block', "{}"),
@@ -102,14 +90,12 @@
     TestSuffix('while', "while (true) {}"),
   ];
 
-  /**
-   * Build a group of tests with the given [groupName]. There will be one test
-   * for every combination of elements in the cross-product of the lists of
-   * [descriptors] and [suffixes], and one additional test for every descriptor
-   * where the suffix is the empty string (to test partial declarations at the
-   * end of the file). In total, there will be
-   * `descriptors.length * (suffixes.length + 1)` tests generated.
-   */
+  /// Build a group of tests with the given [groupName]. There will be one test
+  /// for every combination of elements in the cross-product of the lists of
+  /// [descriptors] and [suffixes], and one additional test for every descriptor
+  /// where the suffix is the empty string (to test partial declarations at the
+  /// end of the file). In total, there will be
+  /// `descriptors.length * (suffixes.length + 1)` tests generated.
   buildTests(String groupName, List<TestDescriptor> descriptors,
       List<TestSuffix> suffixes,
       {FeatureSet featureSet,
@@ -144,9 +130,7 @@
     });
   }
 
-  /**
-   * Build a single test based on the given [descriptor] and [suffix].
-   */
+  /// Build a single test based on the given [descriptor] and [suffix].
   _buildTestForDescriptorAndSuffix(TestDescriptor descriptor, TestSuffix suffix,
       int suffixIndex, String head, String tail,
       {FeatureSet featureSet}) {
@@ -236,56 +220,36 @@
   }
 }
 
-/**
- * A description of a set of tests that are to be built.
- */
+/// A description of a set of tests that are to be built.
 class TestDescriptor {
-  /**
-   * The name of the test.
-   */
+  /// The name of the test.
   final String name;
 
-  /**
-   * Invalid code that the parser is expected to recover from.
-   */
+  /// Invalid code that the parser is expected to recover from.
   final String invalid;
 
-  /**
-   * Error codes that the parser is expected to produce.
-   */
+  /// Error codes that the parser is expected to produce.
   final List<ErrorCode> errorCodes;
 
-  /**
-   * Valid code that is equivalent to what the parser should produce as part of
-   * recovering from the invalid code.
-   */
+  /// Valid code that is equivalent to what the parser should produce as part of
+  /// recovering from the invalid code.
   final String valid;
 
-  /**
-   * Error codes that the parser is expected to produce in the valid code.
-   */
+  /// Error codes that the parser is expected to produce in the valid code.
   final List<ErrorCode> expectedErrorsInValidCode;
 
-  /**
-   * A flag indicating whether all of the tests are expected to fail.
-   */
+  /// A flag indicating whether all of the tests are expected to fail.
   final bool allFailing;
 
-  /**
-   * A list containing the names of the suffixes for which the test is expected
-   * to fail.
-   */
+  /// A list containing the names of the suffixes for which the test is expected
+  /// to fail.
   final List<String> failing;
 
-  /**
-   * A function that modifies the valid compilation unit before it is compared
-   * with the invalid compilation unit, or `null` if no modification needed.
-   */
+  /// A function that modifies the valid compilation unit before it is compared
+  /// with the invalid compilation unit, or `null` if no modification needed.
   AdjustValidUnitBeforeComparison adjustValidUnitBeforeComparison;
 
-  /**
-   * Initialize a newly created test descriptor.
-   */
+  /// Initialize a newly created test descriptor.
   TestDescriptor(this.name, this.invalid, this.errorCodes, this.valid,
       {this.allFailing = false,
       this.failing,
@@ -293,24 +257,16 @@
       this.adjustValidUnitBeforeComparison});
 }
 
-/**
- * A description of a set of suffixes that are to be used to construct tests.
- */
+/// A description of a set of suffixes that are to be used to construct tests.
 class TestSuffix {
   static final TestSuffix eof = TestSuffix('eof', '');
 
-  /**
-   * The name of the suffix.
-   */
+  /// The name of the suffix.
   final String name;
 
-  /**
-   * The code to be appended to the test code.
-   */
+  /// The code to be appended to the test code.
   final String text;
 
-  /**
-   * Initialize a newly created suffix.
-   */
+  /// Initialize a newly created suffix.
   TestSuffix(this.name, this.text);
 }
diff --git a/pkg/analyzer/test/src/fasta/recovery/recovery_test_support.dart b/pkg/analyzer/test/src/fasta/recovery/recovery_test_support.dart
index 7e26451..b00f377 100644
--- a/pkg/analyzer/test/src/fasta/recovery/recovery_test_support.dart
+++ b/pkg/analyzer/test/src/fasta/recovery/recovery_test_support.dart
@@ -12,10 +12,8 @@
 import '../../../generated/parser_fasta_test.dart';
 import '../../../generated/test_support.dart';
 
-/**
- * The base class for tests that test how well the parser recovers from various
- * syntactic errors.
- */
+/// The base class for tests that test how well the parser recovers from various
+/// syntactic errors.
 abstract class AbstractRecoveryTest extends FastaParserTestCase {
   void testRecovery(
       String invalidCode, List<ErrorCode> errorCodes, String validCode,
@@ -71,10 +69,8 @@
   }
 }
 
-/**
- * An object used to compare to AST structures and cause the test to fail if
- * they differ in any important ways.
- */
+/// An object used to compare to AST structures and cause the test to fail if
+/// they differ in any important ways.
 class ResultComparator extends AstComparator {
   @override
   bool failDifferentLength(List first, List second) {
@@ -128,10 +124,8 @@
     fail(buffer.toString());
   }
 
-  /**
-   * Overridden to allow the valid code to contain an explicit identifier where
-   * a synthetic identifier is expected to be inserted by recovery.
-   */
+  /// Overridden to allow the valid code to contain an explicit identifier where
+  /// a synthetic identifier is expected to be inserted by recovery.
   @override
   bool isEqualNodes(AstNode first, AstNode second) {
     if (first is SimpleIdentifier && second is SimpleIdentifier) {
@@ -142,10 +136,8 @@
     return super.isEqualNodes(first, second);
   }
 
-  /**
-   * Overridden to ignore the offsets of tokens because these can legitimately
-   * be different.
-   */
+  /// Overridden to ignore the offsets of tokens because these can legitimately
+  /// be different.
   @override
   bool isEqualTokensNotNull(Token first, Token second) =>
       (first.isSynthetic && first.type == second.type) ||
@@ -169,10 +161,8 @@
     buffer.write(node.runtimeType);
   }
 
-  /**
-   * Compare the [actual] and [expected] nodes, failing the test if they are
-   * different.
-   */
+  /// Compare the [actual] and [expected] nodes, failing the test if they are
+  /// different.
   static void compare(AstNode actual, AstNode expected) {
     ResultComparator comparator = ResultComparator();
     if (!comparator.isEqualNodes(actual, expected)) {
diff --git a/pkg/analyzer/test/src/manifest/manifest_validator_test.dart b/pkg/analyzer/test/src/manifest/manifest_validator_test.dart
index 064d487..717cf1f 100644
--- a/pkg/analyzer/test/src/manifest/manifest_validator_test.dart
+++ b/pkg/analyzer/test/src/manifest/manifest_validator_test.dart
@@ -22,10 +22,8 @@
 class ManifestValidatorTest with ResourceProviderMixin {
   ManifestValidator validator;
 
-  /**
-   * Assert that when the validator is used on the given [content] the
-   * [expectedErrorCodes] are produced.
-   */
+  /// Assert that when the validator is used on the given [content] the
+  /// [expectedErrorCodes] are produced.
   void assertErrors(String content, List<ErrorCode> expectedErrorCodes) {
     List<AnalysisError> errors = validator.validate(content, true);
     GatheringErrorListener listener = GatheringErrorListener();
@@ -33,10 +31,8 @@
     listener.assertErrorsWithCodes(expectedErrorCodes);
   }
 
-  /**
-   * Assert that when the validator is used on the given [content] no errors are
-   * produced.
-   */
+  /// Assert that when the validator is used on the given [content] no errors
+  /// are produced.
   void assertNoErrors(String content) {
     assertErrors(content, []);
   }
diff --git a/pkg/analyzer/test/src/options/options_rule_validator_test.dart b/pkg/analyzer/test/src/options/options_rule_validator_test.dart
index 9586500..2c04a4e 100644
--- a/pkg/analyzer/test/src/options/options_rule_validator_test.dart
+++ b/pkg/analyzer/test/src/options/options_rule_validator_test.dart
@@ -32,10 +32,8 @@
   LinterRuleOptionsValidator validator = LinterRuleOptionsValidator(
       provider: () => [DeprecatedLint(), StableLint(), RuleNeg(), RulePos()]);
 
-/**
- * Assert that when the validator is used on the given [content] the
- * [expectedErrorCodes] are produced.
- */
+  /// Assert that when the validator is used on the given [content] the
+  /// [expectedErrorCodes] are produced.
   void assertErrors(String content, List<ErrorCode> expectedErrorCodes) {
     GatheringErrorListener listener = GatheringErrorListener();
     ErrorReporter reporter = ErrorReporter(
diff --git a/pkg/analyzer/test/src/pubspec/pubspec_validator_test.dart b/pkg/analyzer/test/src/pubspec/pubspec_validator_test.dart
index 509b3b4..cf3dda7 100644
--- a/pkg/analyzer/test/src/pubspec/pubspec_validator_test.dart
+++ b/pkg/analyzer/test/src/pubspec/pubspec_validator_test.dart
@@ -23,10 +23,8 @@
 class PubspecValidatorTest with ResourceProviderMixin {
   PubspecValidator validator;
 
-  /**
-   * Assert that when the validator is used on the given [content] the
-   * [expectedErrorCodes] are produced.
-   */
+  /// Assert that when the validator is used on the given [content] the
+  /// [expectedErrorCodes] are produced.
   void assertErrors(String content, List<ErrorCode> expectedErrorCodes) {
     YamlNode node = loadYamlNode(content);
     if (node is! YamlMap) {
@@ -39,10 +37,8 @@
     listener.assertErrorsWithCodes(expectedErrorCodes);
   }
 
-  /**
-   * Assert that when the validator is used on the given [content] no errors are
-   * produced.
-   */
+  /// Assert that when the validator is used on the given [content] no errors
+  /// are produced.
   void assertNoErrors(String content) {
     assertErrors(content, []);
   }
diff --git a/pkg/analyzer/test/src/summary/element_text.dart b/pkg/analyzer/test/src/summary/element_text.dart
index ab54d35..951af04 100644
--- a/pkg/analyzer/test/src/summary/element_text.dart
+++ b/pkg/analyzer/test/src/summary/element_text.dart
@@ -16,25 +16,17 @@
 
 import 'resolved_ast_printer.dart';
 
-/**
- * Set this path to automatically replace expectations in invocations of
- * [checkElementText] with the new actual texts.
- */
+/// Set this path to automatically replace expectations in invocations of
+/// [checkElementText] with the new actual texts.
 const String _testPath = null;
 
-/**
- * The list of replacements that update expectations.
- */
+/// The list of replacements that update expectations.
 final List<_Replacement> _replacements = [];
 
-/**
- * The cached content of the file with the [_testPath].
- */
+/// The cached content of the file with the [_testPath].
 String _testCode;
 
-/**
- * The cache line information for the [_testPath] file.
- */
+/// The cache line information for the [_testPath] file.
 LineInfo _testCodeLines;
 
 void applyCheckElementTextReplacements() {
@@ -49,11 +41,9 @@
   }
 }
 
-/**
- * Write the given [library] elements into the canonical text presentation
- * taking into account the specified 'withX' options. Then compare the
- * actual text with the given [expected] one.
- */
+/// Write the given [library] elements into the canonical text presentation
+/// taking into account the specified 'withX' options. Then compare the
+/// actual text with the given [expected] one.
 void checkElementText(
   LibraryElement library,
   String expected, {
@@ -135,9 +125,7 @@
   expect(actualText, expected);
 }
 
-/**
- * Writes the canonical text presentation of elements.
- */
+/// Writes the canonical text presentation of elements.
 class _ElementWriter {
   final String selfUriStr;
   final bool withCodeRanges;
diff --git a/pkg/analyzer/test/src/summary/resynthesize_common.dart b/pkg/analyzer/test/src/summary/resynthesize_common.dart
index 8836488..0380e45 100644
--- a/pkg/analyzer/test/src/summary/resynthesize_common.dart
+++ b/pkg/analyzer/test/src/summary/resynthesize_common.dart
@@ -20,11 +20,9 @@
 import 'element_text.dart';
 import 'test_strategies.dart';
 
-/**
- * Abstract base class for resynthesizing and comparing elements.
- *
- * The return type separator: →
- */
+/// Abstract base class for resynthesizing and comparing elements.
+///
+/// The return type separator: →
 abstract class AbstractResynthesizeTest with ResourceProviderMixin {
   DeclaredVariables declaredVariables = DeclaredVariables();
   SourceFactory sourceFactory;
@@ -34,10 +32,8 @@
   Source testSource;
   Set<Source> otherLibrarySources = <Source>{};
 
-  /**
-   * Tests may set this to `true` to indicate that a missing file at the time of
-   * summary resynthesis shouldn't trigger an error.
-   */
+  /// Tests may set this to `true` to indicate that a missing file at the time
+  /// of summary resynthesis shouldn't trigger an error.
   bool allowMissingFiles = false;
 
   AbstractResynthesizeTest() {
@@ -6941,6 +6937,15 @@
     expect(typeA.element.source.shortName, 'foo_html.dart');
   }
 
+  test_import_dartCore_implicit() async {
+    var library = await checkLibrary('''
+import 'dart:math';
+''');
+    expect(library.imports, hasLength(2));
+    expect(library.imports[0].uri, 'dart:math');
+    expect(library.imports[1].uri, 'dart:core');
+  }
+
   test_import_deferred() async {
     addLibrarySource('/a.dart', 'f() {}');
     var library = await checkLibrary('''
diff --git a/pkg/analyzer/test/src/summary/top_level_inference_test.dart b/pkg/analyzer/test/src/summary/top_level_inference_test.dart
index 7b2e7bf..577c790 100644
--- a/pkg/analyzer/test/src/summary/top_level_inference_test.dart
+++ b/pkg/analyzer/test/src/summary/top_level_inference_test.dart
@@ -542,12 +542,10 @@
 ''');
   }
 
-  /**
-   * A simple or qualified identifier referring to a top level function, static
-   * variable, field, getter; or a static class variable, static getter or
-   * method; or an instance method; has the inferred type of the identifier.
-   *
-   */
+  /// A simple or qualified identifier referring to a top level function, static
+  /// variable, field, getter; or a static class variable, static getter or
+  /// method; or an instance method; has the inferred type of the identifier.
+  ///
   test_initializer_classField_useInstanceGetter() async {
     var library = await _encodeDecodeLibrary(r'''
 class A {
diff --git a/pkg/analyzer/test/src/task/strong/inferred_type_test.dart b/pkg/analyzer/test/src/task/strong/inferred_type_test.dart
index fde389d..907bbea 100644
--- a/pkg/analyzer/test/src/task/strong/inferred_type_test.dart
+++ b/pkg/analyzer/test/src/task/strong/inferred_type_test.dart
@@ -22,10 +22,8 @@
 
 @reflectiveTest
 class InferredTypeTest extends AbstractStrongTest {
-  /**
-   * Add the file, process it (resolve, validate, etc) and return the resolved
-   * unit element.
-   */
+  /// Add the file, process it (resolve, validate, etc) and return the resolved
+  /// unit element.
   Future<CompilationUnitElement> checkFileElement(String content) async {
     CompilationUnit unit = await checkFile(content);
     return unit.declaredElement;
diff --git a/pkg/analyzer/test/utils.dart b/pkg/analyzer/test/utils.dart
index e7743c0..5dce8862 100644
--- a/pkg/analyzer/test/utils.dart
+++ b/pkg/analyzer/test/utils.dart
@@ -10,10 +10,8 @@
 import 'package:analyzer/src/generated/testing/element_search.dart';
 import 'package:test/test.dart';
 
-/**
- * Search the [unit] for the [LocalVariableElement] with the given [name].
- * Fail if there is not exactly one such variable.
- */
+/// Search the [unit] for the [LocalVariableElement] with the given [name].
+/// Fail if there is not exactly one such variable.
 FunctionElement findLocalFunction(CompilationUnit unit, String name) {
   List<Element> elements = findElementsByName(unit, name);
   List<Element> functions = elements.whereType<FunctionElement>().toList();
@@ -21,10 +19,8 @@
   return functions[0];
 }
 
-/**
- * Search the [unit] for the [LocalVariableElement] with the given [name].
- * Fail if there is not exactly one such variable.
- */
+/// Search the [unit] for the [LocalVariableElement] with the given [name].
+/// Fail if there is not exactly one such variable.
 LocalVariableElement findLocalVariable(CompilationUnit unit, String name) {
   List<Element> elements = findElementsByName(unit, name);
   List<Element> localVariables =
@@ -49,10 +45,8 @@
 typedef AsserterBuilderBuilder<R, S, T> = AsserterBuilder<S, T> Function(R arg);
 
 class AstFinder {
-  /**
-   * Return the declaration of the class with the given [className] in the given
-   * compilation [unit].
-   */
+  /// Return the declaration of the class with the given [className] in the
+  /// given compilation [unit].
   static ClassDeclaration getClass(CompilationUnit unit, String className) {
     NodeList<CompilationUnitMember> unitMembers = unit.declarations;
     for (CompilationUnitMember unitMember in unitMembers) {
@@ -64,11 +58,9 @@
     fail('No class named $className in $source');
   }
 
-  /**
-   * Return the declaration of the constructor with the given [constructorName] in
-   * the class with the given [className] in the given compilation [unit].  If
-   * constructorName is null, return the default constructor;
-   */
+  /// Return the declaration of the constructor with the given [constructorName]
+  /// in the class with the given [className] in the given compilation [unit].
+  /// If constructorName is null, return the default constructor;
   static ConstructorDeclaration getConstructorInClass(
       CompilationUnit unit, String className, String constructorName) {
     ClassDeclaration unitMember = getClass(unit, className);
@@ -83,10 +75,8 @@
     fail('No constructor named $constructorName in $className');
   }
 
-  /**
-   * Return the declaration of the field with the given [fieldName] in the class
-   * with the given [className] in the given compilation [unit].
-   */
+  /// Return the declaration of the field with the given [fieldName] in the
+  /// class with the given [className] in the given compilation [unit].
   static VariableDeclaration getFieldInClass(
       CompilationUnit unit, String className, String fieldName) {
     ClassDeclaration unitMember = getClass(unit, className);
@@ -104,19 +94,15 @@
     fail('No field named $fieldName in $className');
   }
 
-  /**
-   * Return the element of the field with the given [fieldName] in the class
-   * with the given [className] in the given compilation [unit].
-   */
+  /// Return the element of the field with the given [fieldName] in the class
+  /// with the given [className] in the given compilation [unit].
   static FieldElement getFieldInClassElement(
       CompilationUnit unit, String className, String fieldName) {
     return getFieldInClass(unit, className, fieldName)?.name?.staticElement;
   }
 
-  /**
-   * Return the declaration of the method with the given [methodName] in the
-   * class with the given [className] in the given compilation [unit].
-   */
+  /// Return the declaration of the method with the given [methodName] in the
+  /// class with the given [className] in the given compilation [unit].
   static MethodDeclaration getMethodInClass(
       CompilationUnit unit, String className, String methodName) {
     ClassDeclaration unitMember = getClass(unit, className);
@@ -131,11 +117,9 @@
     fail('No method named $methodName in $className');
   }
 
-  /**
-   * Return the statements in the body of a the method with the given
-   * [methodName] in the class with the given [className] in the given
-   * compilation [unit].
-   */
+  /// Return the statements in the body of a the method with the given
+  /// [methodName] in the class with the given [className] in the given
+  /// compilation [unit].
   static List<Statement> getStatementsInMethod(
       CompilationUnit unit, String className, String methodName) {
     MethodDeclaration method = getMethodInClass(unit, className, methodName);
@@ -143,10 +127,8 @@
     return body.block.statements;
   }
 
-  /**
-   * Return the statements in the body of the top-level function with the given
-   * [functionName] in the given compilation [unit].
-   */
+  /// Return the statements in the body of the top-level function with the given
+  /// [functionName] in the given compilation [unit].
   static List<Statement> getStatementsInTopLevelFunction(
       CompilationUnit unit, String functionName) {
     FunctionDeclaration function = getTopLevelFunction(unit, functionName);
@@ -154,10 +136,8 @@
     return body.block.statements;
   }
 
-  /**
-   * Return the declaration of the top-level function with the given
-   * [functionName] in the given compilation [unit].
-   */
+  /// Return the declaration of the top-level function with the given
+  /// [functionName] in the given compilation [unit].
   static FunctionDeclaration getTopLevelFunction(
       CompilationUnit unit, String functionName) {
     NodeList<CompilationUnitMember> unitMembers = unit.declarations;
@@ -171,10 +151,8 @@
     fail('No toplevel function named $functionName found');
   }
 
-  /**
-   * Return the declaration of the top-level variable with the given
-   * [variableName] in the given compilation [unit].
-   */
+  /// Return the declaration of the top-level variable with the given
+  /// [variableName] in the given compilation [unit].
   static VariableDeclaration getTopLevelVariable(
       CompilationUnit unit, String variableName) {
     NodeList<CompilationUnitMember> unitMembers = unit.declarations;
@@ -192,79 +170,53 @@
     fail('No toplevel variable named $variableName found');
   }
 
-  /**
-   * Return the top-level variable element with the given [name].
-   */
+  /// Return the top-level variable element with the given [name].
   static TopLevelVariableElement getTopLevelVariableElement(
       CompilationUnit unit, String name) {
     return getTopLevelVariable(unit, name)?.name?.staticElement;
   }
 }
 
-/**
- * Class for compositionally building up assertions on types
- */
+/// Class for compositionally building up assertions on types
 class TypeAssertions {
   // TODO(leafp): Make these matchers.
   // https://pub.dev/documentation/matcher/latest/matcher/Matcher-class.html
 
-  /**
-   * Provides primitive types for basic type assertions.
-   */
+  /// Provides primitive types for basic type assertions.
   final TypeProvider _typeProvider;
 
   TypeAssertions(this._typeProvider);
 
-  /**
-   * Primitive assertion for the dynamic type
-   */
+  /// Primitive assertion for the dynamic type
   Asserter<DartType> get isDynamic => isType(_typeProvider.dynamicType);
 
-  /**
-   * Primitive assertion for the int type
-   */
+  /// Primitive assertion for the int type
   Asserter<DartType> get isInt => isType(_typeProvider.intType);
 
-  /**
-   * Primitive assertion for the list type
-   */
+  /// Primitive assertion for the list type
   Asserter<DartType> get isList => hasElement(_typeProvider.listElement);
 
-  /**
-   * Primitive assertion for the map type
-   */
+  /// Primitive assertion for the map type
   Asserter<DartType> get isMap => hasElement(_typeProvider.mapElement);
 
-  /**
-   * Primitive assertion for the Null type
-   */
+  /// Primitive assertion for the Null type
   Asserter<DartType> get isNull => isType(_typeProvider.nullType);
 
-  /**
-   * Primitive assertion for the num type
-   */
+  /// Primitive assertion for the num type
   Asserter<DartType> get isNum => isType(_typeProvider.numType);
 
-  /**
-   * Primitive assertion for the Object type
-   */
+  /// Primitive assertion for the Object type
   Asserter<DartType> get isObject => isType(_typeProvider.objectType);
 
-  /**
-   * Primitive assertion for the string type
-   */
+  /// Primitive assertion for the string type
   Asserter<DartType> get isString => isType(_typeProvider.stringType);
 
-  /**
-   * Assert that a type has the element that is equal to the [expected].
-   */
+  /// Assert that a type has the element that is equal to the [expected].
   Asserter<DartType> hasElement(Element expected) =>
       (DartType type) => expect(expected, type.element);
 
-  /**
-   * Given assertions for the argument and return types, produce an
-   *  assertion over unary function types.
-   */
+  /// Given assertions for the argument and return types, produce an
+  /// assertion over unary function types.
   Asserter<DartType> isFunction2Of(
           Asserter<DartType> argType, Asserter<DartType> returnType) =>
       (DartType type) {
@@ -273,10 +225,8 @@
         returnType(fType.returnType);
       };
 
-  /**
-   * Given an assertion for the base type and assertions over the type
-   * parameters, produce an assertion over instantiations.
-   */
+  /// Given an assertion for the base type and assertions over the type
+  /// parameters, produce an assertion over instantiations.
   AsserterBuilder<List<Asserter<DartType>>, DartType> isInstantiationOf(
           Asserter<DartType> baseAssert) =>
       (List<Asserter<DartType>> argAsserts) => (DartType type) {
@@ -289,24 +239,18 @@
             }
           };
 
-  /**
-   * Assert that a type is the List type, and that the given assertion holds
-   * over the type parameter.
-   */
+  /// Assert that a type is the List type, and that the given assertion holds
+  /// over the type parameter.
   Asserter<InterfaceType> isListOf(Asserter<DartType> argAssert) =>
       isInstantiationOf(isList)([argAssert]);
 
-  /**
-   * Assert that a type is the Map type, and that the given assertions hold
-   * over the type parameters.
-   */
+  /// Assert that a type is the Map type, and that the given assertions hold
+  /// over the type parameters.
   Asserter<InterfaceType> isMapOf(
           Asserter<DartType> argAssert0, Asserter<DartType> argAssert1) =>
       isInstantiationOf(isMap)([argAssert0, argAssert1]);
 
-  /**
-   * Assert that a type is equal to the [expected].
-   */
+  /// Assert that a type is equal to the [expected].
   Asserter<DartType> isType(DartType expected) => (DartType t) {
         expect(t, expected);
       };
diff --git a/pkg/analyzer/tool/diagnostics/diagnostics.md b/pkg/analyzer/tool/diagnostics/diagnostics.md
index 59b565b..88b7aee 100644
--- a/pkg/analyzer/tool/diagnostics/diagnostics.md
+++ b/pkg/analyzer/tool/diagnostics/diagnostics.md
@@ -46,7 +46,7 @@
 
 * Annotations
 
-* The expression in a case clause. Example:
+* The expression in a `case` clause. Example:
 
   ```dart
   void f(int e) {
@@ -62,9 +62,9 @@
 A type is _potentially non-nullable_ if it's either explicitly non-nullable or
 if it's a type parameter.
 
-A type is explicitly non-nullable if it is a type name that is not followed by a
+A type is explicitly non-nullable if it is a type name that isn't followed by a
 question mark. Note that there are a few types that are always nullable, such as
-`Null` and `dynamic`, and that `FutureOr` is only non-nullable if it is not
+`Null` and `dynamic`, and that `FutureOr` is only non-nullable if it isn't
 followed by a question mark _and_ the type argument is non-nullable (such as
 `FutureOr<String>`).
 
@@ -94,7 +94,7 @@
 The following code produces this diagnostic because `B` doesn't inherit a
 concrete implementation of `a`:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 abstract class A {
   int get a;
 }
@@ -133,7 +133,7 @@
 The following code produces this diagnostic because there's no way to
 choose between the member in `E1` and the member in `E2`:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 extension E1 on String {
   int get charCount => 1;
 }
@@ -154,7 +154,7 @@
 If you need both, then explicitly select the one you want to use by using
 an extension override:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 extension E1 on String {
   int get charCount => length;
 }
@@ -181,21 +181,21 @@
 
 Given a library (`a.dart`) that defines a class (`C` in this example):
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 class A {}
 class C {}
 {% endprettify %}
 
 And a library (`b.dart`) that defines a different class with the same name:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 class B {}
 class C {}
 {% endprettify %}
 
 The following code produces this diagnostic:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 import 'a.dart';
 import 'b.dart';
 
@@ -207,7 +207,7 @@
 If any of the libraries aren't needed, then remove the import directives
 for them:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 import 'a.dart';
 
 void f(C c1, C c2) {}
@@ -216,7 +216,7 @@
 If the name is still defined by more than one library, then add a `hide`
 clause to the import directives for all except one library:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 import 'a.dart' hide C;
 import 'b.dart';
 
@@ -227,7 +227,7 @@
 prefix to each of the import directives, and qualify the references with
 the appropriate prefix:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 import 'a.dart' as a;
 import 'b.dart' as b;
 
@@ -258,7 +258,7 @@
 
 The following code produces this diagnostic:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 union(Map<String, String> a, List<String> b, Map<String, String> c) =>
     [!{...a, ...b, ...c}!];
 {% endprettify %}
@@ -273,7 +273,7 @@
 consistent. In this case, that likely means removing the list and deciding
 what to do about the now unused parameter:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 union(Map<String, String> a, List<String> b, Map<String, String> c) =>
     {...a, ...c};
 {% endprettify %}
@@ -282,7 +282,7 @@
 consistent with the other elements. For example, you can add the elements
 of the list as keys that map to themselves:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 union(Map<String, String> a, List<String> b, Map<String, String> c) =>
     {...a, for (String s in b) s: s, ...c};
 {% endprettify %}
@@ -310,7 +310,7 @@
 
 The following code produces this diagnostic:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 union(a, b) => [!{...a, ...b}!];
 {% endprettify %}
 
@@ -323,7 +323,7 @@
 arguments to the literal. For example, if the literal is intended to be a
 map literal, you might write something like this:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 union(a, b) => <String, String>{...a, ...b};
 {% endprettify %}
 
@@ -331,21 +331,21 @@
 either the type `Iterable` or the type `Map`. You can add an explicit cast
 or, in this case, add types to the declarations of the two parameters:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 union(List<int> a, List<int> b) => {...a, ...b};
 {% endprettify %}
 
 The third fix is to add context information. In this case, that means
 adding a return type to the function:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 Set<String> union(a, b) => {...a, ...b};
 {% endprettify %}
 
 In other cases, you might add a type somewhere else. For example, say the
 original code looks like this:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 union(a, b) {
   var x = [!{...a, ...b}!];
   return x;
@@ -354,7 +354,7 @@
 
 You might add a type annotation on `x`, like this:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 union(a, b) {
   Map<String, String> x = {...a, ...b};
   return x;
@@ -375,7 +375,7 @@
 The following code produces this diagnostic because a `num` can't be
 assigned to a `String`:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 String f(String x) => x;
 String g(num y) => f([!y!]);
 {% endprettify %}
@@ -385,7 +385,7 @@
 If possible, rewrite the code so that the static type is assignable. In the
 example above you might be able to change the type of the parameter `y`:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 String f(String x) => x;
 String g(String y) => f(y);
 {% endprettify %}
@@ -394,14 +394,14 @@
 argument value isn't the required type. One approach is to coerce other
 types to the required type:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 String f(String x) => x;
 String g(num y) => f(y.toString());
 {% endprettify %}
 
 Another approach is to add explicit type tests and fallback code:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 String f(String x) => x;
 String g(num y) => f(y is String ? y : '');
 {% endprettify %}
@@ -410,7 +410,7 @@
 same as the static type of the parameter, and you're willing to risk having
 an exception thrown at runtime if you're wrong, then add an explicit cast:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 String f(String x) => x;
 String g(num y) => f(y as String);
 {% endprettify %}
@@ -429,7 +429,7 @@
 
 The following code produces this diagnostic because `v` is final:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 class C {
   final v = 0;
 }
@@ -444,7 +444,7 @@
 If you need to be able to set the value of the field, then remove the
 modifier `final` from the field:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 class C {
   int v = 0;
 }
@@ -468,7 +468,7 @@
 The following code produces this diagnostic because `x` is final, so it
 can't have a value assigned to it after it was initialized:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 void f() {
   final x = 0;
   [!x!] = 3;
@@ -481,7 +481,7 @@
 Remove the keyword `final`, and replace it with `var` if there's no type
 annotation:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 void f() {
   var x = 0;
   x = 3;
@@ -504,7 +504,7 @@
 The following code produces this diagnostic because there is no setter
 named `x` in `C`, but there is a getter named `x`:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 class C {
   int get x => 0;
   set y(int p) {}
@@ -519,7 +519,7 @@
 
 If you want to invoke an existing setter, then correct the name:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 class C {
   int get x => 0;
   set y(int p) {}
@@ -533,7 +533,7 @@
 If you want to invoke the setter but it just doesn't exist yet, then
 declare it:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 class C {
   int get x => 0;
   set x(int p) {}
@@ -559,7 +559,7 @@
 The following code produces this diagnostic because `f` can't be assigned a
 value because it's a method:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 class C {
   void f() {}
 
@@ -591,7 +591,7 @@
 implicit return of `null` inserted at the end of the method, but the method
 is declared to not return `null`:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 class C {
   int [!m!](int t) {
     print(t);
@@ -604,7 +604,7 @@
 the class `C` can be instantiated with a non-nullable type argument, the
 method is effectively declared to not return `null`:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 class C<T> {
   T [!m!](T t) {
     print(t);
@@ -614,10 +614,10 @@
 
 #### Common fixes
 
-If there's a reasonable value that can be returned, then add a return
+If there's a reasonable value that can be returned, then add a `return`
 statement at the end of the method:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 class C<T> {
   T m(T t) {
     print(t);
@@ -626,10 +626,10 @@
 }
 {% endprettify %}
 
-If the method won't reach the implicit return, then add a throw at the end
-of the method:
+If the method won't reach the implicit return, then add a `throw` at the
+end of the method:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 class C<T> {
   T m(T t) {
     print(t);
@@ -641,7 +641,7 @@
 If the method intentionally returns `null` at the end, then change the
 return type so that it's valid to return `null`:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 class C<T> {
   T? m(T t) {
     print(t);
@@ -663,7 +663,7 @@
 The following code produces this diagnostic because `mixin` is a built-in
 identifier:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 extension [!mixin!] on int {}
 {% endprettify %}
 
@@ -685,7 +685,7 @@
 The following code produces this diagnostic because `import` can't be used
 as a type because it's a built-in identifier:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 [!import!]<int> x;
 {% endprettify %}
 
@@ -693,7 +693,7 @@
 
 Replace the built-in identifier with the name of a valid type:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 List<int> x;
 {% endprettify %}
 
@@ -704,16 +704,16 @@
 
 #### Description
 
-The analyzer produces this diagnostic when the last statement in a case
+The analyzer produces this diagnostic when the last statement in a `case`
 block isn't one of the required terminators: `break`, `continue`,
 `rethrow`, `return`, or `throw`.
 
 #### Examples
 
-The following code produces this diagnostic because the case block ends
+The following code produces this diagnostic because the `case` block ends
 with an assignment:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 void f(int x) {
   switch (x) {
     [!case!] 0:
@@ -728,7 +728,7 @@
 
 Add one of the required terminators:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 void f(int x) {
   switch (x) {
     case 0:
@@ -748,15 +748,15 @@
 #### Description
 
 The analyzer produces this diagnostic when the expression following `case`
-in a switch statement has a static type that isn't a subtype of the static
-type of the expression following `switch`.
+in a `switch` statement has a static type that isn't a subtype of the
+static type of the expression following `switch`.
 
 #### Example
 
 The following code produces this diagnostic because `1` is an `int`, which
 isn't a subtype of `String` (the type of `s`):
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 void f(String s) {
   switch (s) {
     case [!1!]:
@@ -767,10 +767,10 @@
 
 #### Common fixes
 
-If the value of the case expression is wrong, then change the case
+If the value of the `case` expression is wrong, then change the `case`
 expression so that it has the required type:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 void f(String s) {
   switch (s) {
     case '1':
@@ -779,10 +779,10 @@
 }
 {% endprettify %}
 
-If the value of the case expression is correct, then change the switch
+If the value of the `case` expression is correct, then change the `switch`
 expression to have the required type:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 void f(int s) {
   switch (s) {
     case 1:
@@ -805,7 +805,7 @@
 The following code produces this diagnostic because `x` is a variable, not
 a type:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 num x = 0;
 int y = x as [!x!];
 {% endprettify %}
@@ -814,7 +814,7 @@
 
 Replace the name with the name of a type:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 num x = 0;
 int y = x as int;
 {% endprettify %}
@@ -834,7 +834,7 @@
 The following code produces this diagnostic because `m` is an abstract
 method but `C` isn't an abstract class:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 class C {
   [!void m();!]
 }
@@ -845,7 +845,7 @@
 If it's valid to create instances of the class, provide an implementation
 for the member:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 class C {
   void m() {}
 }
@@ -854,7 +854,7 @@
 If it isn't valid to create instances of the class, mark the class as being
 abstract:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 abstract class C {
   void m();
 }
@@ -875,7 +875,7 @@
 The following code produces this diagnostic because the runtime type of `i`
 is `int`, which can't be assigned to the static type of `s`:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 class C {
   final String s;
 
@@ -893,7 +893,7 @@
 
 Pass a value of the correct type to the constructor:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 class C {
   final String s;
 
@@ -922,7 +922,7 @@
 The following code produces this diagnostic because the field `x` isn't
 final:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 class C {
   int x;
 
@@ -934,7 +934,7 @@
 
 If it's possible to mark all of the fields as final, then do so:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 class C {
   final int x;
 
@@ -945,7 +945,7 @@
 If it isn't possible to mark all of the fields as final, then remove the
 keyword `const` from the constructor:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 class C {
   int x;
 
@@ -968,7 +968,7 @@
 The following code produces this diagnostic because `x` isn't declared to
 be `const`:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 var x = 0;
 const y = [!x!];
 {% endprettify %}
@@ -978,7 +978,7 @@
 If the value being assigned can be declared to be `const`, then change the
 declaration:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 const x = 0;
 const y = x;
 {% endprettify %}
@@ -986,7 +986,7 @@
 If the value can't be declared to be `const`, then remove the `const`
 modifier from the variable, possibly using `final` in its place:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 var x = 0;
 final y = x;
 {% endprettify %}
@@ -1005,7 +1005,7 @@
 The following code produces this diagnostic because `f` is an instance
 field:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 class C {
   [!const!] int f = 3;
 }
@@ -1016,7 +1016,7 @@
 If the field needs to be an instance field, then remove the keyword
 `const`, or replace it with `final`:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 class C {
   final int f = 3;
 }
@@ -1024,7 +1024,7 @@
 
 If the field really should be a const field, then make it a static field:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 class C {
   static const int f = 3;
 }
@@ -1043,7 +1043,7 @@
 
 The following code produces this diagnostic because `c` isn't initialized:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 const [!c!];
 {% endprettify %}
 
@@ -1051,7 +1051,7 @@
 
 Add an initializer:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 const c = 'c';
 {% endprettify %}
 
@@ -1070,7 +1070,7 @@
 The following code produces this diagnostic because the value of `list1` is
 `null`, which is neither a list nor a set:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 const List<int> list1 = null;
 const List<int> list2 = [...[!list1!]];
 {% endprettify %}
@@ -1080,7 +1080,7 @@
 Change the expression to something that evaluates to either a constant list
 or a constant set:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 const List<int> list1 = [];
 const List<int> list2 = [...list1];
 {% endprettify %}
@@ -1099,7 +1099,7 @@
 The following code produces this diagnostic because the value of `map1` is
 `null`, which isn't a map:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 const Map<String, int> map1 = null;
 const Map<String, int> map2 = {...[!map1!]};
 {% endprettify %}
@@ -1108,7 +1108,7 @@
 
 Change the expression to something that evaluates to a constant map:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 const Map<String, int> map1 = {};
 const Map<String, int> map2 = {...map1};
 {% endprettify %}
@@ -1127,7 +1127,7 @@
 The following code produces this diagnostic because the constructor in `A`
 isn't a const constructor:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 class A {
   A();
 }
@@ -1141,7 +1141,7 @@
 making all of the fields of the class, including inherited fields, final),
 then add the keyword `const` to the constructor:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 class A {
   const A();
 }
@@ -1151,7 +1151,7 @@
 
 Otherwise, remove the keyword `const`:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 class A {
   A();
 }
@@ -1172,7 +1172,7 @@
 
 The following code produces this diagnostic because `i` isn't a constant:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 class C {
   final int i;
   const C(this.i);
@@ -1185,7 +1185,7 @@
 Either make all of the arguments constant expressions, or remove the
 `const` keyword to use the non-constant form of the constructor:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 class C {
   final int i;
   const C(this.i);
@@ -1207,7 +1207,7 @@
 The following code produces this diagnostic because the invocation of
 `print` occurs after the function has returned:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 void f() {
   return;
   [!print('here');!]
@@ -1218,7 +1218,7 @@
 
 If the code isn't needed, then remove it:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 void f() {
   return;
 }
@@ -1227,7 +1227,7 @@
 If the code needs to be executed, then either move the code to a place
 where it will be executed:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 void f() {
   print('here');
   return;
@@ -1236,7 +1236,7 @@
 
 Or, rewrite the code before it, so that it can be reached:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 void f({bool skipPrinting = true}) {
   if (skipPrinting) {
     return;
@@ -1252,17 +1252,17 @@
 
 #### Description
 
-The analyzer produces this diagnostic when a catch clause is found that
-can't be executed because it’s after a catch clause of the form `catch (e)`
-or `on Object catch (e)`. The first catch clause that matches the thrown
-object is selected, and both of those forms will match any object, so no
-catch clauses that follow them will be selected.
+The analyzer produces this diagnostic when a `catch` clause is found that
+can't be executed because it’s after a `catch` clause of the form
+`catch (e)` or `on Object catch (e)`. The first `catch` clause that matches
+the thrown object is selected, and both of those forms will match any
+object, so no `catch` clauses that follow them will be selected.
 
 #### Examples
 
 The following code produces this diagnostic:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 void f() {
   try {
   } catch (e) {
@@ -1276,7 +1276,7 @@
 If the clause should be selectable, then move the clause before the general
 clause:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 void f() {
   try {
   } on String {
@@ -1287,7 +1287,7 @@
 
 If the clause doesn't need to be selectable, then remove it:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 void f() {
   try {
   } catch (e) {
@@ -1302,10 +1302,10 @@
 
 #### Description
 
-The analyzer produces this diagnostic when a catch clause is found that
-can't be executed because it is after a catch clause that catches either
-the same type or a supertype of the clause's type. The first catch clause
-that matches the thrown object is selected, and the earlier clause l always
+The analyzer produces this diagnostic when a `catch` clause is found that
+can't be executed because it is after a `catch` clause that catches either
+the same type or a supertype of the clause's type. The first `catch` clause
+that matches the thrown object is selected, and the earlier clause always
 matches anything matchable by the highlighted clause, so the highlighted
 clause will never be selected.
 
@@ -1313,7 +1313,7 @@
 
 The following code produces this diagnostic:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 void f() {
   try {
   } on num {
@@ -1327,7 +1327,7 @@
 If the clause should be selectable, then move the clause before the general
 clause:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 void f() {
   try {
   } on int {
@@ -1338,7 +1338,7 @@
 
 If the clause doesn't need to be selectable, then remove it:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 void f() {
   try {
   } on num {
@@ -1368,7 +1368,7 @@
 
 The following code produces this diagnostic because `x` can't be `null`:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 int f(int x) {
   return x ?? [!0!];
 }
@@ -1376,7 +1376,7 @@
 
 The following code produces this diagnostic because `f` can't be `null`:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 class C {
   int f = -1;
 
@@ -1391,7 +1391,7 @@
 If the diagnostic is reported for an `??` operator, then remove the `??`
 operator and the right operand:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 int f(int x) {
   return x;
 }
@@ -1400,7 +1400,7 @@
 If the diagnostic is reported for an assignment, and the assignment isn't
 needed, then remove the assignment:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 class C {
   int f = -1;
 
@@ -1412,7 +1412,7 @@
 If the assignment is needed, but should be based on a different condition,
 then rewrite the code to use `=` and the different condition:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 class C {
   int f = -1;
 
@@ -1426,7 +1426,7 @@
 
 ### default_list_constructor
 
-_The default 'List' constructor is not available when null safety is enabled._
+_The default 'List' constructor isn't available when null safety is enabled._
 
 #### Description
 
@@ -1438,7 +1438,7 @@
 Assuming the following code is opted in to null safety, it produces this
 diagnostic because it uses the default `List` constructor:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 var l = [!List<int>!]();
 {% endprettify %}
 
@@ -1447,21 +1447,21 @@
 If no initial size is provided, then convert the code to use a list
 literal:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 var l = <int>[];
 {% endprettify %}
 
 If an initial size needs to be provided and there is a single reasonable
 initial value for the elements, then use `List.filled`:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 var l = List.filled(3, 0);
 {% endprettify %}
 
 If an initial size needs to be provided but each element needs to be
 computed, then use `List.generate`:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 var l = List.generate(3, (i) => i);
 {% endprettify %}
 
@@ -1478,10 +1478,10 @@
 
 #### Example
 
-The following code produces this diagnostic because `x` was not assigned a
+The following code produces this diagnostic because `x` wasn't assigned a
 value before being read:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 void f(bool b) {
   late int x;
   print([!x!]);
@@ -1492,7 +1492,7 @@
 
 Assign a value to the variable before reading from it:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 void f(bool b) {
   late int x;
   x = b ? 1 : 0;
@@ -1516,7 +1516,7 @@
 If the method `m` in the class `C` is annotated with `@deprecated`, then
 the following code produces this diagnostic:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 void f(C c) {
   c.[!m!]();
 }
@@ -1542,7 +1542,7 @@
 
 The following code produces this diagnostic because `x` is deprecated:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 @deprecated
 var x = 0;
 var y = [!x!];
@@ -1571,7 +1571,7 @@
 The following code produces this diagnostic because there are two
 declarations for the unnamed constructor:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 class C {
   C();
 
@@ -1582,7 +1582,7 @@
 The following code produces this diagnostic because there are two
 declarations for the constructor named `m`:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 class C {
   C.m();
 
@@ -1595,7 +1595,7 @@
 If there are multiple unnamed constructors and all of the constructors are
 needed, then give all of them, or all except one of them, a name:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 class C {
   C();
 
@@ -1606,7 +1606,7 @@
 If there are multiple unnamed constructors and all except one of them are
 unneeded, then remove the constructors that aren't needed:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 class C {
   C();
 }
@@ -1615,7 +1615,7 @@
 If there are multiple named constructors and all of the constructors are
 needed, then rename all except one of them:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 class C {
   C.m();
 
@@ -1626,7 +1626,7 @@
 If there are multiple named constructors and all except one of them are
 unneeded, then remove the constructorsthat aren't needed:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 class C {
   C.m();
 }
@@ -1646,7 +1646,7 @@
 The following code produces this diagnostic because the name `x` is
 declared twice:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 int x = 0;
 int [!x!] = 1;
 {% endprettify %}
@@ -1655,7 +1655,7 @@
 
 Choose a different name for one of the declarations.
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 int x = 0;
 int y = 1;
 {% endprettify %}
@@ -1674,7 +1674,7 @@
 
 The following code produces this diagnostic:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 import 'package:meta/meta.dart';
 import [!'package:meta/meta.dart'!];
 
@@ -1685,7 +1685,7 @@
 
 Remove the unnecessary import:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 import 'package:meta/meta.dart';
 
 @sealed class C {}
@@ -1705,7 +1705,7 @@
 The following code produces this diagnostic because there are two arguments
 with the name `a`:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 void f(C c) {
   c.m(a: 0, [!a!]: 1);
 }
@@ -1719,7 +1719,7 @@
 
 If one of the arguments should have a different name, then change the name:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 void f(C c) {
   c.m(a: 0, b: 1);
 }
@@ -1731,7 +1731,7 @@
 
 If one of the arguments is wrong, then remove it:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 void f(C c) {
   c.m(a: 1);
 }
@@ -1756,7 +1756,7 @@
 The following code produces this diagnostic because the string `'a'` is
 specified twice:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 const Set<String> set = {'a', [!'a'!]};
 {% endprettify %}
 
@@ -1764,7 +1764,7 @@
 
 Remove one of the duplicate values:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 const Set<String> set = {'a'};
 {% endprettify %}
 
@@ -1780,7 +1780,7 @@
 
 The analyzer produces this diagnostic when an element in a non-constant set
 is the same as a previous element in the same set. If two elements are the
-same, then the second value is  ignored, which makes having both elements
+same, then the second value is ignored, which makes having both elements
 pointless and likely signals a bug.
 
 #### Example
@@ -1788,7 +1788,7 @@
 The following code produces this diagnostic because the element `1` appears
 twice:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 const a = 1;
 const b = 1;
 var s = <int>{a, [!b!]};
@@ -1799,7 +1799,7 @@
 If both elements should be included in the set, then change one of the
 elements:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 const a = 1;
 const b = 2;
 var s = <int>{a, b};
@@ -1808,7 +1808,7 @@
 If only one of the elements is needed, then remove the one that isn't
 needed:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 const a = 1;
 var s = <int>{a};
 {% endprettify %}
@@ -1833,7 +1833,7 @@
 The following code produces this diagnostic because the key `1` is used
 twice:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 const map = <int, String>{1: 'a', 2: 'b', [!1!]: 'c', 4: 'd'};
 {% endprettify %}
 
@@ -1842,14 +1842,14 @@
 If both entries should be included in the map, then change one of the keys
 to be different:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 const map = <int, String>{1: 'a', 2: 'b', 3: 'c', 4: 'd'};
 {% endprettify %}
 
 If only one of the entries is needed, then remove the one that isn't
 needed:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 const map = <int, String>{1: 'a', 2: 'b', 4: 'd'};
 {% endprettify %}
 
@@ -1873,7 +1873,7 @@
 The following code produces this diagnostic because the keys `a` and `b`
 have the same value:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 const a = 1;
 const b = 1;
 var m = <int, String>{a: 'a', [!b!]: 'b'};
@@ -1883,7 +1883,7 @@
 
 If both entries should be included in the map, then change one of the keys:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 const a = 1;
 const b = 2;
 var m = <int, String>{a: 'a', b: 'b'};
@@ -1892,7 +1892,7 @@
 If only one of the entries is needed, then remove the one that isn't
 needed:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 const a = 1;
 var m = <int, String>{a: 'a'};
 {% endprettify %}
@@ -1916,7 +1916,7 @@
 
 Given a library that is opted out of null safety:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 // @dart = 2.8
 String s;
 {% endprettify %}
@@ -1924,7 +1924,7 @@
 The following code produces this diagnostic because it's exporting symbols
 from an opted-out library:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 export [!'optedOut.dart'!];
 
 class C {}
@@ -1935,13 +1935,13 @@
 If you're able to do so, migrate the exported library so that it doesn't
 need to opt out:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 String? s;
 {% endprettify %}
 
 If you can't migrate the library, then remove the export:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 class C {}
 {% endprettify %}
 
@@ -1964,7 +1964,7 @@
 
 The following code produces this diagnostic:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 var map = <String, int>{'a': 0, 'b': 1, [!'c'!]};
 {% endprettify %}
 
@@ -1974,7 +1974,7 @@
 entry, fix the issue by replacing the expression with the key or the value.
 For example:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 var map = <String, int>{'a': 0, 'b': 1, 'c': 2};
 {% endprettify %}
 
@@ -1984,7 +1984,7 @@
 
 #### Description
 
-The analyzer produces this diagnostic when an extends clause contains a
+The analyzer produces this diagnostic when an `extends` clause contains a
 name that is declared to be something other than a class.
 
 #### Examples
@@ -1992,7 +1992,7 @@
 The following code produces this diagnostic because `f` is declared to be a
 function:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 void f() {}
 
 class C extends [!f!] {}
@@ -2001,9 +2001,9 @@
 #### Common fixes
 
 If you want the class to extend a class other than `Object`, then replace
-the name in the extends clause with the name of that class:
+the name in the `extends` clause with the name of that class:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 void f() {}
 
 class C extends B {}
@@ -2011,9 +2011,9 @@
 class B {}
 {% endprettify %}
 
-If you want the class to extend `Object`, then remove the extends clause:
+If you want the class to extend `Object`, then remove the `extends` clause:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 void f() {}
 
 class C {}
@@ -2036,7 +2036,7 @@
 
 The following code produces this diagnostic because `E` is an extension:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 extension E on int {
   static String m() => '';
 }
@@ -2049,7 +2049,7 @@
 Replace the name of the extension with a name that can be referenced, such
 as a static member defined on the extension:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 extension E on int {
   static String m() => '';
 }
@@ -2075,7 +2075,7 @@
 The following code produces this diagnostic because the name `a` is being
 used for two different members:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 extension E on Object {
   int get a => 0;
   static int [!a!]() => 0;
@@ -2086,7 +2086,7 @@
 
 Rename or remove one of the members:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 extension E on Object {
   int get a => 0;
   static int b() => 0;
@@ -2107,7 +2107,7 @@
 The following code produces this diagnostic because the method `a` doesn't
 have a body:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 extension E on String {
   int [!a!]();
 }
@@ -2133,7 +2133,7 @@
 The following code produces this diagnostic because there is a constructor
 declaration in `E`:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 extension E on String {
   [!E!]() : super();
 }
@@ -2158,7 +2158,7 @@
 The following code produces this diagnostic because `s` is an instance
 field:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 extension E on String {
   String [!s!];
 }
@@ -2186,7 +2186,7 @@
 The following code produces this diagnostic because `toString` is defined
 by `Object`:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 extension E on String {
   String [!toString!]() => this;
 }
@@ -2197,7 +2197,7 @@
 Remove the member or rename it so that the name doesn't conflict with the
 member in `Object`:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 extension E on String {
   String displayString() => this;
 }
@@ -2219,7 +2219,7 @@
 
 The following code produces this diagnostic because `m` is static:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 extension E on String {
   static void m() {}
 }
@@ -2233,7 +2233,7 @@
 
 Replace the extension override with the name of the extension:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 extension E on String {
   static void m() {}
 }
@@ -2257,7 +2257,7 @@
 
 The following code produces this diagnostic because `3` isn't a `String`:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 extension E on String {
   void method() {}
 }
@@ -2272,7 +2272,7 @@
 If you're using the correct extension, then update the argument to have the
 correct type:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 extension E on String {
   void method() {}
 }
@@ -2302,7 +2302,7 @@
 The following code produces this diagnostic because `E(i)` isn't an
 expression:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 extension E on int {
   int get a => 0;
 }
@@ -2317,7 +2317,7 @@
 If you want to invoke one of the members of the extension, then add the
 invocation:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 extension E on int {
   int get a => 0;
 }
@@ -2329,7 +2329,7 @@
 
 If you don't want to invoke a member, then unwrap the target:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 extension E on int {
   int get a => 0;
 }
@@ -2348,7 +2348,7 @@
 
 The analyzer produces this diagnostic when an extension override is used as
 the target of a cascade expression. The value of a cascade expression
-`e..m` is the value of the target `e`, but extension overrides are not
+`e..m` is the value of the target `e`, but extension overrides aren't
 expressions and don't have a value.
 
 #### Examples
@@ -2356,7 +2356,7 @@
 The following code produces this diagnostic because `E(3)` isn't an
 expression:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 extension E on int {
   void m() {}
 }
@@ -2369,7 +2369,7 @@
 
 Use '.' rather than '..':
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 extension E on int {
   void m() {}
 }
@@ -2395,7 +2395,7 @@
 The following code produces this diagnostic because `f` defines 2
 parameters but is invoked with 3 arguments:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 void f(int a, int b) {}
 void g() {
   f[!(1, 2, 3)!];
@@ -2406,7 +2406,7 @@
 
 Remove the arguments that don't correspond to parameters:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 void f(int a, int b) {}
 void g() {
   f(1, 2);
@@ -2429,7 +2429,7 @@
 positional parameters but has a named parameter that could be used for the
 third argument:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 void f(int a, int b, {int c}) {}
 void g() {
   f[!(1, 2, 3)!];
@@ -2441,7 +2441,7 @@
 If some of the arguments should be values for named parameters, then add
 the names before the arguments:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 void f(int a, int b, {int c}) {}
 void g() {
   f(1, 2, c: 3);
@@ -2451,7 +2451,7 @@
 Otherwise, remove the arguments that don't correspond to positional
 parameters:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 void f(int a, int b, {int c}) {}
 void g() {
   f(1, 2);
@@ -2474,7 +2474,7 @@
 
 The following code produces this diagnostic because `f` is :
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 class C {
   final int f = 0;
   C() : [!f!] = 1;
@@ -2487,7 +2487,7 @@
 constructor, and if all of the constructors need to initialize the field to
 the same value, then remove the initializer from the constructor:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 class C {
   final int f = 0;
   C();
@@ -2498,7 +2498,7 @@
 different constructors need to initialize the field differently, then
 remove the initializer in the field's declaration:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 class C {
   final int f;
   C() : f = 1;
@@ -2520,7 +2520,7 @@
 The following code produces this diagnostic because `0` has the type `int`,
 and an `int` can't be assigned to a field of type `String`:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 class C {
   String s;
 
@@ -2533,7 +2533,7 @@
 If the type of the field is correct, then change the value assigned to it
 so that the value has a valid type:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 class C {
   String s;
 
@@ -2544,7 +2544,7 @@
 If the type of the value is correct, then change the type of the field to
 allow the assignment:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 class C {
   int s;
 
@@ -2566,7 +2566,7 @@
 The following code produces this diagnostic because `x` doesn't have an
 initializer:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 final [!x!];
 {% endprettify %}
 
@@ -2574,7 +2574,7 @@
 
 For variables and static fields, you can add an initializer:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 final x = 0;
 {% endprettify %}
 
@@ -2582,7 +2582,7 @@
 example, or you can initialize the field in every constructor. You can
 initialize the field by using a field formal parameter:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 class C {
   final int x;
   C(this.x);
@@ -2592,7 +2592,7 @@
 You can also initialize the field by using an initializer in the
 constructor:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 class C {
   final int x;
   C(int y) : x = y * 2;
@@ -2601,12 +2601,12 @@
 
 ### final_not_initialized_constructor
 
-_All final variables must be initialized, but '{0}' and '{1}' are not._
+_All final variables must be initialized, but '{0}' and '{1}' aren't._
 
-_All final variables must be initialized, but '{0}' is not._
+_All final variables must be initialized, but '{0}' isn't._
 
-_All final variables must be initialized, but '{0}', '{1}', and {2} others are
-not._
+_All final variables must be initialized, but '{0}', '{1}', and {2} others
+aren't._
 
 #### Description
 
@@ -2620,7 +2620,7 @@
 
 The following code produces this diagnostic:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 class C {
   final String value;
 
@@ -2633,7 +2633,7 @@
 If the value should be passed in to the constructor directly, then use a
 field formal parameter to initialize the field `value`:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 class C {
   final String value;
 
@@ -2644,7 +2644,7 @@
 If the value should be computed indirectly from a value provided by the
 caller, then add a parameter and include an initializer:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 class C {
   final String value;
 
@@ -2656,7 +2656,7 @@
 the constructor, then add an initializer for the field as part of the field
 declaration:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 class C {
   final String value = '';
 
@@ -2669,7 +2669,7 @@
 different values, then add an initializer for the field in the initializer
 list:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 class C {
   final String value;
 
@@ -2682,7 +2682,7 @@
 However, if the value is the same for all instances, then consider using a
 static field instead of an instance field:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 class C {
   static const String value = '';
 
@@ -2704,7 +2704,7 @@
 The following code produces this diagnostic because `m` is a `Map`, and
 `Map` isn't a subclass of `Iterable`:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 void f(Map<String, String> m) {
   for (String s in [!m!]) {
     print(s);
@@ -2716,7 +2716,7 @@
 
 Replace the expression with one that produces an iterable value:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 void f(Map<String, String> m) {
   for (String s in m.values) {
     print(s);
@@ -2740,7 +2740,7 @@
 function `f` has the `async` modifier even though the return type isn't
 assignable to `Future`:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 [!int!] f() async {
   return 0;
 }
@@ -2751,7 +2751,7 @@
 If the function should be asynchronous, then change the return type to be
 assignable to `Future`:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 Future<int> f() async {
   return 0;
 }
@@ -2759,7 +2759,7 @@
 
 If the function should be synchronous, then remove the `async` modifier:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 int f() {
   return 0;
 }
@@ -2771,7 +2771,7 @@
 
 #### Description
 
-The analyzer produces this diagnostic when a name used in the implements
+The analyzer produces this diagnostic when a name used in the `implements`
 clause of a class or mixin declaration is defined to be something other
 than a class or mixin.
 
@@ -2780,7 +2780,7 @@
 The following code produces this diagnostic because `x` is a variable
 rather than a class or mixin:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 var x;
 class C implements [!x!] {}
 {% endprettify %}
@@ -2795,8 +2795,8 @@
 imported, then add an import, with a prefix, for the library in which it’s
 declared.
 
-Otherwise, either replace the name in the implements clause with the name
-of an existing class or mixin, or remove the name from the implements
+Otherwise, either replace the name in the `implements` clause with the name
+of an existing class or mixin, or remove the name from the `implements`
 clause.
 
 ### implements_repeated
@@ -2806,14 +2806,14 @@
 #### Description
 
 The analyzer produces this diagnostic when a single class is specified more
-than once in an implements clause.
+than once in an `implements` clause.
 
 #### Examples
 
 The following code produces this diagnostic because `A` is in the list
 twice:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 class A {}
 class B implements A, [!A!] {}
 {% endprettify %}
@@ -2822,7 +2822,7 @@
 
 Remove all except one occurrence of the class name:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 class A {}
 class B implements A {}
 {% endprettify %}
@@ -2841,7 +2841,7 @@
 The following code produces this diagnostic because `defaultX` is an
 instance member:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 class C {
   int x;
 
@@ -2855,7 +2855,7 @@
 
 If the member can be made static, then do so:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 class C {
   int x;
 
@@ -2868,7 +2868,7 @@
 If not, then replace the reference in the initializer with a different
 expression that doesn't use an instance member:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 class C {
   int x;
 
@@ -2892,7 +2892,7 @@
 The following code produces this diagnostic because `_interceptors` is an
 internal library:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 import [!'dart:_interceptors'!];
 {% endprettify %}
 
@@ -2916,7 +2916,7 @@
 declaration of `m` from `A`, and that implementation isn't consistent with
 the signature of `m` that's inherited from `B`:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 class A {
   void m({int a}) {}
 }
@@ -2934,7 +2934,7 @@
 Add an implementation of the method that satisfies all the inherited
 signatures:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 class A {
   void m({int a}) {}
 }
@@ -2964,7 +2964,7 @@
 The following code produces this diagnostic because the initializer is
 initializing `x`, but `x` isn't a field in the class:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 class C {
   int y;
 
@@ -2977,7 +2977,7 @@
 If a different field should be initialized, then change the name to the
 name of the field:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 class C {
   int y;
 
@@ -2987,7 +2987,7 @@
 
 If the field must be declared, then add a declaration:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 class C {
   int x;
   int y;
@@ -3012,7 +3012,7 @@
 The following code produces this diagnostic because the field `x` isn't
 defined:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 class C {
   int y;
 
@@ -3025,7 +3025,7 @@
 If the field name was wrong, then change it to the name of an existing
 field:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 class C {
   int y;
 
@@ -3036,7 +3036,7 @@
 If the field name is correct but hasn't yet been defined, then declare the
 field:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 class C {
   int x;
   int y;
@@ -3048,7 +3048,7 @@
 If the parameter is needed but shouldn't initialize a field, then convert
 it to a normal parameter and use it:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 class C {
   int y;
 
@@ -3058,7 +3058,7 @@
 
 If the parameter isn't needed, then remove it:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 class C {
   int y;
 
@@ -3080,7 +3080,7 @@
 The following code produces this diagnostic because `zero` is a static
 field, but it’s being accessed as if it were an instance field:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 void f(C c) {
   c.[!zero!];
 }
@@ -3094,7 +3094,7 @@
 
 Use the class to access the static member:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 void f(C c) {
   C.zero;
 }
@@ -3123,7 +3123,7 @@
 The following code produces this diagnostic because `x` isn't in scope in
 the factory constructor:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 class C {
   int x;
   factory C() {
@@ -3137,7 +3137,7 @@
 
 Rewrite the code so that it doesn't reference the instance member:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 class C {
   int x;
   factory C() {
@@ -3161,7 +3161,7 @@
 The following code produces this diagnostic because the instance field `x`
 is being referenced in a static method:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 class C {
   int x;
 
@@ -3176,7 +3176,7 @@
 If the method must reference the instance member, then it can't be static,
 so remove the keyword:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 class C {
   int x;
 
@@ -3189,7 +3189,7 @@
 If the method can't be made an instance method, then add a parameter so
 that an instance of the class can be passed in:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 class C {
   int x;
 
@@ -3215,7 +3215,7 @@
 The following code produces this diagnostic because `C` is an abstract
 class:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 abstract class C {}
 
 var c = new [!C!]();
@@ -3242,7 +3242,7 @@
 initializer (`int`) isn't assignable to the type of the variable
 (`String`):
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 int i = 0;
 String s = [!i!];
 {% endprettify %}
@@ -3255,7 +3255,7 @@
 Otherwise, change the value being assigned so that it has the expected
 type. In the previous example, this might look like:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 int i = 0;
 String s = i.toString();
 {% endprettify %}
@@ -3263,7 +3263,7 @@
 If you can’t change the value, then change the type of the variable to be
 compatible with the type of the value being assigned:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 int i = 0;
 int s = i;
 {% endprettify %}
@@ -3284,7 +3284,7 @@
 
 The following code produces this diagnostic because there are no arguments:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 extension E on String {
   String join(String other) => '$this $other';
 }
@@ -3297,7 +3297,7 @@
 And, the following code produces this diagnostic because there's more than
 one argument:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 extension E on String {
   String join(String other) => '$this $other';
 }
@@ -3311,7 +3311,7 @@
 
 Provide one argument for the extension override:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 extension E on String {
   String join(String other) => '$this $other';
 }
@@ -3336,7 +3336,7 @@
 The following code produces this diagnostic because the name of the factory
 constructor (`A`) isn't the same as the surrounding class (`C`):
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 class A {}
 
 class C {
@@ -3349,7 +3349,7 @@
 If the factory returns an instance of the surrounding class, then rename
 the factory:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 class A {}
 
 class C {
@@ -3360,7 +3360,7 @@
 If the factory returns an instance of a different class, then move the
 factory to that class:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 class A {
   factory A() => throw 0;
 }
@@ -3372,7 +3372,7 @@
 modify that class or don't want to move the factory, then convert it to be
 a static method:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 class A {}
 
 class C {
@@ -3391,10 +3391,10 @@
 
 #### Examples
 
-The following code produces this diagnostic because the constructor is not
+The following code produces this diagnostic because the constructor isn't
 a `const` constructor:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 import 'package:meta/meta.dart';
 
 class C {
@@ -3406,7 +3406,7 @@
 The following code produces this diagnostic because `x` isn't a
 constructor:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 import 'package:meta/meta.dart';
 
 [!@literal!]
@@ -3419,7 +3419,7 @@
 invoked with `const`, when possible, then mark the constructor with the
 `const` keyword:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 import 'package:meta/meta.dart';
 
 class C {
@@ -3433,7 +3433,7 @@
 If the annotation is on anything other than a constructor, then remove the
 annotation:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 var x;
 {% endprettify %}
 
@@ -3452,7 +3452,7 @@
 
 The following code produces this diagnostic because `s` can't be `null`:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 int? getLength(String s) {
   return s[!?.!]length;
 }
@@ -3460,17 +3460,17 @@
 
 The following code produces this diagnostic because `a` can't be `null`:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 var a = [];
 var b = [[!...?!]a];
 {% endprettify %}
 
 #### Common fixes
 
-Replace the null-aware operator with a non-null-aware equivalent, such as
-replacing '?.' with  '.':
+Replace the null-aware operator with a non-null-aware equivalent; for
+example, change `?.` to  `.`:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 int getLength(String s) {
   return s.length;
 }
@@ -3502,7 +3502,7 @@
 parameter `s` (`String`) isn't assignable to the type of the parameter `i`
 (`int`):
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 class A {
   void m(int i) {}
 }
@@ -3517,7 +3517,7 @@
 If the invalid method is intended to override the method from the
 superclass, then change it to conform:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 class A {
   void m(int i) {}
 }
@@ -3530,7 +3530,7 @@
 If it isn't intended to override the method from the superclass, then
 rename it:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 class A {
   void m(int i) {}
 }
@@ -3556,7 +3556,7 @@
 The following code produces this diagnostic because `v` is a top-level
 variable:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 C f() => [!this!];
 
 class C {}
@@ -3567,7 +3567,7 @@
 Use a variable of the appropriate type in place of `this`, declaring it if
 necessary:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 C f(C c) => c;
 
 class C {}
@@ -3587,7 +3587,7 @@
 The following code produces this diagnostic because `'#'` isn't a valid
 URI:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 import [!'#'!];
 {% endprettify %}
 
@@ -3611,7 +3611,7 @@
 The following code produces this diagnostic because `i` is marked as being
 covariant:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 extension E on String {
   void a([!covariant!] int i) {}
 }
@@ -3621,7 +3621,7 @@
 
 Remove the 'covariant' keyword:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 extension E on String {
   void a(int i) {}
 }
@@ -3641,7 +3641,7 @@
 The following code produces this diagnostic because `x` will always be
 `null`:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 int f(Null x) {
   return [!x!].length;
 }
@@ -3652,7 +3652,7 @@
 If the value is allowed to be something other than `null`, then change the
 type of the expression:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 int f(String? x) {
   return x!.length;
 }
@@ -3672,7 +3672,7 @@
 
 The following code produces this diagnostic:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 import 'package:meta/meta.dart';
 
 [!@visibleForTesting!]
@@ -3686,7 +3686,7 @@
 If the declaration doesn't need to be used by test code, then remove the
 annotation:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 void _someFunction() {}
 
 void f() => _someFunction();
@@ -3694,7 +3694,7 @@
 
 If it does, then make it public:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 import 'package:meta/meta.dart';
 
 @visibleForTesting
@@ -3718,7 +3718,7 @@
 The following code produces this diagnostic because the extension `E`
 doesn't define a `call` method:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 extension E on String {}
 
 void f() {
@@ -3730,7 +3730,7 @@
 
 If the extension is intended to define a `call` method, then declare it:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 extension E on String {
   int call() => 0;
 }
@@ -3761,7 +3761,7 @@
 The following code produces this diagnostic because `Binary` is the name of
 a function type, not a function:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 typedef Binary = int Function(int, int);
 
 int f() {
@@ -3787,7 +3787,7 @@
 
 The following code produces this diagnostic because `x` isn't a function:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 int x = 0;
 
 int f() => x;
@@ -3798,7 +3798,7 @@
 The following code produces this diagnostic because `f()` doesn't return a
 function:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 int x = 0;
 
 int f() => x;
@@ -3812,7 +3812,7 @@
 list with the name of a function or with an expression that computes a
 function:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 int x = 0;
 
 int f() => x;
@@ -3834,7 +3834,7 @@
 The following code produces this diagnostic because `2.5` is a double, and
 the list can hold only integers:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 List<int> x = [1, [!2.5!], 3];
 {% endprettify %}
 
@@ -3843,20 +3843,20 @@
 If you intended to add a different object to the list, then replace the
 element with an expression that computes the intended object:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 List<int> x = [1, 2, 3];
 {% endprettify %}
 
 If the object shouldn't be in the list, then remove the element:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 List<int> x = [1, 3];
 {% endprettify %}
 
 If the object being computed is correct, then widen the element type of the
 list to allow all of the different types of objects it needs to contain:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 List<num> x = [1, 2.5, 3];
 {% endprettify %}
 
@@ -3874,7 +3874,7 @@
 The following code produces this diagnostic because the literal has a map
 entry even though it's a set literal:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 const collection = <String>{[!'a' : 'b'!]};
 {% endprettify %}
 
@@ -3884,7 +3884,7 @@
 that it is a map. In the previous example, you could do this by adding
 another type argument:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 const collection = <String, String>{'a' : 'b'};
 {% endprettify %}
 
@@ -3895,7 +3895,7 @@
 possibly by replacing the colon with a comma if both values should be
 included in the set:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 const collection = <String>{'a', 'b'};
 {% endprettify %}
 
@@ -3913,7 +3913,7 @@
 The following code produces this diagnostic because `2` is an `int`, but
 the keys of the map are required to be `String`s:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 var m = <String, String>{[!2!] : 'a'};
 {% endprettify %}
 
@@ -3922,13 +3922,13 @@
 If the type of the map is correct, then change the key to have the correct
 type:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 var m = <String, String>{'2' : 'a'};
 {% endprettify %}
 
 If the type of the key is correct, then change the key type of the map:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 var m = <int, String>{2 : 'a'};
 {% endprettify %}
 
@@ -3947,7 +3947,7 @@
 The following code produces this diagnostic because `2` is an `int`, but/
 the values of the map are required to be `String`s:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 var m = <String, String>{'a' : [!2!]};
 {% endprettify %}
 
@@ -3956,13 +3956,13 @@
 If the type of the map is correct, then change the value to have the
 correct type:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 var m = <String, String>{'a' : '2'};
 {% endprettify %}
 
 If the type of the value is correct, then change the value type of the map:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 var m = <String, int>{'a' : 2};
 {% endprettify %}
 
@@ -3985,13 +3985,13 @@
 The following code produces this diagnostic because `x` can't be `null`,
 and no non-`null` default value is specified:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 void f([int [!x!]]) {}
 {% endprettify %}
 
 As does this:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 void g({int [!x!]}) {}
 {% endprettify %}
 
@@ -4000,21 +4000,21 @@
 If you want to use `null` to indicate that no value was provided, then you
 need to make the type nullable:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 void f([int? x]) {}
 void g({int? x}) {}
 {% endprettify %}
 
 If the parameter can't be null, then either provide a default value:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 void f([int x = 1]) {}
 void g({int x = 2}) {}
 {% endprettify %}
 
 or make the parameter a required parameter:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 void f(int x) {}
 void g({required int x}) {}
 {% endprettify %}
@@ -4025,7 +4025,7 @@
 
 #### Description
 
-The analyzer produces this diagnostic when a switch statement for an enum
+The analyzer produces this diagnostic when a `switch` statement for an enum
 doesn't include an option for one of the values in the enumeration.
 
 Note that `null` is always a possible value for an enum and therefore also
@@ -4036,7 +4036,7 @@
 The following code produces this diagnostic because the enum constant `e2`
 isn't handled:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 enum E { e1, e2 }
 
 void f(E e) {
@@ -4049,10 +4049,10 @@
 
 #### Common fixes
 
-If there's special handling for the missing values, then add a case clause
-for each of the missing values:
+If there's special handling for the missing values, then add a `case`
+clause for each of the missing values:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 enum E { e1, e2 }
 
 void f(E e) {
@@ -4065,10 +4065,10 @@
 }
 {% endprettify %}
 
-If the missing values should be handled the same way, then add a default
+If the missing values should be handled the same way, then add a `default`
 clause:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 enum E { e1, e2 }
 
 void f(E e) {
@@ -4095,7 +4095,7 @@
 The following code produces this diagnostic because the invocation of `f`
 doesn't include a value for the required named parameter `end`:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 void f(int start, {required int end}) {}
 void g() {
   [!f!](3);
@@ -4106,7 +4106,7 @@
 
 Add a named argument corresponding to the missing required parameter:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 void f(int start, {required int end}) {}
 void g() {
   f(3, end: 5);
@@ -4130,7 +4130,7 @@
 The following code produces this diagnostic because the named parameter `x`
 is required:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 import 'package:meta/meta.dart';
 
 void f({@required int x}) {}
@@ -4144,7 +4144,7 @@
 
 Provide the required value:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 import 'package:meta/meta.dart';
 
 void f({@required int x}) {}
@@ -4170,7 +4170,7 @@
 The following code produces this diagnostic because `f` doesn't end with a
 return:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 int [!f!](int x) {
   if (x < 0) {
     return 0;
@@ -4180,8 +4180,8 @@
 
 #### Common fixes
 
-Add a return statement that makes the return value explicit, even if `null`
-is the appropriate value.
+Add a `return` statement that makes the return value explicit, even if
+`null` is the appropriate value.
 
 ### mixin_of_non_class
 
@@ -4189,7 +4189,7 @@
 
 #### Description
 
-The analyzer produces this diagnostic when a name in a mixin clause is
+The analyzer produces this diagnostic when a name in a `with` clause is
 defined to be something other than a mixin or a class.
 
 #### Examples
@@ -4197,7 +4197,7 @@
 The following code produces this diagnostic because `F` is defined to be a
 function type:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 typedef F = int Function(String);
 
 class C with [!F!] {}
@@ -4205,9 +4205,10 @@
 
 #### Common fixes
 
-Remove the invalid name from the list, possibly replacing it with the name of the intended mixin or class:
+Remove the invalid name from the list, possibly replacing it with the name
+of the intended mixin or class:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 typedef F = int Function(String);
 
 class C {}
@@ -4229,7 +4230,7 @@
 
 If the package 'p' defines a sealed class:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 import 'package:meta/meta.dart';
 
 @sealed
@@ -4239,7 +4240,7 @@
 Then, the following code, when in a package other than 'p', produces this
 diagnostic:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 import 'package:p/p.dart';
 
 [!mixin M on C {}!]
@@ -4265,7 +4266,7 @@
 The following code produces this diagnostic because `F` is neither a class
 nor a mixin:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 typedef F = void Function();
 
 mixin M on [!F!] {}
@@ -4276,7 +4277,7 @@
 If the type was intended to be a class but was mistyped, then replace the
 name.
 
-Otherwise, remove the type from the on clause.
+Otherwise, remove the type from the `on` clause.
 
 ### must_be_immutable
 
@@ -4295,7 +4296,7 @@
 The following code produces this diagnostic because the field `x` isn't
 final:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 import 'package:meta/meta.dart';
 
 @immutable
@@ -4311,7 +4312,7 @@
 If instances of the class should be immutable, then add the keyword `final`
 to all non-final field declarations:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 import 'package:meta/meta.dart';
 
 @immutable
@@ -4324,7 +4325,7 @@
 
 If the instances of the class should be mutable, then remove the
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 class C {
   int x;
 
@@ -4348,7 +4349,7 @@
 The following code produces this diagnostic because the method `m` in `B`
 doesn't invoke the overridden method `m` in `A`:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 import 'package:meta/meta.dart';
 
 class A {
@@ -4366,7 +4367,7 @@
 
 Add an invocation of the overridden method in the overriding method:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 import 'package:meta/meta.dart';
 
 class A {
@@ -4397,7 +4398,7 @@
 The following code produces this diagnostic because `A` doesn't define an
 unnamed constructor:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 class A {
   A.a();
 }
@@ -4409,7 +4410,7 @@
 
 If one of the named constructors does what you need, then use it:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 class A {
   A.a();
 }
@@ -4420,7 +4421,7 @@
 If none of the named constructors does what you need, and you're able to
 add an unnamed constructor, then add the constructor:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 class A {
   A();
   A.a();
@@ -4452,7 +4453,7 @@
 The following code produces this diagnostic because the class `B` doesn't
 have a concrete implementation of `m`:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 abstract class A {
   void m();
 }
@@ -4465,7 +4466,7 @@
 If the subclass can provide a concrete implementation for some or all of
 the abstract inherited members, then add the concrete implementations:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 abstract class A {
   void m();
 }
@@ -4478,7 +4479,7 @@
 If there is a mixin that provides an implementation of the inherited
 methods, then apply the mixin to the subclass:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 abstract class A {
   void m();
 }
@@ -4493,7 +4494,7 @@
 If the subclass can't provide a concrete implementation for all of the
 abstract inherited members, then mark the subclass as being abstract:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 abstract class A {
   void m();
 }
@@ -4515,7 +4516,7 @@
 The following code produces this diagnostic because `x` has the static type
 `int`:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 void f(int x) {
   if ([!x!]) {
     // ...
@@ -4527,7 +4528,7 @@
 
 Change the condition so that it produces a Boolean value:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 void f(int x) {
   if (x == 0) {
     // ...
@@ -4549,7 +4550,7 @@
 The following code produces this diagnostic because the type of `p` is
 `int`, but a `bool` is required:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 void f(int p) {
   assert([!p!]);
 }
@@ -4559,7 +4560,7 @@
 
 Change the expression so that it has the type `bool`:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 void f(int p) {
   assert(p > 0);
 }
@@ -4579,7 +4580,7 @@
 The following code produces this diagnostic because `x` is an `int` when it
 must be a `bool`:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 int x = 0;
 bool y = ![!x!];
 {% endprettify %}
@@ -4588,7 +4589,7 @@
 
 Replace the operand with an expression that has the type `bool`:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 int x = 0;
 bool y = !(x > 0);
 {% endprettify %}
@@ -4607,7 +4608,7 @@
 The following code produces this diagnostic because `a` isn't a Boolean
 value:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 int a = 3;
 bool b = [!a!] || a > 1;
 {% endprettify %}
@@ -4616,7 +4617,7 @@
 
 Change the operand to a Boolean value:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 int a = 3;
 bool b = a == 0 || a > 1;
 {% endprettify %}
@@ -4636,7 +4637,7 @@
 The following code produces this diagnostic because the constructor for `C`
 isn't a const constructor:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 [!@C()!]
 void f() {
 }
@@ -4651,7 +4652,7 @@
 If it's valid for the class to have a const constructor, then create a
 const constructor that can be used for the annotation:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 @C()
 void f() {
 }
@@ -4670,14 +4671,14 @@
 
 #### Description
 
-The analyzer produces this diagnostic when the expression in a case clause
-isn't a constant expression.
+The analyzer produces this diagnostic when the expression in a `case`
+clause isn't a constant expression.
 
 #### Examples
 
 The following code produces this diagnostic because `j` isn't a constant:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 void f(int i, int j) {
   switch (i) {
     case [!j!]:
@@ -4689,10 +4690,10 @@
 
 #### Common fixes
 
-Either make the expression a constant expression, or rewrite the switch
-statement as a sequence of if statements:
+Either make the expression a constant expression, or rewrite the `switch`
+statement as a sequence of `if` statements:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 void f(int i, int j) {
   if (i == j) {
     // ...
@@ -4714,7 +4715,7 @@
 
 The following code produces this diagnostic:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 var defaultValue = 3;
 
 void f([int value = [!defaultValue!]]) {}
@@ -4724,7 +4725,7 @@
 
 If the default value can be converted to be a constant, then convert it:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 const defaultValue = 3;
 
 void f([int value = defaultValue]) {}
@@ -4733,7 +4734,7 @@
 If the default value needs to change over time, then apply the default
 value inside the function:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 var defaultValue = 3;
 
 void f([int value]) {
@@ -4757,7 +4758,7 @@
 The following code produces this diagnostic because `x` isn't a constant,
 even though it appears in an implicitly constant list literal:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 var x = 2;
 var y = const <int>[0, 1, [!x!]];
 {% endprettify %}
@@ -4768,7 +4769,7 @@
 constant. In the example above, you might add the `const` keyword to the
 declaration of `x`:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 const x = 2;
 var y = const <int>[0, 1, x];
 {% endprettify %}
@@ -4778,7 +4779,7 @@
 constant. In the example above this means removing the `const` keyword
 before the list literal:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 var x = 2;
 var y = <int>[0, 1, x];
 {% endprettify %}
@@ -4789,34 +4790,34 @@
 
 #### Description
 
-The analyzer produces this diagnostic when an if element or a spread
+The analyzer produces this diagnostic when an `if` element or a spread
 element in a constant map isn't a constant element.
 
 #### Examples
 
-The following code produces this diagnostic because it is attempting to
+The following code produces this diagnostic because it's attempting to
 spread a non-constant map:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 var notConst = <int, int>{};
 var map = const <int, int>{...[!notConst!]};
 {% endprettify %}
 
 Similarly, the following code produces this diagnostic because the
-condition in the if element isn't a constant expression:
+condition in the `if` element isn't a constant expression:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 bool notConst = true;
 var map = const <int, int>{if ([!notConst!]) 1 : 2};
 {% endprettify %}
 
 #### Common fixes
 
-If the map needs to be a constant map, then make the elements  constants.
+If the map needs to be a constant map, then make the elements constants.
 In the spread example, you might do that by making the collection being
 spread a constant:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 const notConst = <int, int>{};
 var map = const <int, int>{...notConst};
 {% endprettify %}
@@ -4824,7 +4825,7 @@
 If the map doesn't need to be a constant map, then remove the `const`
 keyword:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 bool notConst = true;
 var map = <int, int>{if (notConst) 1 : 2};
 {% endprettify %}
@@ -4842,7 +4843,7 @@
 
 The following code produces this diagnostic beause `a` isn't a constant:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 var a = 'a';
 var m = const {[!a!]: 0};
 {% endprettify %}
@@ -4851,7 +4852,7 @@
 
 If the map needs to be a constant map, then make the key a constant:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 const a = 'a';
 var m = const {a: 0};
 {% endprettify %}
@@ -4859,7 +4860,7 @@
 If the map doesn't need to be a constant map, then remove the `const`
 keyword:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 var a = 'a';
 var m = {a: 0};
 {% endprettify %}
@@ -4877,7 +4878,7 @@
 
 The following code produces this diagnostic because `a` isn't a constant:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 var a = 'a';
 var m = const {0: [!a!]};
 {% endprettify %}
@@ -4886,7 +4887,7 @@
 
 If the map needs to be a constant map, then make the key a constant:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 const a = 'a';
 var m = const {0: a};
 {% endprettify %}
@@ -4894,7 +4895,7 @@
 If the map doesn't need to be a constant map, then remove the `const`
 keyword:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 var a = 'a';
 var m = {0: a};
 {% endprettify %}
@@ -4912,7 +4913,7 @@
 
 The following code produces this diagnostic because `i` isn't a constant:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 var i = 0;
 
 var s = const {[!i!]};
@@ -4922,7 +4923,7 @@
 
 If the element can be changed to be a constant, then change it:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 const i = 0;
 
 var s = const {i};
@@ -4930,7 +4931,7 @@
 
 If the element can't be a constant, then remove the keyword `const`:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 var i = 0;
 
 var s = {i};
@@ -4956,7 +4957,7 @@
 
 The following code produces this diagnostic:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 import 'package:meta/meta.dart';
 
 class C {
@@ -4971,7 +4972,7 @@
 
 Add the keyword `const` before the constructor invocation:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 import 'package:meta/meta.dart';
 
 class C {
@@ -4996,7 +4997,7 @@
 The following code produces this diagnostic because `x` is a variable, not
 a type:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 var x = 0;
 List<[!x!]> xList = [];
 {% endprettify %}
@@ -5005,7 +5006,7 @@
 
 Change the type argument to be a type:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 var x = 0;
 List<int> xList = [];
 {% endprettify %}
@@ -5017,14 +5018,14 @@
 #### Description
 
 The analyzer produces this diagnostic when the identifier following the
-`on` in a catch clause is defined to be something other than a type.
+`on` in a `catch` clause is defined to be something other than a type.
 
 #### Examples
 
 The following code produces this diagnostic because `f` is a function, not
 a type:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 void f() {
   try {
     // ...
@@ -5038,7 +5039,7 @@
 
 Change the name to the type of object that should be caught:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 void f() {
   try {
     // ...
@@ -5069,7 +5070,7 @@
 The following code produces this diagnostic because `x` can't have a value
 of `null`, but is referenced before a value was assigned to it:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 String f() {
   int x;
   return [!x!].toString();
@@ -5079,7 +5080,7 @@
 The following code produces this diagnostic because the assignment to `x`
 might not be executed, so it might have a value of `null`:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 int g(bool b) {
   int x;
   if (b) {
@@ -5093,7 +5094,7 @@
 prove, based on definite assignment analysis, that `x` won't be referenced
 without having a value assigned to it:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 int h(bool b) {
   int x;
   if (b) {
@@ -5110,7 +5111,7 @@
 
 If `null` is a valid value, then make the variable nullable:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 String f() {
   int? x;
   return x!.toString();
@@ -5120,7 +5121,7 @@
 If `null` isn’t a valid value, and there's a reasonable default value, then
 add an initializer:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 int g(bool b) {
   int x = 2;
   if (b) {
@@ -5133,7 +5134,7 @@
 Otherwise, ensure that a value was assigned on every possible code path
 before the value is accessed:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 int g(bool b) {
   int x;
   if (b) {
@@ -5151,7 +5152,7 @@
 be used if you're sure that the variable will always be assigned, even
 though the analyzer can't prove it based on definite assignment analysis.
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 int h(bool b) {
   late int x;
   if (b) {
@@ -5177,7 +5178,7 @@
 
 The following code produces this diagnostic because `f` is a function:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 f() {}
 g([!f!] v) {}
 {% endprettify %}
@@ -5201,7 +5202,7 @@
 The following code produces this diagnostic because `f` declares two
 required parameters, but only one argument is provided:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 void f(int a, int b) {}
 void g() {
   f[!(0)!];
@@ -5212,7 +5213,7 @@
 
 Add arguments corresponding to the remaining parameters:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 void f(int a, int b) {}
 void g() {
   f(0, 1);
@@ -5239,7 +5240,7 @@
 The following code produces this diagnostic because `x` is implicitly
 initialized to `null` when it isn't allowed to be `null`:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 class C {
   int [!x!];
 }
@@ -5250,7 +5251,7 @@
 one of the constructors, even though it's initialized by other
 constructors:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 class C {
   int x;
 
@@ -5265,7 +5266,7 @@
 If there's a reasonable default value for the field that’s the same for all
 instances, then add an initializer expression:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 class C {
   int x = 0;
 }
@@ -5275,7 +5276,7 @@
 then add a constructor that sets the value of the field or update an
 existing constructor:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 class C {
   int x;
 
@@ -5288,7 +5289,7 @@
 an exception being thrown at runtime. This approach should only be used if
 you're sure that the field will always be assigned before it's referenced.
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 class C {
   late int x;
 }
@@ -5311,7 +5312,7 @@
 The following code produces this diagnostic because the field `f` can't be
 initialized to `null`:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 class C {
   static int [!f!];
 }
@@ -5320,7 +5321,7 @@
 Similarly, the following code produces this diagnostic because the
 top-level variable `v` can't be initialized to `null`:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 int [!v!];
 {% endprettify %}
 
@@ -5329,7 +5330,7 @@
 If the field or variable can't be initialized to `null`, then add an
 initializer that sets it to a non-null value:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 class C {
   static int f = 0;
 }
@@ -5338,14 +5339,14 @@
 If the field or variable should be initialized to `null`, then change the
 type to be nullable:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 int? v;
 {% endprettify %}
 
 If the field or variable can't be initialized in the declaration but will
 always be initialized before it's referenced, then mark it as being `late`:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 class C {
   static late int f;
 }
@@ -5365,7 +5366,7 @@
 
 The following code produces this diagnostic:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 var m = <String, int>{'a': 0, 'b': 1};
 var s = <String>{...[!m!]};
 {% endprettify %}
@@ -5375,7 +5376,7 @@
 The most common fix is to replace the expression with one that produces an
 iterable object:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 var m = <String, int>{'a': 0, 'b': 1};
 var s = <String>{...m.keys};
 {% endprettify %}
@@ -5394,7 +5395,7 @@
 
 The following code produces this diagnostic because `l` isn't a `Map`:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 var l =  <String>['a', 'b'];
 var m = <int, String>{...[!l!]};
 {% endprettify %}
@@ -5404,7 +5405,7 @@
 The most common fix is to replace the expression with one that produces a
 map:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 var l =  <String>['a', 'b'];
 var m = <int, String>{...l.asMap()};
 {% endprettify %}
@@ -5426,7 +5427,7 @@
 class can't be used as an annotation without invoking a `const` constructor
 from the class:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 class C {
   const C();
 }
@@ -5439,7 +5440,7 @@
 
 Add the missing argument list:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 class C {
   const C();
 }
@@ -5456,16 +5457,16 @@
 #### Description
 
 The analyzer produces this diagnostic when the type following `on` in a
-catch clause is a nullable type. It isn't valid to specify a nullable type
-because it isn't possible to catch `null` (because it's a runtime error to
-throw `null`).
+`catch` clause is a nullable type. It isn't valid to specify a nullable
+type because it isn't possible to catch `null` (because it's a runtime
+error to throw `null`).
 
 #### Example
 
 The following code produces this diagnostic because the exception type is
 specified to allow `null` when `null` can't be thrown:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 void f() {
   try {
     // ...
@@ -5478,7 +5479,7 @@
 
 Remove the question mark from the type:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 void f() {
   try {
     // ...
@@ -5494,12 +5495,12 @@
 #### Description
 
 The analyzer produces this diagnostic when a class declaration uses an
-extends clause to specify a superclass, and the superclass is followed by a
-`?`.
+`extends` clause to specify a superclass, and the superclass is followed by
+a `?`.
 
 It isn't valid to specify a nullable superclass because doing so would have
 no meaning; it wouldn't change either the interface or implementation being
-inherited by the class containing the extends clause.
+inherited by the class containing the `extends` clause.
 
 Note, however, that it _is_ valid to use a nullable type as a type argument
 to the superclass, such as `class A extends B<C?> {}`.
@@ -5507,9 +5508,9 @@
 #### Example
 
 The following code produces this diagnostic because `A?` is a nullable
-type, and nullable types can't be used in an extends clause:
+type, and nullable types can't be used in an `extends` clause:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 class A {}
 class B extends [!A?!] {}
 {% endprettify %}
@@ -5518,7 +5519,7 @@
 
 Remove the question mark from the type:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 class A {}
 class B extends A {}
 {% endprettify %}
@@ -5530,11 +5531,11 @@
 #### Description
 
 The analyzer produces this diagnostic when a class or mixin declaration has
-an implements clause, and an interface is followed by a `?`.
+an `implements` clause, and an interface is followed by a `?`.
 
 It isn't valid to specify a nullable interface because doing so would have
 no meaning; it wouldn't change the interface being inherited by the class
-containing the implements clause.
+containing the `implements` clause.
 
 Note, however, that it _is_ valid to use a nullable type as a type argument
 to the interface, such as `class A implements B<C?> {}`.
@@ -5543,9 +5544,9 @@
 #### Example
 
 The following code produces this diagnostic because `A?` is a nullable
-type, and nullable types can't be used in an implements clause:
+type, and nullable types can't be used in an `implements` clause:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 class A {}
 class B implements [!A?!] {}
 {% endprettify %}
@@ -5554,7 +5555,7 @@
 
 Remove the question mark from the type:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 class A {}
 class B implements A {}
 {% endprettify %}
@@ -5565,13 +5566,13 @@
 
 #### Description
 
-The analyzer produces this diagnostic when a mixin declaration uses an on
+The analyzer produces this diagnostic when a mixin declaration uses an `on`
 clause to specify a superclass constraint, and the class that's specified
 is followed by a `?`.
 
 It isn't valid to specify a nullable superclass constraint because doing so
 would have no meaning; it wouldn't change the interface being depended on
-by the mixin containing the on clause.
+by the mixin containing the `on` clause.
 
 Note, however, that it _is_ valid to use a nullable type as a type argument
 to the superclass constraint, such as `mixin A on B<C?> {}`.
@@ -5580,9 +5581,9 @@
 #### Example
 
 The following code produces this diagnostic because `A?` is a nullable type
-and nullable types can't be used in an on clause:
+and nullable types can't be used in an `on` clause:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 class C {}
 mixin M on [!C?!] {}
 {% endprettify %}
@@ -5591,7 +5592,7 @@
 
 Remove the question mark from the type:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 class C {}
 mixin M on C {}
 {% endprettify %}
@@ -5603,11 +5604,11 @@
 #### Description
 
 The analyzer produces this diagnostic when a class or mixin declaration has
-a with clause, and a mixin is followed by a `?`.
+a `with` clause, and a mixin is followed by a `?`.
 
 It isn't valid to specify a nullable mixin because doing so would have no
 meaning; it wouldn't change either the interface or implementation being
-inherited by the class containing the with clause.
+inherited by the class containing the `with` clause.
 
 Note, however, that it _is_ valid to use a nullable type as a type argument
 to the mixin, such as `class A with B<C?> {}`.
@@ -5615,9 +5616,9 @@
 #### Example
 
 The following code produces this diagnostic because `A?` is a nullable
-type, and nullable types can't be used in a with clause:
+type, and nullable types can't be used in a `with` clause:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 mixin M {}
 class C with [!M?!] {}
 {% endprettify %}
@@ -5626,7 +5627,7 @@
 
 Remove the question mark from the type:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 mixin M {}
 class C with M {}
 {% endprettify %}
@@ -5652,7 +5653,7 @@
 The following code produces this diagnostic because `m` isn't declared in
 any of the supertypes of `C`:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 class C {
   @override
   String [!m!]() => '';
@@ -5664,7 +5665,7 @@
 If the member is intended to override a member with a different name, then
 update the member to have the same name:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 class C {
   @override
   String toString() => '';
@@ -5690,7 +5691,7 @@
 
 Given a file named `part.dart` containing
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 part of 'library.dart';
 {% endprettify %}
 
@@ -5698,7 +5699,7 @@
 diagnostic because it attempts to include `part.dart` as a part of itself
 when `part.dart` is a part of a different library:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 part [!'package:a/part.dart'!];
 {% endprettify %}
 
@@ -5724,14 +5725,14 @@
 
 Given a file (`a.dart`) containing:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 class A {}
 {% endprettify %}
 
 The following code produces this diagnostic because `a.dart` doesn't
 contain a part-of directive:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 part [!'a.dart'!];
 {% endprettify %}
 
@@ -5740,7 +5741,7 @@
 If the referenced file is intended to be a part of another library, then
 add a part-of directive to the file:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 part of 'test.dart';
 
 class A {}
@@ -5749,7 +5750,7 @@
 If the referenced file is intended to be a library, then replace the part
 directive with an import directive:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 import 'a.dart';
 {% endprettify %}
 
@@ -5769,7 +5770,7 @@
 The following code produces this diagnostic because the prefix `math` is
 being used as if it were a variable:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 import 'dart:math' as math;
 
 void f() {
@@ -5782,7 +5783,7 @@
 If the code is incomplete, then reference something in one of the libraries
 associated with the prefix:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 import 'dart:math' as math;
 
 void f() {
@@ -5810,7 +5811,7 @@
 The following code produces this diagnostic because the constructor for `A`
 doesn't declare a parameter that the constructor for `B` requires:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 abstract class A {
   factory A() = [!B!];
 }
@@ -5825,7 +5826,7 @@
 declares a named parameter (`y`) that the constructor for `B` doesn't
 allow:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 abstract class A {
   factory A(int x, {int y}) = [!B!];
 }
@@ -5840,7 +5841,7 @@
 If there's a different constructor that is compatible with the redirecting
 constructor, then redirect to that constructor:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 abstract class A {
   factory A() = B.zero;
 }
@@ -5853,7 +5854,7 @@
 
 Otherwise, update the redirecting constructor to be compatible:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 abstract class A {
   factory A(int x) = B;
 }
@@ -5879,7 +5880,7 @@
 of `C`, which means that the value returned by the constructor `A()`
 couldn't be returned from the constructor `C()`:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 class A {}
 
 class B implements C {}
@@ -5895,7 +5896,7 @@
 class, then update the factory constructor to redirect to the correct
 constructor:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 class A {}
 
 class B implements C {}
@@ -5908,7 +5909,7 @@
 If the class defining the constructor being redirected to is the class that
 should be returned, then make it a subtype of the factory's return type:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 class A implements C {}
 
 class B implements C {}
@@ -5933,7 +5934,7 @@
 
 The following code produces this diagnostic because `f` is a function:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 C f() => throw 0;
 
 class C {
@@ -5952,7 +5953,7 @@
 If you're trying to return the value returned by a function, then rewrite
 the constructor to return the value from the constructor's body:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 C f() => throw 0;
 
 class C {
@@ -5979,7 +5980,7 @@
 The following code produces this diagnostic because `i` is used before it
 is declared:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 void f() {
   print([!i!]);
   int i = 5;
@@ -5991,7 +5992,7 @@
 If you intended to reference the local variable, move the declaration
 before the first reference:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 void f() {
   int i = 5;
   print(i);
@@ -6002,7 +6003,7 @@
 parameter, instance field or top-level variable, then rename the local
 declaration so that it doesn't hide the outer variable.
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 void f(int i) {
   print(i);
   int x = 5;
@@ -6017,16 +6018,16 @@
 #### Description
 
 The analyzer produces this diagnostic when a generative constructor
-contains a return statement that specifies a value to be returned.
+contains a `return` statement that specifies a value to be returned.
 Generative constructors always return the object that was created, and
 therefore can't return a different object.
 
 #### Example
 
-The following code produces this diagnostic because the return statement
+The following code produces this diagnostic because the `return` statement
 has an expression:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 class C {
   C() {
     return [!this!];
@@ -6037,9 +6038,9 @@
 #### Common fixes
 
 If the constructor should create a new instance, then remove either the
-return statement or the expression:
+`return` statement or the expression:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 class C {
   C();
 }
@@ -6048,7 +6049,7 @@
 If the constructor shouldn't create a new instance, then convert it to be a
 factory constructor:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 class C {
   factory C() {
     return _instance;
@@ -6081,7 +6082,7 @@
 The following code produces this diagnostic because `f` has a return type
 of `String` but is returning an `int`:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 String f() => [!3!];
 {% endprettify %}
 
@@ -6090,13 +6091,13 @@
 If the return type is correct, then replace the value being returned with a
 value of the correct type, possibly by converting the existing value:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 String f() => 3.toString();
 {% endprettify %}
 
 If the value is correct, then change the return type to match:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 int f() => 3;
 {% endprettify %}
 
@@ -6116,7 +6117,7 @@
 function that returns a `String`, but the closure assigned to it returns an
 `int`:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 String Function(String) f = (s) => [!3!];
 {% endprettify %}
 
@@ -6125,7 +6126,7 @@
 If the return type is correct, then replace the returned value with a value
 of the correct type, possibly by converting the existing value:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 String Function(String) f = (s) => 3.toString();
 {% endprettify %}
 
@@ -6135,7 +6136,7 @@
 
 #### Description
 
-The analyzer produces this diagnostic when it finds a return statement
+The analyzer produces this diagnostic when it finds a `return` statement
 without an expression in a function that declares a return type.
 
 #### Examples
@@ -6143,7 +6144,7 @@
 The following code produces this diagnostic because the function `f` is
 expected to return an `int`, but no value is being returned:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 int f() {
   [!return!];
 }
@@ -6153,7 +6154,7 @@
 
 Add an expression that computes the value to be returned:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 int f() {
   return 0;
 }
@@ -6185,7 +6186,7 @@
 In the package that has that pubspec, code like the following produces this
 diagnostic:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 void f([!Future!] f) {}
 {% endprettify %}
 
@@ -6202,7 +6203,7 @@
 If you need to support older versions of the SDK, then import the
 `dart:async` library.
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 import 'dart:async';
 
 void f(Future f) {}
@@ -6215,10 +6216,10 @@
 
 #### Description
 
-The analyzer produces this diagnostic when an as expression inside a
+The analyzer produces this diagnostic when an `as` expression inside a
 [constant context](#constant-context) is found in code that has an SDK
-constraint whose lower bound is less than 2.3.2. Using an as expression in
-a [constant context](#constant-context) wasn't supported in earlier
+constraint whose lower bound is less than 2.3.2. Using an `as` expression
+in a [constant context](#constant-context) wasn't supported in earlier
 versions, so this code won't be able to run against earlier versions of the
 SDK.
 
@@ -6235,7 +6236,7 @@
 In the package that has that pubspec, code like the following produces
 this diagnostic:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 const num n = 3;
 const int i = [!n as int!];
 {% endprettify %}
@@ -6251,10 +6252,10 @@
 ```
 
 If you need to support older versions of the SDK, then either rewrite the
-code to not use an as expression, or change the code so that the as
-expression is not in a [constant context](#constant-context).:
+code to not use an `as` expression, or change the code so that the `as`
+expression isn't in a [constant context](#constant-context):
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 num x = 3;
 int y = x as int;
 {% endprettify %}
@@ -6266,7 +6267,7 @@
 
 #### Description
 
-The analyzer produces this diagnostic when any use of the `&`, `|` or `^`
+The analyzer produces this diagnostic when any use of the `&`, `|`, or `^`
 operators on the class `bool` inside a
 [constant context](#constant-context) is found in code that has an SDK
 constraint whose lower bound is less than 2.3.2. Using these operators in a
@@ -6286,7 +6287,7 @@
 In the package that has that pubspec, code like the following produces this
 diagnostic:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 const bool a = true;
 const bool b = false;
 const bool c = a [!&!] b;
@@ -6304,9 +6305,9 @@
 
 If you need to support older versions of the SDK, then either rewrite the
 code to not use these operators, or change the code so that the expression
-is not in a [constant context](#constant-context).:
+isn't in a [constant context](#constant-context):
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 const bool a = true;
 const bool b = false;
 bool c = a & b;
@@ -6339,7 +6340,7 @@
 In the package that has that pubspec, code like the following produces this
 diagnostic:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 class C {}
 const C a = null;
 const C b = null;
@@ -6358,9 +6359,9 @@
 
 If you need to support older versions of the SDK, then either rewrite the
 code to not use the `==` operator, or change the code so that the
-expression is not in a [constant context](#constant-context).:
+expression isn't in a [constant context](#constant-context):
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 class C {}
 const C a = null;
 const C b = null;
@@ -6393,7 +6394,7 @@
 In the package that has that pubspec, code like the following produces
 this diagnostic:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 [!extension!] E on String {
   void sayHello() {
     print('Hello $this');
@@ -6416,7 +6417,7 @@
 the members of the extension as top-level functions (or methods) that take
 the value that would have been bound to `this` as a parameter:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 void sayHello(String s) {
   print('Hello $s');
 }
@@ -6429,10 +6430,10 @@
 
 #### Description
 
-The analyzer produces this diagnostic when an is expression inside a
+The analyzer produces this diagnostic when an `is` expression inside a
 [constant context](#constant-context) is found in code that has an SDK
-constraint whose lower bound is less than 2.3.2. Using an is expression in
-a [constant context](#constant-context) wasn't supported in earlier
+constraint whose lower bound is less than 2.3.2. Using an `is` expression
+in a [constant context](#constant-context) wasn't supported in earlier
 versions, so this code won't be able to run against earlier versions of the
 SDK.
 
@@ -6449,7 +6450,7 @@
 In the package that has that pubspec, code like the following produces
 this diagnostic:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 const x = 4;
 const y = [!x is int!] ? 0 : 1;
 {% endprettify %}
@@ -6465,11 +6466,11 @@
 ```
 
 If you need to support older versions of the SDK, then either rewrite the
-code to not use the is operator, or, if that's not possible, change the
-code so that the is expression is not in a
-[constant context](#constant-context).:
+code to not use the `is` operator, or, if that isn't possible, change the
+code so that the `is` expression isn't in a
+[constant context](#constant-context):
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 const x = 4;
 var y = x is int ? 0 : 1;
 {% endprettify %}
@@ -6499,7 +6500,7 @@
 In the package that has that pubspec, code like the following produces this
 diagnostic:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 var s = [!<int>{}!];
 {% endprettify %}
 
@@ -6516,7 +6517,7 @@
 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:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 var s = new Set<int>();
 {% endprettify %}
 
@@ -6546,7 +6547,7 @@
 In the package that has that pubspec, code like the following produces
 this diagnostic:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 var digits = [[!for (int i = 0; i < 10; i++) i!]];
 {% endprettify %}
 
@@ -6563,7 +6564,7 @@
 If you need to support older versions of the SDK, then rewrite the code to
 not make use of those elements:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 var digits = _initializeDigits();
 
 List<int> _initializeDigits() {
@@ -6602,7 +6603,7 @@
 In the package that has that pubspec, code like the following produces
 this diagnostic:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 const a = [1, 2];
 const b = [[!...a!]];
 {% endprettify %}
@@ -6620,15 +6621,15 @@
 If you need to support older versions of the SDK, then rewrite the code to
 not make use of those elements:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 const a = [1, 2];
 const b = [1, 2];
 {% endprettify %}
 
-If that's not possible, change the code so that the element is not in a
-[constant context](#constant-context).:
+If that isn't possible, change the code so that the element isn't in a
+[constant context](#constant-context):
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 const a = [1, 2];
 var b = [...a];
 {% endprettify %}
@@ -6648,7 +6649,7 @@
 The following code produces this diagnostic because `x` is an instance
 field:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 class C {
   static int a;
 
@@ -6663,7 +6664,7 @@
 If you intend to access a static field, then change the name of the field
 to an existing static field:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 class C {
   static int a;
 
@@ -6676,7 +6677,7 @@
 If you intend to access the instance field, then use an instance of the
 class to access the field:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 class C {
   static int a;
 
@@ -6702,7 +6703,7 @@
 The following code produces this diagnostic because `super` can't be used
 in an extension:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 extension E on Object {
   String get displayString => [!super!].toString();
 }
@@ -6712,7 +6713,7 @@
 
 Remove the `super` keyword :
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 extension E on Object {
   String get displayString => toString();
 }
@@ -6732,7 +6733,7 @@
 The following code produces this diagnostic because `super` is used in a
 top-level function:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 void f() {
   [!super!].f();
 }
@@ -6750,15 +6751,15 @@
 #### Description
 
 The analyzer produces this diagnostic when the type of the expression in a
-switch statement isn't assignable to the type of the expressions in the
-case clauses.
+`switch` statement isn't assignable to the type of the expressions in the
+`case` clauses.
 
 #### Example
 
 The following code produces this diagnostic because the type of `s`
 (`String`) isn't assignable to the type of `0` (`int`):
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 void f(String s) {
   switch ([!s!]) {
     case 0:
@@ -6769,10 +6770,10 @@
 
 #### Common fixes
 
-If the type of the case expressions is correct, then change the expression
-in the switch statement to have the correct type:
+If the type of the `case` expressions is correct, then change the
+expression in the `switch` statement to have the correct type:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 void f(String s) {
   switch (int.parse(s)) {
     case 0:
@@ -6781,10 +6782,10 @@
 }
 {% endprettify %}
 
-If the type of the switch expression is correct, then change the case
+If the type of the `switch` expression is correct, then change the `case`
 expressions to have the correct type:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 void f(String s) {
   switch (s) {
     case '0':
@@ -6800,7 +6801,7 @@
 #### Description
 
 The analyzer produces this diagnostic when the type of the expression in a
-throw expression is not assignable to `Object`. It’s not valid to throw
+throw expression isn't assignable to `Object`. It isn't valid to throw
 `null`, so it isn't valid to use an expression that might evaluate to
 `null`.
 
@@ -6808,7 +6809,7 @@
 
 The following code produces this diagnostic because `s` might be `null`:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 void f(String? s) {
   throw [!s!];
 }
@@ -6818,7 +6819,7 @@
 
 Add an explicit null check to the expression:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 void f(String? s) {
   throw s!;
 }
@@ -6838,7 +6839,7 @@
 The following code produces this diagnostic because `String` isn't a
 subclass of `num`:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 class A<E extends num> {}
 
 var a = A<[!String!]>();
@@ -6848,7 +6849,7 @@
 
 Change the type argument to be a subclass of the bounds:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 class A<E extends num> {}
 
 var a = A<int>();
@@ -6868,7 +6869,7 @@
 The following code produces this diagnostic because the name `Srting` isn't
 defined:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 void f(Object o) {
   if (o is [!Srting!]) {
     // ...
@@ -6880,7 +6881,7 @@
 
 Replace the name with the name of a type:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 void f(Object o) {
   if (o is String) {
     // ...
@@ -6904,7 +6905,7 @@
 The following code produces this diagnostic because `s` can be `null` at
 the point where it's referenced:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 void f(String? s) {
   if ([!s!].length > 3) {
     // ...
@@ -6917,7 +6918,7 @@
 If the value really can be `null`, then add a test to ensure that members
 are only accessed when the value isn't `null`:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 void f(String? s) {
   if (s != null && s.length > 3) {
     // ...
@@ -6928,7 +6929,7 @@
 If the expression is a variable and the value should never be `null`, then
 change the type of the variable to be non-nullable:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 void f(String s) {
   if (s.length > 3) {
     // ...
@@ -6941,7 +6942,7 @@
 having an exception thrown at runtime if you're wrong, then you can assert
 that the value isn't null:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 void f(String? s) {
   if (s!.length > 3) {
     // ...
@@ -6963,7 +6964,7 @@
 The following code produces this diagnostic because the name `undefined`
 isn't defined:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 [!@undefined!]
 void f() {}
 {% endprettify %}
@@ -6973,7 +6974,7 @@
 If the name is correct, but it isn’t declared yet, then declare the name as
 a constant value:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 const undefined = 'undefined';
 
 @undefined
@@ -6982,7 +6983,7 @@
 
 If the name is wrong, replace the name with the name of a valid constant:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 @deprecated
 void f() {}
 {% endprettify %}
@@ -7003,7 +7004,7 @@
 
 The following code produces this diagnostic because `Piont` isn't defined:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 class Point {}
 
 void f([!Piont!] p) {}
@@ -7015,7 +7016,7 @@
 the name of a class that is defined. The example above can be corrected by
 fixing the spelling of the class:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 class Point {}
 
 void f(Point p) {}
@@ -7041,7 +7042,7 @@
 The following code produces this diagnostic because `A` doesn't have an
 unnamed constructor:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 class A {
   A.n();
 }
@@ -7053,7 +7054,7 @@
 The following code produces this diagnostic because `A` doesn't have a
 constructor named `m`:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 class A {
   A.n();
 }
@@ -7067,7 +7068,7 @@
 If the superclass defines a constructor that should be invoked, then change
 the constructor being invoked:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 class A {
   A.n();
 }
@@ -7079,7 +7080,7 @@
 If the superclass doesn't define an appropriate constructor, then define
 the constructor being invoked:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 class A {
   A.m();
   A.n();
@@ -7104,7 +7105,7 @@
 The following code produces this diagnostic because `E` doesn't define a
 constant named `c`:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 enum E {a, b}
 
 var e = E.[!c!];
@@ -7115,7 +7116,7 @@
 If the constant should be defined, then add it to the declaration of the
 enum:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 enum E {a, b, c}
 
 var e = E.c;
@@ -7124,7 +7125,7 @@
 If the constant shouldn't be defined, then change the name to the name of
 an existing constant:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 enum E {a, b}
 
 var e = E.b;
@@ -7146,7 +7147,7 @@
 The following code produces this diagnostic because the extension `E`
 doesn't declare an instance getter named `b`:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 extension E on String {
   String get a => 'a';
 }
@@ -7163,7 +7164,7 @@
 The following code produces this diagnostic because the extension `E`
 doesn't declare a static getter named `a`:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 extension E on String {}
 
 var x = E.[!a!];
@@ -7174,7 +7175,7 @@
 If the name of the getter is incorrect, then change it to the name of an
 existing getter:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 extension E on String {
   String get a => 'a';
 }
@@ -7191,7 +7192,7 @@
 If the name of the getter is correct but the name of the extension is
 wrong, then change the name of the extension to the correct name:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 extension E on String {
   String get a => 'a';
 }
@@ -7208,7 +7209,7 @@
 If the name of the getter and extension are both correct, but the getter
 isn't defined, then define the getter:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 extension E on String {
   String get a => 'a';
   String get b => 'z';
@@ -7239,7 +7240,7 @@
 The following code produces this diagnostic because the extension `E`
 doesn't declare an instance method named `b`:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 extension E on String {
   String a() => 'a';
 }
@@ -7256,7 +7257,7 @@
 The following code produces this diagnostic because the extension `E`
 doesn't declare a static method named `a`:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 extension E on String {}
 
 var x = E.[!a!]();
@@ -7267,7 +7268,7 @@
 If the name of the method is incorrect, then change it to the name of an
 existing method:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 extension E on String {
   String a() => 'a';
 }
@@ -7284,7 +7285,7 @@
 If the name of the method is correct, but the name of the extension is
 wrong, then change the name of the extension to the correct name:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 extension E on String {
   String a() => 'a';
 }
@@ -7301,7 +7302,7 @@
 If the name of the method and extension are both correct, but the method
 isn't defined, then define the method:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 extension E on String {
   String a() => 'a';
   String b() => 'z';
@@ -7332,7 +7333,7 @@
 The following code produces this diagnostic because the extension `E`
 doesn't declare an instance setter named `b`:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 extension E on String {
   set a(String v) {}
 }
@@ -7349,7 +7350,7 @@
 The following code produces this diagnostic because the extension `E`
 doesn't declare a static setter named `a`:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 extension E on String {}
 
 void f() {
@@ -7362,7 +7363,7 @@
 If the name of the setter is incorrect, then change it to the name of an
 existing setter:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 extension E on String {
   set a(String v) {}
 }
@@ -7379,7 +7380,7 @@
 If the name of the setter is correct, but the name of the extension is
 wrong, then change the name of the extension to the correct name:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 extension E on String {
   set a(String v) {}
 }
@@ -7396,7 +7397,7 @@
 If the name of the setter and extension are both correct, but the setter
 isn't defined, then define the setter:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 extension E on String {
   set a(String v) {}
   set b(String v) {}
@@ -7426,7 +7427,7 @@
 The following code produces this diagnostic because the name `emty` isn't
 defined:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 List<int> empty() => [];
 
 void main() {
@@ -7440,7 +7441,7 @@
 the name of a function that is defined. The example above can be corrected
 by fixing the spelling of the function:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 List<int> empty() => [];
 
 void main() {
@@ -7466,7 +7467,7 @@
 The following code produces this diagnostic because `String` has no member
 named `len`:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 int f(String s) => s.[!len!];
 {% endprettify %}
 
@@ -7476,7 +7477,7 @@
 the name of a getter that is defined. The example above can be corrected by
 fixing the spelling of the getter:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 int f(String s) => s.length;
 {% endprettify %}
 
@@ -7494,7 +7495,7 @@
 The following code produces this diagnostic because `dart:math` doesn't
 define the name `String`:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 import 'dart:math' hide [!String!], max;
 
 var x = min(0, 1);
@@ -7505,7 +7506,7 @@
 If a different name should be hidden, then correct the name. Otherwise,
 remove the name from the list:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 import 'dart:math' hide max;
 
 var x = min(0, 1);
@@ -7526,7 +7527,7 @@
 The following code produces this diagnostic because the name `rihgt` isn't
 defined:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 int min(int left, int right) => left <= [!rihgt!] ? left : right;
 {% endprettify %}
 
@@ -7536,7 +7537,7 @@
 an identifier that is defined. The example above can be corrected by
 fixing the spelling of the variable:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 int min(int left, int right) => left <= right ? left : right;
 {% endprettify %}
 
@@ -7560,7 +7561,7 @@
 used in the body of `f` even though the body of `f` isn't marked with the
 `async` keyword:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 void f(p) { [!await!] p; }
 {% endprettify %}
 
@@ -7568,7 +7569,7 @@
 
 Add the keyword `async` to the function body:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 void f(p) async { await p; }
 {% endprettify %}
 
@@ -7587,7 +7588,7 @@
 The following code produces this diagnostic because the identifier
 `removeMiddle` isn't defined:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 int f(List<int> l) => l.[!removeMiddle!]();
 {% endprettify %}
 
@@ -7597,7 +7598,7 @@
 the name of a method that is defined. The example above can be corrected by
 fixing the spelling of the method:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 int f(List<int> l) => l.removeLast();
 {% endprettify %}
 
@@ -7616,7 +7617,7 @@
 The following code produces this diagnostic because `m` doesn't declare a
 named parameter named `a`:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 class C {
   m({int b}) {}
 }
@@ -7631,7 +7632,7 @@
 If the argument name is mistyped, then replace it with the correct name.
 The example above can be fixed by changing `a` to `b`:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 class C {
   m({int b}) {}
 }
@@ -7644,7 +7645,7 @@
 If a subclass adds a parameter with the name in question, then cast the
 target to the subclass:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 class C {
   m({int b}) {}
 }
@@ -7660,7 +7661,7 @@
 
 If the parameter should be added to the function, then add it:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 class C {
   m({int a, int b}) {}
 }
@@ -7684,7 +7685,7 @@
 The following code produces this diagnostic because the class `C` doesn't
 define the operator `+`:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 class C {}
 
 C f(C c) => c [!+!] 2;
@@ -7694,7 +7695,7 @@
 
 If the operator should be defined for the class, then define it:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 class C {
   C operator +(int i) => this;
 }
@@ -7718,7 +7719,7 @@
 The following code produces this diagnostic because `dart:core` doesn't
 define anything named `a`:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 import 'dart:core' as p;
 
 void f() {
@@ -7749,7 +7750,7 @@
 The following code produces this diagnostic because there isn't a setter
 named `z`:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 class C {
   int x = 0;
   void m(int y) {
@@ -7764,7 +7765,7 @@
 the name of a setter that is defined. The example above can be corrected by
 fixing the spelling of the setter:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 class C {
   int x = 0;
   void m(int y) {
@@ -7787,7 +7788,7 @@
 The following code produces this diagnostic because `dart:math` doesn't
 define the name `String`:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 import 'dart:math' show min, [!String!];
 
 var x = min(0, 1);
@@ -7798,7 +7799,7 @@
 If a different name should be shown, then correct the name. Otherwise,
 remove the name from the list:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 import 'dart:math' show min;
 
 var x = min(0, 1);
@@ -7819,7 +7820,7 @@
 The following code produces this diagnostic because `Object` doesn't define
 a member named `n`:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 class C {
   void m() {
     super.[!n!]();
@@ -7852,7 +7853,7 @@
 The following code produces this diagnostic because `n` is already known to
 be an `int` as a result of the `is` test:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 void f(num n) {
   if (n is int) {
     ([!n as int!]).isEven;
@@ -7864,7 +7865,7 @@
 
 Remove the unnecessary cast:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 void f(num n) {
   if (n is int) {
     n.isEven;
@@ -7885,7 +7886,7 @@
 
 The following code produces this diagnostic because `x` can't be `null`:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 int f(int x) {
   return x[!!!];
 }
@@ -7895,7 +7896,7 @@
 
 Remove the null check operator (`!`):
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 int f(int x) {
   return x;
 }
@@ -7919,7 +7920,7 @@
 The following code produces this diagnostic because `x` can never be
 `null`, so the comparison always evaluates to `true`:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 void f(int x) {
   if (x [!!= null!]) {
     print(x);
@@ -7930,7 +7931,7 @@
 The following code produces this diagnostic because `x` can never be
 `null`, so the comparison always evaluates to `false`:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 void f(int x) {
   if (x [!== null!]) {
     throw ArgumentError("x can't be null");
@@ -7943,7 +7944,7 @@
 If the other operand should be able to be `null`, then change the type of
 the operand:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 void f(int? x) {
   if (x != null) {
     print(x);
@@ -7953,7 +7954,7 @@
 
 If the other operand really can't be `null`, then remove the condition:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 void f(int x) {
   print(x);
 }
@@ -7975,7 +7976,7 @@
 The following code produces this diagnostic because `m` is a static member
 of the extended type `C`:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 class C {
   static void m() {}
 }
@@ -7993,7 +7994,7 @@
 extension, then add the name of the class or extension before the reference
 to the member:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 class C {
   static void m() {}
 }
@@ -8007,7 +8008,7 @@
 
 If you're referencing a member that isn't declared yet, add a declaration:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 class C {
   static void m() {}
 }
@@ -8027,15 +8028,15 @@
 
 #### Description
 
-The analyzer produces this diagnostic when a catch clause is found, and
+The analyzer produces this diagnostic when a `catch` clause is found, and
 neither the exception parameter nor the optional stack trace parameter are
-used in the catch block.
+used in the `catch` block.
 
 #### Examples
 
 The following code produces this diagnostic because `e` isn't referenced:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 void f() {
   try {
     int.parse(';');
@@ -8047,9 +8048,9 @@
 
 #### Common fixes
 
-Remove the unused catch clause:
+Remove the unused `catch` clause:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 void f() {
   try {
     int.parse(';');
@@ -8066,14 +8067,14 @@
 #### Description
 
 The analyzer produces this diagnostic when the stack trace parameter in a
-catch clause isn't referenced within the body of the catch block.
+`catch` clause isn't referenced within the body of the `catch` block.
 
 #### Examples
 
 The following code produces this diagnostic because `stackTrace` isn't
 referenced:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 void f() {
   try {
     // ...
@@ -8088,7 +8089,7 @@
 If you need to reference the stack trace parameter, then add a reference to
 it. Otherwise, remove it:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 void f() {
   try {
     // ...
@@ -8113,7 +8114,7 @@
 Assuming that no code in the library references `_C`, the following code
 produces this diagnostic:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 class [!_C!] {}
 {% endprettify %}
 
@@ -8137,7 +8138,7 @@
 The following code produces this diagnostic because `_x` isn't referenced
 anywhere in the library:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 class Point {
   int [!_x!];
 }
@@ -8164,7 +8165,7 @@
 The following code produces this diagnostic because nothing defined in
 `dart:async` is referenced in the library:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 import [!'dart:async'!];
 
 void main() {}
@@ -8191,7 +8192,7 @@
 The following code produces this diagnostic because the label `loop` isn't
 referenced anywhere in the method:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 void f(int limit) {
   [!loop:!] for (int i = 0; i < limit; i++) {
     print(i);
@@ -8203,7 +8204,7 @@
 
 If the label isn't needed, then remove it:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 void f(int limit) {
   for (int i = 0; i < limit; i++) {
     print(i);
@@ -8213,7 +8214,7 @@
 
 If the label is needed, then use it:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 void f(int limit) {
   loop: for (int i = 0; i < limit; i++) {
     print(i);
@@ -8236,7 +8237,7 @@
 The following code produces this diagnostic because the value of `count` is
 never read:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 void main() {
   int [!count!] = 0;
 }
@@ -8263,7 +8264,7 @@
 The following code produces this diagnostic because the function `max`
 isn't used:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 import 'dart:math' show min, [!max!];
 
 var x = min(0, 1);
@@ -8273,7 +8274,7 @@
 
 Either use the name or remove it:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 import 'dart:math' show min;
 
 var x = min(0, 1);
@@ -8293,7 +8294,7 @@
 If the file `lib.dart` doesn't exist, the following code produces this
 diagnostic:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 import [!'lib.dart'!];
 {% endprettify %}
 
@@ -8325,7 +8326,7 @@
 If the file `lib.g.dart` doesn't exist, the following code produces this
 diagnostic:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 import [!'lib.g.dart'!];
 {% endprettify %}
 
@@ -8353,7 +8354,7 @@
 The following code produces this diagnostic because `f` doesn't produce an
 object on which `toString` can be invoked:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 void f() {}
 
 void g() {
@@ -8380,7 +8381,7 @@
 The following code produces this diagnostic because the value of `x` is an
 `int`, which can't be assigned to `y` because an `int` isn't a `String`:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 const Object x = 0;
 const String y = [!x!];
 {% endprettify %}
@@ -8390,7 +8391,7 @@
 If the declaration of the constant is correct, then change the value being
 assigned to be of the correct type:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 const Object x = 0;
 const String y = '$x';
 {% endprettify %}
@@ -8398,7 +8399,7 @@
 If the assigned value is correct, then change the declaration to have the
 correct type:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 const Object x = 0;
 const int y = x;
 {% endprettify %}
@@ -8417,7 +8418,7 @@
 The following code produces this diagnostic because the operator `+` must
 have a single parameter corresponding to the right operand:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 class C {
   int operator [!+!](a, b) => 0;
 }
@@ -8427,7 +8428,7 @@
 
 Add or remove parameters to match the required number:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 class C {
   int operator +(a) => 0;
 }
@@ -8447,7 +8448,7 @@
 The following code produces this diagnostic because the setter `s` declares
 two required parameters:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 class C {
   set [!s!](int x, int y) {}
 }
@@ -8456,7 +8457,7 @@
 The following code produces this diagnostic because the setter `s` declares
 one optional parameter:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 class C {
   set [!s!]([int x]) {}
 }
@@ -8467,7 +8468,7 @@
 Change the declaration so that there's exactly one required positional
 parameter:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 class C {
   set s(int x) {}
 }
@@ -8494,7 +8495,7 @@
 parameter but two type arguments are provided when it is used as a type
 annotation:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 class C<E> {}
 
 void f([!C<int, int>!] x) {}
@@ -8503,7 +8504,7 @@
 The following code produces this diagnostic because `C` declares one type
 parameter, but two type arguments are provided when creating an instance:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 class C<E> {}
 
 var c = [!C<int, int>!]();
@@ -8514,7 +8515,7 @@
 Add or remove type arguments, as necessary, to match the number of type
 parameters defined for the type:
 
-{% prettify dart %}
+{% prettify dart tag=pre+code %}
 class C<E> {}
 
 void f(C<int> x) {}
diff --git a/pkg/analyzer/tool/diagnostics/generate.dart b/pkg/analyzer/tool/diagnostics/generate.dart
index 61ea2d7..6a0c2f3 100644
--- a/pkg/analyzer/tool/diagnostics/generate.dart
+++ b/pkg/analyzer/tool/diagnostics/generate.dart
@@ -250,7 +250,7 @@
         String trimmedLine = lexeme.substring(3);
         if (trimmedLine == '```dart') {
           inDartCodeBlock = true;
-          docs.add('{% prettify dart %}');
+          docs.add('{% prettify dart tag=pre+code %}');
         } else if (trimmedLine == '```') {
           if (inDartCodeBlock) {
             docs.add('{% endprettify %}');
@@ -419,7 +419,7 @@
 
 * Annotations
 
-* The expression in a case clause. Example:
+* The expression in a `case` clause. Example:
 
   ```dart
   void f(int e) {
@@ -435,9 +435,9 @@
 A type is _potentially non-nullable_ if it's either explicitly non-nullable or
 if it's a type parameter.
 
-A type is explicitly non-nullable if it is a type name that is not followed by a
+A type is explicitly non-nullable if it is a type name that isn't followed by a
 question mark. Note that there are a few types that are always nullable, such as
-`Null` and `dynamic`, and that `FutureOr` is only non-nullable if it is not
+`Null` and `dynamic`, and that `FutureOr` is only non-nullable if it isn't
 followed by a question mark _and_ the type argument is non-nullable (such as
 `FutureOr<String>`).
 
diff --git a/pkg/analyzer/tool/experiments/experiments_test.dart b/pkg/analyzer/tool/experiments/experiments_test.dart
index 167c033..4f77ee3 100644
--- a/pkg/analyzer/tool/experiments/experiments_test.dart
+++ b/pkg/analyzer/tool/experiments/experiments_test.dart
@@ -9,10 +9,8 @@
 
 import 'generate.dart';
 
-/**
- * Check that all targets have been code generated.  If they haven't tell the
- * user to run generate_all.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);
diff --git a/pkg/analyzer/tool/experiments/generate.dart b/pkg/analyzer/tool/experiments/generate.dart
index 0ec1a0b..231851f 100644
--- a/pkg/analyzer/tool/experiments/generate.dart
+++ b/pkg/analyzer/tool/experiments/generate.dart
@@ -1,7 +1,5 @@
-/**
- * This file contains code to generate experimental flags
- * based on the information in tools/experimental_features.yaml.
- */
+/// This file contains code to generate experimental flags
+/// based on the information in tools/experimental_features.yaml.
 import 'dart:io';
 
 import 'package:_fe_analyzer_shared/src/scanner/characters.dart'
@@ -192,15 +190,17 @@
       out.write('''
 
       static const $id = ExperimentalFeature(
-      $index,
-      EnableString.$id,
-      IsEnabledByDefault.$id,
-      IsExpired.$id,
-      '$help'
+        index: $index,
+        enableString: EnableString.$id,
+        isEnabledByDefault: IsEnabledByDefault.$id,
+        isExpired: IsExpired.$id,
+        documentation: '$help',
     ''');
       if (enabledIn != null) {
         enabledIn = _versionNumberAsString(enabledIn);
-        out.write(",firstSupportedVersion: '$enabledIn'");
+        out.write("firstSupportedVersion: '$enabledIn',");
+      } else {
+        out.write("firstSupportedVersion: null,");
       }
       out.writeln(');');
       ++index;
@@ -210,22 +210,25 @@
 
       @deprecated
       static const bogus_disabled = ExperimentalFeature(
-        $index,
+        index: $index,
         // ignore: deprecated_member_use_from_same_package
-        EnableString.bogus_disabled,
-        IsEnabledByDefault.bogus_disabled,
-        IsExpired.bogus_disabled,
-        null);
+        enableString: EnableString.bogus_disabled,
+        isEnabledByDefault: IsEnabledByDefault.bogus_disabled,
+        isExpired: IsExpired.bogus_disabled,
+        documentation: null,
+        firstSupportedVersion: null,
+      );
 
       @deprecated
       static const bogus_enabled = ExperimentalFeature(
-        ${index + 1},
+        index: ${index + 1},
         // ignore: deprecated_member_use_from_same_package
-        EnableString.bogus_enabled,
-        IsEnabledByDefault.bogus_enabled,
-        IsExpired.bogus_enabled,
-        null,
-        firstSupportedVersion: '1.0.0');
+        enableString: EnableString.bogus_enabled,
+        isEnabledByDefault: IsEnabledByDefault.bogus_enabled,
+        isExpired: IsExpired.bogus_enabled,
+        documentation: null,
+        firstSupportedVersion: '1.0.0',
+      );
     }''');
   }
 
diff --git a/pkg/analyzer/tool/messages/generate.dart b/pkg/analyzer/tool/messages/generate.dart
index b38db34..75fd269 100644
--- a/pkg/analyzer/tool/messages/generate.dart
+++ b/pkg/analyzer/tool/messages/generate.dart
@@ -1,17 +1,15 @@
-/**
- * This file contains code to generate scanner and parser message
- * based on the information in pkg/front_end/messages.yaml.
- *
- * For each message in messages.yaml that contains an 'index:' field,
- * this tool generates an error with the name specified by the 'analyzerCode:'
- * field and an entry in the fastaAnalyzerErrorList for that generated error.
- * The text in the 'analyzerCode:' field must contain the name of the class
- * containing the error and the name of the error separated by a `.`
- * (e.g. ParserErrorCode.EQUALITY_CANNOT_BE_EQUALITY_OPERAND).
- *
- * It is expected that 'pkg/front_end/tool/fasta generate-messages'
- * has already been successfully run.
- */
+/// This file contains code to generate scanner and parser message
+/// based on the information in pkg/front_end/messages.yaml.
+///
+/// For each message in messages.yaml that contains an 'index:' field,
+/// this tool generates an error with the name specified by the 'analyzerCode:'
+/// field and an entry in the fastaAnalyzerErrorList for that generated error.
+/// The text in the 'analyzerCode:' field must contain the name of the class
+/// containing the error and the name of the error separated by a `.`
+/// (e.g. ParserErrorCode.EQUALITY_CANNOT_BE_EQUALITY_OPERAND).
+///
+/// It is expected that 'pkg/front_end/tool/fasta generate-messages'
+/// has already been successfully run.
 import 'dart:io';
 
 import 'package:_fe_analyzer_shared/src/scanner/scanner.dart';
diff --git a/pkg/analyzer/tool/summary/build_sdk_summaries.dart b/pkg/analyzer/tool/summary/build_sdk_summaries.dart
index 5c0590b..515fb5d 100644
--- a/pkg/analyzer/tool/summary/build_sdk_summaries.dart
+++ b/pkg/analyzer/tool/summary/build_sdk_summaries.dart
@@ -4,9 +4,9 @@
 
 import 'dart:io';
 
+import 'package:analyzer/dart/sdk/build_sdk_summary.dart';
 import 'package:analyzer/file_system/physical_file_system.dart';
 import 'package:analyzer/src/dart/sdk/sdk.dart';
-import 'package:analyzer/src/summary/summary_file_builder.dart';
 
 void main(List<String> args) {
   String command;
@@ -48,9 +48,7 @@
   }
 }
 
-/**
- * The name of the SDK summaries builder application.
- */
+/// The name of the SDK summaries builder application.
 const BINARY_NAME = "build_sdk_summaries";
 
 void _buildSummary(String sdkPath, String outPath) {
@@ -64,9 +62,7 @@
   print('\tDone in ${sw.elapsedMilliseconds} ms.');
 }
 
-/**
- * Print information about how to use the SDK summaries builder.
- */
+/// Print information about how to use the SDK summaries builder.
 void _printUsage() {
   print('Usage: $BINARY_NAME command arguments');
   print('Where command can be one of the following:');
diff --git a/pkg/analyzer/tool/summary/check_test.dart b/pkg/analyzer/tool/summary/check_test.dart
index 6c4e635..e93bb33 100644
--- a/pkg/analyzer/tool/summary/check_test.dart
+++ b/pkg/analyzer/tool/summary/check_test.dart
@@ -8,10 +8,8 @@
 import '../../test/utils/package_root.dart' as package_root;
 import 'generate.dart';
 
-/**
- * Check that the target file has been code generated.  If it hasn't tell the
- * user to run generate.dart.
- */
+/// Check that the target file has been code generated.  If it hasn't tell the
+/// user to run generate.dart.
 main() async {
   var idlFolderPath = normalize(
       join(package_root.packageRoot, 'analyzer', 'lib', 'src', 'summary'));
diff --git a/pkg/analyzer/tool/summary/idl_model.dart b/pkg/analyzer/tool/summary/idl_model.dart
index f90475c..9680760 100644
--- a/pkg/analyzer/tool/summary/idl_model.dart
+++ b/pkg/analyzer/tool/summary/idl_model.dart
@@ -2,36 +2,24 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-/**
- * This file contains a set of concrete classes representing an in-memory
- * semantic model of the IDL used to code generate summary serialization and
- * deserialization code.
- */
+/// This file contains a set of concrete classes representing an in-memory
+/// semantic model of the IDL used to code generate summary serialization and
+/// deserialization code.
 import 'package:meta/meta.dart';
 
-/**
- * Information about a single class defined in the IDL.
- */
+/// Information about a single class defined in the IDL.
 class ClassDeclaration extends Declaration {
-  /**
-   * All fields defined in the class, including deprecated ones.
-   */
+  /// All fields defined in the class, including deprecated ones.
   final List<FieldDeclaration> allFields = <FieldDeclaration>[];
 
-  /**
-   * Indicates whether the class has the `topLevel` annotation.
-   */
+  /// Indicates whether the class has the `topLevel` annotation.
   final bool isTopLevel;
 
-  /**
-   * If [isTopLevel] is `true` and a file identifier was specified for this
-   * class, the file identifier string.  Otherwise `null`.
-   */
+  /// If [isTopLevel] is `true` and a file identifier was specified for this
+  /// class, the file identifier string.  Otherwise `null`.
   final String fileIdentifier;
 
-  /**
-   * Indicates whether the class has the `deprecated` annotation.
-   */
+  /// Indicates whether the class has the `deprecated` annotation.
   final bool isDeprecated;
 
   final String variantField;
@@ -45,78 +33,52 @@
     @required this.variantField,
   }) : super(documentation, name);
 
-  /**
-   * Get the non-deprecated fields defined in the class.
-   */
+  /// Get the non-deprecated fields defined in the class.
   Iterable<FieldDeclaration> get fields =>
       allFields.where((FieldDeclaration field) => !field.isDeprecated);
 }
 
-/**
- * Information about a declaration in the IDL.
- */
+/// Information about a declaration in the IDL.
 class Declaration {
-  /**
-   * The optional documentation, may be `null`.
-   */
+  /// The optional documentation, may be `null`.
   final String documentation;
 
-  /**
-   * The name of the declaration.
-   */
+  /// The name of the declaration.
   final String name;
 
   Declaration(this.documentation, this.name);
 }
 
-/**
- * Information about a single enum defined in the IDL.
- */
+/// Information about a single enum defined in the IDL.
 class EnumDeclaration extends Declaration {
-  /**
-   * List of enumerated values.
-   */
+  /// List of enumerated values.
   final List<EnumValueDeclaration> values = <EnumValueDeclaration>[];
 
   EnumDeclaration(String documentation, String name)
       : super(documentation, name);
 }
 
-/**
- * Information about a single enum value defined in the IDL.
- */
+/// Information about a single enum value defined in the IDL.
 class EnumValueDeclaration extends Declaration {
   EnumValueDeclaration(String documentation, String name)
       : super(documentation, name);
 }
 
-/**
- * Information about a single class field defined in the IDL.
- */
+/// Information about a single class field defined in the IDL.
 class FieldDeclaration extends Declaration {
-  /**
-   * The file of the field.
-   */
+  /// The file of the field.
   final FieldType type;
 
-  /**
-   * The id of the field.
-   */
+  /// The id of the field.
   final int id;
 
-  /**
-   * Indicates whether the field is deprecated.
-   */
+  /// Indicates whether the field is deprecated.
   final bool isDeprecated;
 
-  /**
-   * Indicates whether the field is informative.
-   */
+  /// Indicates whether the field is informative.
   final bool isInformative;
 
-  /**
-   * Maps logical property names to logical property.
-   */
+  /// Maps logical property names to logical property.
   final Map<String, LogicalProperty> logicalProperties;
 
   FieldDeclaration({
@@ -130,19 +92,13 @@
   }) : super(documentation, name);
 }
 
-/**
- * Information about the type of a class field defined in the IDL.
- */
+/// Information about the type of a class field defined in the IDL.
 class FieldType {
-  /**
-   * Type of the field (e.g. 'int').
-   */
+  /// Type of the field (e.g. 'int').
   final String typeName;
 
-  /**
-   * Indicates whether this field contains a list of the type specified in
-   * [typeName].
-   */
+  /// Indicates whether this field contains a list of the type specified in
+  /// [typeName].
   final bool isList;
 
   FieldType(this.typeName, this.isList);
@@ -166,38 +122,24 @@
   String toString() => isList ? 'List<$typeName>' : typeName;
 }
 
-/**
- * Top level representation of the summary IDL.
- */
+/// Top level representation of the summary IDL.
 class Idl {
-  /**
-   * Classes defined in the IDL.
-   */
+  /// Classes defined in the IDL.
   final Map<String, ClassDeclaration> classes = <String, ClassDeclaration>{};
 
-  /**
-   * Enums defined in the IDL.
-   */
+  /// Enums defined in the IDL.
   final Map<String, EnumDeclaration> enums = <String, EnumDeclaration>{};
 }
 
-/**
- * Information about a logical property mapped to a single data fields.
- */
+/// Information about a logical property mapped to a single data fields.
 class LogicalProperty {
-  /**
-   * Indicates whether the property is deprecated.
-   */
+  /// Indicates whether the property is deprecated.
   final bool isDeprecated;
 
-  /**
-   * Indicates whether the property is informative.
-   */
+  /// Indicates whether the property is informative.
   final bool isInformative;
 
-  /**
-   * Names of variants in which this property is available.
-   */
+  /// Names of variants in which this property is available.
   final List<String> variants;
 
   LogicalProperty({
diff --git a/pkg/analyzer/tool/summary/stats.dart b/pkg/analyzer/tool/summary/stats.dart
index 456fe74..47f58b4 100644
--- a/pkg/analyzer/tool/summary/stats.dart
+++ b/pkg/analyzer/tool/summary/stats.dart
@@ -2,10 +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.
 
-/**
- * This file contains code for collecting statistics about the use of fields in
- * a summary file.
- */
+/// This file contains code for collecting statistics about the use of fields in
+/// a summary file.
 import 'dart:io';
 import 'dart:mirrors';
 
@@ -31,31 +29,21 @@
   stats.dump();
 }
 
-/**
- * The name of the stats tool.
- */
+/// The name of the stats tool.
 const String BINARY_NAME = "stats";
 
-/**
- * Print information about how to use the stats tool.
- */
+/// Print information about how to use the stats tool.
 void _printUsage() {
   print('Usage: $BINARY_NAME input_file_path');
 }
 
-/**
- * An instance of [Stats] keeps track of statistics about the use of fields in
- * summary objects.
- */
+/// An instance of [Stats] keeps track of statistics about the use of fields in
+/// summary objects.
 class Stats {
-  /**
-   * Map from type to field name to a count of how often the field is used.
-   */
+  /// Map from type to field name to a count of how often the field is used.
   Map<Type, Map<String, int>> counts = <Type, Map<String, int>>{};
 
-  /**
-   * Print out statistics gathered so far.
-   */
+  /// Print out statistics gathered so far.
   void dump() {
     counts.forEach((Type type, Map<String, int> typeCounts) {
       print(type);
@@ -68,9 +56,7 @@
     });
   }
 
-  /**
-   * Record statistics for [obj] and all objects it refers to.
-   */
+  /// Record statistics for [obj] and all objects it refers to.
   void record(SummaryClass obj) {
     Map<String, int> typeCounts =
         counts.putIfAbsent(obj.runtimeType, () => <String, int>{});
diff --git a/pkg/analyzer_cli/analysis_options.yaml b/pkg/analyzer_cli/analysis_options.yaml
index ff9fb29..eb5e7f0 100644
--- a/pkg/analyzer_cli/analysis_options.yaml
+++ b/pkg/analyzer_cli/analysis_options.yaml
@@ -1,3 +1,5 @@
+include: package:pedantic/analysis_options.1.9.0.yaml
+
 analyzer:
   strong-mode:
     implicit-casts: false
@@ -10,51 +12,3 @@
   rules:
     - empty_statements
     - unnecessary_brace_in_string_interps
-    #
-    # From pedantic 1.9.0:
-    #
-    - always_declare_return_types
-    - always_require_non_null_named_parameters
-    - annotate_overrides
-    - avoid_empty_else
-    - avoid_init_to_null
-    - avoid_null_checks_in_equality_operators
-    - avoid_relative_lib_imports
-    - avoid_return_types_on_setters
-    - avoid_shadowing_type_parameters
-    - avoid_types_as_parameter_names
-    - camel_case_extensions
-    - curly_braces_in_flow_control_structures
-    - empty_catches
-    - empty_constructor_bodies
-    - library_names
-    - library_prefixes
-    - no_duplicate_case_values
-    - null_closures
-    - omit_local_variable_types
-    - prefer_adjacent_string_concatenation
-    - prefer_collection_literals
-    - prefer_conditional_assignment
-    - prefer_contains
-    - prefer_equal_for_default_values
-    - prefer_final_fields
-    - prefer_for_elements_to_map_fromIterable
-    - prefer_generic_function_type_aliases
-    - prefer_if_null_operators
-    - prefer_is_empty
-    - prefer_is_not_empty
-    - prefer_iterable_whereType
-    - prefer_single_quotes
-    - prefer_spread_collections
-    - recursive_getters
-    - slash_for_doc_comments
-    - type_init_formals
-    - unawaited_futures
-    - unnecessary_const
-    - unnecessary_new
-    - unnecessary_null_in_if_null_operators
-    - unnecessary_this
-    - unrelated_type_equality_checks
-    - use_function_type_syntax_for_parameters
-    - use_rethrow_when_possible
-    - valid_regexps
diff --git a/pkg/analyzer_cli/lib/src/driver.dart b/pkg/analyzer_cli/lib/src/driver.dart
index 1b75a7a..a78cc89 100644
--- a/pkg/analyzer_cli/lib/src/driver.dart
+++ b/pkg/analyzer_cli/lib/src/driver.dart
@@ -6,6 +6,7 @@
 import 'dart:io' as io;
 import 'dart:isolate';
 
+import 'package:analyzer/dart/sdk/build_sdk_summary.dart';
 import 'package:analyzer/error/error.dart';
 import 'package:analyzer/file_system/file_system.dart';
 import 'package:analyzer/file_system/physical_file_system.dart';
@@ -31,7 +32,6 @@
 import 'package:analyzer/src/source/package_map_resolver.dart';
 import 'package:analyzer/src/source/path_filter.dart';
 import 'package:analyzer/src/summary/package_bundle_reader.dart';
-import 'package:analyzer/src/summary/summary_file_builder.dart';
 import 'package:analyzer/src/summary/summary_sdk.dart' show SummaryBasedDartSdk;
 import 'package:analyzer/src/task/options.dart';
 import 'package:analyzer/src/util/yaml.dart';
@@ -552,7 +552,7 @@
         useSummaries ? options.buildSummaryInputs : <String>[]);
 
     // Once options and embedders are processed, setup the SDK.
-    _setupSdk(options, useSummaries, analysisOptions);
+    _setupSdk(options, analysisOptions);
 
     // Choose a package resolution policy and a diet parsing policy based on
     // the command-line options.
@@ -627,8 +627,7 @@
     return analyzer.analyze(formatter);
   }
 
-  void _setupSdk(CommandLineOptions options, bool useSummaries,
-      AnalysisOptions analysisOptions) {
+  void _setupSdk(CommandLineOptions options, AnalysisOptions analysisOptions) {
     if (sdk == null) {
       if (options.dartSdkSummaryPath != null) {
         sdk = SummaryBasedDartSdk(options.dartSdkSummaryPath, true);
@@ -636,12 +635,6 @@
         var dartSdkPath = options.dartSdkPath;
         var dartSdk = FolderBasedDartSdk(
             resourceProvider, resourceProvider.getFolder(dartSdkPath));
-        dartSdk.useSummary = useSummaries &&
-            options.sourceFiles.every((String sourcePath) {
-              sourcePath = path.absolute(sourcePath);
-              sourcePath = path.normalize(sourcePath);
-              return !path.isWithin(dartSdkPath, sourcePath);
-            });
         dartSdk.analysisOptions = analysisOptions;
         sdk = dartSdk;
       }
diff --git a/pkg/analyzer_cli/pubspec.yaml b/pkg/analyzer_cli/pubspec.yaml
index 06a9e27..b761a0e 100644
--- a/pkg/analyzer_cli/pubspec.yaml
+++ b/pkg/analyzer_cli/pubspec.yaml
@@ -15,6 +15,7 @@
   pub_semver: ^1.4.2
   yaml: ^2.1.2
 dev_dependencies:
+  pedantic: ^1.9.0
   test_reflective_loader: ^0.1.8
   test: ^1.0.0
   usage: ^3.2.0+1
diff --git a/pkg/analyzer_cli/test/embedder_test.dart b/pkg/analyzer_cli/test/embedder_test.dart
index c855d21..120af72 100644
--- a/pkg/analyzer_cli/test/embedder_test.dart
+++ b/pkg/analyzer_cli/test/embedder_test.dart
@@ -53,7 +53,6 @@
 
       var sdk = driver.sdk;
       expect(sdk, const TypeMatcher<FolderBasedDartSdk>());
-      expect((sdk as FolderBasedDartSdk).useSummary, isFalse);
     }));
   });
 }
diff --git a/pkg/analyzer_cli/test/options_test.dart b/pkg/analyzer_cli/test/options_test.dart
index d427a0e..6b81425 100644
--- a/pkg/analyzer_cli/test/options_test.dart
+++ b/pkg/analyzer_cli/test/options_test.dart
@@ -89,9 +89,30 @@
 
       group('enable experiment', () {
         var knownFeatures = {
-          'a': ExperimentalFeature(0, 'a', false, false, 'a'),
-          'b': ExperimentalFeature(1, 'b', false, false, 'b'),
-          'c': ExperimentalFeature(2, 'c', false, false, 'c'),
+          'a': ExperimentalFeature(
+            index: 0,
+            enableString: 'a',
+            isEnabledByDefault: false,
+            isExpired: false,
+            documentation: 'a',
+            firstSupportedVersion: null,
+          ),
+          'b': ExperimentalFeature(
+            index: 1,
+            enableString: 'b',
+            isEnabledByDefault: false,
+            isExpired: false,
+            documentation: 'b',
+            firstSupportedVersion: null,
+          ),
+          'c': ExperimentalFeature(
+            index: 2,
+            enableString: 'c',
+            isEnabledByDefault: false,
+            isExpired: false,
+            documentation: 'c',
+            firstSupportedVersion: null,
+          ),
         };
 
         test('no values', () {
diff --git a/pkg/compiler/lib/src/ir/static_type_base.dart b/pkg/compiler/lib/src/ir/static_type_base.dart
index e3750da..b62c4c9 100644
--- a/pkg/compiler/lib/src/ir/static_type_base.dart
+++ b/pkg/compiler/lib/src/ir/static_type_base.dart
@@ -100,7 +100,7 @@
 
   @override
   ir.DartType visitAwaitExpression(ir.AwaitExpression node) {
-    return typeEnvironment.unfutureType(visitNode(node.operand));
+    return typeEnvironment.flatten(visitNode(node.operand));
   }
 
   @override
diff --git a/pkg/compiler/lib/src/js_backend/runtime_types_resolution.dart b/pkg/compiler/lib/src/js_backend/runtime_types_resolution.dart
index d633266..8259c10 100644
--- a/pkg/compiler/lib/src/js_backend/runtime_types_resolution.dart
+++ b/pkg/compiler/lib/src/js_backend/runtime_types_resolution.dart
@@ -1071,6 +1071,9 @@
                     // TODO(johnniwinther): Use register generic instantiations
                     // instead.
                     assumeInstantiations: _genericInstantiations.isNotEmpty)) {
+          if (functionType.typeVariables.isNotEmpty) {
+            potentiallyNeedTypeArguments(function);
+          }
           functionType.forEachTypeVariable((TypeVariableType typeVariable) {
             Entity typeDeclaration = typeVariable.element.typeDeclaration;
             if (!processedEntities.contains(typeDeclaration)) {
diff --git a/pkg/compiler/lib/src/js_model/js_world_builder.dart b/pkg/compiler/lib/src/js_model/js_world_builder.dart
index f5d5955..db779c3 100644
--- a/pkg/compiler/lib/src/js_model/js_world_builder.dart
+++ b/pkg/compiler/lib/src/js_model/js_world_builder.dart
@@ -62,8 +62,6 @@
       OutputUnitData kOutputUnitData) {
     JsToFrontendMap map = new JsToFrontendMapImpl(_elementMap);
 
-    BackendUsage backendUsage =
-        _convertBackendUsage(map, closedWorld.backendUsage);
     NativeData nativeData = _convertNativeData(map, closedWorld.nativeData);
     _elementMap.nativeData = nativeData;
     InterceptorData interceptorData =
@@ -162,7 +160,7 @@
       }
 
       RuntimeTypesNeedImpl jRtiNeed =
-          _convertRuntimeTypesNeed(map, backendUsage, kernelRtiNeed);
+          _convertRuntimeTypesNeed(map, kernelRtiNeed);
       closureData = _closureDataBuilder.createClosureEntities(
           this,
           map.toBackendMemberMap(closureModels, identity),
@@ -189,6 +187,11 @@
       rtiNeed = jRtiNeed;
     }
 
+    map.registerClosureData(closureData);
+
+    BackendUsage backendUsage =
+        _convertBackendUsage(map, closedWorld.backendUsage);
+
     NoSuchMethodDataImpl oldNoSuchMethodData = closedWorld.noSuchMethodData;
     NoSuchMethodData noSuchMethodData = new NoSuchMethodDataImpl(
         map.toBackendFunctionSet(oldNoSuchMethodData.throwingImpls),
@@ -378,8 +381,8 @@
             interceptorData.classesMixedIntoInterceptedClasses));
   }
 
-  RuntimeTypesNeed _convertRuntimeTypesNeed(JsToFrontendMap map,
-      BackendUsage backendUsage, RuntimeTypesNeedImpl rtiNeed) {
+  RuntimeTypesNeed _convertRuntimeTypesNeed(
+      JsToFrontendMap map, RuntimeTypesNeedImpl rtiNeed) {
     Set<ClassEntity> classesNeedingTypeArguments =
         map.toBackendClassSet(rtiNeed.classesNeedingTypeArguments);
     Set<FunctionEntity> methodsNeedingTypeArguments =
@@ -597,6 +600,13 @@
 
   ConstantValue toBackendConstant(ConstantValue value, {bool allowNull: false});
 
+  /// Register [closureData] with this map.
+  ///
+  /// [ClosureData] holds the relation between local function and the backend
+  /// entities. Before this has been registered, type variables of local
+  /// functions cannot be converted into backend equivalents.
+  void registerClosureData(ClosureData closureData);
+
   Set<LibraryEntity> toBackendLibrarySet(Iterable<LibraryEntity> set) {
     return set.map(toBackendLibrary).toSet();
   }
@@ -671,6 +681,7 @@
 
 class JsToFrontendMapImpl extends JsToFrontendMap {
   final JsKernelToElementMap _backend;
+  ClosureData _closureData;
 
   JsToFrontendMapImpl(this._backend);
 
@@ -707,10 +718,23 @@
     return _backend.members.getEntity(member.memberIndex);
   }
 
+  @override
+  void registerClosureData(ClosureData closureData) {
+    assert(_closureData == null, "Closure data has already been registered.");
+    _closureData = closureData;
+  }
+
   TypeVariableEntity toBackendTypeVariable(TypeVariableEntity typeVariable) {
     if (typeVariable is KLocalTypeVariable) {
-      failedAt(
-          typeVariable, "Local function type variables are not supported.");
+      if (_closureData == null) {
+        failedAt(
+            typeVariable, "Local function type variables are not supported.");
+      }
+      ClosureRepresentationInfo info =
+          _closureData.getClosureInfo(typeVariable.typeDeclaration.node);
+      return _backend.elementEnvironment
+          .getFunctionTypeVariables(info.callMethod)[typeVariable.index]
+          .element;
     }
     IndexedTypeVariable indexedTypeVariable = typeVariable;
     return _backend.typeVariables
diff --git a/pkg/compiler/lib/src/kernel/dart2js_target.dart b/pkg/compiler/lib/src/kernel/dart2js_target.dart
index 7bb0b27..891c462 100644
--- a/pkg/compiler/lib/src/kernel/dart2js_target.dart
+++ b/pkg/compiler/lib/src/kernel/dart2js_target.dart
@@ -182,6 +182,7 @@
     'dart:_foreign_helper',
     'dart:_interceptors',
     'dart:_internal',
+    'dart:_js_annotations',
     'dart:_js_embedded_names',
     'dart:_js_helper',
     'dart:_js_names',
@@ -203,6 +204,7 @@
     'dart:_foreign_helper',
     'dart:_interceptors',
     'dart:_internal',
+    'dart:_js_annotations',
     'dart:_js_embedded_names',
     'dart:_js_helper',
     'dart:_js_names',
diff --git a/pkg/compiler/lib/src/kernel/kelements.dart b/pkg/compiler/lib/src/kernel/kelements.dart
index 277a33c..0257c08 100644
--- a/pkg/compiler/lib/src/kernel/kelements.dart
+++ b/pkg/compiler/lib/src/kernel/kelements.dart
@@ -281,7 +281,7 @@
 
 class KLocalTypeVariable implements TypeVariableEntity {
   @override
-  final Entity typeDeclaration;
+  final KLocalFunction typeDeclaration;
   @override
   final String name;
   @override
diff --git a/pkg/compiler/lib/src/kernel/kernel_impact.dart b/pkg/compiler/lib/src/kernel/kernel_impact.dart
index e4c569a..94d96a6 100644
--- a/pkg/compiler/lib/src/kernel/kernel_impact.dart
+++ b/pkg/compiler/lib/src/kernel/kernel_impact.dart
@@ -820,12 +820,6 @@
 
   @override
   void registerSwitchStatementNode(ir.SwitchStatement node) {
-    // TODO(32557): Remove this when issue 32557 is fixed.
-    ir.TreeNode firstCase;
-    DartType firstCaseType;
-    DiagnosticMessage error;
-    List<DiagnosticMessage> infos = <DiagnosticMessage>[];
-
     bool overridesEquals(InterfaceType type) {
       if (type == commonElements.symbolImplementationType) {
         // Treat symbol constants as if Symbol doesn't override `==`.
@@ -850,50 +844,23 @@
         ConstantValue value =
             elementMap.getConstantValue(staticTypeContext, expression);
         DartType type = value.getType(elementMap.commonElements);
-        if (firstCaseType == null) {
-          firstCase = expression;
-          firstCaseType = type;
-
-          // We only report the bad type on the first class element. All others
-          // get a "type differs" error.
-          if (type == commonElements.doubleType) {
-            reporter.reportErrorMessage(
-                computeSourceSpanFromTreeNode(expression),
-                MessageKind.SWITCH_CASE_VALUE_OVERRIDES_EQUALS,
-                {'type': "double"});
-          } else if (type == commonElements.functionType) {
-            reporter.reportErrorMessage(computeSourceSpanFromTreeNode(node),
-                MessageKind.SWITCH_CASE_FORBIDDEN, {'type': "Function"});
-          } else if (value.isObject &&
-              type != commonElements.typeLiteralType &&
-              overridesEquals(type)) {
-            reporter.reportErrorMessage(
-                computeSourceSpanFromTreeNode(firstCase),
-                MessageKind.SWITCH_CASE_VALUE_OVERRIDES_EQUALS,
-                {'type': typeToString(type)});
-          }
-        } else {
-          if (type != firstCaseType) {
-            if (error == null) {
-              error = reporter.createMessage(
-                  computeSourceSpanFromTreeNode(node),
-                  MessageKind.SWITCH_CASE_TYPES_NOT_EQUAL,
-                  {'type': typeToString(firstCaseType)});
-              infos.add(reporter.createMessage(
-                  computeSourceSpanFromTreeNode(firstCase),
-                  MessageKind.SWITCH_CASE_TYPES_NOT_EQUAL_CASE,
-                  {'type': typeToString(firstCaseType)}));
-            }
-            infos.add(reporter.createMessage(
-                computeSourceSpanFromTreeNode(expression),
-                MessageKind.SWITCH_CASE_TYPES_NOT_EQUAL_CASE,
-                {'type': typeToString(type)}));
-          }
+        if (type == commonElements.doubleType) {
+          reporter.reportErrorMessage(
+              computeSourceSpanFromTreeNode(expression),
+              MessageKind.SWITCH_CASE_VALUE_OVERRIDES_EQUALS,
+              {'type': "double"});
+        } else if (type == commonElements.functionType) {
+          reporter.reportErrorMessage(computeSourceSpanFromTreeNode(node),
+              MessageKind.SWITCH_CASE_FORBIDDEN, {'type': "Function"});
+        } else if (value.isObject &&
+            type != commonElements.typeLiteralType &&
+            overridesEquals(type)) {
+          reporter.reportErrorMessage(
+              computeSourceSpanFromTreeNode(expression),
+              MessageKind.SWITCH_CASE_VALUE_OVERRIDES_EQUALS,
+              {'type': typeToString(type)});
         }
       }
     }
-    if (error != null) {
-      reporter.reportError(error, infos);
-    }
   }
 }
diff --git a/pkg/compiler/test/analyses/api_allowed.json b/pkg/compiler/test/analyses/api_allowed.json
index 2804f45..737224b 100644
--- a/pkg/compiler/test/analyses/api_allowed.json
+++ b/pkg/compiler/test/analyses/api_allowed.json
@@ -56,7 +56,7 @@
   "org-dartlang-sdk:///lib/_internal/js_runtime/lib/async_patch.dart": {
     "Dynamic invocation of '-'.": 1,
     "Dynamic access of 'iterator'.": 1,
-    "Dynamic invocation of 'call'.": 4,
+    "Dynamic invocation of 'call'.": 1,
     "Dynamic invocation of 'then'.": 1
   },
   "org-dartlang-sdk:///lib/_internal/js_runtime/lib/collection_patch.dart": {
@@ -198,4 +198,4 @@
   "org-dartlang-sdk:///lib/_http/websocket_impl.dart": {
     "Dynamic invocation of 'dart._http::_toJSON'.": 1
   }
-}
\ No newline at end of file
+}
diff --git a/pkg/compiler/test/rti/data/local_function_generic.dart b/pkg/compiler/test/rti/data/local_function_generic.dart
index e591bc2..2a08e7c 100644
--- a/pkg/compiler/test/rti/data/local_function_generic.dart
+++ b/pkg/compiler/test/rti/data/local_function_generic.dart
@@ -8,7 +8,7 @@
 
 method1() {
   /*spec.direct,explicit=[local.T*],needsArgs,needsSignature*/
-  /*prod.needsSignature*/
+  /*prod.needsArgs,needsSignature*/
   T local<T>(T t) => t;
   return local;
 }
diff --git a/pkg/compiler/test/rti/data/local_function_signatures_generic.dart b/pkg/compiler/test/rti/data/local_function_signatures_generic.dart
index be9d7b2..93b62e8 100644
--- a/pkg/compiler/test/rti/data/local_function_signatures_generic.dart
+++ b/pkg/compiler/test/rti/data/local_function_signatures_generic.dart
@@ -8,7 +8,7 @@
 
 class Class1 {
   method1() {
-    /*needsSignature*/
+    /*needsArgs,needsInst=[<dynamic>,<num*>,<num*>],needsSignature*/
     num local<T>(num n) => null;
     return local;
   }
@@ -19,7 +19,7 @@
   }
 
   method3() {
-    /*needsSignature*/
+    /*needsArgs,needsInst=[<dynamic>,<num*>,<num*>],needsSignature*/
     int local<T>(num n) => null;
     return local;
   }
@@ -75,13 +75,13 @@
 
 method10() {
   /*spec.direct,explicit=[local.T*],needsArgs,needsInst=[<dynamic>,<num*>,<num*>],needsSignature*/
-  /*prod.needsSignature*/
+  /*prod.needsArgs,needsInst=[<dynamic>,<num*>,<num*>],needsSignature*/
   num local<T>(T n) => null;
   return local;
 }
 
 method11() {
-  /*needsSignature*/
+  /*needsArgs,needsInst=[<dynamic>,<num*>,<num*>],needsSignature*/
   T local<T>(num n) => null;
   return local;
 }
@@ -93,20 +93,20 @@
 }
 
 num Function(num) method13() {
-  /*needsSignature*/
+  /*needsArgs,needsInst=[<dynamic>,<num*>,<num*>],needsSignature*/
   num local<T>(num n) => null;
   return local;
 }
 
 num Function(num) method14() {
   /*spec.direct,explicit=[local.T*],needsArgs,needsInst=[<dynamic>,<num*>,<num*>],needsSignature*/
-  /*prod.needsSignature*/
+  /*prod.needsArgs,needsInst=[<dynamic>,<num*>,<num*>],needsSignature*/
   num local<T>(T n) => null;
   return local;
 }
 
 num Function(num) method15() {
-  /*needsSignature*/
+  /*needsArgs,needsInst=[<dynamic>,<num*>,<num*>],needsSignature*/
   T local<T>(num n) => null;
   return local;
 }
diff --git a/pkg/compiler/tool/modular_test_suite.dart b/pkg/compiler/tool/modular_test_suite.dart
index a318ff1..eb8953b 100644
--- a/pkg/compiler/tool/modular_test_suite.dart
+++ b/pkg/compiler/tool/modular_test_suite.dart
@@ -14,13 +14,21 @@
 import 'package:modular_test/src/pipeline.dart';
 import 'package:modular_test/src/suite.dart';
 import 'package:modular_test/src/runner.dart';
+import 'package:package_config/package_config.dart';
 
+String packageConfigJsonPath = ".dart_tool/package_config.json";
 Uri sdkRoot = Platform.script.resolve("../../../");
+Uri packageConfigUri = sdkRoot.resolve(packageConfigJsonPath);
 Options _options;
 String _dart2jsScript;
 String _kernelWorkerScript;
+
+// TODO(joshualitt): Figure out a way to support package configs in
+// tests/modular.
+PackageConfig _packageConfig;
 main(List<String> args) async {
   _options = Options.parse(args);
+  _packageConfig = await loadPackageConfigUri(packageConfigUri);
   await _resolveScripts();
   await runSuite(
       sdkRoot.resolve('tests/modular/'),
@@ -45,6 +53,17 @@
 const jsId = const DataId("js");
 const txtId = const DataId("txt");
 
+String _packageConfigEntry(String name, Uri root,
+    {Uri packageRoot, LanguageVersion version}) {
+  var fields = [
+    '"name": "${name}"',
+    '"rootUri": "$root"',
+    if (packageRoot != null) '"packageUri": "$packageRoot"',
+    if (version != null) '"languageVersion": "$version"'
+  ];
+  return '{${fields.join(',')}}';
+}
+
 // Step that compiles sources in a module to a .dill file.
 class SourceToDillStep implements IOModularStep {
   @override
@@ -88,31 +107,54 @@
       }
     }
 
-    // We create a .packages file which defines the location of this module if
-    // it is a package.  The CFE requires that if a `package:` URI of a
-    // dependency is used in an import, then we need that package entry in the
-    // .packages file. However, after it checks that the definition exists, the
-    // CFE will not actually use the resolved URI if a library for the import
-    // URI is already found in one of the provided .dill files of the
-    // dependencies. For that reason, and to ensure that a step only has access
-    // to the files provided in a module, we generate a .packages with invalid
-    // folders for other packages.
+    // We create both a .packages and package_config.json file which defines
+    // the location of this module if it is a package.  The CFE requires that
+    // if a `package:` URI of a dependency is used in an import, then we need
+    // that package entry in the associated file. However, after it checks that
+    // the definition exists, the CFE will not actually use the resolved URI if
+    // a library for the import URI is already found in one of the provide
+    // .dill files of the dependencies. For that reason, and to ensure that
+    // a step only has access to the files provided in a module, we generate a
+    // config file with invalid folders for other packages.
     // TODO(sigmund): follow up with the CFE to see if we can remove the need
-    // for the .packages entry altogether if they won't need to read the
-    // sources.
+    // for these dummy entries..
+    // TODO(joshualitt): Generate just the json file.
+    var packagesJson = [];
     var packagesContents = new StringBuffer();
     if (module.isPackage) {
       packagesContents.write('${module.name}:${module.packageBase}\n');
+      packagesJson.add(_packageConfigEntry(
+          module.name, Uri.parse('../${module.packageBase}')));
     }
+
     Set<Module> transitiveDependencies = computeTransitiveDependencies(module);
     int unusedNum = 0;
     for (Module dependency in transitiveDependencies) {
       if (dependency.isPackage) {
+        // rootUri should be ignored for dependent modules, so we pass in a
+        // bogus value.
+        var rootUri = Uri.parse('unused$unusedNum');
         unusedNum++;
-        packagesContents.write('${dependency.name}:unused$unusedNum\n');
+
+        var dependentPackage = _packageConfig[dependency.name];
+        var packageJson = dependentPackage == null
+            ? _packageConfigEntry(dependency.name, rootUri)
+            : _packageConfigEntry(dependentPackage.name, rootUri,
+                version: dependentPackage.languageVersion);
+        packagesJson.add(packageJson);
+        packagesContents.write('${dependency.name}:$rootUri\n');
       }
     }
 
+    if (module.isPackage) {
+      await File.fromUri(root.resolve(packageConfigJsonPath))
+          .create(recursive: true);
+      await File.fromUri(root.resolve(packageConfigJsonPath)).writeAsString('{'
+          '  "configVersion": ${_packageConfig.version},'
+          '  "packages": [ ${packagesJson.join(',')} ]'
+          '}');
+    }
+
     await File.fromUri(root.resolve('.packages'))
         .writeAsString('$packagesContents');
 
diff --git a/pkg/dartdev/bin/dartdev.dart b/pkg/dartdev/bin/dartdev.dart
index 1035f4e..1a314e6 100644
--- a/pkg/dartdev/bin/dartdev.dart
+++ b/pkg/dartdev/bin/dartdev.dart
@@ -2,9 +2,18 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+import 'dart:io';
+
 import 'package:dartdev/dartdev.dart';
+import 'package:pedantic/pedantic.dart' show unawaited;
 
 /// The entry point for dartdev.
 Future<void> main(List<String> args) async {
+  // Ignore SIGINT to ensure DartDev doesn't exit before any of its
+  // spawned children. Draining the stream returned by watch() effectively
+  // sends the signals to the void.
+  //
+  // See https://github.com/dart-lang/sdk/issues/42092 for context.
+  unawaited(ProcessSignal.sigint.watch().drain());
   await runDartdev(args);
 }
diff --git a/pkg/dartdev/lib/dartdev.dart b/pkg/dartdev/lib/dartdev.dart
index c1cc224..3d7bb9c 100644
--- a/pkg/dartdev/lib/dartdev.dart
+++ b/pkg/dartdev/lib/dartdev.dart
@@ -4,6 +4,7 @@
 
 import 'dart:io' as io;
 
+import 'package:analyzer/src/dart/analysis/experiments.dart';
 import 'package:args/args.dart';
 import 'package:args/command_runner.dart';
 import 'package:cli_util/cli_logging.dart';
@@ -19,13 +20,14 @@
 import 'src/commands/run.dart';
 import 'src/commands/test.dart';
 import 'src/core.dart';
+import 'src/experiments.dart';
 
 /// This is typically called from bin/, but given the length of the method and
 /// analytics logic, it has been moved here. Also note that this method calls
 /// [io.exit(code)] directly.
 Future<void> runDartdev(List<String> args) async {
   final stopwatch = Stopwatch();
-  dynamic result;
+  int result;
 
   // The Analytics instance used to report information back to Google Analytics,
   // see lib/src/analytics.dart.
@@ -104,7 +106,7 @@
     stopwatch.stop();
 
     // Set the exitCode, if it wasn't set in the catch block above.
-    exitCode ??= result is int ? result : 0;
+    exitCode ??= result ?? 0;
 
     // Send analytics before exiting
     if (analytics.enabled) {
@@ -143,7 +145,7 @@
     final bool verbose = args.contains('-v') || args.contains('--verbose');
 
     argParser.addFlag('verbose',
-        abbr: 'v', negatable: false, help: 'Show verbose output.');
+        abbr: 'v', negatable: false, help: 'Show additional command output.');
     argParser.addFlag('version',
         negatable: false, help: 'Print the Dart SDK version.');
     argParser.addFlag('enable-analytics',
@@ -151,8 +153,10 @@
     argParser.addFlag('disable-analytics',
         negatable: false, help: 'Disable anonymous analytics.');
 
-    // TODO(jwren): hook up.
-    argParser.addMultiOption('enable-experiment', hide: true);
+    addExperimentalFlags(argParser, verbose);
+
+    argParser.addFlag('diagnostics',
+        negatable: false, help: 'Show tool diagnostic output.', hide: !verbose);
 
     // A hidden flag to disable analytics on this run, this constructor can be
     // called with this flag, but should be removed before run() is called as
@@ -162,14 +166,14 @@
         help: 'Disable anonymous analytics for this `dart *` run',
         hide: true);
 
-    addCommand(AnalyzeCommand(verbose: verbose));
+    addCommand(AnalyzeCommand());
     addCommand(CreateCommand(verbose: verbose));
-    addCommand(CompileCommand(verbose: verbose));
-    addCommand(FormatCommand(verbose: verbose));
+    addCommand(CompileCommand());
+    addCommand(FormatCommand());
     addCommand(MigrateCommand(verbose: verbose));
-    addCommand(PubCommand(verbose: verbose));
-    addCommand(RunCommand(verbose: verbose));
-    addCommand(TestCommand(verbose: verbose));
+    addCommand(PubCommand());
+    addCommand(RunCommand());
+    addCommand(TestCommand());
   }
 
   @override
@@ -179,6 +183,7 @@
   @override
   Future<int> runCommand(ArgResults topLevelResults) async {
     assert(!topLevelResults.arguments.contains('--disable-dartdev-analytics'));
+
     if (topLevelResults.command == null &&
         topLevelResults.arguments.isNotEmpty) {
       final firstArg = topLevelResults.arguments.first;
@@ -190,11 +195,45 @@
         io.exit(254);
       }
     }
-    isVerbose = topLevelResults['verbose'];
+
+    isDiagnostics = topLevelResults['diagnostics'];
 
     final Ansi ansi = Ansi(Ansi.terminalSupportsAnsi);
-    log = isVerbose ? Logger.verbose(ansi: ansi) : Logger.standard(ansi: ansi);
+    log = isDiagnostics
+        ? Logger.verbose(ansi: ansi)
+        : Logger.standard(ansi: ansi);
+
+    if (topLevelResults.wasParsed(experimentFlagName)) {
+      List<String> experimentIds = topLevelResults[experimentFlagName];
+      for (ExperimentalFeature feature in experimentalFeatures) {
+        // We allow default true flags, but complain when they are passed in.
+        if (feature.isEnabledByDefault &&
+            experimentIds.contains(feature.enableString)) {
+          print("'${feature.enableString}' is now enabled by default; this "
+              'flag is no longer required.');
+        }
+      }
+    }
 
     return await super.runCommand(topLevelResults);
   }
+
+  void addExperimentalFlags(ArgParser argParser, bool verbose) {
+    List<ExperimentalFeature> features = experimentalFeatures;
+
+    Map<String, String> allowedHelp = {};
+    for (ExperimentalFeature feature in features) {
+      String suffix =
+          feature.isEnabledByDefault ? ' (no-op - enabled by default)' : '';
+      allowedHelp[feature.enableString] = '${feature.documentation}$suffix';
+    }
+
+    argParser.addMultiOption(
+      experimentFlagName,
+      valueHelp: 'experiment',
+      allowed: features.map((feature) => feature.enableString),
+      allowedHelp: verbose ? allowedHelp : null,
+      help: 'Enable one or more experimental features.',
+    );
+  }
 }
diff --git a/pkg/dartdev/lib/src/commands/analyze.dart b/pkg/dartdev/lib/src/commands/analyze.dart
index ccf9a57..57d83a5 100644
--- a/pkg/dartdev/lib/src/commands/analyze.dart
+++ b/pkg/dartdev/lib/src/commands/analyze.dart
@@ -12,9 +12,10 @@
 import '../utils.dart';
 import 'analyze_impl.dart';
 
+// TODO: Support enable-experiment for 'dart analyze'.
+
 class AnalyzeCommand extends DartdevCommand<int> {
-  AnalyzeCommand({bool verbose = false})
-      : super('analyze', "Analyze the project's Dart code.") {
+  AnalyzeCommand() : super('analyze', "Analyze the project's Dart code.") {
     argParser
       ..addFlag('fatal-infos',
           help: 'Treat info level issues as fatal.', negatable: false)
@@ -102,6 +103,20 @@
           '(${error.code})',
         );
 
+        if (verbose) {
+          var padding = ' '.padLeft(error.severity.length + 2);
+          for (var message in error.contextMessages) {
+            log.stdout('$padding${message.message} '
+                'at ${message.filePath}:${message.line}:${message.column}');
+          }
+          if (error.correction != null) {
+            log.stdout('$padding${error.correction}');
+          }
+          if (error.url != null) {
+            log.stdout('$padding${error.url}');
+          }
+        }
+
         hasErrors |= error.isError;
         hasWarnings |= error.isWarning;
         hasInfos |= error.isInfo;
diff --git a/pkg/dartdev/lib/src/commands/analyze_impl.dart b/pkg/dartdev/lib/src/commands/analyze_impl.dart
index 76e1fcb..0918864 100644
--- a/pkg/dartdev/lib/src/commands/analyze_impl.dart
+++ b/pkg/dartdev/lib/src/commands/analyze_impl.dart
@@ -45,7 +45,6 @@
       sdkPath.path,
     ];
 
-    log.trace('dart ${command.join(' ')}');
     _process = await startProcess(sdk.dart, command);
     // This callback hookup can't throw.
     //ignore: unawaited_futures
@@ -204,6 +203,8 @@
 
   String get code => json['code'] as String;
 
+  String get correction => json['correction'] as String;
+
   String get file => json['location']['file'] as String;
 
   int get startLine => json['location']['startLine'] as int;
@@ -214,6 +215,13 @@
 
   String get messageSentenceFragment => trimEnd(message, '.');
 
+  String get url => json['url'] as String;
+
+  List<DiagnosticMessage> get contextMessages {
+    var messages = json['contextMessages'] as List<dynamic>;
+    return messages.map((message) => DiagnosticMessage(message)).toList();
+  }
+
   // TODO(jwren) add some tests to verify that the results are what we are
   //  expecting, 'other' is not always on the RHS of the subtraction in the
   //  implementation.
@@ -242,6 +250,20 @@
       '($code)';
 }
 
+class DiagnosticMessage {
+  final Map<String, dynamic> json;
+
+  DiagnosticMessage(this.json);
+
+  int get column => json['location']['startColumn'] as int;
+
+  String get filePath => json['location']['file'] as String;
+
+  int get line => json['location']['startLine'] as int;
+
+  String get message => json['message'] as String;
+}
+
 class FileAnalysisErrors {
   final String file;
   final List<AnalysisError> errors;
diff --git a/pkg/dartdev/lib/src/commands/compile.dart b/pkg/dartdev/lib/src/commands/compile.dart
index 025d5c6..d79265b 100644
--- a/pkg/dartdev/lib/src/commands/compile.dart
+++ b/pkg/dartdev/lib/src/commands/compile.dart
@@ -18,6 +18,7 @@
   final String flag;
   final String help;
   final String abbr;
+
   Option({this.flag, this.help, this.abbr});
 }
 
@@ -44,10 +45,7 @@
 }
 
 class CompileJSCommand extends DartdevCommand<int> {
-  bool verbose = false;
-  CompileJSCommand({
-    this.verbose,
-  }) : super('js', 'Compile Dart to JavaScript') {
+  CompileJSCommand() : super('js', 'Compile Dart to JavaScript') {
     argParser
       ..addOption(
         commonOptions['outputFile'].flag,
@@ -85,14 +83,12 @@
 }
 
 class CompileSnapshotCommand extends DartdevCommand<int> {
-  bool verbose = false;
   final String commandName;
   final String help;
   final String fileExt;
   final String formatName;
 
   CompileSnapshotCommand({
-    this.verbose,
     this.commandName,
     this.help,
     this.fileExt,
@@ -146,13 +142,11 @@
 }
 
 class CompileNativeCommand extends DartdevCommand<int> {
-  bool verbose = false;
   final String commandName;
   final String format;
   final String help;
 
   CompileNativeCommand({
-    this.verbose,
     this.commandName,
     this.format,
     this.help,
@@ -216,29 +210,27 @@
 class CompileCommand extends Command {
   @override
   String get description => 'Compile Dart to various formats.';
+
   @override
   String get name => 'compile';
 
-  CompileCommand({bool verbose = false}) {
+  CompileCommand() {
     addSubcommand(CompileJSCommand());
     addSubcommand(CompileSnapshotCommand(
       commandName: 'jit-snapshot',
       help: 'to a JIT snapshot',
       fileExt: 'jit',
       formatName: 'app-jit',
-      verbose: verbose,
     ));
     addSubcommand(CompileNativeCommand(
       commandName: 'exe',
       help: 'to a self-contained executable',
       format: 'exe',
-      verbose: verbose,
     ));
     addSubcommand(CompileNativeCommand(
       commandName: 'aot-snapshot',
       help: 'to an AOT snapshot',
       format: 'aot',
-      verbose: verbose,
     ));
   }
 }
diff --git a/pkg/dartdev/lib/src/commands/format.dart b/pkg/dartdev/lib/src/commands/format.dart
index c812ee1..c1dfc60 100644
--- a/pkg/dartdev/lib/src/commands/format.dart
+++ b/pkg/dartdev/lib/src/commands/format.dart
@@ -8,8 +8,7 @@
 import '../sdk.dart';
 
 class FormatCommand extends DartdevCommand {
-  FormatCommand({bool verbose = false})
-      : super('format', 'Format Dart source code.') {
+  FormatCommand() : super('format', 'Format Dart source code.') {
     // TODO(jwren) When https://github.com/dart-lang/dart_style/issues/889
     //  is resolved, have dart_style provide the ArgParser, instead of creating
     // one here.
diff --git a/pkg/dartdev/lib/src/commands/pub.dart b/pkg/dartdev/lib/src/commands/pub.dart
index 0019696..c062eb6 100644
--- a/pkg/dartdev/lib/src/commands/pub.dart
+++ b/pkg/dartdev/lib/src/commands/pub.dart
@@ -8,10 +8,11 @@
 import 'package:args/args.dart';
 
 import '../core.dart';
+import '../experiments.dart';
 import '../sdk.dart';
 
 class PubCommand extends DartdevCommand<int> {
-  PubCommand({bool verbose = false}) : super('pub', 'Work with packages.');
+  PubCommand() : super('pub', 'Work with packages.');
 
   @override
   final ArgParser argParser = ArgParser.allowAnything();
@@ -42,7 +43,26 @@
   @override
   FutureOr<int> run() async {
     final command = sdk.pub;
-    final args = argResults.arguments;
+    var args = argResults.arguments;
+
+    // Pass any --enable-experiment options along.
+    if (args.isNotEmpty && wereExperimentsSpecified) {
+      List<String> experimentIds = specifiedExperiments;
+
+      if (args.first == 'run') {
+        args = [
+          ...args.sublist(0, 1),
+          '--$experimentFlagName=${experimentIds.join(',')}',
+          ...args.sublist(1),
+        ];
+      } else if (args.length > 1 && args[0] == 'global' && args[0] == 'run') {
+        args = [
+          ...args.sublist(0, 2),
+          '--$experimentFlagName=${experimentIds.join(',')}',
+          ...args.sublist(2),
+        ];
+      }
+    }
 
     log.trace('$command ${args.join(' ')}');
 
diff --git a/pkg/dartdev/lib/src/commands/run.dart b/pkg/dartdev/lib/src/commands/run.dart
index 7496a2a..6ba76e0 100644
--- a/pkg/dartdev/lib/src/commands/run.dart
+++ b/pkg/dartdev/lib/src/commands/run.dart
@@ -11,12 +11,15 @@
 import 'package:path/path.dart';
 
 import '../core.dart';
+import '../experiments.dart';
 import '../sdk.dart';
 import '../utils.dart';
 
 class RunCommand extends DartdevCommand<int> {
   @override
   final ArgParser argParser = ArgParser.allowAnything();
+
+  @override
   final bool verbose;
 
   RunCommand({this.verbose = false}) : super('run', '''
@@ -55,7 +58,7 @@
   @override
   FutureOr<int> run() async {
     // The command line arguments after 'run'
-    final args = argResults.arguments.toList();
+    var args = argResults.arguments.toList();
 
     var argsContainFileOrHelp = false;
     for (var arg in args) {
@@ -70,6 +73,7 @@
     }
 
     final cwd = Directory.current;
+
     if (!argsContainFileOrHelp && cwd.existsSync()) {
       var foundImplicitFileToRun = false;
       var cwdName = cwd.name;
@@ -90,6 +94,7 @@
           break;
         }
       }
+
       if (!foundImplicitFileToRun) {
         log.stderr(
           'Could not find the implicit file to run: '
@@ -98,6 +103,15 @@
       }
     }
 
+    // Pass any --enable-experiment options along.
+    if (args.isNotEmpty && wereExperimentsSpecified) {
+      List<String> experimentIds = specifiedExperiments;
+      args = [
+        '--$experimentFlagName=${experimentIds.join(',')}',
+        ...args,
+      ];
+    }
+
     // If the user wants to start a debugging session we need to do some extra
     // work and spawn a Dart Development Service (DDS) instance. DDS is a VM
     // service intermediary which implements the VM service protocol and
@@ -107,14 +121,14 @@
         element.startsWith('--observe') ||
         element.startsWith('--enable-vm-service'))) {
       return await _DebuggingSession(this, args).start();
+    } else {
+      // Starting in ProcessStartMode.inheritStdio mode means the child process
+      // can detect support for ansi chars.
+      final process = await Process.start(
+          sdk.dart, ['--disable-dart-dev', ...args],
+          mode: ProcessStartMode.inheritStdio);
+      return process.exitCode;
     }
-
-    // Starting in ProcessStartMode.inheritStdio mode means the child process
-    // can detect support for ansi chars.
-    final process = await Process.start(
-        sdk.dart, ['--disable-dart-dev', ...args],
-        mode: ProcessStartMode.inheritStdio);
-    return process.exitCode;
   }
 }
 
diff --git a/pkg/dartdev/lib/src/commands/test.dart b/pkg/dartdev/lib/src/commands/test.dart
index d52b802..ccc8268 100644
--- a/pkg/dartdev/lib/src/commands/test.dart
+++ b/pkg/dartdev/lib/src/commands/test.dart
@@ -8,11 +8,11 @@
 import 'package:args/args.dart';
 
 import '../core.dart';
+import '../experiments.dart';
 import '../sdk.dart';
 
 class TestCommand extends DartdevCommand<int> {
-  TestCommand({bool verbose = false})
-      : super('test', 'Runs tests in this project.');
+  TestCommand() : super('test', 'Runs tests in this project.');
 
   @override
   final ArgParser argParser = ArgParser.allowAnything();
@@ -43,9 +43,15 @@
   @override
   FutureOr<int> run() async {
     final command = sdk.pub;
-    final args = argResults.arguments.toList();
+    final testArgs = argResults.arguments.toList();
 
-    args.insertAll(0, ['run', 'test']);
+    final args = [
+      'run',
+      if (wereExperimentsSpecified)
+        '--$experimentFlagName=${specifiedExperiments.join(',')}',
+      'test',
+      ...testArgs,
+    ];
 
     log.trace('$command ${args.join(' ')}');
 
diff --git a/pkg/dartdev/lib/src/core.dart b/pkg/dartdev/lib/src/core.dart
index b0bb75e..da4b3d3 100644
--- a/pkg/dartdev/lib/src/core.dart
+++ b/pkg/dartdev/lib/src/core.dart
@@ -9,10 +9,11 @@
 import 'package:cli_util/cli_logging.dart';
 import 'package:path/path.dart' as path;
 
+import 'experiments.dart';
 import 'utils.dart';
 
 Logger log;
-bool isVerbose = false;
+bool isDiagnostics = false;
 
 abstract class DartdevCommand<int> extends Command {
   final String _name;
@@ -32,6 +33,19 @@
   String get description => _description;
 
   Project get project => _project ??= Project();
+
+  /// Return whether commands should emit verbose output.
+  bool get verbose => globalResults['verbose'];
+
+  /// Return whether the tool should emit diagnostic output.
+  bool get diagnosticsEnabled => globalResults['diagnostics'];
+
+  /// Return whether any Dart experiments were specified by the user.
+  bool get wereExperimentsSpecified =>
+      globalResults.wasParsed(experimentFlagName);
+
+  /// Return the list of Dart experiment flags specified by the user.
+  List<String> get specifiedExperiments => globalResults[experimentFlagName];
 }
 
 /// A utility method to start the given executable as a process, optionally
@@ -50,7 +64,7 @@
   bool logToTrace = false,
   void Function(String str) listener,
 }) {
-  if (isVerbose) {
+  if (isDiagnostics) {
     _streamLineTransform(process.stdout, (String line) {
       logToTrace ? log.trace(line.trimRight()) : log.stdout(line.trimRight());
       if (listener != null) listener(line);
diff --git a/pkg/dartdev/lib/src/experiments.dart b/pkg/dartdev/lib/src/experiments.dart
new file mode 100644
index 0000000..3921900
--- /dev/null
+++ b/pkg/dartdev/lib/src/experiments.dart
@@ -0,0 +1,16 @@
+// Copyright (c) 2020, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/src/dart/analysis/experiments.dart';
+
+const experimentFlagName = 'enable-experiment';
+
+/// Return a list of all the non-expired Dart experiments.
+List<ExperimentalFeature> get experimentalFeatures {
+  List<ExperimentalFeature> features = ExperimentStatus.knownFeatures.values
+      .where((feature) => !feature.isExpired)
+      .toList();
+  features.sort((a, b) => a.enableString.compareTo(b.enableString));
+  return features;
+}
diff --git a/pkg/dartdev/test/commands/analyze_test.dart b/pkg/dartdev/test/commands/analyze_test.dart
index 29c4d07..61206ca 100644
--- a/pkg/dartdev/test/commands/analyze_test.dart
+++ b/pkg/dartdev/test/commands/analyze_test.dart
@@ -157,4 +157,25 @@
     expect(result.stderr, isEmpty);
     expect(result.stdout, contains('1 issue found.'));
   });
+
+  test('--verbose', () {
+    p = project(mainSrc: '''
+int f() {
+  var result = one + 2;
+  var one = 1;
+  return result;
+}''');
+    var result = p.runSync('analyze', ['--verbose', p.dirPath]);
+
+    expect(result.exitCode, 3);
+    expect(result.stderr, isEmpty);
+    var stdout = result.stdout;
+    expect(stdout, contains("The declaration of 'one' is on line 3."));
+    expect(
+        stdout, contains('Try moving the declaration to before the first use'));
+    expect(
+        stdout,
+        contains(
+            'https://dart.dev/tools/diagnostic-messages#referenced_before_declaration'));
+  });
 }
diff --git a/pkg/dartdev/test/commands/flag_test.dart b/pkg/dartdev/test/commands/flag_test.dart
index 978c6ae..748240f 100644
--- a/pkg/dartdev/test/commands/flag_test.dart
+++ b/pkg/dartdev/test/commands/flag_test.dart
@@ -2,6 +2,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+import 'package:args/args.dart';
 import 'package:args/command_runner.dart';
 import 'package:dartdev/dartdev.dart';
 import 'package:test/test.dart';
@@ -37,6 +38,17 @@
       }
     });
   });
+
+  test('enable experiments flag is supported', () {
+    final args = [
+      '--disable-dartdev-analytics',
+      '--enable-experiment=non-nullable'
+    ];
+    final runner = DartdevRunner(args);
+    ArgResults results = runner.parse(args);
+    expect(results['enable-experiment'], isNotEmpty);
+    expect(results['enable-experiment'].first, 'non-nullable');
+  });
 }
 
 void help() {
diff --git a/pkg/dartdev/test/commands/pub_test.dart b/pkg/dartdev/test/commands/pub_test.dart
index b8a98ee..ed9f801 100644
--- a/pkg/dartdev/test/commands/pub_test.dart
+++ b/pkg/dartdev/test/commands/pub_test.dart
@@ -34,6 +34,44 @@
     expect(result.stderr, isEmpty);
   });
 
+  test('--enable-experiment pub run', () {
+    p = project();
+    p.file('bin/main.dart',
+        "void main() { int a; a = null; print('a is \$a.'); }");
+
+    // run 'pub get'
+    p.runSync('pub', ['get']);
+
+    var result = p.runSync(
+        '--enable-experiment=non-nullable', ['pub', 'run', 'main.dart']);
+
+    expect(result.exitCode, 254);
+    expect(result.stdout, isEmpty);
+    expect(
+        result.stderr,
+        contains("A value of type 'Null' can't be assigned to a variable of "
+            "type 'int'"));
+  });
+
+  test('pub run --enable-experiment', () {
+    p = project();
+    p.file('bin/main.dart',
+        "void main() { int a; a = null; print('a is \$a.'); }");
+
+    // run 'pub get'
+    p.runSync('pub', ['get']);
+
+    var result = p.runSync(
+        'pub', ['run', '--enable-experiment=non-nullable', 'main.dart']);
+
+    expect(result.exitCode, 254);
+    expect(result.stdout, isEmpty);
+    expect(
+        result.stderr,
+        contains("A value of type 'Null' can't be assigned to a variable of "
+            "type 'int'"));
+  });
+
   test('failure', () {
     p = project(mainSrc: 'int get foo => 1;\n');
     var result = p.runSync('pub', ['deps']);
diff --git a/pkg/dartdev/test/commands/run_test.dart b/pkg/dartdev/test/commands/run_test.dart
index e6b8931..ac2527a 100644
--- a/pkg/dartdev/test/commands/run_test.dart
+++ b/pkg/dartdev/test/commands/run_test.dart
@@ -36,6 +36,20 @@
     expect(result.exitCode, 0);
   });
 
+  test('--enable-experiment', () {
+    p = project();
+    p.file('main.dart', "void main() { int a; a = null; print('a is \$a.'); }");
+    var result =
+        p.runSync('--enable-experiment=non-nullable', ['run', 'main.dart']);
+
+    expect(result.exitCode, 254);
+    expect(result.stdout, isEmpty);
+    expect(
+        result.stderr,
+        contains("A value of type 'Null' can't be assigned to a variable of "
+            "type 'int'"));
+  });
+
   test('no such file', () {
     p = project(mainSrc: "void main() { print('Hello World'); }");
     ProcessResult result =
@@ -47,7 +61,7 @@
 
   test('implicit packageName.dart', () {
     // TODO(jwren) circle back to reimplement this test if possible, the file
-    //  name (package name) will be the name of the temporary directory on disk
+    // name (package name) will be the name of the temporary directory on disk
     p = project(mainSrc: "void main() { print('Hello World'); }");
     p.file('bin/main.dart', "void main() { print('Hello main.dart'); }");
     ProcessResult result = p.runSync('run', []);
@@ -57,7 +71,7 @@
     expect(result.exitCode, 0);
   }, skip: true);
 
-  //Could not find the implicit file to run: bin
+  // Could not find the implicit file to run: bin
   test('missing implicit packageName.dart', () {
     p = project(mainSrc: "void main() { print('Hello World'); }");
     p.file('bin/foo.dart', "void main() { print('Hello main.dart'); }");
diff --git a/pkg/dartdev/test/commands/test_test.dart b/pkg/dartdev/test/commands/test_test.dart
index 3f2ea70..a3b5265 100644
--- a/pkg/dartdev/test/commands/test_test.dart
+++ b/pkg/dartdev/test/commands/test_test.dart
@@ -65,4 +65,26 @@
     expect(result.stdout, contains('All tests passed!'));
     expect(result.stderr, isEmpty);
   }, skip: 'https://github.com/dart-lang/sdk/issues/40854');
+
+  test('--enable-experiment', () {
+    p = project(mainSrc: 'int get foo => 1;\n');
+    p.file('test/foo_test.dart', '''
+import 'package:test/test.dart';
+
+void main() {
+  test('', () {
+    int a;
+    a = null;
+    print('a is \$a.');
+  });
+}
+''');
+
+    var result = p.runSync('pub', ['get', '--offline']);
+    expect(result.exitCode, 0);
+
+    result = p.runSync('--enable-experiment=non-nullable',
+        ['test', '--no-color', '--reporter', 'expanded']);
+    expect(result.exitCode, 1);
+  }, skip: 'https://github.com/dart-lang/sdk/issues/40854');
 }
diff --git a/pkg/dartdev/test/experiments_test.dart b/pkg/dartdev/test/experiments_test.dart
new file mode 100644
index 0000000..f9bec0e
--- /dev/null
+++ b/pkg/dartdev/test/experiments_test.dart
@@ -0,0 +1,18 @@
+// Copyright (c) 2020, the Dart project authors. Please see the AUTHORS file
+// for 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:dartdev/src/experiments.dart';
+import 'package:test/test.dart';
+
+void main() {
+  group('experiments', () {
+    test('experimentalFeatures', () {
+      expect(experimentalFeatures, isNotEmpty);
+      expect(
+        experimentalFeatures.map((experiment) => experiment.enableString),
+        contains('non-nullable'),
+      );
+    });
+  });
+}
diff --git a/pkg/dev_compiler/lib/src/kernel/compiler.dart b/pkg/dev_compiler/lib/src/kernel/compiler.dart
index 0e7f31e..d6f0fa5 100644
--- a/pkg/dev_compiler/lib/src/kernel/compiler.dart
+++ b/pkg/dev_compiler/lib/src/kernel/compiler.dart
@@ -12,6 +12,7 @@
 import 'package:kernel/library_index.dart';
 import 'package:kernel/type_algebra.dart';
 import 'package:kernel/type_environment.dart';
+import 'package:kernel/src/dart_type_equivalence.dart';
 import 'package:source_span/source_span.dart' show SourceLocation;
 import 'package:path/path.dart' as p;
 
@@ -3125,7 +3126,7 @@
     var gen = emitGeneratorFn((_) => []);
     // Return type of an async body is `Future<flatten(T)>`, where T is the
     // declared return type.
-    var returnType = _types.unfutureType(function
+    var returnType = _types.flatten(function
         .computeThisFunctionType(_currentLibrary.nonNullable)
         .returnType);
     return js.call('#.async(#, #)',
@@ -5331,7 +5332,8 @@
     }
 
     if (!isTypeError &&
-        from.withDeclaredNullability(Nullability.nonNullable) == to &&
+        DartTypeEquivalence(_coreTypes, ignoreTopLevelNullability: true)
+            .areEqual(from, to) &&
         _mustBeNonNullable(to)) {
       // If the underlying type is the same, we only need a null check.
       return runtimeCall('nullCast(#, #)', [jsFrom, _emitType(to)]);
diff --git a/pkg/dev_compiler/test/modular_suite.dart b/pkg/dev_compiler/test/modular_suite.dart
index e368ee2..ab721cb 100644
--- a/pkg/dev_compiler/test/modular_suite.dart
+++ b/pkg/dev_compiler/test/modular_suite.dart
@@ -11,14 +11,22 @@
 import 'package:modular_test/src/pipeline.dart';
 import 'package:modular_test/src/suite.dart';
 import 'package:modular_test/src/runner.dart';
+import 'package:package_config/package_config.dart';
 
+String packageConfigJsonPath = '.dart_tool/package_config.json';
 Uri sdkRoot = Platform.script.resolve('../../../');
+Uri packageConfigUri = sdkRoot.resolve(packageConfigJsonPath);
 Options _options;
 String _dartdevcScript;
 String _kernelWorkerScript;
 
+// TODO(joshualitt): Figure out a way to support package configs in
+// tests/modular.
+PackageConfig _packageConfig;
+
 void main(List<String> args) async {
   _options = Options.parse(args);
+  _packageConfig = await loadPackageConfigUri(packageConfigUri);
   await _resolveScripts();
   await runSuite(
       sdkRoot.resolve('tests/modular/'),
@@ -35,6 +43,17 @@
 const jsId = DataId('js');
 const txtId = DataId('txt');
 
+String _packageConfigEntry(String name, Uri root,
+    {Uri packageRoot, LanguageVersion version}) {
+  var fields = [
+    '"name": "${name}"',
+    '"rootUri": "$root"',
+    if (packageRoot != null) '"packageUri": "$packageRoot"',
+    if (version != null) '"languageVersion": "$version"'
+  ];
+  return '{${fields.join(',')}}';
+}
+
 class SourceToSummaryDillStep implements IOModularStep {
   @override
   List<DataId> get resultData => const [dillId];
@@ -298,30 +317,51 @@
 
 Future<void> _createPackagesFile(
     Module module, Uri root, Set<Module> transitiveDependencies) async {
-  // We create a .packages file which defines the location of this module if
-  // it is a package.  The CFE requires that if a `package:` URI of a
-  // dependency is used in an import, then we need that package entry in the
-  // .packages file. However, after it checks that the definition exists, the
-  // CFE will not actually use the resolved URI if a library for the import
-  // URI is already found in one of the provided .dill files of the
-  // dependencies. For that reason, and to ensure that a step only has access
-  // to the files provided in a module, we generate a .packages with invalid
-  // folders for other packages.
+  // We create both a .packages and package_config.json file which defines
+  // the location of this module if it is a package.  The CFE requires that
+  // if a `package:` URI of a dependency is used in an import, then we need
+  // that package entry in the associated file. However, after it checks that
+  // the definition exists, the CFE will not actually use the resolved URI if
+  // a library for the import URI is already found in one of the provide
+  // .dill files of the dependencies. For that reason, and to ensure that
+  // a step only has access to the files provided in a module, we generate a
+  // config file with invalid folders for other packages.
   // TODO(sigmund): follow up with the CFE to see if we can remove the need
-  // for the .packages entry altogether if they won't need to read the
-  // sources.
+  // for these dummy entries..
+  // TODO(joshualitt): Generate just the json file.
+  var packagesJson = [];
   var packagesContents = StringBuffer();
   if (module.isPackage) {
     packagesContents.write('${module.name}:${module.packageBase}\n');
+    packagesJson.add(_packageConfigEntry(
+        module.name, Uri.parse('../${module.packageBase}')));
   }
   var unusedNum = 0;
   for (var dependency in transitiveDependencies) {
     if (dependency.isPackage) {
+      // rootUri should be ignored for dependent modules, so we pass in a
+      // bogus value.
+      var rootUri = Uri.parse('unused$unusedNum');
       unusedNum++;
-      packagesContents.write('${dependency.name}:unused$unusedNum\n');
+      var dependentPackage = _packageConfig[dependency.name];
+      var packageJson = dependentPackage == null
+          ? _packageConfigEntry(dependency.name, rootUri)
+          : _packageConfigEntry(dependentPackage.name, rootUri,
+              version: dependentPackage.languageVersion);
+      packagesJson.add(packageJson);
+      packagesContents.write('${dependency.name}:$rootUri\n');
     }
   }
 
+  if (module.isPackage) {
+    await File.fromUri(root.resolve(packageConfigJsonPath))
+        .create(recursive: true);
+    await File.fromUri(root.resolve(packageConfigJsonPath)).writeAsString('{'
+        '  "configVersion": ${_packageConfig.version},'
+        '  "packages": [ ${packagesJson.join(',')} ]'
+        '}');
+  }
+
   await File.fromUri(root.resolve('.packages'))
       .writeAsString('$packagesContents');
 }
diff --git a/pkg/dev_compiler/test/modular_suite_nnbd.dart b/pkg/dev_compiler/test/modular_suite_nnbd.dart
index c1a624b..0970e54 100644
--- a/pkg/dev_compiler/test/modular_suite_nnbd.dart
+++ b/pkg/dev_compiler/test/modular_suite_nnbd.dart
@@ -11,14 +11,22 @@
 import 'package:modular_test/src/pipeline.dart';
 import 'package:modular_test/src/suite.dart';
 import 'package:modular_test/src/runner.dart';
+import 'package:package_config/package_config.dart';
 
+String packageConfigJsonPath = '.dart_tool/package_config.json';
 Uri sdkRoot = Platform.script.resolve('../../../');
+Uri packageConfigUri = sdkRoot.resolve(packageConfigJsonPath);
 Options _options;
 String _dartdevcScript;
 String _kernelWorkerScript;
 
+// TODO(joshualitt): Figure out a way to support package configs in
+// tests/modular.
+PackageConfig _packageConfig;
+
 void main(List<String> args) async {
   _options = Options.parse(args);
+  _packageConfig = await loadPackageConfigUri(packageConfigUri);
   await _resolveScripts();
   await runSuite(
       sdkRoot.resolve('tests/modular/'),
@@ -35,6 +43,17 @@
 const jsId = DataId('js');
 const txtId = DataId('txt');
 
+String _packageConfigEntry(String name, Uri root,
+    {Uri packageRoot, LanguageVersion version}) {
+  var fields = [
+    '"name": "${name}"',
+    '"rootUri": "$root"',
+    if (packageRoot != null) '"packageUri": "$packageRoot"',
+    if (version != null) '"languageVersion": "$version"'
+  ];
+  return '{${fields.join(',')}}';
+}
+
 class SourceToSummaryDillStep implements IOModularStep {
   @override
   List<DataId> get resultData => const [dillId];
@@ -301,30 +320,51 @@
 
 Future<void> _createPackagesFile(
     Module module, Uri root, Set<Module> transitiveDependencies) async {
-  // We create a .packages file which defines the location of this module if
-  // it is a package.  The CFE requires that if a `package:` URI of a
-  // dependency is used in an import, then we need that package entry in the
-  // .packages file. However, after it checks that the definition exists, the
-  // CFE will not actually use the resolved URI if a library for the import
-  // URI is already found in one of the provided .dill files of the
-  // dependencies. For that reason, and to ensure that a step only has access
-  // to the files provided in a module, we generate a .packages with invalid
-  // folders for other packages.
+  // We create both a .packages and package_config.json file which defines
+  // the location of this module if it is a package.  The CFE requires that
+  // if a `package:` URI of a dependency is used in an import, then we need
+  // that package entry in the associated file. However, after it checks that
+  // the definition exists, the CFE will not actually use the resolved URI if
+  // a library for the import URI is already found in one of the provide
+  // .dill files of the dependencies. For that reason, and to ensure that
+  // a step only has access to the files provided in a module, we generate a
+  // config file with invalid folders for other packages.
   // TODO(sigmund): follow up with the CFE to see if we can remove the need
-  // for the .packages entry altogether if they won't need to read the
-  // sources.
+  // for these dummy entries..
+  // TODO(joshualitt): Generate just the json file.
+  var packagesJson = [];
   var packagesContents = StringBuffer();
   if (module.isPackage) {
     packagesContents.write('${module.name}:${module.packageBase}\n');
+    packagesJson.add(_packageConfigEntry(
+        module.name, Uri.parse('../${module.packageBase}')));
   }
   var unusedNum = 0;
   for (var dependency in transitiveDependencies) {
     if (dependency.isPackage) {
+      // rootUri should be ignored for dependent modules, so we pass in a
+      // bogus value.
+      var rootUri = Uri.parse('unused$unusedNum');
       unusedNum++;
-      packagesContents.write('${dependency.name}:unused$unusedNum\n');
+      var dependentPackage = _packageConfig[dependency.name];
+      var packageJson = dependentPackage == null
+          ? _packageConfigEntry(dependency.name, rootUri)
+          : _packageConfigEntry(dependentPackage.name, rootUri,
+              version: dependentPackage.languageVersion);
+      packagesJson.add(packageJson);
+      packagesContents.write('${dependency.name}:$rootUri\n');
     }
   }
 
+  if (module.isPackage) {
+    await File.fromUri(root.resolve(packageConfigJsonPath))
+        .create(recursive: true);
+    await File.fromUri(root.resolve(packageConfigJsonPath)).writeAsString('{'
+        '  "configVersion": ${_packageConfig.version},'
+        '  "packages": [ ${packagesJson.join(',')} ]'
+        '}');
+  }
+
   await File.fromUri(root.resolve('.packages'))
       .writeAsString('$packagesContents');
 }
diff --git a/pkg/dev_compiler/tool/dart2js_nnbd_sdk_error_golden.txt b/pkg/dev_compiler/tool/dart2js_nnbd_sdk_error_golden.txt
index 9a662e8..e5b469e 100644
--- a/pkg/dev_compiler/tool/dart2js_nnbd_sdk_error_golden.txt
+++ b/pkg/dev_compiler/tool/dart2js_nnbd_sdk_error_golden.txt
@@ -1,10 +1,10 @@
-ERROR|COMPILE_TIME_ERROR|INCONSISTENT_INHERITANCE|lib/_internal/js_runtime/lib/interceptors.dart|1636|7|5|Superinterfaces don't have a valid override for '&': JSNumber.& (num Function(num)), int.& (int Function(int)).
-ERROR|COMPILE_TIME_ERROR|INCONSISTENT_INHERITANCE|lib/_internal/js_runtime/lib/interceptors.dart|1636|7|5|Superinterfaces don't have a valid override for '<<': JSNumber.<< (num Function(num)), int.<< (int Function(int)).
-ERROR|COMPILE_TIME_ERROR|INCONSISTENT_INHERITANCE|lib/_internal/js_runtime/lib/interceptors.dart|1636|7|5|Superinterfaces don't have a valid override for '>>': JSNumber.>> (num Function(num)), int.>> (int Function(int)).
-ERROR|COMPILE_TIME_ERROR|INCONSISTENT_INHERITANCE|lib/_internal/js_runtime/lib/interceptors.dart|1636|7|5|Superinterfaces don't have a valid override for '\|': JSNumber.\| (num Function(num)), int.\| (int Function(int)).
-ERROR|COMPILE_TIME_ERROR|INCONSISTENT_INHERITANCE|lib/_internal/js_runtime/lib/interceptors.dart|1636|7|5|Superinterfaces don't have a valid override for '^': JSNumber.^ (num Function(num)), int.^ (int Function(int)).
-ERROR|STATIC_TYPE_WARNING|UNDEFINED_OPERATOR|lib/_internal/js_runtime/lib/interceptors.dart|1653|28|1|The operator '&' isn't defined for the type 'JSInt'.
-ERROR|STATIC_TYPE_WARNING|UNDEFINED_OPERATOR|lib/_internal/js_runtime/lib/interceptors.dart|1655|27|1|The operator '&' isn't defined for the type 'JSInt'.
-ERROR|STATIC_TYPE_WARNING|UNDEFINED_OPERATOR|lib/_internal/js_runtime/lib/interceptors.dart|1658|17|1|The operator '&' isn't defined for the type 'JSInt'.
-ERROR|STATIC_TYPE_WARNING|UNDEFINED_OPERATOR|lib/_internal/js_runtime/lib/interceptors.dart|1663|18|1|The operator '&' isn't defined for the type 'JSInt'.
-ERROR|STATIC_TYPE_WARNING|UNDEFINED_OPERATOR|lib/_internal/js_runtime/lib/interceptors.dart|1663|44|1|The operator '&' isn't defined for the type 'JSInt'.
+ERROR|COMPILE_TIME_ERROR|INCONSISTENT_INHERITANCE|lib/_internal/js_runtime/lib/interceptors.dart|1659|7|5|Superinterfaces don't have a valid override for '&': JSNumber.& (num Function(num)), int.& (int Function(int)).
+ERROR|COMPILE_TIME_ERROR|INCONSISTENT_INHERITANCE|lib/_internal/js_runtime/lib/interceptors.dart|1659|7|5|Superinterfaces don't have a valid override for '<<': JSNumber.<< (num Function(num)), int.<< (int Function(int)).
+ERROR|COMPILE_TIME_ERROR|INCONSISTENT_INHERITANCE|lib/_internal/js_runtime/lib/interceptors.dart|1659|7|5|Superinterfaces don't have a valid override for '>>': JSNumber.>> (num Function(num)), int.>> (int Function(int)).
+ERROR|COMPILE_TIME_ERROR|INCONSISTENT_INHERITANCE|lib/_internal/js_runtime/lib/interceptors.dart|1659|7|5|Superinterfaces don't have a valid override for '\|': JSNumber.\| (num Function(num)), int.\| (int Function(int)).
+ERROR|COMPILE_TIME_ERROR|INCONSISTENT_INHERITANCE|lib/_internal/js_runtime/lib/interceptors.dart|1659|7|5|Superinterfaces don't have a valid override for '^': JSNumber.^ (num Function(num)), int.^ (int Function(int)).
+ERROR|STATIC_TYPE_WARNING|UNDEFINED_OPERATOR|lib/_internal/js_runtime/lib/interceptors.dart|1676|28|1|The operator '&' isn't defined for the type 'JSInt'.
+ERROR|STATIC_TYPE_WARNING|UNDEFINED_OPERATOR|lib/_internal/js_runtime/lib/interceptors.dart|1678|27|1|The operator '&' isn't defined for the type 'JSInt'.
+ERROR|STATIC_TYPE_WARNING|UNDEFINED_OPERATOR|lib/_internal/js_runtime/lib/interceptors.dart|1681|17|1|The operator '&' isn't defined for the type 'JSInt'.
+ERROR|STATIC_TYPE_WARNING|UNDEFINED_OPERATOR|lib/_internal/js_runtime/lib/interceptors.dart|1686|18|1|The operator '&' isn't defined for the type 'JSInt'.
+ERROR|STATIC_TYPE_WARNING|UNDEFINED_OPERATOR|lib/_internal/js_runtime/lib/interceptors.dart|1686|44|1|The operator '&' isn't defined for the type 'JSInt'.
diff --git a/pkg/dev_compiler/tool/dartdevc_nnbd_sdk_error_golden.txt b/pkg/dev_compiler/tool/dartdevc_nnbd_sdk_error_golden.txt
index a4e5f6e..21a638c 100644
--- a/pkg/dev_compiler/tool/dartdevc_nnbd_sdk_error_golden.txt
+++ b/pkg/dev_compiler/tool/dartdevc_nnbd_sdk_error_golden.txt
@@ -1,8 +1,8 @@
-ERROR|COMPILE_TIME_ERROR|CONST_CONSTRUCTOR_THROWS_EXCEPTION|lib/core/core.dart|3723|5|94|Const constructors can't throw exceptions.
-ERROR|COMPILE_TIME_ERROR|CONST_CONSTRUCTOR_THROWS_EXCEPTION|lib/core/core.dart|7913|5|97|Const constructors can't throw exceptions.
+ERROR|COMPILE_TIME_ERROR|CONST_CONSTRUCTOR_THROWS_EXCEPTION|lib/core/core.dart|3726|5|94|Const constructors can't throw exceptions.
+ERROR|COMPILE_TIME_ERROR|CONST_CONSTRUCTOR_THROWS_EXCEPTION|lib/core/core.dart|7916|5|97|Const constructors can't throw exceptions.
 ERROR|COMPILE_TIME_ERROR|CONST_CONSTRUCTOR_THROWS_EXCEPTION|lib/core/core.dart|940|5|95|Const constructors can't throw exceptions.
 ERROR|COMPILE_TIME_ERROR|CONST_CONSTRUCTOR_THROWS_EXCEPTION|lib/core/core.dart|973|5|94|Const constructors can't throw exceptions.
-ERROR|SYNTACTIC_ERROR|CONST_FACTORY|lib/core/core.dart|3721|3|5|Only redirecting factory constructors can be declared to be 'const'.
-ERROR|SYNTACTIC_ERROR|CONST_FACTORY|lib/core/core.dart|7911|3|5|Only redirecting factory constructors can be declared to be 'const'.
+ERROR|SYNTACTIC_ERROR|CONST_FACTORY|lib/core/core.dart|3724|3|5|Only redirecting factory constructors can be declared to be 'const'.
+ERROR|SYNTACTIC_ERROR|CONST_FACTORY|lib/core/core.dart|7914|3|5|Only redirecting factory constructors can be declared to be 'const'.
 ERROR|SYNTACTIC_ERROR|CONST_FACTORY|lib/core/core.dart|938|3|5|Only redirecting factory constructors can be declared to be 'const'.
 ERROR|SYNTACTIC_ERROR|CONST_FACTORY|lib/core/core.dart|971|3|5|Only redirecting factory constructors can be declared to be 'const'.
diff --git a/pkg/expect/lib/expect.dart b/pkg/expect/lib/expect.dart
index 7376ca8..fcf64da 100644
--- a/pkg/expect/lib/expect.dart
+++ b/pkg/expect/lib/expect.dart
@@ -612,6 +612,19 @@
     Expect.throws(f, (error) => error is NoSuchMethodError, reason);
   }
 
+  /// Checks that [f] throws an appropriate error on a null argument.
+  ///
+  /// In strong mode, this is expected to be a [TypeError] when casting the
+  /// `null` to some non-nullable type. In weak mode, that cast is ignored and
+  /// some later explicit validation should handle it and [ArgumentError].
+  static void throwsNullCheckError(void f()) {
+    if (isStrongMode) {
+      throwsTypeError(f);
+    } else {
+      throwsArgumentError(f);
+    }
+  }
+
   static void throwsRangeError(void f(), [String reason = "RangeError"]) {
     Expect.throws(f, (error) => error is RangeError, reason);
   }
diff --git a/pkg/front_end/lib/src/api_prototype/experimental_flags_generated.dart b/pkg/front_end/lib/src/api_prototype/experimental_flags_generated.dart
index a53d4f2..26c702a 100644
--- a/pkg/front_end/lib/src/api_prototype/experimental_flags_generated.dart
+++ b/pkg/front_end/lib/src/api_prototype/experimental_flags_generated.dart
@@ -108,6 +108,9 @@
   "collection": {
     ExperimentalFlag.nonNullable,
   },
+  "dart_internal": {
+    ExperimentalFlag.nonNullable,
+  },
   "fake_async": {
     ExperimentalFlag.nonNullable,
   },
@@ -117,6 +120,9 @@
   "flutter": {
     ExperimentalFlag.nonNullable,
   },
+  "flutter_test": {
+    ExperimentalFlag.nonNullable,
+  },
   "js": {
     ExperimentalFlag.nonNullable,
   },
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 7dcfad3..2b7f3a1 100644
--- a/pkg/front_end/lib/src/fasta/builder/class_builder.dart
+++ b/pkg/front_end/lib/src/fasta/builder/class_builder.dart
@@ -8,6 +8,7 @@
     show
         Arguments,
         AsExpression,
+        AsyncMarker,
         Class,
         Constructor,
         DartType,
@@ -873,6 +874,8 @@
     procedure.function.body = new ReturnStatement(result)
       ..fileOffset = procedure.fileOffset;
     procedure.function.body.parent = procedure.function;
+    procedure.function.asyncMarker = AsyncMarker.Sync;
+    procedure.function.dartAsyncMarker = AsyncMarker.Sync;
 
     procedure.isAbstract = false;
     procedure.isNoSuchMethodForwarder = true;
diff --git a/pkg/front_end/lib/src/fasta/builder/enum_builder.dart b/pkg/front_end/lib/src/fasta/builder/enum_builder.dart
index bc32b18d..9580da7 100644
--- a/pkg/front_end/lib/src/fasta/builder/enum_builder.dart
+++ b/pkg/front_end/lib/src/fasta/builder/enum_builder.dart
@@ -7,6 +7,7 @@
 import 'package:kernel/ast.dart'
     show
         Arguments,
+        AsyncMarker,
         Class,
         Constructor,
         ConstructorInvocation,
@@ -239,7 +240,8 @@
         charOffset,
         charEndOffset,
         toStringReference,
-        null);
+        null,
+        AsyncMarker.Sync);
     members["toString"] = toStringBuilder;
     String className = name;
     if (enumConstantInfos != null) {
diff --git a/pkg/front_end/lib/src/fasta/builder/procedure_builder.dart b/pkg/front_end/lib/src/fasta/builder/procedure_builder.dart
index 086ea419..1e90de3 100644
--- a/pkg/front_end/lib/src/fasta/builder/procedure_builder.dart
+++ b/pkg/front_end/lib/src/fasta/builder/procedure_builder.dart
@@ -226,6 +226,7 @@
       int charEndOffset,
       Procedure referenceFrom,
       this._tearOffReferenceFrom,
+      AsyncMarker asyncModifier,
       [String nativeMethodName])
       : super(
             metadata,
@@ -241,7 +242,9 @@
             charOpenParenOffset,
             charEndOffset,
             referenceFrom,
-            nativeMethodName);
+            nativeMethodName) {
+    this.asyncModifier = asyncModifier;
+  }
 
   bool _typeEnsured = false;
   Set<ClassMember> _overrideDependencies;
diff --git a/pkg/front_end/lib/src/fasta/incremental_compiler.dart b/pkg/front_end/lib/src/fasta/incremental_compiler.dart
index 03d86c2..01fc714 100644
--- a/pkg/front_end/lib/src/fasta/incremental_compiler.dart
+++ b/pkg/front_end/lib/src/fasta/incremental_compiler.dart
@@ -1438,9 +1438,9 @@
     dillLoadedData = new DillTarget(ticker, uriTranslator, c.options.target);
     int bytesLength = 0;
 
+    data.component = c.options.target.configureComponent(new Component());
     if (summaryBytes != null) {
       ticker.logMs("Read ${c.options.sdkSummary}");
-      data.component = c.options.target.configureComponent(new Component());
       new BinaryBuilderWithMetadata(summaryBytes,
               disableLazyReading: false, disableLazyClassReading: true)
           .readComponent(data.component);
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 12b828d..69f4d72 100644
--- a/pkg/front_end/lib/src/fasta/kernel/body_builder.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/body_builder.dart
@@ -6546,27 +6546,6 @@
   }
 }
 
-AsyncMarker asyncMarkerFromTokens(Token asyncToken, Token starToken) {
-  if (asyncToken == null || identical(asyncToken.stringValue, "sync")) {
-    if (starToken == null) {
-      return AsyncMarker.Sync;
-    } else {
-      assert(identical(starToken.stringValue, "*"));
-      return AsyncMarker.SyncStar;
-    }
-  } else if (identical(asyncToken.stringValue, "async")) {
-    if (starToken == null) {
-      return AsyncMarker.Async;
-    } else {
-      assert(identical(starToken.stringValue, "*"));
-      return AsyncMarker.AsyncStar;
-    }
-  } else {
-    return unhandled(asyncToken.lexeme, "asyncMarkerFromTokens",
-        asyncToken.charOffset, null);
-  }
-}
-
 /// A data holder used to hold the information about a label that is pushed on
 /// the stack.
 class Label {
diff --git a/pkg/front_end/lib/src/fasta/kernel/collections.dart b/pkg/front_end/lib/src/fasta/kernel/collections.dart
index 7944ba5..0a26c3a 100644
--- a/pkg/front_end/lib/src/fasta/kernel/collections.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/collections.dart
@@ -108,8 +108,12 @@
   }
 
   @override
-  void toTextInternal(AstPrinter state) {
-    // TODO(johnniwinther): Implement this.
+  void toTextInternal(AstPrinter printer) {
+    printer.write('...');
+    if (isNullAware) {
+      printer.write('?');
+    }
+    printer.writeExpression(expression);
   }
 }
 
@@ -174,8 +178,15 @@
   }
 
   @override
-  void toTextInternal(AstPrinter state) {
-    // TODO(johnniwinther): Implement this.
+  void toTextInternal(AstPrinter printer) {
+    printer.write('if (');
+    printer.writeExpression(condition);
+    printer.write(') ');
+    printer.writeExpression(then);
+    if (otherwise != null) {
+      printer.write(' else ');
+      printer.writeExpression(otherwise);
+    }
   }
 }
 
diff --git a/pkg/front_end/lib/src/fasta/kernel/inference_visitor.dart b/pkg/front_end/lib/src/fasta/kernel/inference_visitor.dart
index 9644894..1e8e21e 100644
--- a/pkg/front_end/lib/src/fasta/kernel/inference_visitor.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/inference_visitor.dart
@@ -271,7 +271,7 @@
         node.operand, typeContext, true,
         isVoidAllowed: !inferrer.isNonNullableByDefault);
     DartType inferredType =
-        inferrer.typeSchemaEnvironment.unfutureType(operandResult.inferredType);
+        inferrer.typeSchemaEnvironment.flatten(operandResult.inferredType);
     node.operand = operandResult.expression..parent = node;
     return new ExpressionInferenceResult(inferredType, node);
   }
@@ -748,7 +748,8 @@
     assert(getExplicitTypeArguments(node.arguments) == null);
     Typedef typedef = node.typeAliasBuilder.typedef;
     FunctionType calleeType = node.target.function
-        .computeAliasedFunctionType(typedef, inferrer.library.library);
+        .computeAliasedConstructorFunctionType(
+            typedef, inferrer.library.library);
     InvocationInferenceResult result = inferrer.inferInvocation(
         typeContext, node.fileOffset, calleeType, node.arguments,
         returnType: calleeType.returnType.unalias, isConst: node.isConst);
@@ -772,10 +773,29 @@
 
   ExpressionInferenceResult visitTypeAliasedFactoryInvocationJudgment(
       TypeAliasedFactoryInvocationJudgment node, DartType typeContext) {
-    // TODO(eernst): See visitTypeAliasedConstructorInvocationJudgment
-    // for an implementation handling a similar task.
-    throw "visitTypeAliasedFactoryInvocationJudgment: "
-        "${node.typeAliasBuilder}, ${node.target}, $typeContext";
+    assert(getExplicitTypeArguments(node.arguments) == null);
+    Typedef typedef = node.typeAliasBuilder.typedef;
+    FunctionType calleeType = node.target.function
+        .computeAliasedFactoryFunctionType(typedef, inferrer.library.library);
+    InvocationInferenceResult result = inferrer.inferInvocation(
+        typeContext, node.fileOffset, calleeType, node.arguments,
+        returnType: calleeType.returnType.unalias, isConst: node.isConst);
+    node.hasBeenInferred = true;
+    Expression resultNode = node;
+    if (!inferrer.isTopLevel) {
+      SourceLibraryBuilder library = inferrer.library;
+      library.checkBoundsInType(result.inferredType,
+          inferrer.typeSchemaEnvironment, inferrer.helper.uri, node.fileOffset,
+          inferred: true);
+      if (inferrer.isNonNullableByDefault) {
+        if (node.target == inferrer.coreTypes.listDefaultConstructor) {
+          resultNode = inferrer.helper.wrapInProblem(node,
+              messageDefaultListConstructorError, node.fileOffset, noLength);
+        }
+      }
+    }
+    return new ExpressionInferenceResult(
+        result.inferredType, result.applyResult(resultNode));
   }
 
   @override
@@ -1303,7 +1323,11 @@
   DartType getSpreadElementType(DartType spreadType, bool isNullAware) {
     if (spreadType is InterfaceType) {
       if (spreadType.classNode == inferrer.coreTypes.nullClass) {
-        return isNullAware ? spreadType : null;
+        if (inferrer.isNonNullableByDefault) {
+          return isNullAware ? const NeverType(Nullability.nonNullable) : null;
+        } else {
+          return isNullAware ? spreadType : null;
+        }
       }
       List<DartType> supertypeArguments = inferrer.typeSchemaEnvironment
           .getTypeArgumentsAsInstanceOf(
@@ -1706,7 +1730,12 @@
     if (spreadMapEntryType is InterfaceType) {
       if (spreadMapEntryType.classNode == inferrer.coreTypes.nullClass) {
         if (isNullAware) {
-          output[offset] = output[offset + 1] = spreadMapEntryType;
+          if (inferrer.isNonNullableByDefault) {
+            output[offset] =
+                output[offset + 1] = const NeverType(Nullability.nonNullable);
+          } else {
+            output[offset] = output[offset + 1] = spreadMapEntryType;
+          }
         }
       } else {
         List<DartType> supertypeArguments = inferrer.typeSchemaEnvironment
@@ -2132,7 +2161,7 @@
     bool typeContextIsMap = node.keyType is! ImplicitTypeArgument;
     bool typeContextIsIterable = false;
     DartType unfuturedTypeContext =
-        inferrer.typeSchemaEnvironment.unfutureType(typeContext);
+        inferrer.typeSchemaEnvironment.flatten(typeContext);
     if (!inferrer.isTopLevel && inferenceNeeded) {
       // Ambiguous set/map literal
       if (unfuturedTypeContext is InterfaceType) {
@@ -5451,9 +5480,7 @@
       inferredType = inferrer.inferDeclarationType(
           initializerResult.inferredType,
           forSyntheticVariable: node.name == null);
-      inferrer.flowAnalysis.declare(node, true);
     } else {
-      inferrer.flowAnalysis.declare(node, false);
       inferredType = const DynamicType();
     }
     if (node.isImplicitlyTyped) {
@@ -5470,6 +5497,7 @@
           fileOffset: node.fileOffset, isVoidAllowed: node.type is VoidType);
       node.initializer = initializer..parent = node;
     }
+    inferrer.flowAnalysis.declare(node, node.initializer != null);
     if (!inferrer.isTopLevel) {
       SourceLibraryBuilder library = inferrer.library;
       if (node.isImplicitlyTyped) {
diff --git a/pkg/front_end/lib/src/fasta/kernel/internal_ast.dart b/pkg/front_end/lib/src/fasta/kernel/internal_ast.dart
index 377dace..76b40ba 100644
--- a/pkg/front_end/lib/src/fasta/kernel/internal_ast.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/internal_ast.dart
@@ -3500,6 +3500,17 @@
   String toString() {
     return "EqualsExpression(${toStringInternal()})";
   }
+
+  @override
+  void toTextInternal(AstPrinter printer) {
+    printer.writeExpression(left, minimumPrecedence: Precedence.EQUALITY);
+    if (isNot) {
+      printer.write(' != ');
+    } else {
+      printer.write(' == ');
+    }
+    printer.writeExpression(right, minimumPrecedence: Precedence.EQUALITY + 1);
+  }
 }
 
 /// Internal expression for a binary expression.
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 da9bf9d..37a9535 100644
--- a/pkg/front_end/lib/src/fasta/source/outline_builder.dart
+++ b/pkg/front_end/lib/src/fasta/source/outline_builder.dart
@@ -24,7 +24,7 @@
 import 'package:_fe_analyzer_shared/src/scanner/scanner.dart' show Token;
 
 import 'package:kernel/ast.dart'
-    show InvalidType, Nullability, ProcedureKind, Variance;
+    show AsyncMarker, InvalidType, Nullability, ProcedureKind, Variance;
 
 import '../builder/constructor_reference_builder.dart';
 import '../builder/enum_builder.dart';
@@ -797,6 +797,7 @@
   void endTopLevelMethod(Token beginToken, Token getOrSet, Token endToken) {
     debugEvent("endTopLevelMethod");
     MethodBody kind = pop();
+    AsyncMarker asyncModifier = pop();
     List<FormalParameterBuilder> formals = pop();
     int formalsOffset = pop();
     List<TypeVariableBuilder> typeVariables = pop();
@@ -841,6 +842,7 @@
         formalsOffset,
         endToken.charOffset,
         nativeMethodName,
+        asyncModifier,
         isTopLevel: true);
     nativeMethodName = null;
   }
@@ -973,6 +975,7 @@
       pop();
     }
     assert(checkState(beginToken, [
+      ValueKinds.AsyncModifier,
       ValueKinds.FormalsOrNull,
       ValueKinds.Integer, // formals offset
       ValueKinds.TypeVariableListOrNull,
@@ -988,6 +991,7 @@
       ValueKinds.Integer, // var/final/const offset
       ValueKinds.MetadataListOrNull,
     ]));
+    AsyncMarker asyncModifier = pop();
     List<FormalParameterBuilder> formals = pop();
     int formalsOffset = pop();
     List<TypeVariableBuilder> typeVariables = pop();
@@ -1181,6 +1185,7 @@
           formalsOffset,
           endToken.charOffset,
           nativeMethodName,
+          asyncModifier,
           isTopLevel: false);
     }
     nativeMethodName = null;
@@ -1926,6 +1931,7 @@
     if (kind == MethodBody.RedirectingFactoryBody) {
       redirectionTarget = nullIfParserRecovery(pop());
     }
+    AsyncMarker asyncModifier = pop();
     List<FormalParameterBuilder> formals = pop();
     int formalsOffset = pop();
     pop(); // type variables
@@ -1943,17 +1949,19 @@
     }
     String documentationComment = getDocumentationComment(beginToken);
     libraryBuilder.addFactoryMethod(
-        documentationComment,
-        metadata,
-        modifiers,
-        name,
-        formals,
-        redirectionTarget,
-        beginToken.charOffset,
-        charOffset,
-        formalsOffset,
-        endToken.charOffset,
-        nativeMethodName);
+      documentationComment,
+      metadata,
+      modifiers,
+      name,
+      formals,
+      redirectionTarget,
+      beginToken.charOffset,
+      charOffset,
+      formalsOffset,
+      endToken.charOffset,
+      nativeMethodName,
+      asyncModifier,
+    );
     nativeMethodName = null;
     inConstructor = false;
   }
@@ -2060,6 +2068,7 @@
   @override
   void handleAsyncModifier(Token asyncToken, Token starToken) {
     debugEvent("AsyncModifier");
+    push(asyncMarkerFromTokens(asyncToken, starToken));
   }
 
   void addProblem(Message message, int charOffset, int length,
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 ab13bf7..9d489d6 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
@@ -16,6 +16,7 @@
 import 'package:kernel/ast.dart'
     show
         Arguments,
+        AsyncMarker,
         Class,
         Constructor,
         ConstructorInvocation,
@@ -2120,6 +2121,7 @@
       int charOpenParenOffset,
       int charEndOffset,
       String nativeMethodName,
+      AsyncMarker asyncModifier,
       {bool isTopLevel}) {
     MetadataCollector metadataCollector = loader.target.metadataCollector;
     if (returnType == null) {
@@ -2194,6 +2196,7 @@
         charEndOffset,
         referenceFrom,
         tearOffReferenceFrom,
+        asyncModifier,
         nativeMethodName);
     metadataCollector?.setDocumentationComment(
         procedureBuilder.procedure, documentationComment);
@@ -2216,7 +2219,8 @@
       int charOffset,
       int charOpenParenOffset,
       int charEndOffset,
-      String nativeMethodName) {
+      String nativeMethodName,
+      AsyncMarker asyncModifier) {
     TypeBuilder returnType = addNamedType(
         currentTypeParameterScopeBuilder.parent.name,
         const NullabilityBuilder.omitted(),
@@ -2278,6 +2282,7 @@
           charEndOffset,
           referenceFrom,
           null,
+          asyncModifier,
           nativeMethodName);
     }
 
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 e6cf582..dd1021b 100644
--- a/pkg/front_end/lib/src/fasta/source/source_loader.dart
+++ b/pkg/front_end/lib/src/fasta/source/source_loader.dart
@@ -29,6 +29,7 @@
 import 'package:kernel/ast.dart'
     show
         Arguments,
+        AsyncMarker,
         BottomType,
         Class,
         Component,
@@ -398,7 +399,8 @@
         -1,
         -1,
         null,
-        null)
+        null,
+        AsyncMarker.Sync)
       ..parent = parent;
     BodyBuilder listener = dietListener.createListener(
         builder, dietListener.memberScope,
@@ -1300,10 +1302,12 @@
 
 class _GrowableList<E> {
   factory _GrowableList() => null;
+  factory _GrowableList.filled() => null;
 }
 
 class _List<E> {
   factory _List() => null;
+  factory _List.filled() => null;
 }
 
 class MapEntry<K, V> {
diff --git a/pkg/front_end/lib/src/fasta/source/stack_listener_impl.dart b/pkg/front_end/lib/src/fasta/source/stack_listener_impl.dart
index 9eb4912..2d4577b 100644
--- a/pkg/front_end/lib/src/fasta/source/stack_listener_impl.dart
+++ b/pkg/front_end/lib/src/fasta/source/stack_listener_impl.dart
@@ -25,6 +25,27 @@
 abstract class StackListenerImpl extends StackListener {
   SourceLibraryBuilder get libraryBuilder;
 
+  AsyncMarker asyncMarkerFromTokens(Token asyncToken, Token starToken) {
+    if (asyncToken == null || identical(asyncToken.stringValue, "sync")) {
+      if (starToken == null) {
+        return AsyncMarker.Sync;
+      } else {
+        assert(identical(starToken.stringValue, "*"));
+        return AsyncMarker.SyncStar;
+      }
+    } else if (identical(asyncToken.stringValue, "async")) {
+      if (starToken == null) {
+        return AsyncMarker.Async;
+      } else {
+        assert(identical(starToken.stringValue, "*"));
+        return AsyncMarker.AsyncStar;
+      }
+    } else {
+      return unhandled(asyncToken.lexeme, "asyncMarkerFromTokens",
+          asyncToken.charOffset, null);
+    }
+  }
+
   // TODO(ahe): This doesn't belong here. Only implemented by body_builder.dart
   // and ast_builder.dart.
   void finishFunction(
diff --git a/pkg/front_end/lib/src/fasta/source/value_kinds.dart b/pkg/front_end/lib/src/fasta/source/value_kinds.dart
index 1268e81..b7d80dc 100644
--- a/pkg/front_end/lib/src/fasta/source/value_kinds.dart
+++ b/pkg/front_end/lib/src/fasta/source/value_kinds.dart
@@ -64,6 +64,8 @@
   static const ValueKind IdentifierOrNull =
       const SingleValueKind<type.Identifier>(NullValue.Identifier);
   static const ValueKind Integer = const SingleValueKind<int>();
+  static const ValueKind AsyncModifier =
+      const SingleValueKind<type.AsyncMarker>();
   static const ValueKind Formals =
       const SingleValueKind<List<type.FormalParameterBuilder>>();
   static const ValueKind FormalsOrNull =
diff --git a/pkg/front_end/lib/src/fasta/type_inference/closure_context.dart b/pkg/front_end/lib/src/fasta/type_inference/closure_context.dart
index 1ff344f..0251f0c 100644
--- a/pkg/front_end/lib/src/fasta/type_inference/closure_context.dart
+++ b/pkg/front_end/lib/src/fasta/type_inference/closure_context.dart
@@ -53,8 +53,13 @@
             yieldContext, declaredReturnType, needToInferReturnType);
       }
     } else if (isAsync) {
-      returnContext = inferrer.wrapFutureOrType(
-          inferrer.typeSchemaEnvironment.unfutureType(returnContext));
+      if (inferrer.isNonNullableByDefault) {
+        returnContext = inferrer.wrapFutureOrType(
+            inferrer.computeFutureValueTypeSchema(returnContext));
+      } else {
+        returnContext = inferrer.wrapFutureOrType(
+            inferrer.typeSchemaEnvironment.flatten(returnContext));
+      }
       return new _AsyncClosureContext(
           returnContext, declaredReturnType, needToInferReturnType);
     } else {
@@ -148,58 +153,115 @@
 
   void _checkValidReturn(TypeInferrerImpl inferrer, DartType returnType,
       ReturnStatement statement, DartType expressionType) {
-    // The rules for valid returns for functions with [returnType] `T` and
-    // a return expression with static [expressionType] `S`.
-    if (statement.expression == null) {
-      // `return;` is a valid return if T is void, dynamic, or Null.
-      if (returnType is VoidType ||
-          returnType is DynamicType ||
-          returnType == inferrer.coreTypes.nullType) {
-        // Valid return;
+    if (inferrer.isNonNullableByDefault) {
+      if (statement.expression == null) {
+        // It is a compile-time error if s is `return;`, unless T is void,
+        // dynamic, or Null.
+        if (returnType is VoidType ||
+            returnType is DynamicType ||
+            returnType == inferrer.coreTypes.nullType) {
+          // Valid return;
+        } else {
+          statement.expression = inferrer.helper.wrapInProblem(
+              new NullLiteral()..fileOffset = statement.fileOffset,
+              messageReturnWithoutExpressionSync,
+              statement.fileOffset,
+              noLength)
+            ..parent = statement;
+        }
       } else {
-        statement.expression = inferrer.helper.wrapInProblem(
-            new NullLiteral()..fileOffset = statement.fileOffset,
-            messageReturnWithoutExpression,
-            statement.fileOffset,
-            noLength)
-          ..parent = statement;
+        if (_isArrow && returnType is VoidType) {
+          // For `=> e` it is a compile-time error if T is not void, and it
+          // would have been a compile-time error to declare the function with
+          // the body `{ return e; }` rather than `=> e`.
+          return;
+        }
+
+        if (returnType is VoidType &&
+            !(expressionType is VoidType ||
+                expressionType is DynamicType ||
+                expressionType == inferrer.coreTypes.nullType)) {
+          // It is a compile-time error if s is `return e;`, T is void, and S is
+          // neither void, dynamic, nor Null.
+          statement.expression = inferrer.helper.wrapInProblem(
+              statement.expression,
+              messageReturnFromVoidFunction,
+              statement.expression.fileOffset,
+              noLength)
+            ..parent = statement;
+        } else if (!(returnType is VoidType || returnType is DynamicType) &&
+            expressionType is VoidType) {
+          // It is a compile-time error if s is `return e;`, T is neither void
+          // nor dynamic, and S is void.
+          statement.expression = inferrer.helper.wrapInProblem(
+              statement.expression,
+              messageVoidExpression,
+              statement.expression.fileOffset,
+              noLength)
+            ..parent = statement;
+        } else if (expressionType is! VoidType) {
+          // It is a compile-time error if s is `return e;`, S is not void, and
+          // S is not assignable to T.
+          Expression expression = inferrer.ensureAssignable(
+              _returnContext, expressionType, statement.expression,
+              fileOffset: statement.expression.fileOffset, isVoidAllowed: true);
+          statement.expression = expression..parent = statement;
+        }
       }
     } else {
-      void ensureAssignability() {
-        Expression expression = inferrer.ensureAssignable(
-            _returnContext, expressionType, statement.expression,
-            fileOffset: statement.fileOffset, isVoidAllowed: true);
-        statement.expression = expression..parent = statement;
-      }
-
-      if (_isArrow && returnType is VoidType) {
-        // Arrow functions are valid if: T is void or return exp; is a valid for
-        // a block-bodied function.
-        ensureAssignability();
-      } else if (returnType is VoidType &&
-          expressionType is! VoidType &&
-          expressionType is! DynamicType &&
-          expressionType != inferrer.coreTypes.nullType) {
-        // Invalid if T is void and S is not void, dynamic, or Null
-        statement.expression = inferrer.helper.wrapInProblem(
-            statement.expression,
-            messageReturnFromVoidFunction,
-            statement.expression.fileOffset,
-            noLength)
-          ..parent = statement;
-      } else if (expressionType is VoidType &&
-          returnType is! VoidType &&
-          returnType is! DynamicType &&
-          returnType != inferrer.coreTypes.nullType) {
-        // Invalid if S is void and T is not void, dynamic, or Null.
-        statement.expression = inferrer.helper.wrapInProblem(
-            statement.expression,
-            messageVoidExpression,
-            statement.expression.fileOffset,
-            noLength)
-          ..parent = statement;
+      // The rules for valid returns for functions with [returnType] `T` and
+      // a return expression with static [expressionType] `S`.
+      if (statement.expression == null) {
+        // `return;` is a valid return if T is void, dynamic, or Null.
+        if (returnType is VoidType ||
+            returnType is DynamicType ||
+            returnType == inferrer.coreTypes.nullType) {
+          // Valid return;
+        } else {
+          statement.expression = inferrer.helper.wrapInProblem(
+              new NullLiteral()..fileOffset = statement.fileOffset,
+              messageReturnWithoutExpression,
+              statement.fileOffset,
+              noLength)
+            ..parent = statement;
+        }
       } else {
-        ensureAssignability();
+        void ensureAssignability() {
+          Expression expression = inferrer.ensureAssignable(
+              _returnContext, expressionType, statement.expression,
+              fileOffset: statement.fileOffset, isVoidAllowed: true);
+          statement.expression = expression..parent = statement;
+        }
+
+        if (_isArrow && returnType is VoidType) {
+          // Arrow functions are valid if: T is void or return exp; is a valid
+          // for a block-bodied function.
+          ensureAssignability();
+        } else if (returnType is VoidType &&
+            expressionType is! VoidType &&
+            expressionType is! DynamicType &&
+            expressionType != inferrer.coreTypes.nullType) {
+          // Invalid if T is void and S is not void, dynamic, or Null
+          statement.expression = inferrer.helper.wrapInProblem(
+              statement.expression,
+              messageReturnFromVoidFunction,
+              statement.expression.fileOffset,
+              noLength)
+            ..parent = statement;
+        } else if (expressionType is VoidType &&
+            returnType is! VoidType &&
+            returnType is! DynamicType &&
+            returnType != inferrer.coreTypes.nullType) {
+          // Invalid if S is void and T is not void, dynamic, or Null.
+          statement.expression = inferrer.helper.wrapInProblem(
+              statement.expression,
+              messageVoidExpression,
+              statement.expression.fileOffset,
+              noLength)
+            ..parent = statement;
+        } else {
+          ensureAssignability();
+        }
       }
     }
   }
@@ -380,72 +442,159 @@
 
   void _checkValidReturn(TypeInferrerImpl inferrer, DartType returnType,
       ReturnStatement statement, DartType expressionType) {
-    // The rules for valid returns for async functions with [returnType] `T` and
-    // a return expression with static [expressionType] `S`.
-    DartType flattenedReturnType =
-        inferrer.typeSchemaEnvironment.unfutureType(returnType);
-    if (statement.expression == null) {
-      // `return;` is a valid return if flatten(T) is void, dynamic, or Null.
-      if (flattenedReturnType is VoidType ||
-          flattenedReturnType is DynamicType ||
-          flattenedReturnType == inferrer.coreTypes.nullType) {
-        // Valid return;
+    if (inferrer.isNonNullableByDefault) {
+      DartType futureValueType =
+          computeFutureValueType(inferrer.coreTypes, returnType);
+
+      if (statement.expression == null) {
+        // It is a compile-time error if s is `return;`, unless T_v is void,
+        // dynamic, or Null.
+        if (futureValueType is VoidType ||
+            futureValueType is DynamicType ||
+            futureValueType == inferrer.coreTypes.nullType) {
+          // Valid return;
+        } else {
+          statement.expression = inferrer.helper.wrapInProblem(
+              new NullLiteral()..fileOffset = statement.fileOffset,
+              messageReturnWithoutExpressionAsync,
+              statement.fileOffset,
+              noLength)
+            ..parent = statement;
+        }
       } else {
-        statement.expression = inferrer.helper.wrapInProblem(
-            new NullLiteral()..fileOffset = statement.fileOffset,
-            messageReturnWithoutExpression,
-            statement.fileOffset,
-            noLength)
-          ..parent = statement;
+        if (_isArrow &&
+            inferrer.typeSchemaEnvironment.flatten(returnType) is VoidType) {
+          // For `async => e` it is a compile-time error if flatten(T) is not
+          // void, and it would have been a compile-time error to declare the
+          // function with the body `async { return e; }` rather than
+          // `async => e`.
+          return;
+        }
+
+        DartType flattenedExpressionType =
+            inferrer.typeSchemaEnvironment.flatten(expressionType);
+        if (futureValueType is VoidType &&
+            !(flattenedExpressionType is VoidType ||
+                flattenedExpressionType is DynamicType ||
+                flattenedExpressionType == inferrer.coreTypes.nullType)) {
+          // It is a compile-time error if s is `return e;`, T_v is void, and
+          // flatten(S) is neither void, dynamic, Null.
+          statement.expression = inferrer.helper.wrapInProblem(
+              new NullLiteral()..fileOffset = statement.fileOffset,
+              messageReturnFromVoidFunction,
+              statement.expression.fileOffset,
+              noLength)
+            ..parent = statement;
+        } else if (!(futureValueType is VoidType ||
+                futureValueType is DynamicType) &&
+            flattenedExpressionType is VoidType) {
+          // It is a compile-time error if s is `return e;`, T_v is neither void
+          // nor dynamic, and flatten(S) is void.
+          statement.expression = inferrer.helper.wrapInProblem(
+              new NullLiteral()..fileOffset = statement.fileOffset,
+              messageVoidExpression,
+              statement.expression.fileOffset,
+              noLength)
+            ..parent = statement;
+/*        } else if (flattenedExpressionType is! VoidType &&
+            !inferrer.isAssignable(futureValueType, expressionType) &&
+            !inferrer.typeSchemaEnvironment
+                .performNullabilityAwareSubtypeCheck(
+                    flattenedExpressionType, futureValueType)
+                .isSubtypeWhenUsingNullabilities()) {
+          // It is a compile-time error if s is `return e;`, flatten(S) is not
+          // void, S is not assignable to T_v, and flatten(S) is not a subtype
+          // of T_v.
+          statement.expression = inferrer.helper.wrapInProblem(
+              new NullLiteral()..fileOffset = statement.fileOffset,
+              messageReturnWithoutExpressionAsync,
+              statement.expression.fileOffset,
+              noLength)
+            ..parent = statement;*/
+        } else if (flattenedExpressionType is! VoidType &&
+            !inferrer.typeSchemaEnvironment
+                .performNullabilityAwareSubtypeCheck(
+                    flattenedExpressionType, futureValueType)
+                .isSubtypeWhenUsingNullabilities()) {
+          // It is a compile-time error if s is `return e;`, flatten(S) is not
+          // void, S is not assignable to T_v, and flatten(S) is not a subtype
+          // of T_v.
+          statement.expression = inferrer.ensureAssignable(
+              futureValueType, expressionType, statement.expression,
+              fileOffset: statement.expression.fileOffset,
+              runtimeCheckedType: _returnContext,
+              isVoidAllowed: false)
+            ..parent = statement;
+        }
       }
     } else {
-      DartType flattenedExpressionType =
-          inferrer.typeSchemaEnvironment.unfutureType(expressionType);
-
-      void ensureAssignability() {
-        DartType wrappedType = inferrer.typeSchemaEnvironment
-            .futureType(flattenedExpressionType, Nullability.nonNullable);
-        Expression expression = inferrer.ensureAssignable(
-            computeAssignableType(inferrer, _returnContext, wrappedType),
-            wrappedType,
-            statement.expression,
-            fileOffset: statement.fileOffset,
-            isVoidAllowed: true,
-            runtimeCheckedType: _returnContext);
-        statement.expression = expression..parent = statement;
-      }
-
-      if (_isArrow && flattenedReturnType is VoidType) {
-        // Arrow functions are valid if: flatten(T) is void or return exp; is
-        // valid for a block-bodied function.
-        ensureAssignability();
-      } else if (returnType is VoidType &&
-          flattenedExpressionType is! VoidType &&
-          flattenedExpressionType is! DynamicType &&
-          flattenedExpressionType != inferrer.coreTypes.nullType) {
-        // Invalid if T is void and flatten(S) is not void, dynamic, or Null.
-        statement.expression = inferrer.helper.wrapInProblem(
-            statement.expression,
-            messageReturnFromVoidFunction,
-            statement.expression.fileOffset,
-            noLength)
-          ..parent = statement;
-      } else if (flattenedExpressionType is VoidType &&
-          flattenedReturnType is! VoidType &&
-          flattenedReturnType is! DynamicType &&
-          flattenedReturnType != inferrer.coreTypes.nullType) {
-        // Invalid if flatten(S) is void and flatten(T) is not void, dynamic,
-        // or Null.
-        statement.expression = inferrer.helper.wrapInProblem(
-            statement.expression,
-            messageVoidExpression,
-            statement.expression.fileOffset,
-            noLength)
-          ..parent = statement;
+      // The rules for valid returns for async functions with [returnType] `T`
+      // and a return expression with static [expressionType] `S`.
+      DartType flattenedReturnType =
+          inferrer.typeSchemaEnvironment.flatten(returnType);
+      if (statement.expression == null) {
+        // `return;` is a valid return if flatten(T) is void, dynamic, or Null.
+        if (flattenedReturnType is VoidType ||
+            flattenedReturnType is DynamicType ||
+            flattenedReturnType == inferrer.coreTypes.nullType) {
+          // Valid return;
+        } else {
+          statement.expression = inferrer.helper.wrapInProblem(
+              new NullLiteral()..fileOffset = statement.fileOffset,
+              messageReturnWithoutExpression,
+              statement.fileOffset,
+              noLength)
+            ..parent = statement;
+        }
       } else {
-        // The caller will check that the return expression is assignable to the
-        // return type.
-        ensureAssignability();
+        DartType flattenedExpressionType =
+            inferrer.typeSchemaEnvironment.flatten(expressionType);
+
+        void ensureAssignability() {
+          DartType wrappedType = inferrer.typeSchemaEnvironment
+              .futureType(flattenedExpressionType, Nullability.nonNullable);
+          Expression expression = inferrer.ensureAssignable(
+              computeAssignableType(inferrer, _returnContext, wrappedType),
+              wrappedType,
+              statement.expression,
+              fileOffset: statement.fileOffset,
+              isVoidAllowed: true,
+              runtimeCheckedType: _returnContext);
+          statement.expression = expression..parent = statement;
+        }
+
+        if (_isArrow && flattenedReturnType is VoidType) {
+          // Arrow functions are valid if: flatten(T) is void or return exp; is
+          // valid for a block-bodied function.
+          ensureAssignability();
+        } else if (returnType is VoidType &&
+            flattenedExpressionType is! VoidType &&
+            flattenedExpressionType is! DynamicType &&
+            flattenedExpressionType != inferrer.coreTypes.nullType) {
+          // Invalid if T is void and flatten(S) is not void, dynamic, or Null.
+          statement.expression = inferrer.helper.wrapInProblem(
+              statement.expression,
+              messageReturnFromVoidFunction,
+              statement.expression.fileOffset,
+              noLength)
+            ..parent = statement;
+        } else if (flattenedExpressionType is VoidType &&
+            flattenedReturnType is! VoidType &&
+            flattenedReturnType is! DynamicType &&
+            flattenedReturnType != inferrer.coreTypes.nullType) {
+          // Invalid if flatten(S) is void and flatten(T) is not void, dynamic,
+          // or Null.
+          statement.expression = inferrer.helper.wrapInProblem(
+              statement.expression,
+              messageVoidExpression,
+              statement.expression.fileOffset,
+              noLength)
+            ..parent = statement;
+        } else {
+          // The caller will check that the return expression is assignable to
+          // the return type.
+          ensureAssignability();
+        }
       }
     }
   }
@@ -488,7 +637,7 @@
       // shape FutureOr<T>.  We check both branches for FutureOr here: both T
       // and Future<T>.
       DartType unfuturedExpectedType =
-          inferrer.typeSchemaEnvironment.unfutureType(contextType);
+          inferrer.typeSchemaEnvironment.flatten(contextType);
       DartType futuredExpectedType = inferrer.wrapFutureType(
           unfuturedExpectedType, inferrer.library.nonNullable);
       if (inferrer.isAssignable(unfuturedExpectedType, expressionType)) {
@@ -514,15 +663,16 @@
 
         // The return expression has to be assignable to the return type
         // expectation from the downwards inference context.
-        if (statement.expression != null) {
-          if (!inferrer.isAssignable(
-              computeAssignableType(inferrer, _returnContext, type), type)) {
-            // Not assignable, use the expectation.
-            type = inferrer.computeGreatestClosure(_returnContext);
+        if (!inferrer.isNonNullableByDefault) {
+          if (statement.expression != null) {
+            if (!inferrer.isAssignable(
+                computeAssignableType(inferrer, _returnContext, type), type)) {
+              // Not assignable, use the expectation.
+              type = inferrer.computeGreatestClosure(_returnContext);
+            }
           }
         }
-        DartType unwrappedType =
-            inferrer.typeSchemaEnvironment.unfutureType(type);
+        DartType unwrappedType = inferrer.typeSchemaEnvironment.flatten(type);
         if (inferredType == null) {
           inferredType = unwrappedType;
         } else {
@@ -543,14 +693,26 @@
       }
     }
 
-    inferredType =
-        inferrer.wrapFutureType(inferredType, inferrer.library.nonNullable);
+    if (inferrer.isNonNullableByDefault) {
+      if (!inferrer.typeSchemaEnvironment.isSubtypeOf(
+          inferredType, _returnContext, SubtypeCheckMode.withNullabilities)) {
+        // If the inferred return type isn't a subtype of the context, we use
+        // the context.
+        inferredType = inferrer.computeGreatestClosure2(_declaredReturnType);
+      }
+      inferredType = inferrer.wrapFutureType(
+          inferrer.typeSchemaEnvironment.flatten(inferredType),
+          inferrer.library.nonNullable);
+    } else {
+      inferredType =
+          inferrer.wrapFutureType(inferredType, inferrer.library.nonNullable);
 
-    if (!inferrer.typeSchemaEnvironment.isSubtypeOf(
-        inferredType, _returnContext, SubtypeCheckMode.withNullabilities)) {
-      // If the inferred return type isn't a subtype of the context, we use the
-      // context.
-      inferredType = inferrer.computeGreatestClosure2(_declaredReturnType);
+      if (!inferrer.typeSchemaEnvironment.isSubtypeOf(
+          inferredType, _returnContext, SubtypeCheckMode.withNullabilities)) {
+        // If the inferred return type isn't a subtype of the context, we use
+        // the context.
+        inferredType = inferrer.computeGreatestClosure2(_declaredReturnType);
+      }
     }
 
     for (int i = 0; i < _returnStatements.length; ++i) {
@@ -576,7 +738,7 @@
     } else {
       returnType = _declaredReturnType;
     }
-    returnType = inferrer.typeSchemaEnvironment.unfutureType(returnType);
+    returnType = inferrer.typeSchemaEnvironment.flatten(returnType);
     if (inferrer.library.isNonNullableByDefault &&
         (containsInvalidType(returnType) ||
             returnType.isPotentiallyNonNullable) &&
diff --git a/pkg/front_end/lib/src/fasta/type_inference/type_inferrer.dart b/pkg/front_end/lib/src/fasta/type_inference/type_inferrer.dart
index f432969..6e43379 100644
--- a/pkg/front_end/lib/src/fasta/type_inference/type_inferrer.dart
+++ b/pkg/front_end/lib/src/fasta/type_inference/type_inferrer.dart
@@ -12,17 +12,12 @@
 import 'package:front_end/src/fasta/type_inference/type_demotion.dart';
 
 import 'package:kernel/ast.dart';
-
 import 'package:kernel/class_hierarchy.dart' show ClassHierarchy;
-
 import 'package:kernel/core_types.dart' show CoreTypes;
-
 import 'package:kernel/type_algebra.dart';
-
 import 'package:kernel/type_environment.dart';
-
 import 'package:kernel/src/bounds_checks.dart' show calculateBounds;
-
+import 'package:kernel/src/future_value_type.dart';
 import 'package:kernel/src/legacy_erasure.dart';
 
 import '../../base/instrumentation.dart'
@@ -849,8 +844,8 @@
             isPotentiallyNullable: false);
       }
       if (includeExtensionMethods) {
-        ObjectAccessTarget target =
-            _findExtensionMember(receiverBound, classNode, name, fileOffset);
+        ObjectAccessTarget target = _findExtensionMember(
+            receiverBound, coreTypes.objectClass, name, fileOffset);
         if (target != null) {
           return target;
         }
@@ -3192,6 +3187,22 @@
         class_, nullability, <DartType>[type ?? const DynamicType()]);
   }
 
+  /// Computes the `futureValueTypeSchema` for the type schema [type].
+  ///
+  /// This is the same as the [futureValueType] except that this handles
+  /// the unknown type.
+  DartType computeFutureValueTypeSchema(DartType type) {
+    return type.accept1(new FutureValueTypeVisitor(unhandledTypeHandler:
+        (DartType node, CoreTypes coreTypes,
+            DartType Function(DartType node, CoreTypes coreTypes) recursor) {
+      if (node is UnknownType) {
+        // futureValueTypeSchema(_) = _.
+        return node;
+      }
+      throw new UnsupportedError("Unsupported type '${node.runtimeType}'.");
+    }), coreTypes);
+  }
+
   Member _getInterfaceMember(
       Class class_, Name name, bool setter, int charOffset) {
     Member member = engine.hierarchyBuilder.getCombinedMemberSignatureKernel(
diff --git a/pkg/front_end/messages.status b/pkg/front_end/messages.status
index 0fd1a31..f5a8184 100644
--- a/pkg/front_end/messages.status
+++ b/pkg/front_end/messages.status
@@ -613,6 +613,9 @@
 RethrowNotCatch/example: Fail
 ReturnTypeFunctionExpression/analyzerCode: Fail
 ReturnTypeFunctionExpression/example: Fail
+ReturnWithoutExpressionAsync/analyzerCode: Fail
+ReturnWithoutExpressionSync/analyzerCode: Fail
+ReturnWithoutExpressionSync/part_wrapped_script: Fail
 SdkRootNotFound/analyzerCode: Fail
 SdkRootNotFound/example: Fail
 SdkSpecificationNotFound/analyzerCode: Fail
diff --git a/pkg/front_end/messages.yaml b/pkg/front_end/messages.yaml
index e2ce926..7b44c74 100644
--- a/pkg/front_end/messages.yaml
+++ b/pkg/front_end/messages.yaml
@@ -1186,7 +1186,7 @@
   template: "#string"
 
 StrongModeNNBDButOptOut:
-  template: "A library can't opt out of non-nullable by default, when in nnbd-strong mode."
+  template: "A library can't opt out of null safety by default, when using sound null safety."
 
 AbstractNotSync:
   template: "Abstract methods can't use 'async', 'async*', or 'sync*'."
@@ -3401,6 +3401,18 @@
   analyzerCode: RETURN_WITHOUT_VALUE
   declaration: "int foo() { return; }"
 
+ReturnWithoutExpressionSync:
+  template: "A value must be explicitly returned from a non-void function."
+  configuration: nnbd-strong
+  script: |
+    import "dart:async";
+    FutureOr<Object?> foo() { return; }
+
+ReturnWithoutExpressionAsync:
+  template: "A value must be explicitly returned from a non-void async function."
+  configuration: nnbd-strong
+  declaration: "Future<int> foo() async { return; }"
+
 ImplicitReturnNull:
   template: "A non-null value must be returned since the return type '#type' doesn't allow null."
   configuration: nnbd-strong
diff --git a/pkg/front_end/test/binary_md_dill_reader.dart b/pkg/front_end/test/binary_md_dill_reader.dart
index 01cf4d9..c0a4b5b 100644
--- a/pkg/front_end/test/binary_md_dill_reader.dart
+++ b/pkg/front_end/test/binary_md_dill_reader.dart
@@ -473,31 +473,33 @@
         type = type.substring(0, type.indexOf("["));
         type = _lookupGenericType(typeNames, type, types);
 
-        int intCount = -1;
-        if (vars[count] != null && vars[count] is int) {
-          intCount = vars[count];
-        } else if (count.contains(".")) {
-          List<String> countData =
-              count.split(regExpSplit).map((s) => s.trim()).toList();
-          if (vars[countData[0]] != null) {
-            dynamic v = vars[countData[0]];
-            if (v is Map &&
-                countData[1] == "last" &&
-                v["items"] is List &&
-                v["items"].last is int) {
-              intCount = v["items"].last;
-            } else if (v is Map && v[countData[1]] != null) {
-              v = v[countData[1]];
-              if (v is Map && v[countData[2]] != null) {
-                v = v[countData[2]];
-                if (v is int) intCount = v;
-              } else if (v is int &&
-                  countData.length == 4 &&
-                  countData[2] == "+") {
-                intCount = v + int.parse(countData[3]);
+        int intCount = int.tryParse(count) ?? -1;
+        if (intCount == -1) {
+          if (vars[count] != null && vars[count] is int) {
+            intCount = vars[count];
+          } else if (count.contains(".")) {
+            List<String> countData =
+                count.split(regExpSplit).map((s) => s.trim()).toList();
+            if (vars[countData[0]] != null) {
+              dynamic v = vars[countData[0]];
+              if (v is Map &&
+                  countData[1] == "last" &&
+                  v["items"] is List &&
+                  v["items"].last is int) {
+                intCount = v["items"].last;
+              } else if (v is Map && v[countData[1]] != null) {
+                v = v[countData[1]];
+                if (v is Map && v[countData[2]] != null) {
+                  v = v[countData[2]];
+                  if (v is int) intCount = v;
+                } else if (v is int &&
+                    countData.length == 4 &&
+                    countData[2] == "+") {
+                  intCount = v + int.parse(countData[3]);
+                }
+              } else {
+                throw "Unknown dot to int ($count)";
               }
-            } else {
-              throw "Unknown dot to int ($count)";
             }
           }
         }
diff --git a/pkg/front_end/test/incremental_load_from_dill_suite.dart b/pkg/front_end/test/incremental_load_from_dill_suite.dart
index bcde263..52c9a86 100644
--- a/pkg/front_end/test/incremental_load_from_dill_suite.dart
+++ b/pkg/front_end/test/incremental_load_from_dill_suite.dart
@@ -469,6 +469,9 @@
         options.fileSystem = fs;
         options.sdkRoot = null;
         options.sdkSummary = sdkSummaryUri;
+        if (world["badSdk"] == true) {
+          options.sdkSummary = sdkSummaryUri.resolve("nonexisting.dill");
+        }
         options.omitPlatform = omitPlatform != false;
         if (world["experiments"] != null) {
           Map<ExperimentalFlag, bool> experimentalFlags =
@@ -486,8 +489,12 @@
       final Set<String> formattedErrors = Set<String>();
       bool gotWarning = false;
       final Set<String> formattedWarnings = Set<String>();
+      final Set<String> seenDiagnosticCodes = Set<String>();
 
       options.onDiagnostic = (DiagnosticMessage message) {
+        String code = getMessageCodeObject(message)?.name;
+        if (code != null) seenDiagnosticCodes.add(code);
+
         String stringId = message.ansiFormatted.join("\n");
         if (message is FormattedMessage) {
           stringId = message.toJsonString();
@@ -581,6 +588,27 @@
       }
       performErrorAndWarningCheck(
           world, gotError, formattedErrors, gotWarning, formattedWarnings);
+      if (world["expectInitializationError"] != null) {
+        Set<String> seenInitializationError = seenDiagnosticCodes.intersection({
+          "InitializeFromDillNotSelfContainedNoDump",
+          "InitializeFromDillNotSelfContained",
+          "InitializeFromDillUnknownProblem",
+          "InitializeFromDillUnknownProblemNoDump",
+        });
+        if (world["expectInitializationError"] == true) {
+          if (seenInitializationError.isEmpty) {
+            throw "Expected to see an initialization error but didn't.";
+          }
+        } else if (world["expectInitializationError"] == false) {
+          if (seenInitializationError.isNotEmpty) {
+            throw "Expected not to see an initialization error but did: "
+                "$seenInitializationError.";
+          }
+        } else {
+          throw "Unsupported value for 'expectInitializationError': "
+              "${world["expectInitializationError"]}";
+        }
+      }
       util.throwOnEmptyMixinBodies(component);
       await util.throwOnInsufficientUriToSource(component,
           fileSystem: gotError ? null : fs);
@@ -1594,6 +1622,11 @@
     }
     return result;
   }
+
+  void recordTemporaryFileForTesting(Uri uri) {
+    File f = new File.fromUri(uri);
+    if (f.existsSync()) f.deleteSync();
+  }
 }
 
 void doSimulateTransformer(Component c) {
diff --git a/pkg/front_end/test/incremental_utils.dart b/pkg/front_end/test/incremental_utils.dart
index 7cc2842..f91e823 100644
--- a/pkg/front_end/test/incremental_utils.dart
+++ b/pkg/front_end/test/incremental_utils.dart
@@ -67,6 +67,7 @@
   component.accept(uriFinder);
   Set<Uri> uris = uriFinder.seenUris.toSet();
   uris.removeAll(component.uriToSource.keys);
+  uris.remove(null);
   if (uris.length != 0) {
     throw "Expected 0 uris with no source, but found ${uris.length} ($uris)";
   }
diff --git a/pkg/front_end/test/spell_checking_list_code.txt b/pkg/front_end/test/spell_checking_list_code.txt
index 190fa6af9b..0dba39a 100644
--- a/pkg/front_end/test/spell_checking_list_code.txt
+++ b/pkg/front_end/test/spell_checking_list_code.txt
@@ -53,6 +53,7 @@
 arising
 arity
 artifact
+artifacts
 artificial
 asgerf
 askesc
@@ -313,6 +314,7 @@
 disambiguator
 disjoint
 dispatched
+distribute
 divided
 dmitryas
 doc
@@ -325,6 +327,7 @@
 downloading
 dq
 dquote
+dsdk
 dst
 dummy
 dupdate
@@ -348,6 +351,7 @@
 emitted
 emitting
 en
+encapsulation
 enforce
 enforced
 enforces
@@ -435,12 +439,14 @@
 futureor
 g
 gardening
+gen
 generation
 gets
 getter1a
 getter1b
 getting
 gft
+git
 github
 glb
 glob
@@ -893,6 +899,7 @@
 replacements
 replacer
 replaces
+replicated
 repo
 repositories
 requirement
diff --git a/pkg/front_end/test/spell_checking_list_tests.txt b/pkg/front_end/test/spell_checking_list_tests.txt
index 8af47b7..e62b6c1 100644
--- a/pkg/front_end/test/spell_checking_list_tests.txt
+++ b/pkg/front_end/test/spell_checking_list_tests.txt
@@ -78,6 +78,7 @@
 camel
 capitalized
 casing
+causal
 cc
 ccc
 charcode
@@ -271,6 +272,8 @@
 ia
 ikg
 illustrate
+image
+images
 implementor
 inclosure
 increased
@@ -505,6 +508,7 @@
 sqrt
 squared
 sssp
+stacks
 stashed
 stat
 stats
diff --git a/pkg/front_end/test/text_representation/internal_ast_text_representation_test.dart b/pkg/front_end/test/text_representation/internal_ast_text_representation_test.dart
index 308fa9e..787ad07 100644
--- a/pkg/front_end/test/text_representation/internal_ast_text_representation_test.dart
+++ b/pkg/front_end/test/text_representation/internal_ast_text_representation_test.dart
@@ -3,6 +3,7 @@
 // BSD-style license that can be found in the LICENSE file.
 
 import 'package:expect/expect.dart';
+import 'package:front_end/src/fasta/kernel/collections.dart';
 import 'package:front_end/src/fasta/kernel/forest.dart';
 import 'package:front_end/src/fasta/kernel/internal_ast.dart';
 import 'package:kernel/ast.dart';
@@ -632,7 +633,16 @@
 
 void _testExtensionTearOff() {}
 
-void _testEqualsExpression() {}
+void _testEqualsExpression() {
+  testExpression(
+      new EqualsExpression(new IntLiteral(0), new IntLiteral(1), isNot: false),
+      '''
+0 == 1''');
+  testExpression(
+      new EqualsExpression(new IntLiteral(0), new IntLiteral(1), isNot: true),
+      '''
+0 != 1''');
+}
 
 void _testBinaryExpression() {}
 
@@ -640,9 +650,21 @@
 
 void _testParenthesizedExpression() {}
 
-void _testSpreadElement() {}
+void _testSpreadElement() {
+  testExpression(new SpreadElement(new IntLiteral(0), false), '''
+...0''');
+  testExpression(new SpreadElement(new IntLiteral(0), true), '''
+...?0''');
+}
 
-void _testIfElement() {}
+void _testIfElement() {
+  testExpression(new IfElement(new IntLiteral(0), new IntLiteral(1), null), '''
+if (0) 1''');
+  testExpression(
+      new IfElement(new IntLiteral(0), new IntLiteral(1), new IntLiteral(2)),
+      '''
+if (0) 1 else 2''');
+}
 
 void _testForElement() {}
 
diff --git a/pkg/front_end/test/utils/kernel_chain.dart b/pkg/front_end/test/utils/kernel_chain.dart
index 43bbcfa..bf5e04b 100644
--- a/pkg/front_end/test/utils/kernel_chain.dart
+++ b/pkg/front_end/test/utils/kernel_chain.dart
@@ -257,8 +257,7 @@
       component.adoptChildren();
     }
 
-    Uri uri =
-        component.uriToSource.keys.firstWhere((uri) => uri?.scheme == "file");
+    Uri uri = result.description.uri;
     Iterable<Library> libraries =
         componentToText.libraries.where(result.isUserLibrary);
     Uri base = uri.resolve(".");
diff --git a/pkg/front_end/testcases/extensions/deferred_explicit_access.dart.outline.expect b/pkg/front_end/testcases/extensions/deferred_explicit_access.dart.outline.expect
index 95c544f..bd4405e 100644
--- a/pkg/front_end/testcases/extensions/deferred_explicit_access.dart.outline.expect
+++ b/pkg/front_end/testcases/extensions/deferred_explicit_access.dart.outline.expect
@@ -11,7 +11,7 @@
 
 import "org-dartlang-testcase:///deferred_explicit_access_lib.dart" deferred as prefix;
 
-static method main() → dynamic
+static method main() → dynamic async 
   ;
 static method expect(dynamic expected, dynamic actual) → dynamic
   ;
diff --git a/pkg/front_end/testcases/extensions/deferred_import_hidden.dart.outline.expect b/pkg/front_end/testcases/extensions/deferred_import_hidden.dart.outline.expect
index d102c56..5ce34ec 100644
--- a/pkg/front_end/testcases/extensions/deferred_import_hidden.dart.outline.expect
+++ b/pkg/front_end/testcases/extensions/deferred_import_hidden.dart.outline.expect
@@ -3,7 +3,7 @@
 
 import "org-dartlang-testcase:///deferred_explicit_access_lib.dart" deferred as prefix;
 
-static method main() → dynamic
+static method main() → dynamic async 
   ;
 static method expect(dynamic expected, dynamic actual) → dynamic
   ;
diff --git a/pkg/front_end/testcases/extensions/issue39938/issue39938_lib.dart.outline.expect b/pkg/front_end/testcases/extensions/issue39938/issue39938.dart.outline.expect
similarity index 100%
rename from pkg/front_end/testcases/extensions/issue39938/issue39938_lib.dart.outline.expect
rename to pkg/front_end/testcases/extensions/issue39938/issue39938.dart.outline.expect
diff --git a/pkg/front_end/testcases/extensions/issue39938/issue39938_lib.dart.strong.expect b/pkg/front_end/testcases/extensions/issue39938/issue39938.dart.strong.expect
similarity index 100%
rename from pkg/front_end/testcases/extensions/issue39938/issue39938_lib.dart.strong.expect
rename to pkg/front_end/testcases/extensions/issue39938/issue39938.dart.strong.expect
diff --git a/pkg/front_end/testcases/extensions/issue39938/issue39938_lib.dart.strong.transformed.expect b/pkg/front_end/testcases/extensions/issue39938/issue39938.dart.strong.transformed.expect
similarity index 100%
rename from pkg/front_end/testcases/extensions/issue39938/issue39938_lib.dart.strong.transformed.expect
rename to pkg/front_end/testcases/extensions/issue39938/issue39938.dart.strong.transformed.expect
diff --git a/pkg/front_end/testcases/general/async_function.dart.outline.expect b/pkg/front_end/testcases/general/async_function.dart.outline.expect
index ee58d22..b2b99f7 100644
--- a/pkg/front_end/testcases/general/async_function.dart.outline.expect
+++ b/pkg/front_end/testcases/general/async_function.dart.outline.expect
@@ -6,17 +6,17 @@
 import "dart:async";
 
 static field core::List<core::String*>* stringList;
-static method asyncString() → asy::Future<core::String*>*
+static method asyncString() → asy::Future<core::String*>* async 
   ;
-static method asyncString2() → asy::Future<core::String*>*
+static method asyncString2() → asy::Future<core::String*>* async 
   ;
-static method syncStarString() → core::Iterable<core::String*>*
+static method syncStarString() → core::Iterable<core::String*>* sync* 
   ;
-static method syncStarString2() → core::Iterable<core::String*>*
+static method syncStarString2() → core::Iterable<core::String*>* sync* 
   ;
-static method asyncStarString() → asy::Stream<core::String*>*
+static method asyncStarString() → asy::Stream<core::String*>* async* 
   ;
-static method asyncStarString2() → asy::Stream<core::String*>*
+static method asyncStarString2() → asy::Stream<core::String*>* async* 
   ;
-static method main() → dynamic
+static method main() → dynamic async 
   ;
diff --git a/pkg/front_end/testcases/general/async_method_with_invalid_type.dart.outline.expect b/pkg/front_end/testcases/general/async_method_with_invalid_type.dart.outline.expect
index ea22af7..4a9b82e 100644
--- a/pkg/front_end/testcases/general/async_method_with_invalid_type.dart.outline.expect
+++ b/pkg/front_end/testcases/general/async_method_with_invalid_type.dart.outline.expect
@@ -1,5 +1,5 @@
 library;
 import self as self;
 
-static method foo() → dynamic
+static method foo() → dynamic async 
   ;
diff --git a/pkg/front_end/testcases/general/async_nested.dart.outline.expect b/pkg/front_end/testcases/general/async_nested.dart.outline.expect
index 7d1bc82..adeba1d 100644
--- a/pkg/front_end/testcases/general/async_nested.dart.outline.expect
+++ b/pkg/front_end/testcases/general/async_nested.dart.outline.expect
@@ -23,5 +23,5 @@
   abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic;
   abstract member-signature get runtimeType() → core::Type*;
 }
-static method main() → void
+static method main() → void async 
   ;
diff --git a/pkg/front_end/testcases/general/await.dart.outline.expect b/pkg/front_end/testcases/general/await.dart.outline.expect
index 6a28c0d..b3304ef 100644
--- a/pkg/front_end/testcases/general/await.dart.outline.expect
+++ b/pkg/front_end/testcases/general/await.dart.outline.expect
@@ -1,5 +1,5 @@
 library;
 import self as self;
 
-static method main() → dynamic
+static method main() → dynamic async 
   ;
diff --git a/pkg/front_end/testcases/general/await_complex.dart.outline.expect b/pkg/front_end/testcases/general/await_complex.dart.outline.expect
index 6082104..5a8cc44 100644
--- a/pkg/front_end/testcases/general/await_complex.dart.outline.expect
+++ b/pkg/front_end/testcases/general/await_complex.dart.outline.expect
@@ -43,27 +43,27 @@
   ;
 static method dummy() → dynamic
   ;
-static method staticMembers() → dynamic
+static method staticMembers() → dynamic async 
   ;
-static method topLevelMembers() → dynamic
+static method topLevelMembers() → dynamic async 
   ;
-static method instanceMembers() → dynamic
+static method instanceMembers() → dynamic async 
   ;
-static method others() → dynamic
+static method others() → dynamic async 
   ;
-static method conditionals() → dynamic
+static method conditionals() → dynamic async 
   ;
-static method asserts() → dynamic
+static method asserts() → dynamic async 
   ;
-static method controlFlow() → dynamic
+static method controlFlow() → dynamic async 
   ;
-static method future<T extends core::Object* = dynamic>(self::future::T* value) → FutureOr<self::future::T*>*
+static method future<T extends core::Object* = dynamic>(self::future::T* value) → FutureOr<self::future::T*>* async 
   ;
 static method id<T extends core::Object* = dynamic>(self::id::T* value) → FutureOr<self::id::T*>*
   ;
-static method intStream() → asy::Stream<core::int*>*
+static method intStream() → asy::Stream<core::int*>* async* 
   ;
-static method main() → dynamic
+static method main() → dynamic async 
   ;
 static method expect(dynamic expected, dynamic actual) → dynamic
   ;
diff --git a/pkg/front_end/testcases/general/await_in_cascade.dart.outline.expect b/pkg/front_end/testcases/general/await_in_cascade.dart.outline.expect
index 1d8e5fd..913fed7 100644
--- a/pkg/front_end/testcases/general/await_in_cascade.dart.outline.expect
+++ b/pkg/front_end/testcases/general/await_in_cascade.dart.outline.expect
@@ -8,9 +8,9 @@
 class C extends core::Object {
   synthetic constructor •() → self::C*
     ;
-  method m() → asy::Future<core::List<core::int*>*>*
+  method m() → asy::Future<core::List<core::int*>*>* async 
     ;
-  method _m() → asy::Future<core::int*>*
+  method _m() → asy::Future<core::int*>* async 
     ;
   abstract member-signature get _identityHashCode() → core::int*;
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*;
@@ -23,7 +23,7 @@
   abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic;
   abstract member-signature get runtimeType() → core::Type*;
 }
-static method main() → dynamic
+static method main() → dynamic async 
   ;
 static method expect(dynamic expected, dynamic actual) → dynamic
   ;
diff --git a/pkg/front_end/testcases/general/bug33196.dart.outline.expect b/pkg/front_end/testcases/general/bug33196.dart.outline.expect
index 7ebb44e..b187102 100644
--- a/pkg/front_end/testcases/general/bug33196.dart.outline.expect
+++ b/pkg/front_end/testcases/general/bug33196.dart.outline.expect
@@ -6,5 +6,5 @@
 
 static method main() → dynamic
   ;
-static method returnsString() → FutureOr<core::String*>*
+static method returnsString() → FutureOr<core::String*>* async 
   ;
diff --git a/pkg/front_end/testcases/general/bug33206.dart.outline.expect b/pkg/front_end/testcases/general/bug33206.dart.outline.expect
index b2e9eba..aa878df 100644
--- a/pkg/front_end/testcases/general/bug33206.dart.outline.expect
+++ b/pkg/front_end/testcases/general/bug33206.dart.outline.expect
@@ -38,13 +38,13 @@
   abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic;
   abstract member-signature get runtimeType() → core::Type*;
 }
-static method f1() → asy::Future<core::List<core::Object*>*>*
+static method f1() → asy::Future<core::List<core::Object*>*>* async 
   ;
 static method f2() → core::List<core::Object*>*
   ;
-static method f3() → asy::Future<core::Object*>*
+static method f3() → asy::Future<core::Object*>* async 
   ;
-static method foo() → asy::Future<self::X*>*
+static method foo() → asy::Future<self::X*>* async 
   ;
-static method main() → asy::Future<void>*
+static method main() → asy::Future<void>* async 
   ;
diff --git a/pkg/front_end/testcases/general/check_deferred_before_args2.dart.outline.expect b/pkg/front_end/testcases/general/check_deferred_before_args2.dart.outline.expect
index bb7f296..eaa1764 100644
--- a/pkg/front_end/testcases/general/check_deferred_before_args2.dart.outline.expect
+++ b/pkg/front_end/testcases/general/check_deferred_before_args2.dart.outline.expect
@@ -5,7 +5,7 @@
 
 static method main() → dynamic
   ;
-static method test() → dynamic
+static method test() → dynamic async 
   ;
 
 library;
diff --git a/pkg/front_end/testcases/general/control_flow_collection_inference.dart.outline.expect b/pkg/front_end/testcases/general/control_flow_collection_inference.dart.outline.expect
index 50ae146..9158a4f 100644
--- a/pkg/front_end/testcases/general/control_flow_collection_inference.dart.outline.expect
+++ b/pkg/front_end/testcases/general/control_flow_collection_inference.dart.outline.expect
@@ -31,7 +31,7 @@
   ;
 static method testForElement(dynamic dynVar, core::List<core::int*>* listInt, core::List<core::double*>* listDouble, core::int* index, core::Map<core::String*, core::int*>* mapStringInt, core::Map<core::String*, core::double*>* mapStringDouble) → dynamic
   ;
-static method testForElementErrors(core::Map<core::int*, core::int*>* map, core::List<core::int*>* list) → dynamic
+static method testForElementErrors(core::Map<core::int*, core::int*>* map, core::List<core::int*>* list) → dynamic async 
   ;
 static method testForElementErrorsNotAsync(asy::Stream<core::int*>* stream) → dynamic
   ;
diff --git a/pkg/front_end/testcases/general/error_recovery/empty_await_for.dart.outline.expect b/pkg/front_end/testcases/general/error_recovery/empty_await_for.dart.outline.expect
index 6a28c0d..b3304ef 100644
--- a/pkg/front_end/testcases/general/error_recovery/empty_await_for.dart.outline.expect
+++ b/pkg/front_end/testcases/general/error_recovery/empty_await_for.dart.outline.expect
@@ -1,5 +1,5 @@
 library;
 import self as self;
 
-static method main() → dynamic
+static method main() → dynamic async 
   ;
diff --git a/pkg/front_end/testcases/general/future_or_test.dart.outline.expect b/pkg/front_end/testcases/general/future_or_test.dart.outline.expect
index 9a4dfad..4bfe1d3 100644
--- a/pkg/front_end/testcases/general/future_or_test.dart.outline.expect
+++ b/pkg/front_end/testcases/general/future_or_test.dart.outline.expect
@@ -25,7 +25,7 @@
   field self::A* a;
   synthetic constructor •() → self::B*
     ;
-  method bar() → asy::Future<dynamic>*
+  method bar() → asy::Future<dynamic>* async 
     ;
   abstract member-signature get _identityHashCode() → core::int*;
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*;
@@ -42,7 +42,7 @@
   field self::B* b;
   synthetic constructor •() → self::C*
     ;
-  method baz() → asy::Future<core::int*>*
+  method baz() → asy::Future<core::int*>* async 
     ;
   abstract member-signature get _identityHashCode() → core::int*;
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*;
diff --git a/pkg/front_end/testcases/general/future_return.dart.outline.expect b/pkg/front_end/testcases/general/future_return.dart.outline.expect
index 7fed171..d209b20 100644
--- a/pkg/front_end/testcases/general/future_return.dart.outline.expect
+++ b/pkg/front_end/testcases/general/future_return.dart.outline.expect
@@ -21,29 +21,29 @@
 }
 static method returnDynamic() → dynamic
   ;
-static method returnClass() → self::Class*
+static method returnClass() → self::Class* async 
   ;
-static method returnFutureClass() → asy::Future<self::Class*>*
+static method returnFutureClass() → asy::Future<self::Class*>* async 
   ;
-static method returnFutureOrClass() → FutureOr<self::Class*>*
+static method returnFutureOrClass() → FutureOr<self::Class*>* async 
   ;
-static method returnClassFromDynamic() → self::Class*
+static method returnClassFromDynamic() → self::Class* async 
   ;
-static method returnFutureClassDynamic() → asy::Future<self::Class*>*
+static method returnFutureClassDynamic() → asy::Future<self::Class*>* async 
   ;
-static method returnFutureOrClassDynamic() → FutureOr<self::Class*>*
+static method returnFutureOrClassDynamic() → FutureOr<self::Class*>* async 
   ;
-static method returnClassFromFutureClass() → self::Class*
+static method returnClassFromFutureClass() → self::Class* async 
   ;
-static method returnFutureClassFromFutureClass() → asy::Future<self::Class*>*
+static method returnFutureClassFromFutureClass() → asy::Future<self::Class*>* async 
   ;
-static method returnFutureOrClassFromFutureClass() → FutureOr<self::Class*>*
+static method returnFutureOrClassFromFutureClass() → FutureOr<self::Class*>* async 
   ;
-static method returnClassFromFutureOrClass() → self::Class*
+static method returnClassFromFutureOrClass() → self::Class* async 
   ;
-static method returnFutureClassFromFutureOrClass() → asy::Future<self::Class*>*
+static method returnFutureClassFromFutureOrClass() → asy::Future<self::Class*>* async 
   ;
-static method returnFutureOrClassFromFutureOrClass() → FutureOr<self::Class*>*
+static method returnFutureOrClassFromFutureOrClass() → FutureOr<self::Class*>* async 
   ;
-static method main() → dynamic
+static method main() → dynamic async 
   ;
diff --git a/pkg/front_end/testcases/general/issue40662.dart.outline.expect b/pkg/front_end/testcases/general/issue40662.dart.outline.expect
index 4bf75b4..993f2d6 100644
--- a/pkg/front_end/testcases/general/issue40662.dart.outline.expect
+++ b/pkg/front_end/testcases/general/issue40662.dart.outline.expect
@@ -4,9 +4,9 @@
 
 static method bar(core::int* a, core::List<core::int*>* b) → dynamic
   ;
-static method foo(core::int* x) → dynamic
+static method foo(core::int* x) → dynamic async 
   ;
-static method main() → void
+static method main() → void async 
   ;
 static method expect(dynamic expected, dynamic actual) → dynamic
   ;
diff --git a/pkg/front_end/testcases/general/issue41210b/issue41210_lib.dart.outline.expect b/pkg/front_end/testcases/general/issue41210b/issue41210.dart.outline.expect
similarity index 100%
rename from pkg/front_end/testcases/general/issue41210b/issue41210_lib.dart.outline.expect
rename to pkg/front_end/testcases/general/issue41210b/issue41210.dart.outline.expect
diff --git a/pkg/front_end/testcases/general/issue41210b/issue41210_lib.dart.strong.expect b/pkg/front_end/testcases/general/issue41210b/issue41210.dart.strong.expect
similarity index 100%
rename from pkg/front_end/testcases/general/issue41210b/issue41210_lib.dart.strong.expect
rename to pkg/front_end/testcases/general/issue41210b/issue41210.dart.strong.expect
diff --git a/pkg/front_end/testcases/general/no_such_method_forwarder.dart b/pkg/front_end/testcases/general/no_such_method_forwarder.dart
new file mode 100644
index 0000000..2d3319a
--- /dev/null
+++ b/pkg/front_end/testcases/general/no_such_method_forwarder.dart
@@ -0,0 +1,23 @@
+// Copyright (c) 2020, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+class X {
+  void _foo() async {
+    await null;
+    print("hello");
+  }
+
+  void foo() => _foo();
+}
+
+class Y implements X {
+  void noSuchMethod(Invocation _) {
+    print("Hello from noSuchMethod");
+  }
+}
+
+main() {
+  Y y = new Y();
+  y.foo();
+}
\ No newline at end of file
diff --git a/pkg/front_end/testcases/general/no_such_method_forwarder.dart.outline.expect b/pkg/front_end/testcases/general/no_such_method_forwarder.dart.outline.expect
new file mode 100644
index 0000000..59e7abc
--- /dev/null
+++ b/pkg/front_end/testcases/general/no_such_method_forwarder.dart.outline.expect
@@ -0,0 +1,43 @@
+library;
+import self as self;
+import "dart:core" as core;
+
+class X extends core::Object {
+  synthetic constructor •() → self::X*
+    ;
+  method _foo() → void async 
+    ;
+  method foo() → void
+    ;
+  abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic;
+  abstract member-signature get _identityHashCode() → core::int*;
+  abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*;
+  abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*;
+  abstract member-signature method _simpleInstanceOfTrue(dynamic type) → core::bool*;
+  abstract member-signature method _simpleInstanceOfFalse(dynamic type) → core::bool*;
+  abstract member-signature operator ==(dynamic other) → core::bool*;
+  abstract member-signature get hashCode() → core::int*;
+  abstract member-signature method toString() → core::String*;
+  abstract member-signature get runtimeType() → core::Type*;
+}
+class Y extends core::Object implements self::X {
+  synthetic constructor •() → self::Y*
+    ;
+  method noSuchMethod(core::Invocation* _) → void
+    ;
+  abstract member-signature get _identityHashCode() → core::int*;
+  abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*;
+  abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*;
+  abstract member-signature method _simpleInstanceOfTrue(dynamic type) → core::bool*;
+  abstract member-signature method _simpleInstanceOfFalse(dynamic type) → core::bool*;
+  abstract member-signature operator ==(dynamic other) → core::bool*;
+  abstract member-signature get hashCode() → core::int*;
+  abstract member-signature method toString() → core::String*;
+  abstract member-signature get runtimeType() → core::Type*;
+  no-such-method-forwarder method _foo() → void
+    return this.{self::Y::noSuchMethod}(new core::_InvocationMirror::_withType(#_foo, 0, const <core::Type*>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol*, dynamic>(const <core::Symbol*, dynamic>{})));
+  no-such-method-forwarder method foo() → void
+    return this.{self::Y::noSuchMethod}(new core::_InvocationMirror::_withType(#foo, 0, const <core::Type*>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol*, dynamic>(const <core::Symbol*, dynamic>{})));
+}
+static method main() → dynamic
+  ;
diff --git a/pkg/front_end/testcases/general/no_such_method_forwarder.dart.strong.expect b/pkg/front_end/testcases/general/no_such_method_forwarder.dart.strong.expect
new file mode 100644
index 0000000..1988002
--- /dev/null
+++ b/pkg/front_end/testcases/general/no_such_method_forwarder.dart.strong.expect
@@ -0,0 +1,58 @@
+library;
+import self as self;
+import "dart:core" as core;
+
+class X extends core::Object {
+  synthetic constructor •() → self::X*
+    : super core::Object::•()
+    ;
+  method _foo() → void async {
+    await null;
+    core::print("hello");
+  }
+  method foo() → void
+    return this.{self::X::_foo}();
+  abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic;
+  abstract member-signature get _identityHashCode() → core::int*;
+  abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*;
+  abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*;
+  abstract member-signature method _simpleInstanceOfTrue(dynamic type) → core::bool*;
+  abstract member-signature method _simpleInstanceOfFalse(dynamic type) → core::bool*;
+  abstract member-signature operator ==(dynamic other) → core::bool*;
+  abstract member-signature get hashCode() → core::int*;
+  abstract member-signature method toString() → core::String*;
+  abstract member-signature get runtimeType() → core::Type*;
+}
+class Y extends core::Object implements self::X {
+  synthetic constructor •() → self::Y*
+    : super core::Object::•()
+    ;
+  method noSuchMethod(core::Invocation* _) → void {
+    core::print("Hello from noSuchMethod");
+  }
+  abstract member-signature get _identityHashCode() → core::int*;
+  abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*;
+  abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*;
+  abstract member-signature method _simpleInstanceOfTrue(dynamic type) → core::bool*;
+  abstract member-signature method _simpleInstanceOfFalse(dynamic type) → core::bool*;
+  abstract member-signature operator ==(dynamic other) → core::bool*;
+  abstract member-signature get hashCode() → core::int*;
+  abstract member-signature method toString() → core::String*;
+  abstract member-signature get runtimeType() → core::Type*;
+  no-such-method-forwarder method _foo() → void
+    return this.{self::Y::noSuchMethod}(new core::_InvocationMirror::_withType(#C1, 0, #C2, #C3, core::Map::unmodifiable<core::Symbol*, dynamic>(#C4)));
+  no-such-method-forwarder method foo() → void
+    return this.{self::Y::noSuchMethod}(new core::_InvocationMirror::_withType(#C5, 0, #C2, #C3, core::Map::unmodifiable<core::Symbol*, dynamic>(#C4)));
+}
+static method main() → dynamic {
+  self::Y* y = new self::Y::•();
+  y.{self::X::foo}();
+}
+
+constants  {
+  #C1 = #org-dartlang-testcase:///no_such_method_forwarder.dart::_foo
+  #C2 = <core::Type*>[]
+  #C3 = <dynamic>[]
+  #C4 = core::_ImmutableMap<core::Symbol*, dynamic> {_kvPairs:#C3}
+  #C5 = #foo
+}
diff --git a/pkg/front_end/testcases/general/no_such_method_forwarder.dart.strong.transformed.expect b/pkg/front_end/testcases/general/no_such_method_forwarder.dart.strong.transformed.expect
new file mode 100644
index 0000000..f43471e
--- /dev/null
+++ b/pkg/front_end/testcases/general/no_such_method_forwarder.dart.strong.transformed.expect
@@ -0,0 +1,85 @@
+library;
+import self as self;
+import "dart:core" as core;
+import "dart:async" as asy;
+import "dart:_internal" as _in;
+
+class X extends core::Object {
+  synthetic constructor •() → self::X*
+    : super core::Object::•()
+    ;
+  method _foo() → void /* originally async */ {
+    final asy::_AsyncAwaitCompleter<dynamic>* :async_completer = new asy::_AsyncAwaitCompleter::•<dynamic>();
+    FutureOr<dynamic>* :return_value;
+    dynamic :async_stack_trace;
+    (dynamic) →* dynamic :async_op_then;
+    (core::Object*, core::StackTrace*) →* dynamic :async_op_error;
+    core::int* :await_jump_var = 0;
+    dynamic :await_ctx_var;
+    dynamic :saved_try_context_var0;
+    function :async_op([dynamic :result, dynamic :exception, dynamic :stack_trace]) → dynamic yielding 
+      try {
+        #L1:
+        {
+          [yield] let dynamic #t1 = asy::_awaitHelper(null, :async_op_then, :async_op_error, :async_op) in null;
+          _in::unsafeCast<core::Null?>(:result);
+          core::print("hello");
+        }
+        asy::_completeOnAsyncReturn(:async_completer, :return_value);
+        return;
+      }
+      on dynamic catch(dynamic exception, core::StackTrace* stack_trace) {
+        :async_completer.{asy::Completer::completeError}(exception, stack_trace);
+      }
+    :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
+    :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
+    :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
+    :async_completer.{asy::_AsyncAwaitCompleter::start}(:async_op);
+    return :async_completer.{asy::Completer::future};
+  }
+  method foo() → void
+    return this.{self::X::_foo}();
+  abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic;
+  abstract member-signature get _identityHashCode() → core::int*;
+  abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*;
+  abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*;
+  abstract member-signature method _simpleInstanceOfTrue(dynamic type) → core::bool*;
+  abstract member-signature method _simpleInstanceOfFalse(dynamic type) → core::bool*;
+  abstract member-signature operator ==(dynamic other) → core::bool*;
+  abstract member-signature get hashCode() → core::int*;
+  abstract member-signature method toString() → core::String*;
+  abstract member-signature get runtimeType() → core::Type*;
+}
+class Y extends core::Object implements self::X {
+  synthetic constructor •() → self::Y*
+    : super core::Object::•()
+    ;
+  method noSuchMethod(core::Invocation* _) → void {
+    core::print("Hello from noSuchMethod");
+  }
+  abstract member-signature get _identityHashCode() → core::int*;
+  abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*;
+  abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*;
+  abstract member-signature method _simpleInstanceOfTrue(dynamic type) → core::bool*;
+  abstract member-signature method _simpleInstanceOfFalse(dynamic type) → core::bool*;
+  abstract member-signature operator ==(dynamic other) → core::bool*;
+  abstract member-signature get hashCode() → core::int*;
+  abstract member-signature method toString() → core::String*;
+  abstract member-signature get runtimeType() → core::Type*;
+  no-such-method-forwarder method _foo() → void
+    return this.{self::Y::noSuchMethod}(new core::_InvocationMirror::_withType(#C1, 0, #C2, #C3, core::Map::unmodifiable<core::Symbol*, dynamic>(#C4)));
+  no-such-method-forwarder method foo() → void
+    return this.{self::Y::noSuchMethod}(new core::_InvocationMirror::_withType(#C5, 0, #C2, #C3, core::Map::unmodifiable<core::Symbol*, dynamic>(#C4)));
+}
+static method main() → dynamic {
+  self::Y* y = new self::Y::•();
+  y.{self::X::foo}();
+}
+
+constants  {
+  #C1 = #org-dartlang-testcase:///no_such_method_forwarder.dart::_foo
+  #C2 = <core::Type*>[]
+  #C3 = <dynamic>[]
+  #C4 = core::_ImmutableMap<core::Symbol*, dynamic> {_kvPairs:#C3}
+  #C5 = #foo
+}
diff --git a/pkg/front_end/testcases/general/no_such_method_forwarder.dart.textual_outline.expect b/pkg/front_end/testcases/general/no_such_method_forwarder.dart.textual_outline.expect
new file mode 100644
index 0000000..1caa183
--- /dev/null
+++ b/pkg/front_end/testcases/general/no_such_method_forwarder.dart.textual_outline.expect
@@ -0,0 +1,10 @@
+class X {
+  void _foo() async {}
+  void foo() => _foo();
+}
+
+class Y implements X {
+  void noSuchMethod(Invocation _) {}
+}
+
+main() {}
diff --git a/pkg/front_end/testcases/general/no_such_method_forwarder.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/general/no_such_method_forwarder.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..1caa183
--- /dev/null
+++ b/pkg/front_end/testcases/general/no_such_method_forwarder.dart.textual_outline_modelled.expect
@@ -0,0 +1,10 @@
+class X {
+  void _foo() async {}
+  void foo() => _foo();
+}
+
+class Y implements X {
+  void noSuchMethod(Invocation _) {}
+}
+
+main() {}
diff --git a/pkg/front_end/testcases/general/statements.dart.outline.expect b/pkg/front_end/testcases/general/statements.dart.outline.expect
index 122c9cb1..1b94614 100644
--- a/pkg/front_end/testcases/general/statements.dart.outline.expect
+++ b/pkg/front_end/testcases/general/statements.dart.outline.expect
@@ -3,7 +3,7 @@
 
 static method foo() → dynamic
   ;
-static method bar() → dynamic
+static method bar() → dynamic async 
   ;
 static method main() → dynamic
   ;
diff --git a/pkg/front_end/testcases/general/stream_future.dart.outline.expect b/pkg/front_end/testcases/general/stream_future.dart.outline.expect
index 7554d93..d9d2112 100644
--- a/pkg/front_end/testcases/general/stream_future.dart.outline.expect
+++ b/pkg/front_end/testcases/general/stream_future.dart.outline.expect
@@ -23,13 +23,13 @@
   ;
 static method returnClass() → self::Class*
   ;
-static method returnFutureDynamic() → asy::Future<dynamic>*
+static method returnFutureDynamic() → asy::Future<dynamic>* async 
   ;
-static method returnFutureClass() → asy::Future<self::Class*>*
+static method returnFutureClass() → asy::Future<self::Class*>* async 
   ;
-static method error() → asy::Stream<FutureOr<self::Class*>*>*
+static method error() → asy::Stream<FutureOr<self::Class*>*>* async* 
   ;
-static method stream() → asy::Stream<FutureOr<self::Class*>*>*
+static method stream() → asy::Stream<FutureOr<self::Class*>*>* async* 
   ;
-static method main() → dynamic
+static method main() → dynamic async 
   ;
diff --git a/pkg/front_end/testcases/general/with_dependencies/abstract_members_from_dill/main_lib.dart.outline.expect b/pkg/front_end/testcases/general/with_dependencies/abstract_members_from_dill/main.dart.outline.expect
similarity index 100%
rename from pkg/front_end/testcases/general/with_dependencies/abstract_members_from_dill/main_lib.dart.outline.expect
rename to pkg/front_end/testcases/general/with_dependencies/abstract_members_from_dill/main.dart.outline.expect
diff --git a/pkg/front_end/testcases/general/with_dependencies/abstract_members_from_dill/main_lib.dart.strong.expect b/pkg/front_end/testcases/general/with_dependencies/abstract_members_from_dill/main.dart.strong.expect
similarity index 100%
rename from pkg/front_end/testcases/general/with_dependencies/abstract_members_from_dill/main_lib.dart.strong.expect
rename to pkg/front_end/testcases/general/with_dependencies/abstract_members_from_dill/main.dart.strong.expect
diff --git a/pkg/front_end/testcases/general/with_dependencies/abstract_members_from_dill/main_lib.dart.strong.transformed.expect b/pkg/front_end/testcases/general/with_dependencies/abstract_members_from_dill/main.dart.strong.transformed.expect
similarity index 100%
rename from pkg/front_end/testcases/general/with_dependencies/abstract_members_from_dill/main_lib.dart.strong.transformed.expect
rename to pkg/front_end/testcases/general/with_dependencies/abstract_members_from_dill/main.dart.strong.transformed.expect
diff --git a/pkg/front_end/testcases/general/with_dependencies/extension_from_dill/extension_from_dill_lib.dart.outline.expect b/pkg/front_end/testcases/general/with_dependencies/extension_from_dill/extension_from_dill.dart.outline.expect
similarity index 100%
rename from pkg/front_end/testcases/general/with_dependencies/extension_from_dill/extension_from_dill_lib.dart.outline.expect
rename to pkg/front_end/testcases/general/with_dependencies/extension_from_dill/extension_from_dill.dart.outline.expect
diff --git a/pkg/front_end/testcases/general/with_dependencies/extension_from_dill/extension_from_dill_lib.dart.strong.expect b/pkg/front_end/testcases/general/with_dependencies/extension_from_dill/extension_from_dill.dart.strong.expect
similarity index 100%
rename from pkg/front_end/testcases/general/with_dependencies/extension_from_dill/extension_from_dill_lib.dart.strong.expect
rename to pkg/front_end/testcases/general/with_dependencies/extension_from_dill/extension_from_dill.dart.strong.expect
diff --git a/pkg/front_end/testcases/general/with_dependencies/extension_from_dill/extension_from_dill_lib.dart.strong.transformed.expect b/pkg/front_end/testcases/general/with_dependencies/extension_from_dill/extension_from_dill.dart.strong.transformed.expect
similarity index 100%
rename from pkg/front_end/testcases/general/with_dependencies/extension_from_dill/extension_from_dill_lib.dart.strong.transformed.expect
rename to pkg/front_end/testcases/general/with_dependencies/extension_from_dill/extension_from_dill.dart.strong.transformed.expect
diff --git a/pkg/front_end/testcases/general/with_dependencies/mixin_from_dill/mixin_from_dill_lib1.dart.outline.expect b/pkg/front_end/testcases/general/with_dependencies/mixin_from_dill/mixin_from_dill.dart.outline.expect
similarity index 100%
rename from pkg/front_end/testcases/general/with_dependencies/mixin_from_dill/mixin_from_dill_lib1.dart.outline.expect
rename to pkg/front_end/testcases/general/with_dependencies/mixin_from_dill/mixin_from_dill.dart.outline.expect
diff --git a/pkg/front_end/testcases/general/with_dependencies/mixin_from_dill/mixin_from_dill_lib1.dart.strong.expect b/pkg/front_end/testcases/general/with_dependencies/mixin_from_dill/mixin_from_dill.dart.strong.expect
similarity index 100%
rename from pkg/front_end/testcases/general/with_dependencies/mixin_from_dill/mixin_from_dill_lib1.dart.strong.expect
rename to pkg/front_end/testcases/general/with_dependencies/mixin_from_dill/mixin_from_dill.dart.strong.expect
diff --git a/pkg/front_end/testcases/general/with_dependencies/mixin_from_dill/mixin_from_dill_lib1.dart.strong.transformed.expect b/pkg/front_end/testcases/general/with_dependencies/mixin_from_dill/mixin_from_dill.dart.strong.transformed.expect
similarity index 100%
rename from pkg/front_end/testcases/general/with_dependencies/mixin_from_dill/mixin_from_dill_lib1.dart.strong.transformed.expect
rename to pkg/front_end/testcases/general/with_dependencies/mixin_from_dill/mixin_from_dill.dart.strong.transformed.expect
diff --git a/pkg/front_end/testcases/general/with_dependencies/variance_from_dill/variance_from_dill_lib.dart.outline.expect b/pkg/front_end/testcases/general/with_dependencies/variance_from_dill/variance_from_dill.dart.outline.expect
similarity index 100%
rename from pkg/front_end/testcases/general/with_dependencies/variance_from_dill/variance_from_dill_lib.dart.outline.expect
rename to pkg/front_end/testcases/general/with_dependencies/variance_from_dill/variance_from_dill.dart.outline.expect
diff --git a/pkg/front_end/testcases/general/with_dependencies/variance_from_dill/variance_from_dill_lib.dart.strong.expect b/pkg/front_end/testcases/general/with_dependencies/variance_from_dill/variance_from_dill.dart.strong.expect
similarity index 100%
rename from pkg/front_end/testcases/general/with_dependencies/variance_from_dill/variance_from_dill_lib.dart.strong.expect
rename to pkg/front_end/testcases/general/with_dependencies/variance_from_dill/variance_from_dill.dart.strong.expect
diff --git a/pkg/front_end/testcases/general/with_dependencies/variance_from_dill/variance_from_dill_lib.dart.strong.transformed.expect b/pkg/front_end/testcases/general/with_dependencies/variance_from_dill/variance_from_dill.dart.strong.transformed.expect
similarity index 100%
rename from pkg/front_end/testcases/general/with_dependencies/variance_from_dill/variance_from_dill_lib.dart.strong.transformed.expect
rename to pkg/front_end/testcases/general/with_dependencies/variance_from_dill/variance_from_dill.dart.strong.transformed.expect
diff --git a/pkg/front_end/testcases/incremental_initialize_from_dill/bad_sdk_uri.yaml b/pkg/front_end/testcases/incremental_initialize_from_dill/bad_sdk_uri.yaml
new file mode 100644
index 0000000..2e729f2
--- /dev/null
+++ b/pkg/front_end/testcases/incremental_initialize_from_dill/bad_sdk_uri.yaml
@@ -0,0 +1,58 @@
+# Copyright (c) 2020, the Dart project authors. Please see the AUTHORS file
+# for details. All rights reserved. Use of this source code is governed by a
+# BSD-style license that can be found in the LICENSE.md file.
+
+# Give a bad SDK URI, and try to initialize from dill.
+
+type: newworld
+worlds:
+  - entry: main.dart
+    sources:
+      main.dart: |
+        import 'lib.dart';
+        class A extends B {}
+      lib.dart: |
+        class B {
+          void bMethod() {}
+        }
+    expectedLibraryCount: 2
+
+  - entry: main.dart
+    expectInitializeFromDill: true
+    invalidate:
+      - main.dart
+    sources:
+      main.dart: |
+        import 'lib.dart';
+        class A extends B {}
+      lib.dart: |
+        class B {
+          void bMethod() {}
+        }
+    expectedLibraryCount: 2
+
+  - entry: main.dart
+    badSdk: true
+    errors: true
+    expectInitializeFromDill: false
+    expectInitializationError: false
+
+    # this skips a check that fails (shouldn't matter considering this is an
+    # exceptional case).
+    checkInvalidatedFiles: false
+
+    # this skips re-compiling several times which fails to produce the same
+    # result (shouldn't matter considering this is an exceptional case).
+    noFullComponent: true
+
+    invalidate:
+      - main.dart
+    sources:
+      main.dart: |
+        import 'lib.dart';
+        class A extends B {}
+      lib.dart: |
+        class B {
+          void bMethod() {}
+        }
+    expectedLibraryCount: 2
\ No newline at end of file
diff --git a/pkg/front_end/testcases/incremental_initialize_from_dill/bad_sdk_uri.yaml.world.1.expect b/pkg/front_end/testcases/incremental_initialize_from_dill/bad_sdk_uri.yaml.world.1.expect
new file mode 100644
index 0000000..2b0ab34
--- /dev/null
+++ b/pkg/front_end/testcases/incremental_initialize_from_dill/bad_sdk_uri.yaml.world.1.expect
@@ -0,0 +1,30 @@
+main = <No Member>;
+library from "org-dartlang-test:///lib.dart" as lib {
+
+  class B extends dart.core::Object {
+    synthetic constructor •() → lib::B*
+      : super dart.core::Object::•()
+      ;
+    method bMethod() → void {}
+    abstract member-signature get _identityHashCode() → dart.core::int*;
+    abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → dart.core::bool*;
+    abstract member-signature method _simpleInstanceOf(dynamic type) → dart.core::bool*;
+    abstract member-signature method _simpleInstanceOfTrue(dynamic type) → dart.core::bool*;
+    abstract member-signature method _simpleInstanceOfFalse(dynamic type) → dart.core::bool*;
+    abstract member-signature operator ==(dynamic other) → dart.core::bool*;
+    abstract member-signature get hashCode() → dart.core::int*;
+    abstract member-signature method toString() → dart.core::String*;
+    abstract member-signature method noSuchMethod(dart.core::Invocation* invocation) → dynamic;
+    abstract member-signature get runtimeType() → dart.core::Type*;
+  }
+}
+library from "org-dartlang-test:///main.dart" as main {
+
+  import "org-dartlang-test:///lib.dart";
+
+  class A extends lib::B {
+    synthetic constructor •() → main::A*
+      : super lib::B::•()
+      ;
+  }
+}
diff --git a/pkg/front_end/testcases/incremental_initialize_from_dill/bad_sdk_uri.yaml.world.2.expect b/pkg/front_end/testcases/incremental_initialize_from_dill/bad_sdk_uri.yaml.world.2.expect
new file mode 100644
index 0000000..2b0ab34
--- /dev/null
+++ b/pkg/front_end/testcases/incremental_initialize_from_dill/bad_sdk_uri.yaml.world.2.expect
@@ -0,0 +1,30 @@
+main = <No Member>;
+library from "org-dartlang-test:///lib.dart" as lib {
+
+  class B extends dart.core::Object {
+    synthetic constructor •() → lib::B*
+      : super dart.core::Object::•()
+      ;
+    method bMethod() → void {}
+    abstract member-signature get _identityHashCode() → dart.core::int*;
+    abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → dart.core::bool*;
+    abstract member-signature method _simpleInstanceOf(dynamic type) → dart.core::bool*;
+    abstract member-signature method _simpleInstanceOfTrue(dynamic type) → dart.core::bool*;
+    abstract member-signature method _simpleInstanceOfFalse(dynamic type) → dart.core::bool*;
+    abstract member-signature operator ==(dynamic other) → dart.core::bool*;
+    abstract member-signature get hashCode() → dart.core::int*;
+    abstract member-signature method toString() → dart.core::String*;
+    abstract member-signature method noSuchMethod(dart.core::Invocation* invocation) → dynamic;
+    abstract member-signature get runtimeType() → dart.core::Type*;
+  }
+}
+library from "org-dartlang-test:///main.dart" as main {
+
+  import "org-dartlang-test:///lib.dart";
+
+  class A extends lib::B {
+    synthetic constructor •() → main::A*
+      : super lib::B::•()
+      ;
+  }
+}
diff --git a/pkg/front_end/testcases/incremental_initialize_from_dill/bad_sdk_uri.yaml.world.3.expect b/pkg/front_end/testcases/incremental_initialize_from_dill/bad_sdk_uri.yaml.world.3.expect
new file mode 100644
index 0000000..471019b
--- /dev/null
+++ b/pkg/front_end/testcases/incremental_initialize_from_dill/bad_sdk_uri.yaml.world.3.expect
@@ -0,0 +1,41 @@
+main = <No Member>;
+library from "org-dartlang-test:///lib.dart" as lib {
+
+  class B extends #lib1::Object {
+    synthetic constructor •() → lib::B*
+      : super #lib1::Object::•()
+      ;
+    method bMethod() → void {}
+    abstract member-signature operator ==(dynamic dynamic) → #lib1::bool*;
+  }
+}
+library from "org-dartlang-test:///main.dart" as main {
+
+  import "org-dartlang-test:///lib.dart";
+
+  class A extends lib::B {
+    synthetic constructor •() → main::A*
+      : super lib::B::•()
+      ;
+  }
+}
+
+And 18 platform libraries:
+ - dart:_builtin
+ - dart:_internal
+ - dart:_vmservice
+ - dart:async
+ - dart:cli
+ - dart:collection
+ - dart:convert
+ - dart:core
+ - dart:developer
+ - dart:ffi
+ - dart:io
+ - dart:isolate
+ - dart:math
+ - dart:mirrors
+ - dart:nativewrappers
+ - dart:typed_data
+ - dart:vmservice_io
+ - dart:wasm
diff --git a/pkg/front_end/testcases/inference/async_await.dart.outline.expect b/pkg/front_end/testcases/inference/async_await.dart.outline.expect
index 63dc8a8..9a1284a 100644
--- a/pkg/front_end/testcases/inference/async_await.dart.outline.expect
+++ b/pkg/front_end/testcases/inference/async_await.dart.outline.expect
@@ -24,7 +24,7 @@
   abstract member-signature method asStream() → asy::Stream<core::int*>*;
   abstract member-signature method timeout(core::Duration* timeLimit, {generic-covariant-impl () →* FutureOr<core::int*>onTimeout}) → asy::Future<core::int*>*;
 }
-static method test() → void
+static method test() → void async 
   ;
 static method main() → dynamic
   ;
diff --git a/pkg/front_end/testcases/inference/block_bodied_lambdas_infer_bottom_async.dart.outline.expect b/pkg/front_end/testcases/inference/block_bodied_lambdas_infer_bottom_async.dart.outline.expect
index 55e2ed1..2fff360 100644
--- a/pkg/front_end/testcases/inference/block_bodied_lambdas_infer_bottom_async.dart.outline.expect
+++ b/pkg/front_end/testcases/inference/block_bodied_lambdas_infer_bottom_async.dart.outline.expect
@@ -3,5 +3,5 @@
 
 import "dart:async";
 
-static method main() → dynamic
+static method main() → dynamic async 
   ;
diff --git a/pkg/front_end/testcases/inference/block_bodied_lambdas_infer_bottom_async_star.dart.outline.expect b/pkg/front_end/testcases/inference/block_bodied_lambdas_infer_bottom_async_star.dart.outline.expect
index 55e2ed1..2fff360 100644
--- a/pkg/front_end/testcases/inference/block_bodied_lambdas_infer_bottom_async_star.dart.outline.expect
+++ b/pkg/front_end/testcases/inference/block_bodied_lambdas_infer_bottom_async_star.dart.outline.expect
@@ -3,5 +3,5 @@
 
 import "dart:async";
 
-static method main() → dynamic
+static method main() → dynamic async 
   ;
diff --git a/pkg/front_end/testcases/inference/downwards_inference_async_await.dart.outline.expect b/pkg/front_end/testcases/inference/downwards_inference_async_await.dart.outline.expect
index 7554b7c..55795d5 100644
--- a/pkg/front_end/testcases/inference/downwards_inference_async_await.dart.outline.expect
+++ b/pkg/front_end/testcases/inference/downwards_inference_async_await.dart.outline.expect
@@ -4,5 +4,5 @@
 
 import "dart:async";
 
-static method main() → asy::Future<dynamic>*
+static method main() → asy::Future<dynamic>* async 
   ;
diff --git a/pkg/front_end/testcases/inference/downwards_inference_for_each.dart.outline.expect b/pkg/front_end/testcases/inference/downwards_inference_for_each.dart.outline.expect
index e66e007..a3f57b9 100644
--- a/pkg/front_end/testcases/inference/downwards_inference_for_each.dart.outline.expect
+++ b/pkg/front_end/testcases/inference/downwards_inference_for_each.dart.outline.expect
@@ -58,7 +58,7 @@
 }
 static method F<T extends core::Object* = dynamic>() → self::F::T*
   ;
-static method f() → asy::Future<dynamic>*
+static method f() → asy::Future<dynamic>* async 
   ;
-static method main() → asy::Future<dynamic>*
+static method main() → asy::Future<dynamic>* async 
   ;
diff --git a/pkg/front_end/testcases/inference/downwards_inference_yield_yield_star.dart.outline.expect b/pkg/front_end/testcases/inference/downwards_inference_yield_yield_star.dart.outline.expect
index c2ee04e..7ec687e 100644
--- a/pkg/front_end/testcases/inference/downwards_inference_yield_yield_star.dart.outline.expect
+++ b/pkg/front_end/testcases/inference/downwards_inference_yield_yield_star.dart.outline.expect
@@ -56,9 +56,9 @@
   abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic;
   abstract member-signature get runtimeType() → core::Type*;
 }
-static method foo() → asy::Stream<core::List<core::int*>*>*
+static method foo() → asy::Stream<core::List<core::int*>*>* async* 
   ;
-static method bar() → core::Iterable<core::Map<core::int*, core::int*>*>*
+static method bar() → core::Iterable<core::Map<core::int*, core::int*>*>* sync* 
   ;
 static method main() → dynamic
   ;
diff --git a/pkg/front_end/testcases/inference/for_each_downcast_iterable.dart.outline.expect b/pkg/front_end/testcases/inference/for_each_downcast_iterable.dart.outline.expect
index 8e85697..f69f500 100644
--- a/pkg/front_end/testcases/inference/for_each_downcast_iterable.dart.outline.expect
+++ b/pkg/front_end/testcases/inference/for_each_downcast_iterable.dart.outline.expect
@@ -1,7 +1,7 @@
 library test;
 import self as self;
 
-static method test() → dynamic
+static method test() → dynamic async 
   ;
 static method main() → dynamic
   ;
diff --git a/pkg/front_end/testcases/inference/future_union_async_conditional.dart.outline.expect b/pkg/front_end/testcases/inference/future_union_async_conditional.dart.outline.expect
index 0736982..fa77948 100644
--- a/pkg/front_end/testcases/inference/future_union_async_conditional.dart.outline.expect
+++ b/pkg/front_end/testcases/inference/future_union_async_conditional.dart.outline.expect
@@ -32,11 +32,11 @@
   member-signature no-such-method-forwarder method timeout(core::Duration* timeLimit, {generic-covariant-impl () →* FutureOr<self::MyFuture::T*>onTimeout}) → asy::Future<self::MyFuture::T*>*
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#timeout, 0, const <core::Type*>[], core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#onTimeout: onTimeout}))) as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
 }
-static method g1(core::bool* x) → asy::Future<core::int*>*
+static method g1(core::bool* x) → asy::Future<core::int*>* async 
   ;
-static method g2(core::bool* x) → asy::Future<core::int*>*
+static method g2(core::bool* x) → asy::Future<core::int*>* async 
   ;
-static method g3(core::bool* x) → asy::Future<core::int*>*
+static method g3(core::bool* x) → asy::Future<core::int*>* async 
   ;
 static method main() → dynamic
   ;
diff --git a/pkg/front_end/testcases/inference/future_union_async_conditional_2.dart.outline.expect b/pkg/front_end/testcases/inference/future_union_async_conditional_2.dart.outline.expect
index 0736982..fa77948 100644
--- a/pkg/front_end/testcases/inference/future_union_async_conditional_2.dart.outline.expect
+++ b/pkg/front_end/testcases/inference/future_union_async_conditional_2.dart.outline.expect
@@ -32,11 +32,11 @@
   member-signature no-such-method-forwarder method timeout(core::Duration* timeLimit, {generic-covariant-impl () →* FutureOr<self::MyFuture::T*>onTimeout}) → asy::Future<self::MyFuture::T*>*
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#timeout, 0, const <core::Type*>[], core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol*, dynamic>(<core::Symbol*, dynamic>{#onTimeout: onTimeout}))) as{TypeError,ForDynamic} asy::Future<self::MyFuture::T*>*;
 }
-static method g1(core::bool* x) → asy::Future<core::int*>*
+static method g1(core::bool* x) → asy::Future<core::int*>* async 
   ;
-static method g2(core::bool* x) → asy::Future<core::int*>*
+static method g2(core::bool* x) → asy::Future<core::int*>* async 
   ;
-static method g3(core::bool* x) → asy::Future<core::int*>*
+static method g3(core::bool* x) → asy::Future<core::int*>* async 
   ;
 static method main() → dynamic
   ;
diff --git a/pkg/front_end/testcases/inference/future_union_downwards.dart.outline.expect b/pkg/front_end/testcases/inference/future_union_downwards.dart.outline.expect
index 7921c42..5be9fed 100644
--- a/pkg/front_end/testcases/inference/future_union_downwards.dart.outline.expect
+++ b/pkg/front_end/testcases/inference/future_union_downwards.dart.outline.expect
@@ -35,9 +35,9 @@
 static field self::MyFuture<dynamic>* f;
 static field asy::Future<core::int*>* t1;
 static field asy::Future<core::List<core::int*>*>* t2;
-static method g2() → asy::Future<core::List<core::int*>*>*
+static method g2() → asy::Future<core::List<core::int*>*>* async 
   ;
-static method g3() → asy::Future<core::List<core::int*>*>*
+static method g3() → asy::Future<core::List<core::int*>*>* async 
   ;
 static method main() → dynamic
   ;
diff --git a/pkg/front_end/testcases/inference/future_union_downwards_2.dart.outline.expect b/pkg/front_end/testcases/inference/future_union_downwards_2.dart.outline.expect
index 7921c42..5be9fed 100644
--- a/pkg/front_end/testcases/inference/future_union_downwards_2.dart.outline.expect
+++ b/pkg/front_end/testcases/inference/future_union_downwards_2.dart.outline.expect
@@ -35,9 +35,9 @@
 static field self::MyFuture<dynamic>* f;
 static field asy::Future<core::int*>* t1;
 static field asy::Future<core::List<core::int*>*>* t2;
-static method g2() → asy::Future<core::List<core::int*>*>*
+static method g2() → asy::Future<core::List<core::int*>*>* async 
   ;
-static method g3() → asy::Future<core::List<core::int*>*>*
+static method g3() → asy::Future<core::List<core::int*>*>* async 
   ;
 static method main() → dynamic
   ;
diff --git a/pkg/front_end/testcases/inference/future_union_downwards_3.dart.outline.expect b/pkg/front_end/testcases/inference/future_union_downwards_3.dart.outline.expect
index 6865d8a..f2c084f 100644
--- a/pkg/front_end/testcases/inference/future_union_downwards_3.dart.outline.expect
+++ b/pkg/front_end/testcases/inference/future_union_downwards_3.dart.outline.expect
@@ -35,9 +35,9 @@
 static field asy::Future<dynamic>* f;
 static field asy::Future<core::int*>* t1;
 static field asy::Future<core::List<core::int*>*>* t2;
-static method g2() → asy::Future<core::List<core::int*>*>*
+static method g2() → asy::Future<core::List<core::int*>*>* async 
   ;
-static method g3() → asy::Future<core::List<core::int*>*>*
+static method g3() → asy::Future<core::List<core::int*>*>* async 
   ;
 static method main() → dynamic
   ;
diff --git a/pkg/front_end/testcases/inference/future_union_downwards_4.dart.outline.expect b/pkg/front_end/testcases/inference/future_union_downwards_4.dart.outline.expect
index 6865d8a..f2c084f 100644
--- a/pkg/front_end/testcases/inference/future_union_downwards_4.dart.outline.expect
+++ b/pkg/front_end/testcases/inference/future_union_downwards_4.dart.outline.expect
@@ -35,9 +35,9 @@
 static field asy::Future<dynamic>* f;
 static field asy::Future<core::int*>* t1;
 static field asy::Future<core::List<core::int*>*>* t2;
-static method g2() → asy::Future<core::List<core::int*>*>*
+static method g2() → asy::Future<core::List<core::int*>*>* async 
   ;
-static method g3() → asy::Future<core::List<core::int*>*>*
+static method g3() → asy::Future<core::List<core::int*>*>* async 
   ;
 static method main() → dynamic
   ;
diff --git a/pkg/front_end/testcases/inference/future_union_downwards_generic_method_with_future_return.dart.outline.expect b/pkg/front_end/testcases/inference/future_union_downwards_generic_method_with_future_return.dart.outline.expect
index fcbe2d9..b4ddb0f 100644
--- a/pkg/front_end/testcases/inference/future_union_downwards_generic_method_with_future_return.dart.outline.expect
+++ b/pkg/front_end/testcases/inference/future_union_downwards_generic_method_with_future_return.dart.outline.expect
@@ -18,7 +18,7 @@
   abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic;
   abstract member-signature get runtimeType() → core::Type*;
 }
-static method foo() → dynamic
+static method foo() → dynamic async 
   ;
 static method main() → dynamic
   ;
diff --git a/pkg/front_end/testcases/inference/future_union_downwards_generic_method_with_generic_return.dart.outline.expect b/pkg/front_end/testcases/inference/future_union_downwards_generic_method_with_generic_return.dart.outline.expect
index ffd2984..ede3be0 100644
--- a/pkg/front_end/testcases/inference/future_union_downwards_generic_method_with_generic_return.dart.outline.expect
+++ b/pkg/front_end/testcases/inference/future_union_downwards_generic_method_with_generic_return.dart.outline.expect
@@ -6,7 +6,7 @@
 
 static method id<T extends core::Object* = dynamic>(self::id::T* x) → self::id::T*
   ;
-static method test() → dynamic
+static method test() → dynamic async 
   ;
 static method main() → dynamic
   ;
diff --git a/pkg/front_end/testcases/inference/future_union_upwards_generic_methods.dart.outline.expect b/pkg/front_end/testcases/inference/future_union_upwards_generic_methods.dart.outline.expect
index 3692109..84c3925 100644
--- a/pkg/front_end/testcases/inference/future_union_upwards_generic_methods.dart.outline.expect
+++ b/pkg/front_end/testcases/inference/future_union_upwards_generic_methods.dart.outline.expect
@@ -26,5 +26,5 @@
   synthetic constructor •() → self::C*
     ;
 }
-static method main() → dynamic
+static method main() → dynamic async 
   ;
diff --git a/pkg/front_end/testcases/inference/infer_types_on_loop_indices_for_each_loop_async.dart.outline.expect b/pkg/front_end/testcases/inference/infer_types_on_loop_indices_for_each_loop_async.dart.outline.expect
index 86ed9fd..3557372 100644
--- a/pkg/front_end/testcases/inference/infer_types_on_loop_indices_for_each_loop_async.dart.outline.expect
+++ b/pkg/front_end/testcases/inference/infer_types_on_loop_indices_for_each_loop_async.dart.outline.expect
@@ -23,7 +23,7 @@
 class Bar<T extends asy::Stream<core::String*>* = asy::Stream<core::String*>*> extends core::Object {
   synthetic constructor •() → self::Bar<self::Bar::T*>*
     ;
-  method foo(generic-covariant-impl self::Bar::T* t) → dynamic
+  method foo(generic-covariant-impl self::Bar::T* t) → dynamic async 
     ;
   abstract member-signature get _identityHashCode() → core::int*;
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*;
@@ -39,7 +39,7 @@
 class Baz<T extends core::Object* = dynamic, E extends asy::Stream<self::Baz::T*>* = asy::Stream<dynamic>*, S extends self::Baz::E* = asy::Stream<dynamic>*> extends core::Object {
   synthetic constructor •() → self::Baz<self::Baz::T*, self::Baz::E*, self::Baz::S*>*
     ;
-  method foo(generic-covariant-impl self::Baz::S* t) → dynamic
+  method foo(generic-covariant-impl self::Baz::S* t) → dynamic async 
     ;
   abstract member-signature get _identityHashCode() → core::int*;
   abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*;
@@ -103,7 +103,7 @@
   abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic;
   abstract member-signature get runtimeType() → core::Type*;
 }
-static method test() → dynamic
+static method test() → dynamic async 
   ;
 static method main() → dynamic
   ;
diff --git a/pkg/front_end/testcases/inference/top_level_return_and_yield.dart.outline.expect b/pkg/front_end/testcases/inference/top_level_return_and_yield.dart.outline.expect
index 8510a42..37e08af 100644
--- a/pkg/front_end/testcases/inference/top_level_return_and_yield.dart.outline.expect
+++ b/pkg/front_end/testcases/inference/top_level_return_and_yield.dart.outline.expect
@@ -8,15 +8,15 @@
 typedef IntToInt = (core::int*) →* core::int*;
 static method a() → (core::int*) →* core::int*
   ;
-static method b() → asy::Future<(core::int*) →* core::int*>*
+static method b() → asy::Future<(core::int*) →* core::int*>* async 
   ;
-static method c() → core::Iterable<(core::int*) →* core::int*>*
+static method c() → core::Iterable<(core::int*) →* core::int*>* sync* 
   ;
-static method d() → core::Iterable<(core::int*) →* core::int*>*
+static method d() → core::Iterable<(core::int*) →* core::int*>* sync* 
   ;
-static method e() → asy::Stream<(core::int*) →* core::int*>*
+static method e() → asy::Stream<(core::int*) →* core::int*>* async* 
   ;
-static method f() → asy::Stream<(core::int*) →* core::int*>*
+static method f() → asy::Stream<(core::int*) →* core::int*>* async* 
   ;
 static method main() → dynamic
   ;
diff --git a/pkg/front_end/testcases/inference_new/for_each_invalid_iterable.dart.outline.expect b/pkg/front_end/testcases/inference_new/for_each_invalid_iterable.dart.outline.expect
index 8e85697..f69f500 100644
--- a/pkg/front_end/testcases/inference_new/for_each_invalid_iterable.dart.outline.expect
+++ b/pkg/front_end/testcases/inference_new/for_each_invalid_iterable.dart.outline.expect
@@ -1,7 +1,7 @@
 library test;
 import self as self;
 
-static method test() → dynamic
+static method test() → dynamic async 
   ;
 static method main() → dynamic
   ;
diff --git a/pkg/front_end/testcases/inference_new/for_each_outer_var_type.dart.outline.expect b/pkg/front_end/testcases/inference_new/for_each_outer_var_type.dart.outline.expect
index 27b629e..c5b32d0 100644
--- a/pkg/front_end/testcases/inference_new/for_each_outer_var_type.dart.outline.expect
+++ b/pkg/front_end/testcases/inference_new/for_each_outer_var_type.dart.outline.expect
@@ -24,7 +24,7 @@
 }
 static method f<T extends core::Object* = dynamic>() → self::f::T*
   ;
-static method test() → dynamic
+static method test() → dynamic async 
   ;
 static method main() → dynamic
   ;
diff --git a/pkg/front_end/testcases/late_lowering/issue41436c/issue41436c_lib.dart.outline.expect b/pkg/front_end/testcases/late_lowering/issue41436c/issue41436c.dart.outline.expect
similarity index 100%
rename from pkg/front_end/testcases/late_lowering/issue41436c/issue41436c_lib.dart.outline.expect
rename to pkg/front_end/testcases/late_lowering/issue41436c/issue41436c.dart.outline.expect
diff --git a/pkg/front_end/testcases/late_lowering/issue41436c/issue41436c_lib.dart.strong.expect b/pkg/front_end/testcases/late_lowering/issue41436c/issue41436c.dart.strong.expect
similarity index 100%
rename from pkg/front_end/testcases/late_lowering/issue41436c/issue41436c_lib.dart.strong.expect
rename to pkg/front_end/testcases/late_lowering/issue41436c/issue41436c.dart.strong.expect
diff --git a/pkg/front_end/testcases/late_lowering/issue41436c/issue41436c_lib.dart.strong.transformed.expect b/pkg/front_end/testcases/late_lowering/issue41436c/issue41436c.dart.strong.transformed.expect
similarity index 100%
rename from pkg/front_end/testcases/late_lowering/issue41436c/issue41436c_lib.dart.strong.transformed.expect
rename to pkg/front_end/testcases/late_lowering/issue41436c/issue41436c.dart.strong.transformed.expect
diff --git a/pkg/front_end/testcases/late_lowering/issue41436c/issue41436c_lib.dart.weak.expect b/pkg/front_end/testcases/late_lowering/issue41436c/issue41436c.dart.weak.expect
similarity index 100%
rename from pkg/front_end/testcases/late_lowering/issue41436c/issue41436c_lib.dart.weak.expect
rename to pkg/front_end/testcases/late_lowering/issue41436c/issue41436c.dart.weak.expect
diff --git a/pkg/front_end/testcases/late_lowering/issue41436c/issue41436c_lib.dart.weak.transformed.expect b/pkg/front_end/testcases/late_lowering/issue41436c/issue41436c.dart.weak.transformed.expect
similarity index 100%
rename from pkg/front_end/testcases/late_lowering/issue41436c/issue41436c_lib.dart.weak.transformed.expect
rename to pkg/front_end/testcases/late_lowering/issue41436c/issue41436c.dart.weak.transformed.expect
diff --git a/pkg/front_end/testcases/late_lowering/later.dart.outline.expect b/pkg/front_end/testcases/late_lowering/later.dart.outline.expect
index 7c07f78..a6cb6f6 100644
--- a/pkg/front_end/testcases/late_lowering/later.dart.outline.expect
+++ b/pkg/front_end/testcases/late_lowering/later.dart.outline.expect
@@ -47,9 +47,9 @@
   ;
 static method baz() → dynamic
   ;
-static method hest() → dynamic
+static method hest() → dynamic async 
   ;
-static method fisk() → dynamic
+static method fisk() → dynamic async 
   ;
 static method main() → dynamic
   ;
diff --git a/pkg/front_end/testcases/nnbd/from_agnostic/from_agnostic_lib.dart.outline.expect b/pkg/front_end/testcases/nnbd/from_agnostic/from_agnostic.dart.outline.expect
similarity index 100%
rename from pkg/front_end/testcases/nnbd/from_agnostic/from_agnostic_lib.dart.outline.expect
rename to pkg/front_end/testcases/nnbd/from_agnostic/from_agnostic.dart.outline.expect
diff --git a/pkg/front_end/testcases/nnbd/from_agnostic/from_agnostic_lib.dart.strong.expect b/pkg/front_end/testcases/nnbd/from_agnostic/from_agnostic.dart.strong.expect
similarity index 100%
rename from pkg/front_end/testcases/nnbd/from_agnostic/from_agnostic_lib.dart.strong.expect
rename to pkg/front_end/testcases/nnbd/from_agnostic/from_agnostic.dart.strong.expect
diff --git a/pkg/front_end/testcases/nnbd/from_agnostic/from_agnostic_lib.dart.strong.transformed.expect b/pkg/front_end/testcases/nnbd/from_agnostic/from_agnostic.dart.strong.transformed.expect
similarity index 100%
rename from pkg/front_end/testcases/nnbd/from_agnostic/from_agnostic_lib.dart.strong.transformed.expect
rename to pkg/front_end/testcases/nnbd/from_agnostic/from_agnostic.dart.strong.transformed.expect
diff --git a/pkg/front_end/testcases/nnbd/from_agnostic/from_agnostic_lib.dart.weak.expect b/pkg/front_end/testcases/nnbd/from_agnostic/from_agnostic.dart.weak.expect
similarity index 100%
rename from pkg/front_end/testcases/nnbd/from_agnostic/from_agnostic_lib.dart.weak.expect
rename to pkg/front_end/testcases/nnbd/from_agnostic/from_agnostic.dart.weak.expect
diff --git a/pkg/front_end/testcases/nnbd/from_agnostic/from_agnostic_lib.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd/from_agnostic/from_agnostic.dart.weak.transformed.expect
similarity index 100%
rename from pkg/front_end/testcases/nnbd/from_agnostic/from_agnostic_lib.dart.weak.transformed.expect
rename to pkg/front_end/testcases/nnbd/from_agnostic/from_agnostic.dart.weak.transformed.expect
diff --git a/pkg/front_end/testcases/nnbd/issue41114.dart.outline.expect b/pkg/front_end/testcases/nnbd/issue41114.dart.outline.expect
index e2cba6b..074fe5d 100644
--- a/pkg/front_end/testcases/nnbd/issue41114.dart.outline.expect
+++ b/pkg/front_end/testcases/nnbd/issue41114.dart.outline.expect
@@ -1,5 +1,5 @@
 library /*isNonNullableByDefault*/;
 import self as self;
 
-static method main() → dynamic
+static method main() → dynamic async 
   ;
diff --git a/pkg/front_end/testcases/nnbd/issue41156.dart.outline.expect b/pkg/front_end/testcases/nnbd/issue41156.dart.outline.expect
index 29bd99f..2d05be9 100644
--- a/pkg/front_end/testcases/nnbd/issue41156.dart.outline.expect
+++ b/pkg/front_end/testcases/nnbd/issue41156.dart.outline.expect
@@ -5,5 +5,5 @@
   ;
 static method main() → void
   ;
-static method errors() → void
+static method errors() → void async 
   ;
diff --git a/pkg/front_end/testcases/nnbd/issue41437a.dart b/pkg/front_end/testcases/nnbd/issue41437a.dart
index 778cd69..7092b26 100644
--- a/pkg/front_end/testcases/nnbd/issue41437a.dart
+++ b/pkg/front_end/testcases/nnbd/issue41437a.dart
@@ -11,19 +11,19 @@
   return true;
 }
 
-Future<bool> test1() async => await getNull(); // error
+Future<bool> test1() async => await getNull(); // ok
 Future<bool> test2() => getNull(); // ok
 bool test3() => getNull(); // ok
-Future<bool> test4() async => await getFutureNull(); // error
+Future<bool> test4() async => await getFutureNull(); // ok
 Future<bool> test5() => getFutureNull(); // error
 Future<bool> test6() => getFutureBool(); // ok
 Future<bool> test7() async => getFutureBool(); // ok
 
 test() async {
-  Future<bool> test1() async => await getNull(); // error
+  Future<bool> test1() async => await getNull(); // ok
   Future<bool> test2() => getNull(); // ok
   bool test3() => getNull(); // ok
-  Future<bool> test4() async => await getFutureNull(); // error
+  Future<bool> test4() async => await getFutureNull(); // ok
   Future<bool> test5() => getFutureNull(); // error
   Future<bool> test6() => getFutureBool(); // ok
   Future<bool> test7() async => getFutureBool(); // ok
diff --git a/pkg/front_end/testcases/nnbd/issue41437a.dart.outline.expect b/pkg/front_end/testcases/nnbd/issue41437a.dart.outline.expect
index 7e28ffc..0f05ccb 100644
--- a/pkg/front_end/testcases/nnbd/issue41437a.dart.outline.expect
+++ b/pkg/front_end/testcases/nnbd/issue41437a.dart.outline.expect
@@ -5,25 +5,25 @@
 
 static method getNull() → dynamic
   ;
-static method getFutureNull() → asy::Future<dynamic>
+static method getFutureNull() → asy::Future<dynamic> async 
   ;
-static method getFutureBool() → asy::Future<core::bool>
+static method getFutureBool() → asy::Future<core::bool> async 
   ;
-static method test1() → asy::Future<core::bool>
+static method test1() → asy::Future<core::bool> async 
   ;
 static method test2() → asy::Future<core::bool>
   ;
 static method test3() → core::bool
   ;
-static method test4() → asy::Future<core::bool>
+static method test4() → asy::Future<core::bool> async 
   ;
 static method test5() → asy::Future<core::bool>
   ;
 static method test6() → asy::Future<core::bool>
   ;
-static method test7() → asy::Future<core::bool>
+static method test7() → asy::Future<core::bool> async 
   ;
-static method test() → dynamic
+static method test() → dynamic async 
   ;
 static method main() → dynamic
   ;
diff --git a/pkg/front_end/testcases/nnbd/issue41437a.dart.strong.expect b/pkg/front_end/testcases/nnbd/issue41437a.dart.strong.expect
index 2864cb5..7b35002 100644
--- a/pkg/front_end/testcases/nnbd/issue41437a.dart.strong.expect
+++ b/pkg/front_end/testcases/nnbd/issue41437a.dart.strong.expect
@@ -2,31 +2,11 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/nnbd/issue41437a.dart:14:31: Error: A value of type 'Future<dynamic>' can't be assigned to a variable of type 'FutureOr<bool>'.
-//  - 'Future' is from 'dart:async'.
-// Future<bool> test1() async => await getNull(); // error
-//                               ^
-//
-// pkg/front_end/testcases/nnbd/issue41437a.dart:17:31: Error: A value of type 'Future<dynamic>' can't be assigned to a variable of type 'FutureOr<bool>'.
-//  - 'Future' is from 'dart:async'.
-// Future<bool> test4() async => await getFutureNull(); // error
-//                               ^
-//
 // pkg/front_end/testcases/nnbd/issue41437a.dart:18:25: Error: A value of type 'Future<dynamic>' can't be assigned to a variable of type 'Future<bool>'.
 //  - 'Future' is from 'dart:async'.
 // Future<bool> test5() => getFutureNull(); // error
 //                         ^
 //
-// pkg/front_end/testcases/nnbd/issue41437a.dart:23:33: Error: A value of type 'Future<dynamic>' can't be assigned to a variable of type 'FutureOr<bool>'.
-//  - 'Future' is from 'dart:async'.
-//   Future<bool> test1() async => await getNull(); // error
-//                                 ^
-//
-// pkg/front_end/testcases/nnbd/issue41437a.dart:26:33: Error: A value of type 'Future<dynamic>' can't be assigned to a variable of type 'FutureOr<bool>'.
-//  - 'Future' is from 'dart:async'.
-//   Future<bool> test4() async => await getFutureNull(); // error
-//                                 ^
-//
 // pkg/front_end/testcases/nnbd/issue41437a.dart:27:27: Error: A value of type 'Future<dynamic>' can't be assigned to a variable of type 'Future<bool>'.
 //  - 'Future' is from 'dart:async'.
 //   Future<bool> test5() => getFutureNull(); // error
@@ -60,21 +40,15 @@
   return true;
 }
 static method test1() → asy::Future<core::bool> async 
-  return let final<BottomType> #t1 = invalid-expression "pkg/front_end/testcases/nnbd/issue41437a.dart:14:31: Error: A value of type 'Future<dynamic>' can't be assigned to a variable of type 'FutureOr<bool>'.
- - 'Future' is from 'dart:async'.
-Future<bool> test1() async => await getNull(); // error
-                              ^" in await self::getNull() as{TypeError,ForNonNullableByDefault} FutureOr<core::bool>;
+  return await self::getNull() as{TypeError,ForDynamic,ForNonNullableByDefault} FutureOr<core::bool>;
 static method test2() → asy::Future<core::bool>
   return self::getNull() as{TypeError,ForDynamic,ForNonNullableByDefault} asy::Future<core::bool>;
 static method test3() → core::bool
   return self::getNull() as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool;
 static method test4() → asy::Future<core::bool> async 
-  return let final<BottomType> #t2 = invalid-expression "pkg/front_end/testcases/nnbd/issue41437a.dart:17:31: Error: A value of type 'Future<dynamic>' can't be assigned to a variable of type 'FutureOr<bool>'.
- - 'Future' is from 'dart:async'.
-Future<bool> test4() async => await getFutureNull(); // error
-                              ^" in await self::getFutureNull() as{TypeError,ForNonNullableByDefault} FutureOr<core::bool>;
+  return await self::getFutureNull() as{TypeError,ForDynamic,ForNonNullableByDefault} FutureOr<core::bool>;
 static method test5() → asy::Future<core::bool>
-  return let final<BottomType> #t3 = invalid-expression "pkg/front_end/testcases/nnbd/issue41437a.dart:18:25: Error: A value of type 'Future<dynamic>' can't be assigned to a variable of type 'Future<bool>'.
+  return let final<BottomType> #t1 = invalid-expression "pkg/front_end/testcases/nnbd/issue41437a.dart:18:25: Error: A value of type 'Future<dynamic>' can't be assigned to a variable of type 'Future<bool>'.
  - 'Future' is from 'dart:async'.
 Future<bool> test5() => getFutureNull(); // error
                         ^" in self::getFutureNull() as{TypeError,ForNonNullableByDefault} asy::Future<core::bool>;
@@ -84,21 +58,15 @@
   return self::getFutureBool();
 static method test() → dynamic async {
   function test1() → asy::Future<core::bool> async 
-    return let final<BottomType> #t4 = invalid-expression "pkg/front_end/testcases/nnbd/issue41437a.dart:23:33: Error: A value of type 'Future<dynamic>' can't be assigned to a variable of type 'FutureOr<bool>'.
- - 'Future' is from 'dart:async'.
-  Future<bool> test1() async => await getNull(); // error
-                                ^" in await self::getNull() as{TypeError,ForNonNullableByDefault} FutureOr<core::bool>;
+    return await self::getNull() as{TypeError,ForDynamic,ForNonNullableByDefault} FutureOr<core::bool>;
   function test2() → asy::Future<core::bool>
     return self::getNull() as{TypeError,ForDynamic,ForNonNullableByDefault} asy::Future<core::bool>;
   function test3() → core::bool
     return self::getNull() as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool;
   function test4() → asy::Future<core::bool> async 
-    return let final<BottomType> #t5 = invalid-expression "pkg/front_end/testcases/nnbd/issue41437a.dart:26:33: Error: A value of type 'Future<dynamic>' can't be assigned to a variable of type 'FutureOr<bool>'.
- - 'Future' is from 'dart:async'.
-  Future<bool> test4() async => await getFutureNull(); // error
-                                ^" in await self::getFutureNull() as{TypeError,ForNonNullableByDefault} FutureOr<core::bool>;
+    return await self::getFutureNull() as{TypeError,ForDynamic,ForNonNullableByDefault} FutureOr<core::bool>;
   function test5() → asy::Future<core::bool>
-    return let final<BottomType> #t6 = invalid-expression "pkg/front_end/testcases/nnbd/issue41437a.dart:27:27: Error: A value of type 'Future<dynamic>' can't be assigned to a variable of type 'Future<bool>'.
+    return let final<BottomType> #t2 = invalid-expression "pkg/front_end/testcases/nnbd/issue41437a.dart:27:27: Error: A value of type 'Future<dynamic>' can't be assigned to a variable of type 'Future<bool>'.
  - 'Future' is from 'dart:async'.
   Future<bool> test5() => getFutureNull(); // error
                           ^" in self::getFutureNull() as{TypeError,ForNonNullableByDefault} asy::Future<core::bool>;
@@ -106,17 +74,17 @@
     return self::getFutureBool();
   function test7() → asy::Future<core::bool> async 
     return self::getFutureBool();
-  asy::Future<core::bool> var1 = let final<BottomType> #t7 = invalid-expression "pkg/front_end/testcases/nnbd/issue41437a.dart:31:52: Error: A value of type 'Future<dynamic>' can't be assigned to a variable of type 'Future<bool>'.
+  asy::Future<core::bool> var1 = let final<BottomType> #t3 = invalid-expression "pkg/front_end/testcases/nnbd/issue41437a.dart:31:52: Error: A value of type 'Future<dynamic>' can't be assigned to a variable of type 'Future<bool>'.
  - 'Future' is from 'dart:async'.
   Future<bool> var1 = (() async => await getNull())(); // error
                                                    ^" in (() → asy::Future<dynamic> async => await self::getNull()).call() as{TypeError,ForNonNullableByDefault} asy::Future<core::bool>;
   asy::Future<core::bool> var2 = (() → dynamic => self::getNull()).call() as{TypeError,ForDynamic,ForNonNullableByDefault} asy::Future<core::bool>;
   core::bool var3 = (() → dynamic => self::getNull()).call() as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool;
-  asy::Future<core::bool> var4 = let final<BottomType> #t8 = invalid-expression "pkg/front_end/testcases/nnbd/issue41437a.dart:34:58: Error: A value of type 'Future<dynamic>' can't be assigned to a variable of type 'Future<bool>'.
+  asy::Future<core::bool> var4 = let final<BottomType> #t4 = invalid-expression "pkg/front_end/testcases/nnbd/issue41437a.dart:34:58: Error: A value of type 'Future<dynamic>' can't be assigned to a variable of type 'Future<bool>'.
  - 'Future' is from 'dart:async'.
   Future<bool> var4 = (() async => await getFutureNull())(); // error
                                                          ^" in (() → asy::Future<dynamic> async => await self::getFutureNull()).call() as{TypeError,ForNonNullableByDefault} asy::Future<core::bool>;
-  asy::Future<core::bool> var5 = let final<BottomType> #t9 = invalid-expression "pkg/front_end/testcases/nnbd/issue41437a.dart:35:46: Error: A value of type 'Future<dynamic>' can't be assigned to a variable of type 'Future<bool>'.
+  asy::Future<core::bool> var5 = let final<BottomType> #t5 = invalid-expression "pkg/front_end/testcases/nnbd/issue41437a.dart:35:46: Error: A value of type 'Future<dynamic>' can't be assigned to a variable of type 'Future<bool>'.
  - 'Future' is from 'dart:async'.
   Future<bool> var5 = (() => getFutureNull())(); // error
                                              ^" in (() → asy::Future<dynamic> => self::getFutureNull()).call() as{TypeError,ForNonNullableByDefault} asy::Future<core::bool>;
diff --git a/pkg/front_end/testcases/nnbd/issue41437a.dart.strong.transformed.expect b/pkg/front_end/testcases/nnbd/issue41437a.dart.strong.transformed.expect
index 58e2737..4efaadf 100644
--- a/pkg/front_end/testcases/nnbd/issue41437a.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/nnbd/issue41437a.dart.strong.transformed.expect
@@ -2,31 +2,11 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/nnbd/issue41437a.dart:14:31: Error: A value of type 'Future<dynamic>' can't be assigned to a variable of type 'FutureOr<bool>'.
-//  - 'Future' is from 'dart:async'.
-// Future<bool> test1() async => await getNull(); // error
-//                               ^
-//
-// pkg/front_end/testcases/nnbd/issue41437a.dart:17:31: Error: A value of type 'Future<dynamic>' can't be assigned to a variable of type 'FutureOr<bool>'.
-//  - 'Future' is from 'dart:async'.
-// Future<bool> test4() async => await getFutureNull(); // error
-//                               ^
-//
 // pkg/front_end/testcases/nnbd/issue41437a.dart:18:25: Error: A value of type 'Future<dynamic>' can't be assigned to a variable of type 'Future<bool>'.
 //  - 'Future' is from 'dart:async'.
 // Future<bool> test5() => getFutureNull(); // error
 //                         ^
 //
-// pkg/front_end/testcases/nnbd/issue41437a.dart:23:33: Error: A value of type 'Future<dynamic>' can't be assigned to a variable of type 'FutureOr<bool>'.
-//  - 'Future' is from 'dart:async'.
-//   Future<bool> test1() async => await getNull(); // error
-//                                 ^
-//
-// pkg/front_end/testcases/nnbd/issue41437a.dart:26:33: Error: A value of type 'Future<dynamic>' can't be assigned to a variable of type 'FutureOr<bool>'.
-//  - 'Future' is from 'dart:async'.
-//   Future<bool> test4() async => await getFutureNull(); // error
-//                                 ^
-//
 // pkg/front_end/testcases/nnbd/issue41437a.dart:27:27: Error: A value of type 'Future<dynamic>' can't be assigned to a variable of type 'Future<bool>'.
 //  - 'Future' is from 'dart:async'.
 //   Future<bool> test5() => getFutureNull(); // error
@@ -120,12 +100,8 @@
     try {
       #L3:
       {
-        final<BottomType> #t1 = invalid-expression "pkg/front_end/testcases/nnbd/issue41437a.dart:14:31: Error: A value of type 'Future<dynamic>' can't be assigned to a variable of type 'FutureOr<bool>'.
- - 'Future' is from 'dart:async'.
-Future<bool> test1() async => await getNull(); // error
-                              ^";
-        [yield] let dynamic #t2 = asy::_awaitHelper(self::getNull(), :async_op_then, :async_op_error, :async_op) in null;
-        :return_value = :result as{TypeError,ForNonNullableByDefault} FutureOr<core::bool>;
+        [yield] let dynamic #t1 = asy::_awaitHelper(self::getNull(), :async_op_then, :async_op_error, :async_op) in null;
+        :return_value = :result as{TypeError,ForDynamic,ForNonNullableByDefault} FutureOr<core::bool>;
         break #L3;
       }
       asy::_completeOnAsyncReturn(:async_completer, :return_value);
@@ -157,12 +133,8 @@
     try {
       #L4:
       {
-        final<BottomType> #t3 = invalid-expression "pkg/front_end/testcases/nnbd/issue41437a.dart:17:31: Error: A value of type 'Future<dynamic>' can't be assigned to a variable of type 'FutureOr<bool>'.
- - 'Future' is from 'dart:async'.
-Future<bool> test4() async => await getFutureNull(); // error
-                              ^";
-        [yield] let dynamic #t4 = asy::_awaitHelper(self::getFutureNull(), :async_op_then, :async_op_error, :async_op) in null;
-        :return_value = :result as{TypeError,ForNonNullableByDefault} FutureOr<core::bool>;
+        [yield] let dynamic #t2 = asy::_awaitHelper(self::getFutureNull(), :async_op_then, :async_op_error, :async_op) in null;
+        :return_value = :result as{TypeError,ForDynamic,ForNonNullableByDefault} FutureOr<core::bool>;
         break #L4;
       }
       asy::_completeOnAsyncReturn(:async_completer, :return_value);
@@ -178,7 +150,7 @@
   return :async_completer.{asy::Completer::future};
 }
 static method test5() → asy::Future<core::bool>
-  return let final<BottomType> #t5 = invalid-expression "pkg/front_end/testcases/nnbd/issue41437a.dart:18:25: Error: A value of type 'Future<dynamic>' can't be assigned to a variable of type 'Future<bool>'.
+  return let final<BottomType> #t3 = invalid-expression "pkg/front_end/testcases/nnbd/issue41437a.dart:18:25: Error: A value of type 'Future<dynamic>' can't be assigned to a variable of type 'Future<bool>'.
  - 'Future' is from 'dart:async'.
 Future<bool> test5() => getFutureNull(); // error
                         ^" in self::getFutureNull() as{TypeError,ForNonNullableByDefault} asy::Future<core::bool>;
@@ -236,12 +208,8 @@
             try {
               #L7:
               {
-                final<BottomType> #t6 = invalid-expression "pkg/front_end/testcases/nnbd/issue41437a.dart:23:33: Error: A value of type 'Future<dynamic>' can't be assigned to a variable of type 'FutureOr<bool>'.
- - 'Future' is from 'dart:async'.
-  Future<bool> test1() async => await getNull(); // error
-                                ^";
-                [yield] let dynamic #t7 = asy::_awaitHelper(self::getNull(), :async_op_then, :async_op_error, :async_op) in null;
-                :return_value = :result as{TypeError,ForNonNullableByDefault} FutureOr<core::bool>;
+                [yield] let dynamic #t4 = asy::_awaitHelper(self::getNull(), :async_op_then, :async_op_error, :async_op) in null;
+                :return_value = :result as{TypeError,ForDynamic,ForNonNullableByDefault} FutureOr<core::bool>;
                 break #L7;
               }
               asy::_completeOnAsyncReturn(:async_completer, :return_value);
@@ -273,12 +241,8 @@
             try {
               #L8:
               {
-                final<BottomType> #t8 = invalid-expression "pkg/front_end/testcases/nnbd/issue41437a.dart:26:33: Error: A value of type 'Future<dynamic>' can't be assigned to a variable of type 'FutureOr<bool>'.
- - 'Future' is from 'dart:async'.
-  Future<bool> test4() async => await getFutureNull(); // error
-                                ^";
-                [yield] let dynamic #t9 = asy::_awaitHelper(self::getFutureNull(), :async_op_then, :async_op_error, :async_op) in null;
-                :return_value = :result as{TypeError,ForNonNullableByDefault} FutureOr<core::bool>;
+                [yield] let dynamic #t5 = asy::_awaitHelper(self::getFutureNull(), :async_op_then, :async_op_error, :async_op) in null;
+                :return_value = :result as{TypeError,ForDynamic,ForNonNullableByDefault} FutureOr<core::bool>;
                 break #L8;
               }
               asy::_completeOnAsyncReturn(:async_completer, :return_value);
@@ -294,7 +258,7 @@
           return :async_completer.{asy::Completer::future};
         }
         function test5() → asy::Future<core::bool>
-          return let final<BottomType> #t10 = invalid-expression "pkg/front_end/testcases/nnbd/issue41437a.dart:27:27: Error: A value of type 'Future<dynamic>' can't be assigned to a variable of type 'Future<bool>'.
+          return let final<BottomType> #t6 = invalid-expression "pkg/front_end/testcases/nnbd/issue41437a.dart:27:27: Error: A value of type 'Future<dynamic>' can't be assigned to a variable of type 'Future<bool>'.
  - 'Future' is from 'dart:async'.
   Future<bool> test5() => getFutureNull(); // error
                           ^" in self::getFutureNull() as{TypeError,ForNonNullableByDefault} asy::Future<core::bool>;
@@ -327,7 +291,7 @@
           :async_completer.{asy::_AsyncAwaitCompleter::start}(:async_op);
           return :async_completer.{asy::Completer::future};
         }
-        asy::Future<core::bool> var1 = let final<BottomType> #t11 = invalid-expression "pkg/front_end/testcases/nnbd/issue41437a.dart:31:52: Error: A value of type 'Future<dynamic>' can't be assigned to a variable of type 'Future<bool>'.
+        asy::Future<core::bool> var1 = let final<BottomType> #t7 = invalid-expression "pkg/front_end/testcases/nnbd/issue41437a.dart:31:52: Error: A value of type 'Future<dynamic>' can't be assigned to a variable of type 'Future<bool>'.
  - 'Future' is from 'dart:async'.
   Future<bool> var1 = (() async => await getNull())(); // error
                                                    ^" in (() → asy::Future<dynamic> /* originally async */ {
@@ -343,7 +307,7 @@
             try {
               #L10:
               {
-                [yield] let dynamic #t12 = asy::_awaitHelper(self::getNull(), :async_op_then, :async_op_error, :async_op) in null;
+                [yield] let dynamic #t8 = asy::_awaitHelper(self::getNull(), :async_op_then, :async_op_error, :async_op) in null;
                 :return_value = :result;
                 break #L10;
               }
@@ -361,7 +325,7 @@
         }).call() as{TypeError,ForNonNullableByDefault} asy::Future<core::bool>;
         asy::Future<core::bool> var2 = (() → dynamic => self::getNull()).call() as{TypeError,ForDynamic,ForNonNullableByDefault} asy::Future<core::bool>;
         core::bool var3 = (() → dynamic => self::getNull()).call() as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool;
-        asy::Future<core::bool> var4 = let final<BottomType> #t13 = invalid-expression "pkg/front_end/testcases/nnbd/issue41437a.dart:34:58: Error: A value of type 'Future<dynamic>' can't be assigned to a variable of type 'Future<bool>'.
+        asy::Future<core::bool> var4 = let final<BottomType> #t9 = invalid-expression "pkg/front_end/testcases/nnbd/issue41437a.dart:34:58: Error: A value of type 'Future<dynamic>' can't be assigned to a variable of type 'Future<bool>'.
  - 'Future' is from 'dart:async'.
   Future<bool> var4 = (() async => await getFutureNull())(); // error
                                                          ^" in (() → asy::Future<dynamic> /* originally async */ {
@@ -377,7 +341,7 @@
             try {
               #L11:
               {
-                [yield] let dynamic #t14 = asy::_awaitHelper(self::getFutureNull(), :async_op_then, :async_op_error, :async_op) in null;
+                [yield] let dynamic #t10 = asy::_awaitHelper(self::getFutureNull(), :async_op_then, :async_op_error, :async_op) in null;
                 :return_value = :result;
                 break #L11;
               }
@@ -393,7 +357,7 @@
           :async_completer.{asy::_AsyncAwaitCompleter::start}(:async_op);
           return :async_completer.{asy::Completer::future};
         }).call() as{TypeError,ForNonNullableByDefault} asy::Future<core::bool>;
-        asy::Future<core::bool> var5 = let final<BottomType> #t15 = invalid-expression "pkg/front_end/testcases/nnbd/issue41437a.dart:35:46: Error: A value of type 'Future<dynamic>' can't be assigned to a variable of type 'Future<bool>'.
+        asy::Future<core::bool> var5 = let final<BottomType> #t11 = invalid-expression "pkg/front_end/testcases/nnbd/issue41437a.dart:35:46: Error: A value of type 'Future<dynamic>' can't be assigned to a variable of type 'Future<bool>'.
  - 'Future' is from 'dart:async'.
   Future<bool> var5 = (() => getFutureNull())(); // error
                                              ^" in (() → asy::Future<dynamic> => self::getFutureNull()).call() as{TypeError,ForNonNullableByDefault} asy::Future<core::bool>;
diff --git a/pkg/front_end/testcases/nnbd/issue41437a.dart.textual_outline.expect b/pkg/front_end/testcases/nnbd/issue41437a.dart.textual_outline.expect
new file mode 100644
index 0000000..064638f
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/issue41437a.dart.textual_outline.expect
@@ -0,0 +1,12 @@
+dynamic getNull() => null;
+Future<dynamic> getFutureNull() async {}
+Future<bool> getFutureBool() async {}
+Future<bool> test1() async => await getNull();
+Future<bool> test2() => getNull();
+bool test3() => getNull();
+Future<bool> test4() async => await getFutureNull();
+Future<bool> test5() => getFutureNull();
+Future<bool> test6() => getFutureBool();
+Future<bool> test7() async => getFutureBool();
+test() async {}
+main() {}
diff --git a/pkg/front_end/testcases/nnbd/issue41437a.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/nnbd/issue41437a.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..e910427
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/issue41437a.dart.textual_outline_modelled.expect
@@ -0,0 +1,12 @@
+Future<bool> getFutureBool() async {}
+Future<bool> test1() async => await getNull();
+Future<bool> test2() => getNull();
+Future<bool> test4() async => await getFutureNull();
+Future<bool> test5() => getFutureNull();
+Future<bool> test6() => getFutureBool();
+Future<bool> test7() async => getFutureBool();
+Future<dynamic> getFutureNull() async {}
+bool test3() => getNull();
+dynamic getNull() => null;
+main() {}
+test() async {}
diff --git a/pkg/front_end/testcases/nnbd/issue41437a.dart.weak.expect b/pkg/front_end/testcases/nnbd/issue41437a.dart.weak.expect
index 2864cb5..7b35002 100644
--- a/pkg/front_end/testcases/nnbd/issue41437a.dart.weak.expect
+++ b/pkg/front_end/testcases/nnbd/issue41437a.dart.weak.expect
@@ -2,31 +2,11 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/nnbd/issue41437a.dart:14:31: Error: A value of type 'Future<dynamic>' can't be assigned to a variable of type 'FutureOr<bool>'.
-//  - 'Future' is from 'dart:async'.
-// Future<bool> test1() async => await getNull(); // error
-//                               ^
-//
-// pkg/front_end/testcases/nnbd/issue41437a.dart:17:31: Error: A value of type 'Future<dynamic>' can't be assigned to a variable of type 'FutureOr<bool>'.
-//  - 'Future' is from 'dart:async'.
-// Future<bool> test4() async => await getFutureNull(); // error
-//                               ^
-//
 // pkg/front_end/testcases/nnbd/issue41437a.dart:18:25: Error: A value of type 'Future<dynamic>' can't be assigned to a variable of type 'Future<bool>'.
 //  - 'Future' is from 'dart:async'.
 // Future<bool> test5() => getFutureNull(); // error
 //                         ^
 //
-// pkg/front_end/testcases/nnbd/issue41437a.dart:23:33: Error: A value of type 'Future<dynamic>' can't be assigned to a variable of type 'FutureOr<bool>'.
-//  - 'Future' is from 'dart:async'.
-//   Future<bool> test1() async => await getNull(); // error
-//                                 ^
-//
-// pkg/front_end/testcases/nnbd/issue41437a.dart:26:33: Error: A value of type 'Future<dynamic>' can't be assigned to a variable of type 'FutureOr<bool>'.
-//  - 'Future' is from 'dart:async'.
-//   Future<bool> test4() async => await getFutureNull(); // error
-//                                 ^
-//
 // pkg/front_end/testcases/nnbd/issue41437a.dart:27:27: Error: A value of type 'Future<dynamic>' can't be assigned to a variable of type 'Future<bool>'.
 //  - 'Future' is from 'dart:async'.
 //   Future<bool> test5() => getFutureNull(); // error
@@ -60,21 +40,15 @@
   return true;
 }
 static method test1() → asy::Future<core::bool> async 
-  return let final<BottomType> #t1 = invalid-expression "pkg/front_end/testcases/nnbd/issue41437a.dart:14:31: Error: A value of type 'Future<dynamic>' can't be assigned to a variable of type 'FutureOr<bool>'.
- - 'Future' is from 'dart:async'.
-Future<bool> test1() async => await getNull(); // error
-                              ^" in await self::getNull() as{TypeError,ForNonNullableByDefault} FutureOr<core::bool>;
+  return await self::getNull() as{TypeError,ForDynamic,ForNonNullableByDefault} FutureOr<core::bool>;
 static method test2() → asy::Future<core::bool>
   return self::getNull() as{TypeError,ForDynamic,ForNonNullableByDefault} asy::Future<core::bool>;
 static method test3() → core::bool
   return self::getNull() as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool;
 static method test4() → asy::Future<core::bool> async 
-  return let final<BottomType> #t2 = invalid-expression "pkg/front_end/testcases/nnbd/issue41437a.dart:17:31: Error: A value of type 'Future<dynamic>' can't be assigned to a variable of type 'FutureOr<bool>'.
- - 'Future' is from 'dart:async'.
-Future<bool> test4() async => await getFutureNull(); // error
-                              ^" in await self::getFutureNull() as{TypeError,ForNonNullableByDefault} FutureOr<core::bool>;
+  return await self::getFutureNull() as{TypeError,ForDynamic,ForNonNullableByDefault} FutureOr<core::bool>;
 static method test5() → asy::Future<core::bool>
-  return let final<BottomType> #t3 = invalid-expression "pkg/front_end/testcases/nnbd/issue41437a.dart:18:25: Error: A value of type 'Future<dynamic>' can't be assigned to a variable of type 'Future<bool>'.
+  return let final<BottomType> #t1 = invalid-expression "pkg/front_end/testcases/nnbd/issue41437a.dart:18:25: Error: A value of type 'Future<dynamic>' can't be assigned to a variable of type 'Future<bool>'.
  - 'Future' is from 'dart:async'.
 Future<bool> test5() => getFutureNull(); // error
                         ^" in self::getFutureNull() as{TypeError,ForNonNullableByDefault} asy::Future<core::bool>;
@@ -84,21 +58,15 @@
   return self::getFutureBool();
 static method test() → dynamic async {
   function test1() → asy::Future<core::bool> async 
-    return let final<BottomType> #t4 = invalid-expression "pkg/front_end/testcases/nnbd/issue41437a.dart:23:33: Error: A value of type 'Future<dynamic>' can't be assigned to a variable of type 'FutureOr<bool>'.
- - 'Future' is from 'dart:async'.
-  Future<bool> test1() async => await getNull(); // error
-                                ^" in await self::getNull() as{TypeError,ForNonNullableByDefault} FutureOr<core::bool>;
+    return await self::getNull() as{TypeError,ForDynamic,ForNonNullableByDefault} FutureOr<core::bool>;
   function test2() → asy::Future<core::bool>
     return self::getNull() as{TypeError,ForDynamic,ForNonNullableByDefault} asy::Future<core::bool>;
   function test3() → core::bool
     return self::getNull() as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool;
   function test4() → asy::Future<core::bool> async 
-    return let final<BottomType> #t5 = invalid-expression "pkg/front_end/testcases/nnbd/issue41437a.dart:26:33: Error: A value of type 'Future<dynamic>' can't be assigned to a variable of type 'FutureOr<bool>'.
- - 'Future' is from 'dart:async'.
-  Future<bool> test4() async => await getFutureNull(); // error
-                                ^" in await self::getFutureNull() as{TypeError,ForNonNullableByDefault} FutureOr<core::bool>;
+    return await self::getFutureNull() as{TypeError,ForDynamic,ForNonNullableByDefault} FutureOr<core::bool>;
   function test5() → asy::Future<core::bool>
-    return let final<BottomType> #t6 = invalid-expression "pkg/front_end/testcases/nnbd/issue41437a.dart:27:27: Error: A value of type 'Future<dynamic>' can't be assigned to a variable of type 'Future<bool>'.
+    return let final<BottomType> #t2 = invalid-expression "pkg/front_end/testcases/nnbd/issue41437a.dart:27:27: Error: A value of type 'Future<dynamic>' can't be assigned to a variable of type 'Future<bool>'.
  - 'Future' is from 'dart:async'.
   Future<bool> test5() => getFutureNull(); // error
                           ^" in self::getFutureNull() as{TypeError,ForNonNullableByDefault} asy::Future<core::bool>;
@@ -106,17 +74,17 @@
     return self::getFutureBool();
   function test7() → asy::Future<core::bool> async 
     return self::getFutureBool();
-  asy::Future<core::bool> var1 = let final<BottomType> #t7 = invalid-expression "pkg/front_end/testcases/nnbd/issue41437a.dart:31:52: Error: A value of type 'Future<dynamic>' can't be assigned to a variable of type 'Future<bool>'.
+  asy::Future<core::bool> var1 = let final<BottomType> #t3 = invalid-expression "pkg/front_end/testcases/nnbd/issue41437a.dart:31:52: Error: A value of type 'Future<dynamic>' can't be assigned to a variable of type 'Future<bool>'.
  - 'Future' is from 'dart:async'.
   Future<bool> var1 = (() async => await getNull())(); // error
                                                    ^" in (() → asy::Future<dynamic> async => await self::getNull()).call() as{TypeError,ForNonNullableByDefault} asy::Future<core::bool>;
   asy::Future<core::bool> var2 = (() → dynamic => self::getNull()).call() as{TypeError,ForDynamic,ForNonNullableByDefault} asy::Future<core::bool>;
   core::bool var3 = (() → dynamic => self::getNull()).call() as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool;
-  asy::Future<core::bool> var4 = let final<BottomType> #t8 = invalid-expression "pkg/front_end/testcases/nnbd/issue41437a.dart:34:58: Error: A value of type 'Future<dynamic>' can't be assigned to a variable of type 'Future<bool>'.
+  asy::Future<core::bool> var4 = let final<BottomType> #t4 = invalid-expression "pkg/front_end/testcases/nnbd/issue41437a.dart:34:58: Error: A value of type 'Future<dynamic>' can't be assigned to a variable of type 'Future<bool>'.
  - 'Future' is from 'dart:async'.
   Future<bool> var4 = (() async => await getFutureNull())(); // error
                                                          ^" in (() → asy::Future<dynamic> async => await self::getFutureNull()).call() as{TypeError,ForNonNullableByDefault} asy::Future<core::bool>;
-  asy::Future<core::bool> var5 = let final<BottomType> #t9 = invalid-expression "pkg/front_end/testcases/nnbd/issue41437a.dart:35:46: Error: A value of type 'Future<dynamic>' can't be assigned to a variable of type 'Future<bool>'.
+  asy::Future<core::bool> var5 = let final<BottomType> #t5 = invalid-expression "pkg/front_end/testcases/nnbd/issue41437a.dart:35:46: Error: A value of type 'Future<dynamic>' can't be assigned to a variable of type 'Future<bool>'.
  - 'Future' is from 'dart:async'.
   Future<bool> var5 = (() => getFutureNull())(); // error
                                              ^" in (() → asy::Future<dynamic> => self::getFutureNull()).call() as{TypeError,ForNonNullableByDefault} asy::Future<core::bool>;
diff --git a/pkg/front_end/testcases/nnbd/issue41437a.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd/issue41437a.dart.weak.transformed.expect
index 58e2737..4efaadf 100644
--- a/pkg/front_end/testcases/nnbd/issue41437a.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/nnbd/issue41437a.dart.weak.transformed.expect
@@ -2,31 +2,11 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/nnbd/issue41437a.dart:14:31: Error: A value of type 'Future<dynamic>' can't be assigned to a variable of type 'FutureOr<bool>'.
-//  - 'Future' is from 'dart:async'.
-// Future<bool> test1() async => await getNull(); // error
-//                               ^
-//
-// pkg/front_end/testcases/nnbd/issue41437a.dart:17:31: Error: A value of type 'Future<dynamic>' can't be assigned to a variable of type 'FutureOr<bool>'.
-//  - 'Future' is from 'dart:async'.
-// Future<bool> test4() async => await getFutureNull(); // error
-//                               ^
-//
 // pkg/front_end/testcases/nnbd/issue41437a.dart:18:25: Error: A value of type 'Future<dynamic>' can't be assigned to a variable of type 'Future<bool>'.
 //  - 'Future' is from 'dart:async'.
 // Future<bool> test5() => getFutureNull(); // error
 //                         ^
 //
-// pkg/front_end/testcases/nnbd/issue41437a.dart:23:33: Error: A value of type 'Future<dynamic>' can't be assigned to a variable of type 'FutureOr<bool>'.
-//  - 'Future' is from 'dart:async'.
-//   Future<bool> test1() async => await getNull(); // error
-//                                 ^
-//
-// pkg/front_end/testcases/nnbd/issue41437a.dart:26:33: Error: A value of type 'Future<dynamic>' can't be assigned to a variable of type 'FutureOr<bool>'.
-//  - 'Future' is from 'dart:async'.
-//   Future<bool> test4() async => await getFutureNull(); // error
-//                                 ^
-//
 // pkg/front_end/testcases/nnbd/issue41437a.dart:27:27: Error: A value of type 'Future<dynamic>' can't be assigned to a variable of type 'Future<bool>'.
 //  - 'Future' is from 'dart:async'.
 //   Future<bool> test5() => getFutureNull(); // error
@@ -120,12 +100,8 @@
     try {
       #L3:
       {
-        final<BottomType> #t1 = invalid-expression "pkg/front_end/testcases/nnbd/issue41437a.dart:14:31: Error: A value of type 'Future<dynamic>' can't be assigned to a variable of type 'FutureOr<bool>'.
- - 'Future' is from 'dart:async'.
-Future<bool> test1() async => await getNull(); // error
-                              ^";
-        [yield] let dynamic #t2 = asy::_awaitHelper(self::getNull(), :async_op_then, :async_op_error, :async_op) in null;
-        :return_value = :result as{TypeError,ForNonNullableByDefault} FutureOr<core::bool>;
+        [yield] let dynamic #t1 = asy::_awaitHelper(self::getNull(), :async_op_then, :async_op_error, :async_op) in null;
+        :return_value = :result as{TypeError,ForDynamic,ForNonNullableByDefault} FutureOr<core::bool>;
         break #L3;
       }
       asy::_completeOnAsyncReturn(:async_completer, :return_value);
@@ -157,12 +133,8 @@
     try {
       #L4:
       {
-        final<BottomType> #t3 = invalid-expression "pkg/front_end/testcases/nnbd/issue41437a.dart:17:31: Error: A value of type 'Future<dynamic>' can't be assigned to a variable of type 'FutureOr<bool>'.
- - 'Future' is from 'dart:async'.
-Future<bool> test4() async => await getFutureNull(); // error
-                              ^";
-        [yield] let dynamic #t4 = asy::_awaitHelper(self::getFutureNull(), :async_op_then, :async_op_error, :async_op) in null;
-        :return_value = :result as{TypeError,ForNonNullableByDefault} FutureOr<core::bool>;
+        [yield] let dynamic #t2 = asy::_awaitHelper(self::getFutureNull(), :async_op_then, :async_op_error, :async_op) in null;
+        :return_value = :result as{TypeError,ForDynamic,ForNonNullableByDefault} FutureOr<core::bool>;
         break #L4;
       }
       asy::_completeOnAsyncReturn(:async_completer, :return_value);
@@ -178,7 +150,7 @@
   return :async_completer.{asy::Completer::future};
 }
 static method test5() → asy::Future<core::bool>
-  return let final<BottomType> #t5 = invalid-expression "pkg/front_end/testcases/nnbd/issue41437a.dart:18:25: Error: A value of type 'Future<dynamic>' can't be assigned to a variable of type 'Future<bool>'.
+  return let final<BottomType> #t3 = invalid-expression "pkg/front_end/testcases/nnbd/issue41437a.dart:18:25: Error: A value of type 'Future<dynamic>' can't be assigned to a variable of type 'Future<bool>'.
  - 'Future' is from 'dart:async'.
 Future<bool> test5() => getFutureNull(); // error
                         ^" in self::getFutureNull() as{TypeError,ForNonNullableByDefault} asy::Future<core::bool>;
@@ -236,12 +208,8 @@
             try {
               #L7:
               {
-                final<BottomType> #t6 = invalid-expression "pkg/front_end/testcases/nnbd/issue41437a.dart:23:33: Error: A value of type 'Future<dynamic>' can't be assigned to a variable of type 'FutureOr<bool>'.
- - 'Future' is from 'dart:async'.
-  Future<bool> test1() async => await getNull(); // error
-                                ^";
-                [yield] let dynamic #t7 = asy::_awaitHelper(self::getNull(), :async_op_then, :async_op_error, :async_op) in null;
-                :return_value = :result as{TypeError,ForNonNullableByDefault} FutureOr<core::bool>;
+                [yield] let dynamic #t4 = asy::_awaitHelper(self::getNull(), :async_op_then, :async_op_error, :async_op) in null;
+                :return_value = :result as{TypeError,ForDynamic,ForNonNullableByDefault} FutureOr<core::bool>;
                 break #L7;
               }
               asy::_completeOnAsyncReturn(:async_completer, :return_value);
@@ -273,12 +241,8 @@
             try {
               #L8:
               {
-                final<BottomType> #t8 = invalid-expression "pkg/front_end/testcases/nnbd/issue41437a.dart:26:33: Error: A value of type 'Future<dynamic>' can't be assigned to a variable of type 'FutureOr<bool>'.
- - 'Future' is from 'dart:async'.
-  Future<bool> test4() async => await getFutureNull(); // error
-                                ^";
-                [yield] let dynamic #t9 = asy::_awaitHelper(self::getFutureNull(), :async_op_then, :async_op_error, :async_op) in null;
-                :return_value = :result as{TypeError,ForNonNullableByDefault} FutureOr<core::bool>;
+                [yield] let dynamic #t5 = asy::_awaitHelper(self::getFutureNull(), :async_op_then, :async_op_error, :async_op) in null;
+                :return_value = :result as{TypeError,ForDynamic,ForNonNullableByDefault} FutureOr<core::bool>;
                 break #L8;
               }
               asy::_completeOnAsyncReturn(:async_completer, :return_value);
@@ -294,7 +258,7 @@
           return :async_completer.{asy::Completer::future};
         }
         function test5() → asy::Future<core::bool>
-          return let final<BottomType> #t10 = invalid-expression "pkg/front_end/testcases/nnbd/issue41437a.dart:27:27: Error: A value of type 'Future<dynamic>' can't be assigned to a variable of type 'Future<bool>'.
+          return let final<BottomType> #t6 = invalid-expression "pkg/front_end/testcases/nnbd/issue41437a.dart:27:27: Error: A value of type 'Future<dynamic>' can't be assigned to a variable of type 'Future<bool>'.
  - 'Future' is from 'dart:async'.
   Future<bool> test5() => getFutureNull(); // error
                           ^" in self::getFutureNull() as{TypeError,ForNonNullableByDefault} asy::Future<core::bool>;
@@ -327,7 +291,7 @@
           :async_completer.{asy::_AsyncAwaitCompleter::start}(:async_op);
           return :async_completer.{asy::Completer::future};
         }
-        asy::Future<core::bool> var1 = let final<BottomType> #t11 = invalid-expression "pkg/front_end/testcases/nnbd/issue41437a.dart:31:52: Error: A value of type 'Future<dynamic>' can't be assigned to a variable of type 'Future<bool>'.
+        asy::Future<core::bool> var1 = let final<BottomType> #t7 = invalid-expression "pkg/front_end/testcases/nnbd/issue41437a.dart:31:52: Error: A value of type 'Future<dynamic>' can't be assigned to a variable of type 'Future<bool>'.
  - 'Future' is from 'dart:async'.
   Future<bool> var1 = (() async => await getNull())(); // error
                                                    ^" in (() → asy::Future<dynamic> /* originally async */ {
@@ -343,7 +307,7 @@
             try {
               #L10:
               {
-                [yield] let dynamic #t12 = asy::_awaitHelper(self::getNull(), :async_op_then, :async_op_error, :async_op) in null;
+                [yield] let dynamic #t8 = asy::_awaitHelper(self::getNull(), :async_op_then, :async_op_error, :async_op) in null;
                 :return_value = :result;
                 break #L10;
               }
@@ -361,7 +325,7 @@
         }).call() as{TypeError,ForNonNullableByDefault} asy::Future<core::bool>;
         asy::Future<core::bool> var2 = (() → dynamic => self::getNull()).call() as{TypeError,ForDynamic,ForNonNullableByDefault} asy::Future<core::bool>;
         core::bool var3 = (() → dynamic => self::getNull()).call() as{TypeError,ForDynamic,ForNonNullableByDefault} core::bool;
-        asy::Future<core::bool> var4 = let final<BottomType> #t13 = invalid-expression "pkg/front_end/testcases/nnbd/issue41437a.dart:34:58: Error: A value of type 'Future<dynamic>' can't be assigned to a variable of type 'Future<bool>'.
+        asy::Future<core::bool> var4 = let final<BottomType> #t9 = invalid-expression "pkg/front_end/testcases/nnbd/issue41437a.dart:34:58: Error: A value of type 'Future<dynamic>' can't be assigned to a variable of type 'Future<bool>'.
  - 'Future' is from 'dart:async'.
   Future<bool> var4 = (() async => await getFutureNull())(); // error
                                                          ^" in (() → asy::Future<dynamic> /* originally async */ {
@@ -377,7 +341,7 @@
             try {
               #L11:
               {
-                [yield] let dynamic #t14 = asy::_awaitHelper(self::getFutureNull(), :async_op_then, :async_op_error, :async_op) in null;
+                [yield] let dynamic #t10 = asy::_awaitHelper(self::getFutureNull(), :async_op_then, :async_op_error, :async_op) in null;
                 :return_value = :result;
                 break #L11;
               }
@@ -393,7 +357,7 @@
           :async_completer.{asy::_AsyncAwaitCompleter::start}(:async_op);
           return :async_completer.{asy::Completer::future};
         }).call() as{TypeError,ForNonNullableByDefault} asy::Future<core::bool>;
-        asy::Future<core::bool> var5 = let final<BottomType> #t15 = invalid-expression "pkg/front_end/testcases/nnbd/issue41437a.dart:35:46: Error: A value of type 'Future<dynamic>' can't be assigned to a variable of type 'Future<bool>'.
+        asy::Future<core::bool> var5 = let final<BottomType> #t11 = invalid-expression "pkg/front_end/testcases/nnbd/issue41437a.dart:35:46: Error: A value of type 'Future<dynamic>' can't be assigned to a variable of type 'Future<bool>'.
  - 'Future' is from 'dart:async'.
   Future<bool> var5 = (() => getFutureNull())(); // error
                                              ^" in (() → asy::Future<dynamic> => self::getFutureNull()).call() as{TypeError,ForNonNullableByDefault} asy::Future<core::bool>;
diff --git a/pkg/front_end/testcases/nnbd/issue41437b.dart.outline.expect b/pkg/front_end/testcases/nnbd/issue41437b.dart.outline.expect
index ab30e91..5c0ba59 100644
--- a/pkg/front_end/testcases/nnbd/issue41437b.dart.outline.expect
+++ b/pkg/front_end/testcases/nnbd/issue41437b.dart.outline.expect
@@ -4,25 +4,25 @@
 
 static method getNull() → dynamic
   ;
-static method getIterableNull() → core::Iterable<dynamic>
+static method getIterableNull() → core::Iterable<dynamic> sync* 
   ;
-static method getIterableBool() → core::Iterable<core::bool>
+static method getIterableBool() → core::Iterable<core::bool> sync* 
   ;
-static method test1() → core::Iterable<core::bool>
+static method test1() → core::Iterable<core::bool> sync* 
   ;
 static method test2() → core::Iterable<core::bool>
   ;
 static method test3() → core::bool
   ;
-static method test4() → core::Iterable<core::bool>
+static method test4() → core::Iterable<core::bool> sync* 
   ;
 static method test5() → core::Iterable<core::bool>
   ;
 static method test6() → core::Iterable<core::bool>
   ;
-static method test7() → core::Iterable<core::bool>
+static method test7() → core::Iterable<core::bool> sync* 
   ;
-static method test() → dynamic
+static method test() → dynamic async 
   ;
 static method main() → dynamic
   ;
diff --git a/pkg/front_end/testcases/nnbd/issue41437c.dart.outline.expect b/pkg/front_end/testcases/nnbd/issue41437c.dart.outline.expect
index f877e4d..d5e9d06 100644
--- a/pkg/front_end/testcases/nnbd/issue41437c.dart.outline.expect
+++ b/pkg/front_end/testcases/nnbd/issue41437c.dart.outline.expect
@@ -5,25 +5,25 @@
 
 static method getNull() → dynamic
   ;
-static method getStreamNull() → asy::Stream<dynamic>
+static method getStreamNull() → asy::Stream<dynamic> async* 
   ;
-static method getStreamBool() → asy::Stream<core::bool>
+static method getStreamBool() → asy::Stream<core::bool> async* 
   ;
-static method test1() → asy::Stream<core::bool>
+static method test1() → asy::Stream<core::bool> async* 
   ;
 static method test2() → asy::Stream<core::bool>
   ;
 static method test3() → core::bool
   ;
-static method test4() → asy::Stream<core::bool>
+static method test4() → asy::Stream<core::bool> async* 
   ;
 static method test5() → asy::Stream<core::bool>
   ;
 static method test6() → asy::Stream<core::bool>
   ;
-static method test7() → asy::Stream<core::bool>
+static method test7() → asy::Stream<core::bool> async* 
   ;
-static method test() → dynamic
+static method test() → dynamic async 
   ;
 static method main() → dynamic
   ;
diff --git a/pkg/front_end/testcases/nnbd/issue41602.dart.outline.expect b/pkg/front_end/testcases/nnbd/issue41602.dart.outline.expect
index 6933297..99fa8c3 100644
--- a/pkg/front_end/testcases/nnbd/issue41602.dart.outline.expect
+++ b/pkg/front_end/testcases/nnbd/issue41602.dart.outline.expect
@@ -2,13 +2,13 @@
 import self as self;
 import "dart:async" as asy;
 
-static method returnFutureOfVoid() → asy::Future<void>
+static method returnFutureOfVoid() → asy::Future<void> async 
   ;
 static method returnVoid() → void
   ;
-static method returnVoidAsync() → void
+static method returnVoidAsync() → void async 
   ;
-static method test() → dynamic
+static method test() → dynamic async 
   ;
-static method main() → dynamic
+static method main() → dynamic async 
   ;
diff --git a/pkg/front_end/testcases/nnbd/issue42089.dart b/pkg/front_end/testcases/nnbd/issue42089.dart
new file mode 100644
index 0000000..8ea0bc5
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/issue42089.dart
@@ -0,0 +1,12 @@
+// Copyright (c) 2020, the Dart project authors. Please see the AUTHORS file
+// for 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<X>(X? x) {
+  if (x is String?) {
+    Object o = x;
+    o = x;
+  }
+}
+
+main() {}
diff --git a/pkg/front_end/testcases/nnbd/issue42089.dart.outline.expect b/pkg/front_end/testcases/nnbd/issue42089.dart.outline.expect
new file mode 100644
index 0000000..0f7e4eb
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/issue42089.dart.outline.expect
@@ -0,0 +1,8 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+static method test<X extends core::Object? = dynamic>(self::test::X? x) → dynamic
+  ;
+static method main() → dynamic
+  ;
diff --git a/pkg/front_end/testcases/nnbd/issue42089.dart.strong.expect b/pkg/front_end/testcases/nnbd/issue42089.dart.strong.expect
new file mode 100644
index 0000000..36f7b96
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/issue42089.dart.strong.expect
@@ -0,0 +1,30 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/nnbd/issue42089.dart:7:16: Error: A value of type 'X?' can't be assigned to a variable of type 'Object'.
+//  - 'Object' is from 'dart:core'.
+//     Object o = x;
+//                ^
+//
+// pkg/front_end/testcases/nnbd/issue42089.dart:8:9: Error: A value of type 'X?' can't be assigned to a variable of type 'Object'.
+//  - 'Object' is from 'dart:core'.
+//     o = x;
+//         ^
+//
+import self as self;
+import "dart:core" as core;
+
+static method test<X extends core::Object? = dynamic>(self::test::X? x) → dynamic {
+  if(x is{ForNonNullableByDefault} core::String?) {
+    core::Object o = let final<BottomType> #t1 = invalid-expression "pkg/front_end/testcases/nnbd/issue42089.dart:7:16: Error: A value of type 'X?' can't be assigned to a variable of type 'Object'.
+ - 'Object' is from 'dart:core'.
+    Object o = x;
+               ^" in x{self::test::X? & core::String? /* '?' & '?' = '?' */} as{TypeError,ForNonNullableByDefault} core::Object;
+    o = let final<BottomType> #t2 = invalid-expression "pkg/front_end/testcases/nnbd/issue42089.dart:8:9: Error: A value of type 'X?' can't be assigned to a variable of type 'Object'.
+ - 'Object' is from 'dart:core'.
+    o = x;
+        ^" in x{self::test::X? & core::String? /* '?' & '?' = '?' */} as{TypeError,ForNonNullableByDefault} core::Object;
+  }
+}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/nnbd/issue42089.dart.strong.transformed.expect b/pkg/front_end/testcases/nnbd/issue42089.dart.strong.transformed.expect
new file mode 100644
index 0000000..e118a5c
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/issue42089.dart.strong.transformed.expect
@@ -0,0 +1,30 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/nnbd/issue42089.dart:7:16: Error: A value of type 'X?' can't be assigned to a variable of type 'Object'.
+//  - 'Object' is from 'dart:core'.
+//     Object o = x;
+//                ^
+//
+// pkg/front_end/testcases/nnbd/issue42089.dart:8:9: Error: A value of type 'X?' can't be assigned to a variable of type 'Object'.
+//  - 'Object' is from 'dart:core'.
+//     o = x;
+//         ^
+//
+import self as self;
+import "dart:core" as core;
+
+static method test<X extends core::Object? = dynamic>(self::test::X? x) → dynamic {
+  if(x is{ForNonNullableByDefault} core::String?) {
+    core::Object o = let final<BottomType> #t1 = invalid-expression "pkg/front_end/testcases/nnbd/issue42089.dart:7:16: Error: A value of type 'X?' can't be assigned to a variable of type 'Object'.
+ - 'Object' is from 'dart:core'.
+    Object o = x;
+               ^" in let self::test::X? & core::String? /* '?' & '?' = '?' */ #t2 = x{self::test::X? & core::String? /* '?' & '?' = '?' */} in #t2.==(null) ?{core::Object} #t2 as{TypeError,ForNonNullableByDefault} core::Object : #t2{core::Object};
+    o = let final<BottomType> #t3 = invalid-expression "pkg/front_end/testcases/nnbd/issue42089.dart:8:9: Error: A value of type 'X?' can't be assigned to a variable of type 'Object'.
+ - 'Object' is from 'dart:core'.
+    o = x;
+        ^" in let self::test::X? & core::String? /* '?' & '?' = '?' */ #t4 = x{self::test::X? & core::String? /* '?' & '?' = '?' */} in #t4.==(null) ?{core::Object} #t4 as{TypeError,ForNonNullableByDefault} core::Object : #t4{core::Object};
+  }
+}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/nnbd/issue42089.dart.textual_outline.expect b/pkg/front_end/testcases/nnbd/issue42089.dart.textual_outline.expect
new file mode 100644
index 0000000..3101fb7
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/issue42089.dart.textual_outline.expect
@@ -0,0 +1,2 @@
+test<X>(X? x) {}
+main() {}
diff --git a/pkg/front_end/testcases/nnbd/issue42089.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/nnbd/issue42089.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..819f1de
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/issue42089.dart.textual_outline_modelled.expect
@@ -0,0 +1,2 @@
+main() {}
+test<X>(X? x) {}
diff --git a/pkg/front_end/testcases/nnbd/issue42089.dart.weak.expect b/pkg/front_end/testcases/nnbd/issue42089.dart.weak.expect
new file mode 100644
index 0000000..36f7b96
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/issue42089.dart.weak.expect
@@ -0,0 +1,30 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/nnbd/issue42089.dart:7:16: Error: A value of type 'X?' can't be assigned to a variable of type 'Object'.
+//  - 'Object' is from 'dart:core'.
+//     Object o = x;
+//                ^
+//
+// pkg/front_end/testcases/nnbd/issue42089.dart:8:9: Error: A value of type 'X?' can't be assigned to a variable of type 'Object'.
+//  - 'Object' is from 'dart:core'.
+//     o = x;
+//         ^
+//
+import self as self;
+import "dart:core" as core;
+
+static method test<X extends core::Object? = dynamic>(self::test::X? x) → dynamic {
+  if(x is{ForNonNullableByDefault} core::String?) {
+    core::Object o = let final<BottomType> #t1 = invalid-expression "pkg/front_end/testcases/nnbd/issue42089.dart:7:16: Error: A value of type 'X?' can't be assigned to a variable of type 'Object'.
+ - 'Object' is from 'dart:core'.
+    Object o = x;
+               ^" in x{self::test::X? & core::String? /* '?' & '?' = '?' */} as{TypeError,ForNonNullableByDefault} core::Object;
+    o = let final<BottomType> #t2 = invalid-expression "pkg/front_end/testcases/nnbd/issue42089.dart:8:9: Error: A value of type 'X?' can't be assigned to a variable of type 'Object'.
+ - 'Object' is from 'dart:core'.
+    o = x;
+        ^" in x{self::test::X? & core::String? /* '?' & '?' = '?' */} as{TypeError,ForNonNullableByDefault} core::Object;
+  }
+}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/nnbd/issue42089.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd/issue42089.dart.weak.transformed.expect
new file mode 100644
index 0000000..e75b74f
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/issue42089.dart.weak.transformed.expect
@@ -0,0 +1,30 @@
+library /*isNonNullableByDefault*/;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/nnbd/issue42089.dart:7:16: Error: A value of type 'X?' can't be assigned to a variable of type 'Object'.
+//  - 'Object' is from 'dart:core'.
+//     Object o = x;
+//                ^
+//
+// pkg/front_end/testcases/nnbd/issue42089.dart:8:9: Error: A value of type 'X?' can't be assigned to a variable of type 'Object'.
+//  - 'Object' is from 'dart:core'.
+//     o = x;
+//         ^
+//
+import self as self;
+import "dart:core" as core;
+
+static method test<X extends core::Object? = dynamic>(self::test::X? x) → dynamic {
+  if(x is{ForNonNullableByDefault} core::String?) {
+    core::Object o = let final<BottomType> #t1 = invalid-expression "pkg/front_end/testcases/nnbd/issue42089.dart:7:16: Error: A value of type 'X?' can't be assigned to a variable of type 'Object'.
+ - 'Object' is from 'dart:core'.
+    Object o = x;
+               ^" in x{self::test::X? & core::String? /* '?' & '?' = '?' */};
+    o = let final<BottomType> #t2 = invalid-expression "pkg/front_end/testcases/nnbd/issue42089.dart:8:9: Error: A value of type 'X?' can't be assigned to a variable of type 'Object'.
+ - 'Object' is from 'dart:core'.
+    o = x;
+        ^" in x{self::test::X? & core::String? /* '?' & '?' = '?' */};
+  }
+}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/nnbd/issue42504.dart b/pkg/front_end/testcases/nnbd/issue42504.dart
new file mode 100644
index 0000000..fc8b368
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/issue42504.dart
@@ -0,0 +1,36 @@
+// Copyright (c) 2020, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+abstract class ImageStreamCompleter {
+  void addListener();
+}
+
+class _LiveImage {
+  factory _LiveImage(ImageStreamCompleter a) => throw UnimplementedError();
+}
+
+abstract class Foo {
+  dynamic get _pendingImages;
+
+  ImageStreamCompleter? putIfAbsent(Object key, ImageStreamCompleter loader()) {
+    assert(key != null);
+    assert(loader != null);
+    ImageStreamCompleter? result = _pendingImages[key]?.completer;
+    if (result != null) {
+      return result;
+    }
+    try {
+      result = loader();
+      _LiveImage(result);
+    } catch (error) {
+      return null;
+    }
+
+    result.addListener();
+
+    return result;
+  }
+}
+
+main() {}
diff --git a/pkg/front_end/testcases/nnbd/issue42504.dart.outline.expect b/pkg/front_end/testcases/nnbd/issue42504.dart.outline.expect
new file mode 100644
index 0000000..c431748
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/issue42504.dart.outline.expect
@@ -0,0 +1,22 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+abstract class ImageStreamCompleter extends core::Object {
+  synthetic constructor •() → self::ImageStreamCompleter
+    ;
+  abstract method addListener() → void;
+}
+class _LiveImage extends core::Object {
+  static factory •(self::ImageStreamCompleter a) → self::_LiveImage
+    ;
+}
+abstract class Foo extends core::Object {
+  synthetic constructor •() → self::Foo
+    ;
+  abstract get _pendingImages() → dynamic;
+  method putIfAbsent(core::Object key, () → self::ImageStreamCompleter loader) → self::ImageStreamCompleter?
+    ;
+}
+static method main() → dynamic
+  ;
diff --git a/pkg/front_end/testcases/nnbd/issue42504.dart.strong.expect b/pkg/front_end/testcases/nnbd/issue42504.dart.strong.expect
new file mode 100644
index 0000000..8c4ad4f
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/issue42504.dart.strong.expect
@@ -0,0 +1,38 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+abstract class ImageStreamCompleter extends core::Object {
+  synthetic constructor •() → self::ImageStreamCompleter
+    : super core::Object::•()
+    ;
+  abstract method addListener() → void;
+}
+class _LiveImage extends core::Object {
+  static factory •(self::ImageStreamCompleter a) → self::_LiveImage
+    return throw new core::UnimplementedError::•();
+}
+abstract class Foo extends core::Object {
+  synthetic constructor •() → self::Foo
+    : super core::Object::•()
+    ;
+  abstract get _pendingImages() → dynamic;
+  method putIfAbsent(core::Object key, () → self::ImageStreamCompleter loader) → self::ImageStreamCompleter? {
+    assert(!key.{core::Object::==}(null));
+    assert(!loader.{core::Object::==}(null));
+    self::ImageStreamCompleter? result = (let final dynamic #t1 = this.{self::Foo::_pendingImages}.[](key) in #t1.{core::Object::==}(null) ?{dynamic} null : #t1.completer) as{TypeError,ForDynamic,ForNonNullableByDefault} self::ImageStreamCompleter?;
+    if(!result.{core::Object::==}(null)) {
+      return result{self::ImageStreamCompleter};
+    }
+    try {
+      result = loader.call();
+      self::_LiveImage::•(result{self::ImageStreamCompleter});
+    }
+    on core::Object catch(final core::Object error) {
+      return null;
+    }
+    result{self::ImageStreamCompleter}.{self::ImageStreamCompleter::addListener}();
+    return result{self::ImageStreamCompleter};
+  }
+}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/nnbd/issue42504.dart.strong.transformed.expect b/pkg/front_end/testcases/nnbd/issue42504.dart.strong.transformed.expect
new file mode 100644
index 0000000..8c4ad4f
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/issue42504.dart.strong.transformed.expect
@@ -0,0 +1,38 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+abstract class ImageStreamCompleter extends core::Object {
+  synthetic constructor •() → self::ImageStreamCompleter
+    : super core::Object::•()
+    ;
+  abstract method addListener() → void;
+}
+class _LiveImage extends core::Object {
+  static factory •(self::ImageStreamCompleter a) → self::_LiveImage
+    return throw new core::UnimplementedError::•();
+}
+abstract class Foo extends core::Object {
+  synthetic constructor •() → self::Foo
+    : super core::Object::•()
+    ;
+  abstract get _pendingImages() → dynamic;
+  method putIfAbsent(core::Object key, () → self::ImageStreamCompleter loader) → self::ImageStreamCompleter? {
+    assert(!key.{core::Object::==}(null));
+    assert(!loader.{core::Object::==}(null));
+    self::ImageStreamCompleter? result = (let final dynamic #t1 = this.{self::Foo::_pendingImages}.[](key) in #t1.{core::Object::==}(null) ?{dynamic} null : #t1.completer) as{TypeError,ForDynamic,ForNonNullableByDefault} self::ImageStreamCompleter?;
+    if(!result.{core::Object::==}(null)) {
+      return result{self::ImageStreamCompleter};
+    }
+    try {
+      result = loader.call();
+      self::_LiveImage::•(result{self::ImageStreamCompleter});
+    }
+    on core::Object catch(final core::Object error) {
+      return null;
+    }
+    result{self::ImageStreamCompleter}.{self::ImageStreamCompleter::addListener}();
+    return result{self::ImageStreamCompleter};
+  }
+}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/nnbd/issue42504.dart.textual_outline.expect b/pkg/front_end/testcases/nnbd/issue42504.dart.textual_outline.expect
new file mode 100644
index 0000000..505bd0b
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/issue42504.dart.textual_outline.expect
@@ -0,0 +1,15 @@
+abstract class ImageStreamCompleter {
+  void addListener();
+}
+
+class _LiveImage {
+  factory _LiveImage(ImageStreamCompleter a) => throw UnimplementedError();
+}
+
+abstract class Foo {
+  dynamic get _pendingImages;
+  ImageStreamCompleter? putIfAbsent(
+      Object key, ImageStreamCompleter loader()) {}
+}
+
+main() {}
diff --git a/pkg/front_end/testcases/nnbd/issue42504.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/nnbd/issue42504.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..50c90ff
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/issue42504.dart.textual_outline_modelled.expect
@@ -0,0 +1,15 @@
+abstract class Foo {
+  ImageStreamCompleter? putIfAbsent(
+      Object key, ImageStreamCompleter loader()) {}
+  dynamic get _pendingImages;
+}
+
+abstract class ImageStreamCompleter {
+  void addListener();
+}
+
+class _LiveImage {
+  factory _LiveImage(ImageStreamCompleter a) => throw UnimplementedError();
+}
+
+main() {}
diff --git a/pkg/front_end/testcases/nnbd/issue42504.dart.weak.expect b/pkg/front_end/testcases/nnbd/issue42504.dart.weak.expect
new file mode 100644
index 0000000..8c4ad4f
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/issue42504.dart.weak.expect
@@ -0,0 +1,38 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+abstract class ImageStreamCompleter extends core::Object {
+  synthetic constructor •() → self::ImageStreamCompleter
+    : super core::Object::•()
+    ;
+  abstract method addListener() → void;
+}
+class _LiveImage extends core::Object {
+  static factory •(self::ImageStreamCompleter a) → self::_LiveImage
+    return throw new core::UnimplementedError::•();
+}
+abstract class Foo extends core::Object {
+  synthetic constructor •() → self::Foo
+    : super core::Object::•()
+    ;
+  abstract get _pendingImages() → dynamic;
+  method putIfAbsent(core::Object key, () → self::ImageStreamCompleter loader) → self::ImageStreamCompleter? {
+    assert(!key.{core::Object::==}(null));
+    assert(!loader.{core::Object::==}(null));
+    self::ImageStreamCompleter? result = (let final dynamic #t1 = this.{self::Foo::_pendingImages}.[](key) in #t1.{core::Object::==}(null) ?{dynamic} null : #t1.completer) as{TypeError,ForDynamic,ForNonNullableByDefault} self::ImageStreamCompleter?;
+    if(!result.{core::Object::==}(null)) {
+      return result{self::ImageStreamCompleter};
+    }
+    try {
+      result = loader.call();
+      self::_LiveImage::•(result{self::ImageStreamCompleter});
+    }
+    on core::Object catch(final core::Object error) {
+      return null;
+    }
+    result{self::ImageStreamCompleter}.{self::ImageStreamCompleter::addListener}();
+    return result{self::ImageStreamCompleter};
+  }
+}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/nnbd/issue42504.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd/issue42504.dart.weak.transformed.expect
new file mode 100644
index 0000000..8c4ad4f
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/issue42504.dart.weak.transformed.expect
@@ -0,0 +1,38 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+abstract class ImageStreamCompleter extends core::Object {
+  synthetic constructor •() → self::ImageStreamCompleter
+    : super core::Object::•()
+    ;
+  abstract method addListener() → void;
+}
+class _LiveImage extends core::Object {
+  static factory •(self::ImageStreamCompleter a) → self::_LiveImage
+    return throw new core::UnimplementedError::•();
+}
+abstract class Foo extends core::Object {
+  synthetic constructor •() → self::Foo
+    : super core::Object::•()
+    ;
+  abstract get _pendingImages() → dynamic;
+  method putIfAbsent(core::Object key, () → self::ImageStreamCompleter loader) → self::ImageStreamCompleter? {
+    assert(!key.{core::Object::==}(null));
+    assert(!loader.{core::Object::==}(null));
+    self::ImageStreamCompleter? result = (let final dynamic #t1 = this.{self::Foo::_pendingImages}.[](key) in #t1.{core::Object::==}(null) ?{dynamic} null : #t1.completer) as{TypeError,ForDynamic,ForNonNullableByDefault} self::ImageStreamCompleter?;
+    if(!result.{core::Object::==}(null)) {
+      return result{self::ImageStreamCompleter};
+    }
+    try {
+      result = loader.call();
+      self::_LiveImage::•(result{self::ImageStreamCompleter});
+    }
+    on core::Object catch(final core::Object error) {
+      return null;
+    }
+    result{self::ImageStreamCompleter}.{self::ImageStreamCompleter::addListener}();
+    return result{self::ImageStreamCompleter};
+  }
+}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/nnbd/later.dart.outline.expect b/pkg/front_end/testcases/nnbd/later.dart.outline.expect
index 654662e..41fee50 100644
--- a/pkg/front_end/testcases/nnbd/later.dart.outline.expect
+++ b/pkg/front_end/testcases/nnbd/later.dart.outline.expect
@@ -40,9 +40,9 @@
   ;
 static method baz() → dynamic
   ;
-static method hest() → dynamic
+static method hest() → dynamic async 
   ;
-static method fisk() → dynamic
+static method fisk() → dynamic async 
   ;
 static method main() → dynamic
   ;
diff --git a/pkg/front_end/testcases/nnbd/nullable_extension.dart b/pkg/front_end/testcases/nnbd/nullable_extension.dart
new file mode 100644
index 0000000..c9307ca
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/nullable_extension.dart
@@ -0,0 +1,20 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+class A {
+  String text = "";
+}
+
+extension on A? {
+  String get text => "Lily was here";
+}
+
+void main() {
+  A? a = null;
+  expect("Lily was here", a.text);
+}
+
+expect(expected, actual) {
+  if (expected != actual) throw 'Expected $expected, actual $actual';
+}
diff --git a/pkg/front_end/testcases/nnbd/nullable_extension.dart.outline.expect b/pkg/front_end/testcases/nnbd/nullable_extension.dart.outline.expect
new file mode 100644
index 0000000..738963d
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/nullable_extension.dart.outline.expect
@@ -0,0 +1,18 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class A extends core::Object {
+  field core::String text;
+  synthetic constructor •() → self::A
+    ;
+}
+extension _extension#0 on self::A? {
+  get text = self::_extension#0|get#text;
+}
+static method _extension#0|get#text(final self::A? #this) → core::String
+  ;
+static method main() → void
+  ;
+static method expect(dynamic expected, dynamic actual) → dynamic
+  ;
diff --git a/pkg/front_end/testcases/nnbd/nullable_extension.dart.strong.expect b/pkg/front_end/testcases/nnbd/nullable_extension.dart.strong.expect
new file mode 100644
index 0000000..4b74dec
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/nullable_extension.dart.strong.expect
@@ -0,0 +1,23 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class A extends core::Object {
+  field core::String text = "";
+  synthetic constructor •() → self::A
+    : super core::Object::•()
+    ;
+}
+extension _extension#0 on self::A? {
+  get text = self::_extension#0|get#text;
+}
+static method _extension#0|get#text(final self::A? #this) → core::String
+  return "Lily was here";
+static method main() → void {
+  self::A? a = null;
+  self::expect("Lily was here", self::_extension#0|get#text(a));
+}
+static method expect(dynamic expected, dynamic actual) → dynamic {
+  if(!expected.{core::Object::==}(actual))
+    throw "Expected ${expected}, actual ${actual}";
+}
diff --git a/pkg/front_end/testcases/nnbd/nullable_extension.dart.strong.transformed.expect b/pkg/front_end/testcases/nnbd/nullable_extension.dart.strong.transformed.expect
new file mode 100644
index 0000000..4b74dec
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/nullable_extension.dart.strong.transformed.expect
@@ -0,0 +1,23 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class A extends core::Object {
+  field core::String text = "";
+  synthetic constructor •() → self::A
+    : super core::Object::•()
+    ;
+}
+extension _extension#0 on self::A? {
+  get text = self::_extension#0|get#text;
+}
+static method _extension#0|get#text(final self::A? #this) → core::String
+  return "Lily was here";
+static method main() → void {
+  self::A? a = null;
+  self::expect("Lily was here", self::_extension#0|get#text(a));
+}
+static method expect(dynamic expected, dynamic actual) → dynamic {
+  if(!expected.{core::Object::==}(actual))
+    throw "Expected ${expected}, actual ${actual}";
+}
diff --git a/pkg/front_end/testcases/nnbd/nullable_extension.dart.textual_outline.expect b/pkg/front_end/testcases/nnbd/nullable_extension.dart.textual_outline.expect
new file mode 100644
index 0000000..d72f2d8
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/nullable_extension.dart.textual_outline.expect
@@ -0,0 +1,8 @@
+class A {
+  String text = "";
+}
+extension on ;
+A;
+? { String get text => "Lily was here"; }
+void main() { }
+expect(expected, actual) { }
diff --git a/pkg/front_end/testcases/nnbd/nullable_extension.dart.weak.expect b/pkg/front_end/testcases/nnbd/nullable_extension.dart.weak.expect
new file mode 100644
index 0000000..4b74dec
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/nullable_extension.dart.weak.expect
@@ -0,0 +1,23 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class A extends core::Object {
+  field core::String text = "";
+  synthetic constructor •() → self::A
+    : super core::Object::•()
+    ;
+}
+extension _extension#0 on self::A? {
+  get text = self::_extension#0|get#text;
+}
+static method _extension#0|get#text(final self::A? #this) → core::String
+  return "Lily was here";
+static method main() → void {
+  self::A? a = null;
+  self::expect("Lily was here", self::_extension#0|get#text(a));
+}
+static method expect(dynamic expected, dynamic actual) → dynamic {
+  if(!expected.{core::Object::==}(actual))
+    throw "Expected ${expected}, actual ${actual}";
+}
diff --git a/pkg/front_end/testcases/nnbd/nullable_extension.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd/nullable_extension.dart.weak.transformed.expect
new file mode 100644
index 0000000..4b74dec
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/nullable_extension.dart.weak.transformed.expect
@@ -0,0 +1,23 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+
+class A extends core::Object {
+  field core::String text = "";
+  synthetic constructor •() → self::A
+    : super core::Object::•()
+    ;
+}
+extension _extension#0 on self::A? {
+  get text = self::_extension#0|get#text;
+}
+static method _extension#0|get#text(final self::A? #this) → core::String
+  return "Lily was here";
+static method main() → void {
+  self::A? a = null;
+  self::expect("Lily was here", self::_extension#0|get#text(a));
+}
+static method expect(dynamic expected, dynamic actual) → dynamic {
+  if(!expected.{core::Object::==}(actual))
+    throw "Expected ${expected}, actual ${actual}";
+}
diff --git a/pkg/front_end/testcases/nnbd/return_async.dart b/pkg/front_end/testcases/nnbd/return_async.dart
new file mode 100644
index 0000000..f4c5375
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/return_async.dart
@@ -0,0 +1,39 @@
+// Copyright (c) 2020, the Dart project authors.  Please see the AUTHORS file
+// for 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 test is derived from `runtime/tests/vm/dart/causal_stacks/utils.dart`.
+
+import 'dart:async';
+
+Future<void> throwSync() {
+  throw '';
+}
+
+Future<void> allYield() async {
+  await 0;
+  await allYield2();
+}
+
+Future<void> allYield2() async {
+  await 0;
+  await allYield3();
+}
+
+Future<void> allYield3() async {
+  await 0;
+  throwSync();
+}
+
+Future<void> customErrorZone() async {
+  final completer = Completer<void>();
+  runZonedGuarded(() async {
+    await allYield();
+    completer.complete(null);
+  }, (e, s) {
+    completer.completeError(e, s);
+  });
+  return completer.future;
+}
+
+main() {}
diff --git a/pkg/front_end/testcases/nnbd/return_async.dart.outline.expect b/pkg/front_end/testcases/nnbd/return_async.dart.outline.expect
new file mode 100644
index 0000000..901f7c1
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/return_async.dart.outline.expect
@@ -0,0 +1,18 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:async" as asy;
+
+import "dart:async";
+
+static method throwSync() → asy::Future<void>
+  ;
+static method allYield() → asy::Future<void> async 
+  ;
+static method allYield2() → asy::Future<void> async 
+  ;
+static method allYield3() → asy::Future<void> async 
+  ;
+static method customErrorZone() → asy::Future<void> async 
+  ;
+static method main() → dynamic
+  ;
diff --git a/pkg/front_end/testcases/nnbd/return_async.dart.strong.expect b/pkg/front_end/testcases/nnbd/return_async.dart.strong.expect
new file mode 100644
index 0000000..2c9322b
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/return_async.dart.strong.expect
@@ -0,0 +1,33 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:async" as asy;
+import "dart:core" as core;
+
+import "dart:async";
+
+static method throwSync() → asy::Future<void> {
+  throw "";
+}
+static method allYield() → asy::Future<void> async {
+  await 0;
+  await self::allYield2();
+}
+static method allYield2() → asy::Future<void> async {
+  await 0;
+  await self::allYield3();
+}
+static method allYield3() → asy::Future<void> async {
+  await 0;
+  self::throwSync();
+}
+static method customErrorZone() → asy::Future<void> async {
+  final asy::Completer<void> completer = asy::Completer::•<void>();
+  asy::runZonedGuarded<asy::Future<core::Null?>>(() → asy::Future<core::Null?> async {
+    await self::allYield();
+    completer.{asy::Completer::complete}(null);
+  }, (core::Object e, core::StackTrace s) → core::Null? {
+    completer.{asy::Completer::completeError}(e, s);
+  });
+  return completer.{asy::Completer::future};
+}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/nnbd/return_async.dart.strong.transformed.expect b/pkg/front_end/testcases/nnbd/return_async.dart.strong.transformed.expect
new file mode 100644
index 0000000..ae00b67
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/return_async.dart.strong.transformed.expect
@@ -0,0 +1,160 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:async" as asy;
+import "dart:core" as core;
+import "dart:_internal" as _in;
+
+import "dart:async";
+
+static method throwSync() → asy::Future<void> {
+  throw "";
+}
+static method allYield() → asy::Future<void> /* originally async */ {
+  final asy::_AsyncAwaitCompleter<void> :async_completer = new asy::_AsyncAwaitCompleter::•<void>();
+  FutureOr<void>? :return_value;
+  dynamic :async_stack_trace;
+  (dynamic) → dynamic :async_op_then;
+  (core::Object, core::StackTrace) → dynamic :async_op_error;
+  core::int :await_jump_var = 0;
+  dynamic :await_ctx_var;
+  dynamic :saved_try_context_var0;
+  function :async_op([dynamic :result, dynamic :exception, dynamic :stack_trace]) → dynamic yielding 
+    try {
+      #L1:
+      {
+        [yield] let dynamic #t1 = asy::_awaitHelper(0, :async_op_then, :async_op_error, :async_op) in null;
+        _in::unsafeCast<core::int>(:result);
+        [yield] let dynamic #t2 = asy::_awaitHelper(self::allYield2(), :async_op_then, :async_op_error, :async_op) in null;
+        _in::unsafeCast<void>(:result);
+      }
+      asy::_completeOnAsyncReturn(:async_completer, :return_value);
+      return;
+    }
+    on dynamic catch(dynamic exception, core::StackTrace stack_trace) {
+      :async_completer.{asy::Completer::completeError}(exception, stack_trace);
+    }
+  :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
+  :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
+  :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
+  :async_completer.{asy::_AsyncAwaitCompleter::start}(:async_op);
+  return :async_completer.{asy::Completer::future};
+}
+static method allYield2() → asy::Future<void> /* originally async */ {
+  final asy::_AsyncAwaitCompleter<void> :async_completer = new asy::_AsyncAwaitCompleter::•<void>();
+  FutureOr<void>? :return_value;
+  dynamic :async_stack_trace;
+  (dynamic) → dynamic :async_op_then;
+  (core::Object, core::StackTrace) → dynamic :async_op_error;
+  core::int :await_jump_var = 0;
+  dynamic :await_ctx_var;
+  dynamic :saved_try_context_var0;
+  function :async_op([dynamic :result, dynamic :exception, dynamic :stack_trace]) → dynamic yielding 
+    try {
+      #L2:
+      {
+        [yield] let dynamic #t3 = asy::_awaitHelper(0, :async_op_then, :async_op_error, :async_op) in null;
+        _in::unsafeCast<core::int>(:result);
+        [yield] let dynamic #t4 = asy::_awaitHelper(self::allYield3(), :async_op_then, :async_op_error, :async_op) in null;
+        _in::unsafeCast<void>(:result);
+      }
+      asy::_completeOnAsyncReturn(:async_completer, :return_value);
+      return;
+    }
+    on dynamic catch(dynamic exception, core::StackTrace stack_trace) {
+      :async_completer.{asy::Completer::completeError}(exception, stack_trace);
+    }
+  :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
+  :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
+  :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
+  :async_completer.{asy::_AsyncAwaitCompleter::start}(:async_op);
+  return :async_completer.{asy::Completer::future};
+}
+static method allYield3() → asy::Future<void> /* originally async */ {
+  final asy::_AsyncAwaitCompleter<void> :async_completer = new asy::_AsyncAwaitCompleter::•<void>();
+  FutureOr<void>? :return_value;
+  dynamic :async_stack_trace;
+  (dynamic) → dynamic :async_op_then;
+  (core::Object, core::StackTrace) → dynamic :async_op_error;
+  core::int :await_jump_var = 0;
+  dynamic :await_ctx_var;
+  dynamic :saved_try_context_var0;
+  function :async_op([dynamic :result, dynamic :exception, dynamic :stack_trace]) → dynamic yielding 
+    try {
+      #L3:
+      {
+        [yield] let dynamic #t5 = asy::_awaitHelper(0, :async_op_then, :async_op_error, :async_op) in null;
+        _in::unsafeCast<core::int>(:result);
+        self::throwSync();
+      }
+      asy::_completeOnAsyncReturn(:async_completer, :return_value);
+      return;
+    }
+    on dynamic catch(dynamic exception, core::StackTrace stack_trace) {
+      :async_completer.{asy::Completer::completeError}(exception, stack_trace);
+    }
+  :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
+  :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
+  :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
+  :async_completer.{asy::_AsyncAwaitCompleter::start}(:async_op);
+  return :async_completer.{asy::Completer::future};
+}
+static method customErrorZone() → asy::Future<void> /* originally async */ {
+  final asy::_AsyncAwaitCompleter<void> :async_completer = new asy::_AsyncAwaitCompleter::•<void>();
+  FutureOr<void>? :return_value;
+  dynamic :async_stack_trace;
+  (dynamic) → dynamic :async_op_then;
+  (core::Object, core::StackTrace) → dynamic :async_op_error;
+  core::int :await_jump_var = 0;
+  dynamic :await_ctx_var;
+  function :async_op([dynamic :result, dynamic :exception, dynamic :stack_trace]) → dynamic yielding 
+    try {
+      #L4:
+      {
+        final asy::Completer<void> completer = asy::Completer::•<void>();
+        asy::runZonedGuarded<asy::Future<core::Null?>>(() → asy::Future<core::Null?> /* originally async */ {
+          final asy::_AsyncAwaitCompleter<core::Null?> :async_completer = new asy::_AsyncAwaitCompleter::•<core::Null?>();
+          FutureOr<core::Null?>? :return_value;
+          dynamic :async_stack_trace;
+          (dynamic) → dynamic :async_op_then;
+          (core::Object, core::StackTrace) → dynamic :async_op_error;
+          core::int :await_jump_var = 0;
+          dynamic :await_ctx_var;
+          dynamic :saved_try_context_var0;
+          function :async_op([dynamic :result, dynamic :exception, dynamic :stack_trace]) → dynamic yielding 
+            try {
+              #L5:
+              {
+                [yield] let dynamic #t6 = asy::_awaitHelper(self::allYield(), :async_op_then, :async_op_error, :async_op) in null;
+                _in::unsafeCast<void>(:result);
+                completer.{asy::Completer::complete}(null);
+              }
+              asy::_completeOnAsyncReturn(:async_completer, :return_value);
+              return;
+            }
+            on dynamic catch(dynamic exception, core::StackTrace stack_trace) {
+              :async_completer.{asy::Completer::completeError}(exception, stack_trace);
+            }
+          :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
+          :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
+          :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
+          :async_completer.{asy::_AsyncAwaitCompleter::start}(:async_op);
+          return :async_completer.{asy::Completer::future};
+        }, (core::Object e, core::StackTrace s) → core::Null? {
+          completer.{asy::Completer::completeError}(e, s);
+        });
+        :return_value = completer.{asy::Completer::future};
+        break #L4;
+      }
+      asy::_completeOnAsyncReturn(:async_completer, :return_value);
+      return;
+    }
+    on dynamic catch(dynamic exception, core::StackTrace stack_trace) {
+      :async_completer.{asy::Completer::completeError}(exception, stack_trace);
+    }
+  :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
+  :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
+  :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
+  :async_completer.{asy::_AsyncAwaitCompleter::start}(:async_op);
+  return :async_completer.{asy::Completer::future};
+}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/nnbd/return_async.dart.textual_outline.expect b/pkg/front_end/testcases/nnbd/return_async.dart.textual_outline.expect
new file mode 100644
index 0000000..cb9684f
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/return_async.dart.textual_outline.expect
@@ -0,0 +1,8 @@
+import 'dart:async';
+
+Future<void> throwSync() {}
+Future<void> allYield() async {}
+Future<void> allYield2() async {}
+Future<void> allYield3() async {}
+Future<void> customErrorZone() async {}
+main() {}
diff --git a/pkg/front_end/testcases/nnbd/return_async.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/nnbd/return_async.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..0f39b9a
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/return_async.dart.textual_outline_modelled.expect
@@ -0,0 +1,8 @@
+import 'dart:async';
+
+Future<void> allYield() async {}
+Future<void> allYield2() async {}
+Future<void> allYield3() async {}
+Future<void> customErrorZone() async {}
+Future<void> throwSync() {}
+main() {}
diff --git a/pkg/front_end/testcases/nnbd/return_async.dart.weak.expect b/pkg/front_end/testcases/nnbd/return_async.dart.weak.expect
new file mode 100644
index 0000000..2c9322b
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/return_async.dart.weak.expect
@@ -0,0 +1,33 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:async" as asy;
+import "dart:core" as core;
+
+import "dart:async";
+
+static method throwSync() → asy::Future<void> {
+  throw "";
+}
+static method allYield() → asy::Future<void> async {
+  await 0;
+  await self::allYield2();
+}
+static method allYield2() → asy::Future<void> async {
+  await 0;
+  await self::allYield3();
+}
+static method allYield3() → asy::Future<void> async {
+  await 0;
+  self::throwSync();
+}
+static method customErrorZone() → asy::Future<void> async {
+  final asy::Completer<void> completer = asy::Completer::•<void>();
+  asy::runZonedGuarded<asy::Future<core::Null?>>(() → asy::Future<core::Null?> async {
+    await self::allYield();
+    completer.{asy::Completer::complete}(null);
+  }, (core::Object e, core::StackTrace s) → core::Null? {
+    completer.{asy::Completer::completeError}(e, s);
+  });
+  return completer.{asy::Completer::future};
+}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/nnbd/return_async.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd/return_async.dart.weak.transformed.expect
new file mode 100644
index 0000000..ae00b67
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/return_async.dart.weak.transformed.expect
@@ -0,0 +1,160 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:async" as asy;
+import "dart:core" as core;
+import "dart:_internal" as _in;
+
+import "dart:async";
+
+static method throwSync() → asy::Future<void> {
+  throw "";
+}
+static method allYield() → asy::Future<void> /* originally async */ {
+  final asy::_AsyncAwaitCompleter<void> :async_completer = new asy::_AsyncAwaitCompleter::•<void>();
+  FutureOr<void>? :return_value;
+  dynamic :async_stack_trace;
+  (dynamic) → dynamic :async_op_then;
+  (core::Object, core::StackTrace) → dynamic :async_op_error;
+  core::int :await_jump_var = 0;
+  dynamic :await_ctx_var;
+  dynamic :saved_try_context_var0;
+  function :async_op([dynamic :result, dynamic :exception, dynamic :stack_trace]) → dynamic yielding 
+    try {
+      #L1:
+      {
+        [yield] let dynamic #t1 = asy::_awaitHelper(0, :async_op_then, :async_op_error, :async_op) in null;
+        _in::unsafeCast<core::int>(:result);
+        [yield] let dynamic #t2 = asy::_awaitHelper(self::allYield2(), :async_op_then, :async_op_error, :async_op) in null;
+        _in::unsafeCast<void>(:result);
+      }
+      asy::_completeOnAsyncReturn(:async_completer, :return_value);
+      return;
+    }
+    on dynamic catch(dynamic exception, core::StackTrace stack_trace) {
+      :async_completer.{asy::Completer::completeError}(exception, stack_trace);
+    }
+  :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
+  :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
+  :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
+  :async_completer.{asy::_AsyncAwaitCompleter::start}(:async_op);
+  return :async_completer.{asy::Completer::future};
+}
+static method allYield2() → asy::Future<void> /* originally async */ {
+  final asy::_AsyncAwaitCompleter<void> :async_completer = new asy::_AsyncAwaitCompleter::•<void>();
+  FutureOr<void>? :return_value;
+  dynamic :async_stack_trace;
+  (dynamic) → dynamic :async_op_then;
+  (core::Object, core::StackTrace) → dynamic :async_op_error;
+  core::int :await_jump_var = 0;
+  dynamic :await_ctx_var;
+  dynamic :saved_try_context_var0;
+  function :async_op([dynamic :result, dynamic :exception, dynamic :stack_trace]) → dynamic yielding 
+    try {
+      #L2:
+      {
+        [yield] let dynamic #t3 = asy::_awaitHelper(0, :async_op_then, :async_op_error, :async_op) in null;
+        _in::unsafeCast<core::int>(:result);
+        [yield] let dynamic #t4 = asy::_awaitHelper(self::allYield3(), :async_op_then, :async_op_error, :async_op) in null;
+        _in::unsafeCast<void>(:result);
+      }
+      asy::_completeOnAsyncReturn(:async_completer, :return_value);
+      return;
+    }
+    on dynamic catch(dynamic exception, core::StackTrace stack_trace) {
+      :async_completer.{asy::Completer::completeError}(exception, stack_trace);
+    }
+  :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
+  :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
+  :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
+  :async_completer.{asy::_AsyncAwaitCompleter::start}(:async_op);
+  return :async_completer.{asy::Completer::future};
+}
+static method allYield3() → asy::Future<void> /* originally async */ {
+  final asy::_AsyncAwaitCompleter<void> :async_completer = new asy::_AsyncAwaitCompleter::•<void>();
+  FutureOr<void>? :return_value;
+  dynamic :async_stack_trace;
+  (dynamic) → dynamic :async_op_then;
+  (core::Object, core::StackTrace) → dynamic :async_op_error;
+  core::int :await_jump_var = 0;
+  dynamic :await_ctx_var;
+  dynamic :saved_try_context_var0;
+  function :async_op([dynamic :result, dynamic :exception, dynamic :stack_trace]) → dynamic yielding 
+    try {
+      #L3:
+      {
+        [yield] let dynamic #t5 = asy::_awaitHelper(0, :async_op_then, :async_op_error, :async_op) in null;
+        _in::unsafeCast<core::int>(:result);
+        self::throwSync();
+      }
+      asy::_completeOnAsyncReturn(:async_completer, :return_value);
+      return;
+    }
+    on dynamic catch(dynamic exception, core::StackTrace stack_trace) {
+      :async_completer.{asy::Completer::completeError}(exception, stack_trace);
+    }
+  :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
+  :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
+  :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
+  :async_completer.{asy::_AsyncAwaitCompleter::start}(:async_op);
+  return :async_completer.{asy::Completer::future};
+}
+static method customErrorZone() → asy::Future<void> /* originally async */ {
+  final asy::_AsyncAwaitCompleter<void> :async_completer = new asy::_AsyncAwaitCompleter::•<void>();
+  FutureOr<void>? :return_value;
+  dynamic :async_stack_trace;
+  (dynamic) → dynamic :async_op_then;
+  (core::Object, core::StackTrace) → dynamic :async_op_error;
+  core::int :await_jump_var = 0;
+  dynamic :await_ctx_var;
+  function :async_op([dynamic :result, dynamic :exception, dynamic :stack_trace]) → dynamic yielding 
+    try {
+      #L4:
+      {
+        final asy::Completer<void> completer = asy::Completer::•<void>();
+        asy::runZonedGuarded<asy::Future<core::Null?>>(() → asy::Future<core::Null?> /* originally async */ {
+          final asy::_AsyncAwaitCompleter<core::Null?> :async_completer = new asy::_AsyncAwaitCompleter::•<core::Null?>();
+          FutureOr<core::Null?>? :return_value;
+          dynamic :async_stack_trace;
+          (dynamic) → dynamic :async_op_then;
+          (core::Object, core::StackTrace) → dynamic :async_op_error;
+          core::int :await_jump_var = 0;
+          dynamic :await_ctx_var;
+          dynamic :saved_try_context_var0;
+          function :async_op([dynamic :result, dynamic :exception, dynamic :stack_trace]) → dynamic yielding 
+            try {
+              #L5:
+              {
+                [yield] let dynamic #t6 = asy::_awaitHelper(self::allYield(), :async_op_then, :async_op_error, :async_op) in null;
+                _in::unsafeCast<void>(:result);
+                completer.{asy::Completer::complete}(null);
+              }
+              asy::_completeOnAsyncReturn(:async_completer, :return_value);
+              return;
+            }
+            on dynamic catch(dynamic exception, core::StackTrace stack_trace) {
+              :async_completer.{asy::Completer::completeError}(exception, stack_trace);
+            }
+          :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
+          :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
+          :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
+          :async_completer.{asy::_AsyncAwaitCompleter::start}(:async_op);
+          return :async_completer.{asy::Completer::future};
+        }, (core::Object e, core::StackTrace s) → core::Null? {
+          completer.{asy::Completer::completeError}(e, s);
+        });
+        :return_value = completer.{asy::Completer::future};
+        break #L4;
+      }
+      asy::_completeOnAsyncReturn(:async_completer, :return_value);
+      return;
+    }
+    on dynamic catch(dynamic exception, core::StackTrace stack_trace) {
+      :async_completer.{asy::Completer::completeError}(exception, stack_trace);
+    }
+  :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
+  :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
+  :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
+  :async_completer.{asy::_AsyncAwaitCompleter::start}(:async_op);
+  return :async_completer.{asy::Completer::future};
+}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/nnbd/return_null.dart.outline.expect b/pkg/front_end/testcases/nnbd/return_null.dart.outline.expect
index db5d4bcf..3fc7c86 100644
--- a/pkg/front_end/testcases/nnbd/return_null.dart.outline.expect
+++ b/pkg/front_end/testcases/nnbd/return_null.dart.outline.expect
@@ -23,23 +23,23 @@
   ;
 static method returnMixed(core::bool b) → core::String
   ;
-static method returnAsync1() → asy::Future<dynamic>
+static method returnAsync1() → asy::Future<dynamic> async 
   ;
-static method returnAsync2() → FutureOr<dynamic>
+static method returnAsync2() → FutureOr<dynamic> async 
   ;
-static method returnAsync3() → FutureOr<core::int>
+static method returnAsync3() → FutureOr<core::int> async 
   ;
-static method returnAsync4() → FutureOr<core::int?>
+static method returnAsync4() → FutureOr<core::int?> async 
   ;
-static method returnAsync5() → dynamic
+static method returnAsync5() → dynamic async 
   ;
-static method returnAsync6() → asy::Future<core::int?>
+static method returnAsync6() → asy::Future<core::int?> async 
   ;
-static method returnAsync7() → asy::Future<core::int?>
+static method returnAsync7() → asy::Future<core::int?> async 
   ;
-static method yieldSync() → core::Iterable<dynamic>
+static method yieldSync() → core::Iterable<dynamic> sync* 
   ;
-static method yieldAsync() → asy::Stream<dynamic>
+static method yieldAsync() → asy::Stream<dynamic> async* 
   ;
 static method caseReturn1(self::Enum e) → self::Enum
   ;
diff --git a/pkg/front_end/testcases/nnbd/spread_if_null.dart b/pkg/front_end/testcases/nnbd/spread_if_null.dart
new file mode 100644
index 0000000..d8b15de
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/spread_if_null.dart
@@ -0,0 +1,27 @@
+// Copyright (c) 2020, the Dart project authors. Please see the AUTHORS file
+// for 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() {
+  List<int>? list = null;
+  print(<int>[1, 2, ...?list, 3]);
+  print(<int>[1, 2, ...?null, 3]);
+  var list1 = [...?list];
+  var list2 = [...?null];
+  var list3 = [1, 2, ...?list, 3];
+  var list4 = [1, 2, ...?null, 3];
+
+  Set<int>? set = null;
+  print(<int>{1, 2, ...?set, 3});
+  print(<int>{1, 2, ...?null, 3});
+  var set1 = {...?set};
+  var set3 = {1, 2, ...?set, 3};
+  var set4 = {1, 2, ...?null, 3};
+
+  Map<int, int>? map = null;
+  print(<int, int>{1: 1, 2: 2, ...?map, 3: 3});
+  print(<int, int>{1: 1, 2: 2, ...?null, 3: 3});
+  var map1 = {...?map};
+  var map3 = {1: 1, 2: 2, ...?map, 3: 3};
+  var map4 = {1: 1, 2: 2, ...?null, 3: 3};
+}
diff --git a/pkg/front_end/testcases/nnbd/spread_if_null.dart.outline.expect b/pkg/front_end/testcases/nnbd/spread_if_null.dart.outline.expect
new file mode 100644
index 0000000..e2cba6b
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/spread_if_null.dart.outline.expect
@@ -0,0 +1,5 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+
+static method main() → dynamic
+  ;
diff --git a/pkg/front_end/testcases/nnbd/spread_if_null.dart.strong.expect b/pkg/front_end/testcases/nnbd/spread_if_null.dart.strong.expect
new file mode 100644
index 0000000..04612a2
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/spread_if_null.dart.strong.expect
@@ -0,0 +1,160 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+import "dart:collection" as col;
+
+static method main() → dynamic {
+  core::List<core::int>? list = null;
+  core::print( block {
+    final core::List<core::int> #t1 = <core::int>[];
+    #t1.{core::List::add}(1);
+    #t1.{core::List::add}(2);
+    final core::Iterable<core::int>? #t2 = list;
+    if(!#t2.{core::Object::==}(null))
+      for (final core::int #t3 in #t2{core::Iterable<core::int>})
+        #t1.{core::List::add}(#t3);
+    #t1.{core::List::add}(3);
+  } =>#t1);
+  core::print( block {
+    final core::List<core::int> #t4 = <core::int>[];
+    #t4.{core::List::add}(1);
+    #t4.{core::List::add}(2);
+    final core::Iterable<core::int>? #t5 = null;
+    if(!#t5.{core::Object::==}(null))
+      for (final core::int #t6 in #t5{core::Iterable<core::int>})
+        #t4.{core::List::add}(#t6);
+    #t4.{core::List::add}(3);
+  } =>#t4);
+  core::List<core::int> list1 = block {
+    final core::List<core::int> #t7 = <core::int>[];
+    final core::Iterable<core::int>? #t8 = list;
+    if(!#t8.{core::Object::==}(null))
+      for (final core::int #t9 in #t8{core::Iterable<core::int>})
+        #t7.{core::List::add}(#t9);
+  } =>#t7;
+  core::List<Never> list2 = block {
+    final core::List<Never> #t10 = <Never>[];
+    final core::Iterable<Never>? #t11 = null;
+    if(!#t11.{core::Object::==}(null))
+      for (final Never #t12 in #t11{core::Iterable<Never>})
+        #t10.{core::List::add}(#t12);
+  } =>#t10;
+  core::List<core::int> list3 = block {
+    final core::List<core::int> #t13 = <core::int>[];
+    #t13.{core::List::add}(1);
+    #t13.{core::List::add}(2);
+    final core::Iterable<core::int>? #t14 = list;
+    if(!#t14.{core::Object::==}(null))
+      for (final core::int #t15 in #t14{core::Iterable<core::int>})
+        #t13.{core::List::add}(#t15);
+    #t13.{core::List::add}(3);
+  } =>#t13;
+  core::List<core::int> list4 = block {
+    final core::List<core::int> #t16 = <core::int>[];
+    #t16.{core::List::add}(1);
+    #t16.{core::List::add}(2);
+    final core::Iterable<core::int>? #t17 = null;
+    if(!#t17.{core::Object::==}(null))
+      for (final core::int #t18 in #t17{core::Iterable<core::int>})
+        #t16.{core::List::add}(#t18);
+    #t16.{core::List::add}(3);
+  } =>#t16;
+  core::Set<core::int>? set = null;
+  core::print( block {
+    final core::Set<core::int> #t19 = col::LinkedHashSet::•<core::int>();
+    #t19.{core::Set::add}(1);
+    #t19.{core::Set::add}(2);
+    final core::Iterable<core::int>? #t20 = set;
+    if(!#t20.{core::Object::==}(null))
+      for (final core::int #t21 in #t20{core::Iterable<core::int>})
+        #t19.{core::Set::add}(#t21);
+    #t19.{core::Set::add}(3);
+  } =>#t19);
+  core::print( block {
+    final core::Set<core::int> #t22 = col::LinkedHashSet::•<core::int>();
+    #t22.{core::Set::add}(1);
+    #t22.{core::Set::add}(2);
+    final core::Iterable<core::int>? #t23 = null;
+    if(!#t23.{core::Object::==}(null))
+      for (final core::int #t24 in #t23{core::Iterable<core::int>})
+        #t22.{core::Set::add}(#t24);
+    #t22.{core::Set::add}(3);
+  } =>#t22);
+  core::Set<core::int> set1 = block {
+    final core::Set<core::int> #t25 = col::LinkedHashSet::•<core::int>();
+    final core::Iterable<dynamic>? #t26 = set;
+    if(!#t26.{core::Object::==}(null))
+      for (final dynamic #t27 in #t26{core::Iterable<dynamic>}) {
+        final core::int #t28 = #t27 as{TypeError,ForNonNullableByDefault} core::int;
+        #t25.{core::Set::add}(#t28);
+      }
+  } =>#t25;
+  core::Set<core::int> set3 = block {
+    final core::Set<core::int> #t29 = col::LinkedHashSet::•<core::int>();
+    #t29.{core::Set::add}(1);
+    #t29.{core::Set::add}(2);
+    final core::Iterable<core::int>? #t30 = set;
+    if(!#t30.{core::Object::==}(null))
+      for (final core::int #t31 in #t30{core::Iterable<core::int>})
+        #t29.{core::Set::add}(#t31);
+    #t29.{core::Set::add}(3);
+  } =>#t29;
+  core::Set<core::int> set4 = block {
+    final core::Set<core::int> #t32 = col::LinkedHashSet::•<core::int>();
+    #t32.{core::Set::add}(1);
+    #t32.{core::Set::add}(2);
+    final core::Iterable<core::int>? #t33 = null;
+    if(!#t33.{core::Object::==}(null))
+      for (final core::int #t34 in #t33{core::Iterable<core::int>})
+        #t32.{core::Set::add}(#t34);
+    #t32.{core::Set::add}(3);
+  } =>#t32;
+  core::Map<core::int, core::int>? map = null;
+  core::print( block {
+    final core::Map<core::int, core::int> #t35 = <core::int, core::int>{};
+    #t35.{core::Map::[]=}(1, 1);
+    #t35.{core::Map::[]=}(2, 2);
+    final core::Map<core::int, core::int>? #t36 = map;
+    if(!#t36.{core::Object::==}(null))
+      for (final core::MapEntry<core::int, core::int> #t37 in #t36{core::Map<core::int, core::int>}.{core::Map::entries})
+        #t35.{core::Map::[]=}(#t37.{core::MapEntry::key}, #t37.{core::MapEntry::value});
+    #t35.{core::Map::[]=}(3, 3);
+  } =>#t35);
+  core::print( block {
+    final core::Map<core::int, core::int> #t38 = <core::int, core::int>{};
+    #t38.{core::Map::[]=}(1, 1);
+    #t38.{core::Map::[]=}(2, 2);
+    final core::Map<core::int, core::int>? #t39 = null;
+    if(!#t39.{core::Object::==}(null))
+      for (final core::MapEntry<core::int, core::int> #t40 in #t39{core::Map<core::int, core::int>}.{core::Map::entries})
+        #t38.{core::Map::[]=}(#t40.{core::MapEntry::key}, #t40.{core::MapEntry::value});
+    #t38.{core::Map::[]=}(3, 3);
+  } =>#t38);
+  core::Map<core::int, core::int> map1 = block {
+    final core::Map<core::int, core::int> #t41 = <core::int, core::int>{};
+    final core::Map<core::int, core::int>? #t42 = map;
+    if(!#t42.{core::Object::==}(null))
+      for (final core::MapEntry<core::int, core::int> #t43 in #t42{core::Map<core::int, core::int>}.{core::Map::entries})
+        #t41.{core::Map::[]=}(#t43.{core::MapEntry::key}, #t43.{core::MapEntry::value});
+  } =>#t41;
+  core::Map<core::int, core::int> map3 = block {
+    final core::Map<core::int, core::int> #t44 = <core::int, core::int>{};
+    #t44.{core::Map::[]=}(1, 1);
+    #t44.{core::Map::[]=}(2, 2);
+    final core::Map<core::int, core::int>? #t45 = map;
+    if(!#t45.{core::Object::==}(null))
+      for (final core::MapEntry<core::int, core::int> #t46 in #t45{core::Map<core::int, core::int>}.{core::Map::entries})
+        #t44.{core::Map::[]=}(#t46.{core::MapEntry::key}, #t46.{core::MapEntry::value});
+    #t44.{core::Map::[]=}(3, 3);
+  } =>#t44;
+  core::Map<core::int, core::int> map4 = block {
+    final core::Map<core::int, core::int> #t47 = <core::int, core::int>{};
+    #t47.{core::Map::[]=}(1, 1);
+    #t47.{core::Map::[]=}(2, 2);
+    final core::Map<core::int, core::int>? #t48 = null;
+    if(!#t48.{core::Object::==}(null))
+      for (final core::MapEntry<core::int, core::int> #t49 in #t48{core::Map<core::int, core::int>}.{core::Map::entries})
+        #t47.{core::Map::[]=}(#t49.{core::MapEntry::key}, #t49.{core::MapEntry::value});
+    #t47.{core::Map::[]=}(3, 3);
+  } =>#t47;
+}
diff --git a/pkg/front_end/testcases/nnbd/spread_if_null.dart.strong.transformed.expect b/pkg/front_end/testcases/nnbd/spread_if_null.dart.strong.transformed.expect
new file mode 100644
index 0000000..04ff3fd
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/spread_if_null.dart.strong.transformed.expect
@@ -0,0 +1,225 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+import "dart:collection" as col;
+
+static method main() → dynamic {
+  core::List<core::int>? list = null;
+  core::print( block {
+    final core::List<core::int> #t1 = <core::int>[];
+    #t1.{core::List::add}(1);
+    #t1.{core::List::add}(2);
+    final core::Iterable<core::int>? #t2 = list;
+    if(!#t2.{core::Object::==}(null)) {
+      core::Iterator<core::int> :sync-for-iterator = #t2{core::Iterable<core::int>}.{core::Iterable::iterator};
+      for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
+        final core::int #t3 = :sync-for-iterator.{core::Iterator::current};
+        #t1.{core::List::add}(#t3);
+      }
+    }
+    #t1.{core::List::add}(3);
+  } =>#t1);
+  core::print( block {
+    final core::List<core::int> #t4 = <core::int>[];
+    #t4.{core::List::add}(1);
+    #t4.{core::List::add}(2);
+    final core::Iterable<core::int>? #t5 = null;
+    if(!#t5.{core::Object::==}(null)) {
+      core::Iterator<core::int> :sync-for-iterator = #t5{core::Iterable<core::int>}.{core::Iterable::iterator};
+      for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
+        final core::int #t6 = :sync-for-iterator.{core::Iterator::current};
+        #t4.{core::List::add}(#t6);
+      }
+    }
+    #t4.{core::List::add}(3);
+  } =>#t4);
+  core::List<core::int> list1 = block {
+    final core::List<core::int> #t7 = <core::int>[];
+    final core::Iterable<core::int>? #t8 = list;
+    if(!#t8.{core::Object::==}(null)) {
+      core::Iterator<core::int> :sync-for-iterator = #t8{core::Iterable<core::int>}.{core::Iterable::iterator};
+      for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
+        final core::int #t9 = :sync-for-iterator.{core::Iterator::current};
+        #t7.{core::List::add}(#t9);
+      }
+    }
+  } =>#t7;
+  core::List<Never> list2 = block {
+    final core::List<Never> #t10 = <Never>[];
+    final core::Iterable<Never>? #t11 = null;
+    if(!#t11.{core::Object::==}(null)) {
+      core::Iterator<Never> :sync-for-iterator = #t11{core::Iterable<Never>}.{core::Iterable::iterator};
+      for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
+        final Never #t12 = :sync-for-iterator.{core::Iterator::current};
+        #t10.{core::List::add}(#t12);
+      }
+    }
+  } =>#t10;
+  core::List<core::int> list3 = block {
+    final core::List<core::int> #t13 = <core::int>[];
+    #t13.{core::List::add}(1);
+    #t13.{core::List::add}(2);
+    final core::Iterable<core::int>? #t14 = list;
+    if(!#t14.{core::Object::==}(null)) {
+      core::Iterator<core::int> :sync-for-iterator = #t14{core::Iterable<core::int>}.{core::Iterable::iterator};
+      for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
+        final core::int #t15 = :sync-for-iterator.{core::Iterator::current};
+        #t13.{core::List::add}(#t15);
+      }
+    }
+    #t13.{core::List::add}(3);
+  } =>#t13;
+  core::List<core::int> list4 = block {
+    final core::List<core::int> #t16 = <core::int>[];
+    #t16.{core::List::add}(1);
+    #t16.{core::List::add}(2);
+    final core::Iterable<core::int>? #t17 = null;
+    if(!#t17.{core::Object::==}(null)) {
+      core::Iterator<core::int> :sync-for-iterator = #t17{core::Iterable<core::int>}.{core::Iterable::iterator};
+      for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
+        final core::int #t18 = :sync-for-iterator.{core::Iterator::current};
+        #t16.{core::List::add}(#t18);
+      }
+    }
+    #t16.{core::List::add}(3);
+  } =>#t16;
+  core::Set<core::int>? set = null;
+  core::print( block {
+    final core::Set<core::int> #t19 = col::LinkedHashSet::•<core::int>();
+    #t19.{core::Set::add}(1);
+    #t19.{core::Set::add}(2);
+    final core::Iterable<core::int>? #t20 = set;
+    if(!#t20.{core::Object::==}(null)) {
+      core::Iterator<core::int> :sync-for-iterator = #t20{core::Iterable<core::int>}.{core::Iterable::iterator};
+      for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
+        final core::int #t21 = :sync-for-iterator.{core::Iterator::current};
+        #t19.{core::Set::add}(#t21);
+      }
+    }
+    #t19.{core::Set::add}(3);
+  } =>#t19);
+  core::print( block {
+    final core::Set<core::int> #t22 = col::LinkedHashSet::•<core::int>();
+    #t22.{core::Set::add}(1);
+    #t22.{core::Set::add}(2);
+    final core::Iterable<core::int>? #t23 = null;
+    if(!#t23.{core::Object::==}(null)) {
+      core::Iterator<core::int> :sync-for-iterator = #t23{core::Iterable<core::int>}.{core::Iterable::iterator};
+      for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
+        final core::int #t24 = :sync-for-iterator.{core::Iterator::current};
+        #t22.{core::Set::add}(#t24);
+      }
+    }
+    #t22.{core::Set::add}(3);
+  } =>#t22);
+  core::Set<core::int> set1 = block {
+    final core::Set<core::int> #t25 = col::LinkedHashSet::•<core::int>();
+    final core::Iterable<dynamic>? #t26 = set;
+    if(!#t26.{core::Object::==}(null)) {
+      core::Iterator<dynamic> :sync-for-iterator = #t26{core::Iterable<dynamic>}.{core::Iterable::iterator};
+      for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
+        final dynamic #t27 = :sync-for-iterator.{core::Iterator::current};
+        {
+          final core::int #t28 = #t27 as{TypeError,ForNonNullableByDefault} core::int;
+          #t25.{core::Set::add}(#t28);
+        }
+      }
+    }
+  } =>#t25;
+  core::Set<core::int> set3 = block {
+    final core::Set<core::int> #t29 = col::LinkedHashSet::•<core::int>();
+    #t29.{core::Set::add}(1);
+    #t29.{core::Set::add}(2);
+    final core::Iterable<core::int>? #t30 = set;
+    if(!#t30.{core::Object::==}(null)) {
+      core::Iterator<core::int> :sync-for-iterator = #t30{core::Iterable<core::int>}.{core::Iterable::iterator};
+      for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
+        final core::int #t31 = :sync-for-iterator.{core::Iterator::current};
+        #t29.{core::Set::add}(#t31);
+      }
+    }
+    #t29.{core::Set::add}(3);
+  } =>#t29;
+  core::Set<core::int> set4 = block {
+    final core::Set<core::int> #t32 = col::LinkedHashSet::•<core::int>();
+    #t32.{core::Set::add}(1);
+    #t32.{core::Set::add}(2);
+    final core::Iterable<core::int>? #t33 = null;
+    if(!#t33.{core::Object::==}(null)) {
+      core::Iterator<core::int> :sync-for-iterator = #t33{core::Iterable<core::int>}.{core::Iterable::iterator};
+      for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
+        final core::int #t34 = :sync-for-iterator.{core::Iterator::current};
+        #t32.{core::Set::add}(#t34);
+      }
+    }
+    #t32.{core::Set::add}(3);
+  } =>#t32;
+  core::Map<core::int, core::int>? map = null;
+  core::print( block {
+    final core::Map<core::int, core::int> #t35 = <core::int, core::int>{};
+    #t35.{core::Map::[]=}(1, 1);
+    #t35.{core::Map::[]=}(2, 2);
+    final core::Map<core::int, core::int>? #t36 = map;
+    if(!#t36.{core::Object::==}(null)) {
+      core::Iterator<core::MapEntry<core::int, core::int>> :sync-for-iterator = #t36{core::Map<core::int, core::int>}.{core::Map::entries}.{core::Iterable::iterator};
+      for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
+        final core::MapEntry<core::int, core::int> #t37 = :sync-for-iterator.{core::Iterator::current};
+        #t35.{core::Map::[]=}(#t37.{core::MapEntry::key}, #t37.{core::MapEntry::value});
+      }
+    }
+    #t35.{core::Map::[]=}(3, 3);
+  } =>#t35);
+  core::print( block {
+    final core::Map<core::int, core::int> #t38 = <core::int, core::int>{};
+    #t38.{core::Map::[]=}(1, 1);
+    #t38.{core::Map::[]=}(2, 2);
+    final core::Map<core::int, core::int>? #t39 = null;
+    if(!#t39.{core::Object::==}(null)) {
+      core::Iterator<core::MapEntry<core::int, core::int>> :sync-for-iterator = #t39{core::Map<core::int, core::int>}.{core::Map::entries}.{core::Iterable::iterator};
+      for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
+        final core::MapEntry<core::int, core::int> #t40 = :sync-for-iterator.{core::Iterator::current};
+        #t38.{core::Map::[]=}(#t40.{core::MapEntry::key}, #t40.{core::MapEntry::value});
+      }
+    }
+    #t38.{core::Map::[]=}(3, 3);
+  } =>#t38);
+  core::Map<core::int, core::int> map1 = block {
+    final core::Map<core::int, core::int> #t41 = <core::int, core::int>{};
+    final core::Map<core::int, core::int>? #t42 = map;
+    if(!#t42.{core::Object::==}(null)) {
+      core::Iterator<core::MapEntry<core::int, core::int>> :sync-for-iterator = #t42{core::Map<core::int, core::int>}.{core::Map::entries}.{core::Iterable::iterator};
+      for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
+        final core::MapEntry<core::int, core::int> #t43 = :sync-for-iterator.{core::Iterator::current};
+        #t41.{core::Map::[]=}(#t43.{core::MapEntry::key}, #t43.{core::MapEntry::value});
+      }
+    }
+  } =>#t41;
+  core::Map<core::int, core::int> map3 = block {
+    final core::Map<core::int, core::int> #t44 = <core::int, core::int>{};
+    #t44.{core::Map::[]=}(1, 1);
+    #t44.{core::Map::[]=}(2, 2);
+    final core::Map<core::int, core::int>? #t45 = map;
+    if(!#t45.{core::Object::==}(null)) {
+      core::Iterator<core::MapEntry<core::int, core::int>> :sync-for-iterator = #t45{core::Map<core::int, core::int>}.{core::Map::entries}.{core::Iterable::iterator};
+      for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
+        final core::MapEntry<core::int, core::int> #t46 = :sync-for-iterator.{core::Iterator::current};
+        #t44.{core::Map::[]=}(#t46.{core::MapEntry::key}, #t46.{core::MapEntry::value});
+      }
+    }
+    #t44.{core::Map::[]=}(3, 3);
+  } =>#t44;
+  core::Map<core::int, core::int> map4 = block {
+    final core::Map<core::int, core::int> #t47 = <core::int, core::int>{};
+    #t47.{core::Map::[]=}(1, 1);
+    #t47.{core::Map::[]=}(2, 2);
+    final core::Map<core::int, core::int>? #t48 = null;
+    if(!#t48.{core::Object::==}(null)) {
+      core::Iterator<core::MapEntry<core::int, core::int>> :sync-for-iterator = #t48{core::Map<core::int, core::int>}.{core::Map::entries}.{core::Iterable::iterator};
+      for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
+        final core::MapEntry<core::int, core::int> #t49 = :sync-for-iterator.{core::Iterator::current};
+        #t47.{core::Map::[]=}(#t49.{core::MapEntry::key}, #t49.{core::MapEntry::value});
+      }
+    }
+    #t47.{core::Map::[]=}(3, 3);
+  } =>#t47;
+}
diff --git a/pkg/front_end/testcases/nnbd/spread_if_null.dart.textual_outline.expect b/pkg/front_end/testcases/nnbd/spread_if_null.dart.textual_outline.expect
new file mode 100644
index 0000000..bae895a
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/spread_if_null.dart.textual_outline.expect
@@ -0,0 +1 @@
+main() {}
diff --git a/pkg/front_end/testcases/nnbd/spread_if_null.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/nnbd/spread_if_null.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..bae895a
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/spread_if_null.dart.textual_outline_modelled.expect
@@ -0,0 +1 @@
+main() {}
diff --git a/pkg/front_end/testcases/nnbd/spread_if_null.dart.weak.expect b/pkg/front_end/testcases/nnbd/spread_if_null.dart.weak.expect
new file mode 100644
index 0000000..04612a2
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/spread_if_null.dart.weak.expect
@@ -0,0 +1,160 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+import "dart:collection" as col;
+
+static method main() → dynamic {
+  core::List<core::int>? list = null;
+  core::print( block {
+    final core::List<core::int> #t1 = <core::int>[];
+    #t1.{core::List::add}(1);
+    #t1.{core::List::add}(2);
+    final core::Iterable<core::int>? #t2 = list;
+    if(!#t2.{core::Object::==}(null))
+      for (final core::int #t3 in #t2{core::Iterable<core::int>})
+        #t1.{core::List::add}(#t3);
+    #t1.{core::List::add}(3);
+  } =>#t1);
+  core::print( block {
+    final core::List<core::int> #t4 = <core::int>[];
+    #t4.{core::List::add}(1);
+    #t4.{core::List::add}(2);
+    final core::Iterable<core::int>? #t5 = null;
+    if(!#t5.{core::Object::==}(null))
+      for (final core::int #t6 in #t5{core::Iterable<core::int>})
+        #t4.{core::List::add}(#t6);
+    #t4.{core::List::add}(3);
+  } =>#t4);
+  core::List<core::int> list1 = block {
+    final core::List<core::int> #t7 = <core::int>[];
+    final core::Iterable<core::int>? #t8 = list;
+    if(!#t8.{core::Object::==}(null))
+      for (final core::int #t9 in #t8{core::Iterable<core::int>})
+        #t7.{core::List::add}(#t9);
+  } =>#t7;
+  core::List<Never> list2 = block {
+    final core::List<Never> #t10 = <Never>[];
+    final core::Iterable<Never>? #t11 = null;
+    if(!#t11.{core::Object::==}(null))
+      for (final Never #t12 in #t11{core::Iterable<Never>})
+        #t10.{core::List::add}(#t12);
+  } =>#t10;
+  core::List<core::int> list3 = block {
+    final core::List<core::int> #t13 = <core::int>[];
+    #t13.{core::List::add}(1);
+    #t13.{core::List::add}(2);
+    final core::Iterable<core::int>? #t14 = list;
+    if(!#t14.{core::Object::==}(null))
+      for (final core::int #t15 in #t14{core::Iterable<core::int>})
+        #t13.{core::List::add}(#t15);
+    #t13.{core::List::add}(3);
+  } =>#t13;
+  core::List<core::int> list4 = block {
+    final core::List<core::int> #t16 = <core::int>[];
+    #t16.{core::List::add}(1);
+    #t16.{core::List::add}(2);
+    final core::Iterable<core::int>? #t17 = null;
+    if(!#t17.{core::Object::==}(null))
+      for (final core::int #t18 in #t17{core::Iterable<core::int>})
+        #t16.{core::List::add}(#t18);
+    #t16.{core::List::add}(3);
+  } =>#t16;
+  core::Set<core::int>? set = null;
+  core::print( block {
+    final core::Set<core::int> #t19 = col::LinkedHashSet::•<core::int>();
+    #t19.{core::Set::add}(1);
+    #t19.{core::Set::add}(2);
+    final core::Iterable<core::int>? #t20 = set;
+    if(!#t20.{core::Object::==}(null))
+      for (final core::int #t21 in #t20{core::Iterable<core::int>})
+        #t19.{core::Set::add}(#t21);
+    #t19.{core::Set::add}(3);
+  } =>#t19);
+  core::print( block {
+    final core::Set<core::int> #t22 = col::LinkedHashSet::•<core::int>();
+    #t22.{core::Set::add}(1);
+    #t22.{core::Set::add}(2);
+    final core::Iterable<core::int>? #t23 = null;
+    if(!#t23.{core::Object::==}(null))
+      for (final core::int #t24 in #t23{core::Iterable<core::int>})
+        #t22.{core::Set::add}(#t24);
+    #t22.{core::Set::add}(3);
+  } =>#t22);
+  core::Set<core::int> set1 = block {
+    final core::Set<core::int> #t25 = col::LinkedHashSet::•<core::int>();
+    final core::Iterable<dynamic>? #t26 = set;
+    if(!#t26.{core::Object::==}(null))
+      for (final dynamic #t27 in #t26{core::Iterable<dynamic>}) {
+        final core::int #t28 = #t27 as{TypeError,ForNonNullableByDefault} core::int;
+        #t25.{core::Set::add}(#t28);
+      }
+  } =>#t25;
+  core::Set<core::int> set3 = block {
+    final core::Set<core::int> #t29 = col::LinkedHashSet::•<core::int>();
+    #t29.{core::Set::add}(1);
+    #t29.{core::Set::add}(2);
+    final core::Iterable<core::int>? #t30 = set;
+    if(!#t30.{core::Object::==}(null))
+      for (final core::int #t31 in #t30{core::Iterable<core::int>})
+        #t29.{core::Set::add}(#t31);
+    #t29.{core::Set::add}(3);
+  } =>#t29;
+  core::Set<core::int> set4 = block {
+    final core::Set<core::int> #t32 = col::LinkedHashSet::•<core::int>();
+    #t32.{core::Set::add}(1);
+    #t32.{core::Set::add}(2);
+    final core::Iterable<core::int>? #t33 = null;
+    if(!#t33.{core::Object::==}(null))
+      for (final core::int #t34 in #t33{core::Iterable<core::int>})
+        #t32.{core::Set::add}(#t34);
+    #t32.{core::Set::add}(3);
+  } =>#t32;
+  core::Map<core::int, core::int>? map = null;
+  core::print( block {
+    final core::Map<core::int, core::int> #t35 = <core::int, core::int>{};
+    #t35.{core::Map::[]=}(1, 1);
+    #t35.{core::Map::[]=}(2, 2);
+    final core::Map<core::int, core::int>? #t36 = map;
+    if(!#t36.{core::Object::==}(null))
+      for (final core::MapEntry<core::int, core::int> #t37 in #t36{core::Map<core::int, core::int>}.{core::Map::entries})
+        #t35.{core::Map::[]=}(#t37.{core::MapEntry::key}, #t37.{core::MapEntry::value});
+    #t35.{core::Map::[]=}(3, 3);
+  } =>#t35);
+  core::print( block {
+    final core::Map<core::int, core::int> #t38 = <core::int, core::int>{};
+    #t38.{core::Map::[]=}(1, 1);
+    #t38.{core::Map::[]=}(2, 2);
+    final core::Map<core::int, core::int>? #t39 = null;
+    if(!#t39.{core::Object::==}(null))
+      for (final core::MapEntry<core::int, core::int> #t40 in #t39{core::Map<core::int, core::int>}.{core::Map::entries})
+        #t38.{core::Map::[]=}(#t40.{core::MapEntry::key}, #t40.{core::MapEntry::value});
+    #t38.{core::Map::[]=}(3, 3);
+  } =>#t38);
+  core::Map<core::int, core::int> map1 = block {
+    final core::Map<core::int, core::int> #t41 = <core::int, core::int>{};
+    final core::Map<core::int, core::int>? #t42 = map;
+    if(!#t42.{core::Object::==}(null))
+      for (final core::MapEntry<core::int, core::int> #t43 in #t42{core::Map<core::int, core::int>}.{core::Map::entries})
+        #t41.{core::Map::[]=}(#t43.{core::MapEntry::key}, #t43.{core::MapEntry::value});
+  } =>#t41;
+  core::Map<core::int, core::int> map3 = block {
+    final core::Map<core::int, core::int> #t44 = <core::int, core::int>{};
+    #t44.{core::Map::[]=}(1, 1);
+    #t44.{core::Map::[]=}(2, 2);
+    final core::Map<core::int, core::int>? #t45 = map;
+    if(!#t45.{core::Object::==}(null))
+      for (final core::MapEntry<core::int, core::int> #t46 in #t45{core::Map<core::int, core::int>}.{core::Map::entries})
+        #t44.{core::Map::[]=}(#t46.{core::MapEntry::key}, #t46.{core::MapEntry::value});
+    #t44.{core::Map::[]=}(3, 3);
+  } =>#t44;
+  core::Map<core::int, core::int> map4 = block {
+    final core::Map<core::int, core::int> #t47 = <core::int, core::int>{};
+    #t47.{core::Map::[]=}(1, 1);
+    #t47.{core::Map::[]=}(2, 2);
+    final core::Map<core::int, core::int>? #t48 = null;
+    if(!#t48.{core::Object::==}(null))
+      for (final core::MapEntry<core::int, core::int> #t49 in #t48{core::Map<core::int, core::int>}.{core::Map::entries})
+        #t47.{core::Map::[]=}(#t49.{core::MapEntry::key}, #t49.{core::MapEntry::value});
+    #t47.{core::Map::[]=}(3, 3);
+  } =>#t47;
+}
diff --git a/pkg/front_end/testcases/nnbd/spread_if_null.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd/spread_if_null.dart.weak.transformed.expect
new file mode 100644
index 0000000..04ff3fd
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/spread_if_null.dart.weak.transformed.expect
@@ -0,0 +1,225 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+import "dart:collection" as col;
+
+static method main() → dynamic {
+  core::List<core::int>? list = null;
+  core::print( block {
+    final core::List<core::int> #t1 = <core::int>[];
+    #t1.{core::List::add}(1);
+    #t1.{core::List::add}(2);
+    final core::Iterable<core::int>? #t2 = list;
+    if(!#t2.{core::Object::==}(null)) {
+      core::Iterator<core::int> :sync-for-iterator = #t2{core::Iterable<core::int>}.{core::Iterable::iterator};
+      for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
+        final core::int #t3 = :sync-for-iterator.{core::Iterator::current};
+        #t1.{core::List::add}(#t3);
+      }
+    }
+    #t1.{core::List::add}(3);
+  } =>#t1);
+  core::print( block {
+    final core::List<core::int> #t4 = <core::int>[];
+    #t4.{core::List::add}(1);
+    #t4.{core::List::add}(2);
+    final core::Iterable<core::int>? #t5 = null;
+    if(!#t5.{core::Object::==}(null)) {
+      core::Iterator<core::int> :sync-for-iterator = #t5{core::Iterable<core::int>}.{core::Iterable::iterator};
+      for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
+        final core::int #t6 = :sync-for-iterator.{core::Iterator::current};
+        #t4.{core::List::add}(#t6);
+      }
+    }
+    #t4.{core::List::add}(3);
+  } =>#t4);
+  core::List<core::int> list1 = block {
+    final core::List<core::int> #t7 = <core::int>[];
+    final core::Iterable<core::int>? #t8 = list;
+    if(!#t8.{core::Object::==}(null)) {
+      core::Iterator<core::int> :sync-for-iterator = #t8{core::Iterable<core::int>}.{core::Iterable::iterator};
+      for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
+        final core::int #t9 = :sync-for-iterator.{core::Iterator::current};
+        #t7.{core::List::add}(#t9);
+      }
+    }
+  } =>#t7;
+  core::List<Never> list2 = block {
+    final core::List<Never> #t10 = <Never>[];
+    final core::Iterable<Never>? #t11 = null;
+    if(!#t11.{core::Object::==}(null)) {
+      core::Iterator<Never> :sync-for-iterator = #t11{core::Iterable<Never>}.{core::Iterable::iterator};
+      for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
+        final Never #t12 = :sync-for-iterator.{core::Iterator::current};
+        #t10.{core::List::add}(#t12);
+      }
+    }
+  } =>#t10;
+  core::List<core::int> list3 = block {
+    final core::List<core::int> #t13 = <core::int>[];
+    #t13.{core::List::add}(1);
+    #t13.{core::List::add}(2);
+    final core::Iterable<core::int>? #t14 = list;
+    if(!#t14.{core::Object::==}(null)) {
+      core::Iterator<core::int> :sync-for-iterator = #t14{core::Iterable<core::int>}.{core::Iterable::iterator};
+      for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
+        final core::int #t15 = :sync-for-iterator.{core::Iterator::current};
+        #t13.{core::List::add}(#t15);
+      }
+    }
+    #t13.{core::List::add}(3);
+  } =>#t13;
+  core::List<core::int> list4 = block {
+    final core::List<core::int> #t16 = <core::int>[];
+    #t16.{core::List::add}(1);
+    #t16.{core::List::add}(2);
+    final core::Iterable<core::int>? #t17 = null;
+    if(!#t17.{core::Object::==}(null)) {
+      core::Iterator<core::int> :sync-for-iterator = #t17{core::Iterable<core::int>}.{core::Iterable::iterator};
+      for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
+        final core::int #t18 = :sync-for-iterator.{core::Iterator::current};
+        #t16.{core::List::add}(#t18);
+      }
+    }
+    #t16.{core::List::add}(3);
+  } =>#t16;
+  core::Set<core::int>? set = null;
+  core::print( block {
+    final core::Set<core::int> #t19 = col::LinkedHashSet::•<core::int>();
+    #t19.{core::Set::add}(1);
+    #t19.{core::Set::add}(2);
+    final core::Iterable<core::int>? #t20 = set;
+    if(!#t20.{core::Object::==}(null)) {
+      core::Iterator<core::int> :sync-for-iterator = #t20{core::Iterable<core::int>}.{core::Iterable::iterator};
+      for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
+        final core::int #t21 = :sync-for-iterator.{core::Iterator::current};
+        #t19.{core::Set::add}(#t21);
+      }
+    }
+    #t19.{core::Set::add}(3);
+  } =>#t19);
+  core::print( block {
+    final core::Set<core::int> #t22 = col::LinkedHashSet::•<core::int>();
+    #t22.{core::Set::add}(1);
+    #t22.{core::Set::add}(2);
+    final core::Iterable<core::int>? #t23 = null;
+    if(!#t23.{core::Object::==}(null)) {
+      core::Iterator<core::int> :sync-for-iterator = #t23{core::Iterable<core::int>}.{core::Iterable::iterator};
+      for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
+        final core::int #t24 = :sync-for-iterator.{core::Iterator::current};
+        #t22.{core::Set::add}(#t24);
+      }
+    }
+    #t22.{core::Set::add}(3);
+  } =>#t22);
+  core::Set<core::int> set1 = block {
+    final core::Set<core::int> #t25 = col::LinkedHashSet::•<core::int>();
+    final core::Iterable<dynamic>? #t26 = set;
+    if(!#t26.{core::Object::==}(null)) {
+      core::Iterator<dynamic> :sync-for-iterator = #t26{core::Iterable<dynamic>}.{core::Iterable::iterator};
+      for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
+        final dynamic #t27 = :sync-for-iterator.{core::Iterator::current};
+        {
+          final core::int #t28 = #t27 as{TypeError,ForNonNullableByDefault} core::int;
+          #t25.{core::Set::add}(#t28);
+        }
+      }
+    }
+  } =>#t25;
+  core::Set<core::int> set3 = block {
+    final core::Set<core::int> #t29 = col::LinkedHashSet::•<core::int>();
+    #t29.{core::Set::add}(1);
+    #t29.{core::Set::add}(2);
+    final core::Iterable<core::int>? #t30 = set;
+    if(!#t30.{core::Object::==}(null)) {
+      core::Iterator<core::int> :sync-for-iterator = #t30{core::Iterable<core::int>}.{core::Iterable::iterator};
+      for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
+        final core::int #t31 = :sync-for-iterator.{core::Iterator::current};
+        #t29.{core::Set::add}(#t31);
+      }
+    }
+    #t29.{core::Set::add}(3);
+  } =>#t29;
+  core::Set<core::int> set4 = block {
+    final core::Set<core::int> #t32 = col::LinkedHashSet::•<core::int>();
+    #t32.{core::Set::add}(1);
+    #t32.{core::Set::add}(2);
+    final core::Iterable<core::int>? #t33 = null;
+    if(!#t33.{core::Object::==}(null)) {
+      core::Iterator<core::int> :sync-for-iterator = #t33{core::Iterable<core::int>}.{core::Iterable::iterator};
+      for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
+        final core::int #t34 = :sync-for-iterator.{core::Iterator::current};
+        #t32.{core::Set::add}(#t34);
+      }
+    }
+    #t32.{core::Set::add}(3);
+  } =>#t32;
+  core::Map<core::int, core::int>? map = null;
+  core::print( block {
+    final core::Map<core::int, core::int> #t35 = <core::int, core::int>{};
+    #t35.{core::Map::[]=}(1, 1);
+    #t35.{core::Map::[]=}(2, 2);
+    final core::Map<core::int, core::int>? #t36 = map;
+    if(!#t36.{core::Object::==}(null)) {
+      core::Iterator<core::MapEntry<core::int, core::int>> :sync-for-iterator = #t36{core::Map<core::int, core::int>}.{core::Map::entries}.{core::Iterable::iterator};
+      for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
+        final core::MapEntry<core::int, core::int> #t37 = :sync-for-iterator.{core::Iterator::current};
+        #t35.{core::Map::[]=}(#t37.{core::MapEntry::key}, #t37.{core::MapEntry::value});
+      }
+    }
+    #t35.{core::Map::[]=}(3, 3);
+  } =>#t35);
+  core::print( block {
+    final core::Map<core::int, core::int> #t38 = <core::int, core::int>{};
+    #t38.{core::Map::[]=}(1, 1);
+    #t38.{core::Map::[]=}(2, 2);
+    final core::Map<core::int, core::int>? #t39 = null;
+    if(!#t39.{core::Object::==}(null)) {
+      core::Iterator<core::MapEntry<core::int, core::int>> :sync-for-iterator = #t39{core::Map<core::int, core::int>}.{core::Map::entries}.{core::Iterable::iterator};
+      for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
+        final core::MapEntry<core::int, core::int> #t40 = :sync-for-iterator.{core::Iterator::current};
+        #t38.{core::Map::[]=}(#t40.{core::MapEntry::key}, #t40.{core::MapEntry::value});
+      }
+    }
+    #t38.{core::Map::[]=}(3, 3);
+  } =>#t38);
+  core::Map<core::int, core::int> map1 = block {
+    final core::Map<core::int, core::int> #t41 = <core::int, core::int>{};
+    final core::Map<core::int, core::int>? #t42 = map;
+    if(!#t42.{core::Object::==}(null)) {
+      core::Iterator<core::MapEntry<core::int, core::int>> :sync-for-iterator = #t42{core::Map<core::int, core::int>}.{core::Map::entries}.{core::Iterable::iterator};
+      for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
+        final core::MapEntry<core::int, core::int> #t43 = :sync-for-iterator.{core::Iterator::current};
+        #t41.{core::Map::[]=}(#t43.{core::MapEntry::key}, #t43.{core::MapEntry::value});
+      }
+    }
+  } =>#t41;
+  core::Map<core::int, core::int> map3 = block {
+    final core::Map<core::int, core::int> #t44 = <core::int, core::int>{};
+    #t44.{core::Map::[]=}(1, 1);
+    #t44.{core::Map::[]=}(2, 2);
+    final core::Map<core::int, core::int>? #t45 = map;
+    if(!#t45.{core::Object::==}(null)) {
+      core::Iterator<core::MapEntry<core::int, core::int>> :sync-for-iterator = #t45{core::Map<core::int, core::int>}.{core::Map::entries}.{core::Iterable::iterator};
+      for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
+        final core::MapEntry<core::int, core::int> #t46 = :sync-for-iterator.{core::Iterator::current};
+        #t44.{core::Map::[]=}(#t46.{core::MapEntry::key}, #t46.{core::MapEntry::value});
+      }
+    }
+    #t44.{core::Map::[]=}(3, 3);
+  } =>#t44;
+  core::Map<core::int, core::int> map4 = block {
+    final core::Map<core::int, core::int> #t47 = <core::int, core::int>{};
+    #t47.{core::Map::[]=}(1, 1);
+    #t47.{core::Map::[]=}(2, 2);
+    final core::Map<core::int, core::int>? #t48 = null;
+    if(!#t48.{core::Object::==}(null)) {
+      core::Iterator<core::MapEntry<core::int, core::int>> :sync-for-iterator = #t48{core::Map<core::int, core::int>}.{core::Map::entries}.{core::Iterable::iterator};
+      for (; :sync-for-iterator.{core::Iterator::moveNext}(); ) {
+        final core::MapEntry<core::int, core::int> #t49 = :sync-for-iterator.{core::Iterator::current};
+        #t47.{core::Map::[]=}(#t49.{core::MapEntry::key}, #t49.{core::MapEntry::value});
+      }
+    }
+    #t47.{core::Map::[]=}(3, 3);
+  } =>#t47;
+}
diff --git a/pkg/front_end/testcases/nnbd/strong_lib_not_ok_from_dill/strong.dart.outline.expect b/pkg/front_end/testcases/nnbd/strong_lib_not_ok_from_dill/strong.dart.outline.expect
new file mode 100644
index 0000000..acb4c8d
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/strong_lib_not_ok_from_dill/strong.dart.outline.expect
@@ -0,0 +1,18 @@
+//
+// Problems in component:
+//
+// pkg/front_end/testcases/nnbd/strong_lib_not_ok_from_dill/strong_lib.dart: Error: A library can't opt out of null safety by default, when using sound null safety.
+//
+library /*isNonNullableByDefault*/;
+import self as self;
+
+import "org-dartlang-testcase:///strong_lib.dart";
+
+static method main() → dynamic
+  ;
+
+library;
+import self as self2;
+
+static method foo() → void
+  ;
diff --git a/pkg/front_end/testcases/nnbd/strong_lib_not_ok_from_dill/strong.dart.strong.expect b/pkg/front_end/testcases/nnbd/strong_lib_not_ok_from_dill/strong.dart.strong.expect
new file mode 100644
index 0000000..b5f4dc2
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/strong_lib_not_ok_from_dill/strong.dart.strong.expect
@@ -0,0 +1,22 @@
+//
+// Problems in component:
+//
+// pkg/front_end/testcases/nnbd/strong_lib_not_ok_from_dill/strong_lib.dart: Error: A library can't opt out of null safety by default, when using sound null safety.
+//
+library /*isNonNullableByDefault*/;
+import self as self;
+import "strong_lib.dart" as str;
+
+import "org-dartlang-testcase:///strong_lib.dart";
+
+static method main() → dynamic {
+  str::foo();
+}
+
+library;
+import self as str;
+import "dart:core" as core;
+
+static method foo() → void {
+  core::print("hello");
+}
diff --git a/pkg/front_end/testcases/nnbd/strong_lib_not_ok_from_dill/strong.dart.strong.transformed.expect b/pkg/front_end/testcases/nnbd/strong_lib_not_ok_from_dill/strong.dart.strong.transformed.expect
new file mode 100644
index 0000000..b5f4dc2
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/strong_lib_not_ok_from_dill/strong.dart.strong.transformed.expect
@@ -0,0 +1,22 @@
+//
+// Problems in component:
+//
+// pkg/front_end/testcases/nnbd/strong_lib_not_ok_from_dill/strong_lib.dart: Error: A library can't opt out of null safety by default, when using sound null safety.
+//
+library /*isNonNullableByDefault*/;
+import self as self;
+import "strong_lib.dart" as str;
+
+import "org-dartlang-testcase:///strong_lib.dart";
+
+static method main() → dynamic {
+  str::foo();
+}
+
+library;
+import self as str;
+import "dart:core" as core;
+
+static method foo() → void {
+  core::print("hello");
+}
diff --git a/pkg/front_end/testcases/nnbd/strong_lib_not_ok_from_dill/strong_lib.dart.weak.expect b/pkg/front_end/testcases/nnbd/strong_lib_not_ok_from_dill/strong.dart.weak.expect
similarity index 100%
rename from pkg/front_end/testcases/nnbd/strong_lib_not_ok_from_dill/strong_lib.dart.weak.expect
rename to pkg/front_end/testcases/nnbd/strong_lib_not_ok_from_dill/strong.dart.weak.expect
diff --git a/pkg/front_end/testcases/nnbd/strong_lib_not_ok_from_dill/strong_lib.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd/strong_lib_not_ok_from_dill/strong.dart.weak.transformed.expect
similarity index 100%
rename from pkg/front_end/testcases/nnbd/strong_lib_not_ok_from_dill/strong_lib.dart.weak.transformed.expect
rename to pkg/front_end/testcases/nnbd/strong_lib_not_ok_from_dill/strong.dart.weak.transformed.expect
diff --git a/pkg/front_end/testcases/nnbd/strong_lib_not_ok_from_dill/strong_lib.dart.outline.expect b/pkg/front_end/testcases/nnbd/strong_lib_not_ok_from_dill/strong_lib.dart.outline.expect
deleted file mode 100644
index ad01661..0000000
--- a/pkg/front_end/testcases/nnbd/strong_lib_not_ok_from_dill/strong_lib.dart.outline.expect
+++ /dev/null
@@ -1,18 +0,0 @@
-//
-// Problems in component:
-//
-// pkg/front_end/testcases/nnbd/strong_lib_not_ok_from_dill/strong_lib.dart: Error: A library can't opt out of non-nullable by default, when in nnbd-strong mode.
-//
-library /*isNonNullableByDefault*/;
-import self as self;
-
-import "org-dartlang-testcase:///strong_lib.dart";
-
-static method main() → dynamic
-  ;
-
-library;
-import self as self2;
-
-static method foo() → void
-  ;
diff --git a/pkg/front_end/testcases/nnbd/strong_lib_not_ok_from_dill/strong_lib.dart.strong.expect b/pkg/front_end/testcases/nnbd/strong_lib_not_ok_from_dill/strong_lib.dart.strong.expect
deleted file mode 100644
index fb76c00..0000000
--- a/pkg/front_end/testcases/nnbd/strong_lib_not_ok_from_dill/strong_lib.dart.strong.expect
+++ /dev/null
@@ -1,22 +0,0 @@
-//
-// Problems in component:
-//
-// pkg/front_end/testcases/nnbd/strong_lib_not_ok_from_dill/strong_lib.dart: Error: A library can't opt out of non-nullable by default, when in nnbd-strong mode.
-//
-library /*isNonNullableByDefault*/;
-import self as self;
-import "strong_lib.dart" as str;
-
-import "org-dartlang-testcase:///strong_lib.dart";
-
-static method main() → dynamic {
-  str::foo();
-}
-
-library;
-import self as str;
-import "dart:core" as core;
-
-static method foo() → void {
-  core::print("hello");
-}
diff --git a/pkg/front_end/testcases/nnbd/strong_lib_not_ok_from_dill/strong_lib.dart.strong.transformed.expect b/pkg/front_end/testcases/nnbd/strong_lib_not_ok_from_dill/strong_lib.dart.strong.transformed.expect
deleted file mode 100644
index fb76c00..0000000
--- a/pkg/front_end/testcases/nnbd/strong_lib_not_ok_from_dill/strong_lib.dart.strong.transformed.expect
+++ /dev/null
@@ -1,22 +0,0 @@
-//
-// Problems in component:
-//
-// pkg/front_end/testcases/nnbd/strong_lib_not_ok_from_dill/strong_lib.dart: Error: A library can't opt out of non-nullable by default, when in nnbd-strong mode.
-//
-library /*isNonNullableByDefault*/;
-import self as self;
-import "strong_lib.dart" as str;
-
-import "org-dartlang-testcase:///strong_lib.dart";
-
-static method main() → dynamic {
-  str::foo();
-}
-
-library;
-import self as str;
-import "dart:core" as core;
-
-static method foo() → void {
-  core::print("hello");
-}
diff --git a/pkg/front_end/testcases/nnbd/strong_lib_not_ok_from_source/strong.dart.outline.expect b/pkg/front_end/testcases/nnbd/strong_lib_not_ok_from_source/strong.dart.outline.expect
index 9399c70..7a170f8 100644
--- a/pkg/front_end/testcases/nnbd/strong_lib_not_ok_from_source/strong.dart.outline.expect
+++ b/pkg/front_end/testcases/nnbd/strong_lib_not_ok_from_source/strong.dart.outline.expect
@@ -10,7 +10,7 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/nnbd/strong_lib_not_ok_from_source/strong_lib.dart:1:1: Error: A library can't opt out of non-nullable by default, when in nnbd-strong mode.
+// pkg/front_end/testcases/nnbd/strong_lib_not_ok_from_source/strong_lib.dart:1:1: Error: A library can't opt out of null safety by default, when using sound null safety.
 // // @dart = 2.7
 // ^^^^^^^^^^^^^^
 //
diff --git a/pkg/front_end/testcases/nnbd/strong_lib_not_ok_from_source/strong.dart.strong.expect b/pkg/front_end/testcases/nnbd/strong_lib_not_ok_from_source/strong.dart.strong.expect
index 7fe6157..701927d 100644
--- a/pkg/front_end/testcases/nnbd/strong_lib_not_ok_from_source/strong.dart.strong.expect
+++ b/pkg/front_end/testcases/nnbd/strong_lib_not_ok_from_source/strong.dart.strong.expect
@@ -12,7 +12,7 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/nnbd/strong_lib_not_ok_from_source/strong_lib.dart:1:1: Error: A library can't opt out of non-nullable by default, when in nnbd-strong mode.
+// pkg/front_end/testcases/nnbd/strong_lib_not_ok_from_source/strong_lib.dart:1:1: Error: A library can't opt out of null safety by default, when using sound null safety.
 // // @dart = 2.7
 // ^^^^^^^^^^^^^^
 //
diff --git a/pkg/front_end/testcases/nnbd/strong_lib_not_ok_from_source/strong.dart.strong.transformed.expect b/pkg/front_end/testcases/nnbd/strong_lib_not_ok_from_source/strong.dart.strong.transformed.expect
index 7fe6157..701927d 100644
--- a/pkg/front_end/testcases/nnbd/strong_lib_not_ok_from_source/strong.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/nnbd/strong_lib_not_ok_from_source/strong.dart.strong.transformed.expect
@@ -12,7 +12,7 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/nnbd/strong_lib_not_ok_from_source/strong_lib.dart:1:1: Error: A library can't opt out of non-nullable by default, when in nnbd-strong mode.
+// pkg/front_end/testcases/nnbd/strong_lib_not_ok_from_source/strong_lib.dart:1:1: Error: A library can't opt out of null safety by default, when using sound null safety.
 // // @dart = 2.7
 // ^^^^^^^^^^^^^^
 //
diff --git a/pkg/front_end/testcases/nnbd/strong_ok_from_dill/strong_lib.dart.outline.expect b/pkg/front_end/testcases/nnbd/strong_ok_from_dill/strong.dart.outline.expect
similarity index 100%
rename from pkg/front_end/testcases/nnbd/strong_ok_from_dill/strong_lib.dart.outline.expect
rename to pkg/front_end/testcases/nnbd/strong_ok_from_dill/strong.dart.outline.expect
diff --git a/pkg/front_end/testcases/nnbd/strong_ok_from_dill/strong_lib.dart.strong.expect b/pkg/front_end/testcases/nnbd/strong_ok_from_dill/strong.dart.strong.expect
similarity index 100%
rename from pkg/front_end/testcases/nnbd/strong_ok_from_dill/strong_lib.dart.strong.expect
rename to pkg/front_end/testcases/nnbd/strong_ok_from_dill/strong.dart.strong.expect
diff --git a/pkg/front_end/testcases/nnbd/strong_ok_from_dill/strong_lib.dart.strong.transformed.expect b/pkg/front_end/testcases/nnbd/strong_ok_from_dill/strong.dart.strong.transformed.expect
similarity index 100%
rename from pkg/front_end/testcases/nnbd/strong_ok_from_dill/strong_lib.dart.strong.transformed.expect
rename to pkg/front_end/testcases/nnbd/strong_ok_from_dill/strong.dart.strong.transformed.expect
diff --git a/pkg/front_end/testcases/nnbd/strong_ok_from_dill/strong_lib.dart.weak.expect b/pkg/front_end/testcases/nnbd/strong_ok_from_dill/strong.dart.weak.expect
similarity index 100%
rename from pkg/front_end/testcases/nnbd/strong_ok_from_dill/strong_lib.dart.weak.expect
rename to pkg/front_end/testcases/nnbd/strong_ok_from_dill/strong.dart.weak.expect
diff --git a/pkg/front_end/testcases/nnbd/strong_ok_from_dill/strong_lib.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd/strong_ok_from_dill/strong.dart.weak.transformed.expect
similarity index 100%
rename from pkg/front_end/testcases/nnbd/strong_ok_from_dill/strong_lib.dart.weak.transformed.expect
rename to pkg/front_end/testcases/nnbd/strong_ok_from_dill/strong.dart.weak.transformed.expect
diff --git a/pkg/front_end/testcases/nnbd_mixed/issue40512/issue40512_lib.dart.weak.expect b/pkg/front_end/testcases/nnbd_mixed/issue40512/issue40512.dart.weak.expect
similarity index 100%
rename from pkg/front_end/testcases/nnbd_mixed/issue40512/issue40512_lib.dart.weak.expect
rename to pkg/front_end/testcases/nnbd_mixed/issue40512/issue40512.dart.weak.expect
diff --git a/pkg/front_end/testcases/nnbd_mixed/issue40512/issue40512_lib.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd_mixed/issue40512/issue40512.dart.weak.transformed.expect
similarity index 100%
rename from pkg/front_end/testcases/nnbd_mixed/issue40512/issue40512_lib.dart.weak.transformed.expect
rename to pkg/front_end/testcases/nnbd_mixed/issue40512/issue40512.dart.weak.transformed.expect
diff --git a/pkg/front_end/testcases/nnbd_mixed/issue40512/issue40512_lib.dart.outline.expect b/pkg/front_end/testcases/nnbd_mixed/issue40512/issue40512_lib.dart.outline.expect
deleted file mode 100644
index 667822e3..0000000
--- a/pkg/front_end/testcases/nnbd_mixed/issue40512/issue40512_lib.dart.outline.expect
+++ /dev/null
@@ -1,69 +0,0 @@
-//
-// Problems in component:
-//
-// pkg/front_end/testcases/nnbd_mixed/issue40512/issue40512_lib.dart: Error: A library can't opt out of non-nullable by default, when in nnbd-strong mode.
-//
-library /*isNonNullableByDefault*/;
-//
-// Problems in library:
-//
-// pkg/front_end/testcases/nnbd_mixed/issue40512/issue40512.dart:5:1: Error: A library can't opt out of non-nullable by default, when in nnbd-strong mode.
-// // @dart = 2.6
-// ^^^^^^^^^^^^^^
-//
-import self as self;
-import "dart:core" as core;
-import "issue40512_lib.dart" as baz2;
-
-import "org-dartlang-testcase:///issue40512_lib.dart";
-
-abstract class _C&Object&A = core::Object with baz2::A /*isAnonymousMixin,hasConstConstructor*/  {
-  const synthetic constructor •() → self::_C&Object&A
-    : super core::Object::•()
-    ;
-}
-abstract class _C&Object&A&B = self::_C&Object&A with baz2::B /*isAnonymousMixin,hasConstConstructor*/  {
-  const synthetic constructor •() → self::_C&Object&A&B
-    : super self::_C&Object&A::•()
-    ;
-  abstract forwarding-stub method toString({core::String* s}) → core::String*;
-}
-class C extends self::_C&Object&A&B {
-  synthetic constructor •() → self::C
-    ;
-  abstract forwarding-stub method toString({core::String* s}) → core::String*;
-}
-static method main() → void
-  ;
-
-library baz2;
-import self as baz2;
-import "dart:core" as core;
-
-abstract class A extends core::Object /*isMixinDeclaration*/  {
-  method toString({core::String* s = "hello"}) → core::String*
-    ;
-  abstract member-signature get _identityHashCode() → core::int*;
-  abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*;
-  abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*;
-  abstract member-signature method _simpleInstanceOfTrue(dynamic type) → core::bool*;
-  abstract member-signature method _simpleInstanceOfFalse(dynamic type) → core::bool*;
-  abstract member-signature operator ==(dynamic other) → core::bool*;
-  abstract member-signature get hashCode() → core::int*;
-  abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic;
-  abstract member-signature get runtimeType() → core::Type*;
-}
-class B extends core::Object {
-  synthetic constructor •() → baz2::B*
-    ;
-  abstract member-signature get _identityHashCode() → core::int*;
-  abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*;
-  abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*;
-  abstract member-signature method _simpleInstanceOfTrue(dynamic type) → core::bool*;
-  abstract member-signature method _simpleInstanceOfFalse(dynamic type) → core::bool*;
-  abstract member-signature operator ==(dynamic other) → core::bool*;
-  abstract member-signature get hashCode() → core::int*;
-  abstract member-signature method toString() → core::String*;
-  abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic;
-  abstract member-signature get runtimeType() → core::Type*;
-}
diff --git a/pkg/front_end/testcases/nnbd_mixed/issue41210a/issue41210_lib1.dart.weak.expect b/pkg/front_end/testcases/nnbd_mixed/issue41210a/issue41210.dart.weak.expect
similarity index 100%
rename from pkg/front_end/testcases/nnbd_mixed/issue41210a/issue41210_lib1.dart.weak.expect
rename to pkg/front_end/testcases/nnbd_mixed/issue41210a/issue41210.dart.weak.expect
diff --git a/pkg/front_end/testcases/nnbd_mixed/issue41210a/issue41210_lib1.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd_mixed/issue41210a/issue41210.dart.weak.transformed.expect
similarity index 100%
rename from pkg/front_end/testcases/nnbd_mixed/issue41210a/issue41210_lib1.dart.weak.transformed.expect
rename to pkg/front_end/testcases/nnbd_mixed/issue41210a/issue41210.dart.weak.transformed.expect
diff --git a/pkg/front_end/testcases/nnbd_mixed/issue41210a/issue41210_lib1.dart.outline.expect b/pkg/front_end/testcases/nnbd_mixed/issue41210a/issue41210_lib1.dart.outline.expect
deleted file mode 100644
index a91db35..0000000
--- a/pkg/front_end/testcases/nnbd_mixed/issue41210a/issue41210_lib1.dart.outline.expect
+++ /dev/null
@@ -1,86 +0,0 @@
-//
-// Problems in component:
-//
-// pkg/front_end/testcases/nnbd_mixed/issue41210a/issue41210_lib1.dart: Error: A library can't opt out of non-nullable by default, when in nnbd-strong mode.
-//
-library /*isNonNullableByDefault*/;
-//
-// Problems in library:
-//
-// pkg/front_end/testcases/nnbd_mixed/issue41210a/issue41210.dart:5:1: Error: A library can't opt out of non-nullable by default, when in nnbd-strong mode.
-// // @dart=2.6
-// ^^^^^^^^^^^^
-//
-import self as self;
-import "dart:core" as core;
-import "issue41210_lib1.dart" as iss;
-
-import "org-dartlang-testcase:///issue41210_lib1.dart";
-
-abstract class _C&Object&A = core::Object with iss::A /*isAnonymousMixin,hasConstConstructor*/  {
-  const synthetic constructor •() → self::_C&Object&A
-    : super core::Object::•()
-    ;
-}
-abstract class _C&Object&A&B = self::_C&Object&A with iss::B /*isAnonymousMixin,hasConstConstructor*/  {
-  const synthetic constructor •() → self::_C&Object&A&B
-    : super self::_C&Object&A::•()
-    ;
-  abstract forwarding-stub method method({core::String* s}) → core::String*;
-}
-class C extends self::_C&Object&A&B {
-  synthetic constructor •() → self::C
-    ;
-  abstract forwarding-stub method method({core::String* s}) → core::String*;
-}
-static method main() → dynamic
-  ;
-
-library;
-import self as iss;
-import "dart:core" as core;
-import "issue41210_lib2.dart" as iss2;
-
-import "org-dartlang-testcase:///issue41210_lib2.dart";
-
-abstract class A extends core::Object implements iss2::Interface /*isMixinDeclaration*/  {
-  method method({core::String* s = "hello"}) → core::String*
-    ;
-  abstract member-signature get _identityHashCode() → core::int*;
-  abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*;
-  abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*;
-  abstract member-signature method _simpleInstanceOfTrue(dynamic type) → core::bool*;
-  abstract member-signature method _simpleInstanceOfFalse(dynamic type) → core::bool*;
-  abstract member-signature operator ==(dynamic other) → core::bool*;
-  abstract member-signature get hashCode() → core::int*;
-  abstract member-signature method toString() → core::String*;
-  abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic;
-  abstract member-signature get runtimeType() → core::Type*;
-}
-abstract class B extends core::Object implements iss2::Interface {
-  synthetic constructor •() → iss::B*
-    ;
-  abstract member-signature get _identityHashCode() → core::int*;
-  abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*;
-  abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*;
-  abstract member-signature method _simpleInstanceOfTrue(dynamic type) → core::bool*;
-  abstract member-signature method _simpleInstanceOfFalse(dynamic type) → core::bool*;
-  abstract member-signature operator ==(dynamic other) → core::bool*;
-  abstract member-signature get hashCode() → core::int*;
-  abstract member-signature method toString() → core::String*;
-  abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic;
-  abstract member-signature get runtimeType() → core::Type*;
-  abstract member-signature method method() → core::String*;
-}
-static method main() → void
-  ;
-
-library /*isNonNullableByDefault*/;
-import self as iss2;
-import "dart:core" as core;
-
-abstract class Interface extends core::Object {
-  synthetic constructor •() → iss2::Interface
-    ;
-  abstract method method() → core::String;
-}
diff --git a/pkg/front_end/testcases/nnbd_mixed/issue42387/foundation_basic_types_lib.dart.weak.expect b/pkg/front_end/testcases/nnbd_mixed/issue42387/foundation_basic_types_lib.dart.weak.expect
deleted file mode 100644
index 4d3ffdd..0000000
--- a/pkg/front_end/testcases/nnbd_mixed/issue42387/foundation_basic_types_lib.dart.weak.expect
+++ /dev/null
@@ -1,129 +0,0 @@
-library;
-import self as self;
-import "foundation_binding_lib.dart" as fou;
-import "scheduler_binding_lib.dart" as sch;
-import "services_binding_lib.dart" as ser;
-
-import "org-dartlang-testcase:///foundation_lib.dart";
-import "org-dartlang-testcase:///services_lib.dart";
-import "org-dartlang-testcase:///scheduler_lib.dart";
-
-abstract class _TestSchedulerBinding&BindingBase&SchedulerBinding = fou::BindingBase with sch::SchedulerBinding /*isAnonymousMixin*/  {
-  synthetic constructor •() → self::_TestSchedulerBinding&BindingBase&SchedulerBinding*
-    : super fou::BindingBase::•()
-    ;
-}
-abstract class _TestSchedulerBinding&BindingBase&SchedulerBinding&ServicesBinding = self::_TestSchedulerBinding&BindingBase&SchedulerBinding with ser::ServicesBinding /*isAnonymousMixin*/  {
-  synthetic constructor •() → self::_TestSchedulerBinding&BindingBase&SchedulerBinding&ServicesBinding*
-    : super self::_TestSchedulerBinding&BindingBase&SchedulerBinding::•()
-    ;
-}
-class TestSchedulerBinding extends self::_TestSchedulerBinding&BindingBase&SchedulerBinding&ServicesBinding {
-  synthetic constructor •() → self::TestSchedulerBinding*
-    : super self::_TestSchedulerBinding&BindingBase&SchedulerBinding&ServicesBinding::•()
-    ;
-}
-static method main() → dynamic {}
-
-library /*isNonNullableByDefault*/;
-import self as self2;
-import "dart:async" as asy;
-import "dart:core" as core;
-
-typedef AsyncCallback = () → asy::Future<core::Null?>;
-
-library /*isNonNullableByDefault*/;
-import self as fou;
-import "dart:core" as core;
-import "dart:async" as asy;
-
-import "org-dartlang-testcase:///foundation_basic_types_lib.dart";
-
-abstract class BindingBase extends core::Object {
-  synthetic constructor •() → fou::BindingBase
-    : super core::Object::•()
-    ;
-  method registerSignalServiceExtension({required core::String name = #C1, required () → asy::Future<core::Null?> callback = #C1}) → void {}
-}
-
-library;
-import self as self3;
-import "foundation_basic_types_lib.dart" as self2;
-import "foundation_binding_lib.dart" as fou;
-additionalExports = (self2::AsyncCallback,
-  fou::BindingBase)
-
-export "org-dartlang-testcase:///foundation_basic_types_lib.dart";
-export "org-dartlang-testcase:///foundation_binding_lib.dart";
-
-
-library;
-import self as sch;
-import "foundation_binding_lib.dart" as fou;
-import "dart:core" as core;
-import "dart:async" as asy;
-
-import "org-dartlang-testcase:///foundation_lib.dart";
-
-abstract class SchedulerBinding extends fou::BindingBase /*isMixinDeclaration*/  {
-  abstract member-signature method registerSignalServiceExtension({core::String* name = #C1, () →* asy::Future<core::Null?>* callback = #C1}) → void;
-  abstract member-signature get _identityHashCode() → core::int*;
-  abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*;
-  abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*;
-  abstract member-signature method _simpleInstanceOfTrue(dynamic type) → core::bool*;
-  abstract member-signature method _simpleInstanceOfFalse(dynamic type) → core::bool*;
-  abstract member-signature operator ==(dynamic other) → core::bool*;
-  abstract member-signature get hashCode() → core::int*;
-  abstract member-signature method toString() → core::String*;
-  abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic;
-  abstract member-signature get runtimeType() → core::Type*;
-}
-
-library;
-import self as self4;
-import "scheduler_binding_lib.dart" as sch;
-additionalExports = (sch::SchedulerBinding)
-
-export "org-dartlang-testcase:///scheduler_binding_lib.dart";
-
-
-library;
-import self as ser;
-import "dart:core" as core;
-import "foundation_binding_lib.dart" as fou;
-import "scheduler_binding_lib.dart" as sch;
-import "dart:async" as asy;
-
-import "org-dartlang-testcase:///foundation_lib.dart";
-import "org-dartlang-testcase:///scheduler_lib.dart";
-
-abstract class _ServicesBinding&BindingBase&SchedulerBinding extends core::Object implements fou::BindingBase, sch::SchedulerBinding /*isAnonymousMixin*/  {
-  synthetic constructor •() → ser::_ServicesBinding&BindingBase&SchedulerBinding*
-    : super core::Object::•()
-    ;
-  abstract member-signature get _identityHashCode() → core::int*;
-  abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*;
-  abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*;
-  abstract member-signature method _simpleInstanceOfTrue(dynamic type) → core::bool*;
-  abstract member-signature method _simpleInstanceOfFalse(dynamic type) → core::bool*;
-  abstract member-signature operator ==(dynamic other) → core::bool*;
-  abstract member-signature get hashCode() → core::int*;
-  abstract member-signature method toString() → core::String*;
-  abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic;
-  abstract member-signature get runtimeType() → core::Type*;
-  abstract member-signature method registerSignalServiceExtension({core::String* name = #C1, () →* asy::Future<core::Null?>* callback = #C1}) → void;
-}
-abstract class ServicesBinding extends ser::_ServicesBinding&BindingBase&SchedulerBinding /*isMixinDeclaration*/  {
-}
-
-library;
-import self as self5;
-import "services_binding_lib.dart" as ser;
-additionalExports = (ser::ServicesBinding)
-
-export "org-dartlang-testcase:///services_binding_lib.dart";
-
-
-constants  {
-  #C1 = null
-}
diff --git a/pkg/front_end/testcases/nnbd_mixed/issue42387/foundation_basic_types_lib.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd_mixed/issue42387/foundation_basic_types_lib.dart.weak.transformed.expect
deleted file mode 100644
index 3670831..0000000
--- a/pkg/front_end/testcases/nnbd_mixed/issue42387/foundation_basic_types_lib.dart.weak.transformed.expect
+++ /dev/null
@@ -1,142 +0,0 @@
-library;
-import self as self;
-import "foundation_binding_lib.dart" as fou;
-import "scheduler_binding_lib.dart" as sch;
-import "dart:core" as core;
-import "dart:async" as asy;
-import "services_binding_lib.dart" as ser;
-
-import "org-dartlang-testcase:///foundation_lib.dart";
-import "org-dartlang-testcase:///services_lib.dart";
-import "org-dartlang-testcase:///scheduler_lib.dart";
-
-abstract class _TestSchedulerBinding&BindingBase&SchedulerBinding extends fou::BindingBase implements sch::SchedulerBinding /*isAnonymousMixin,isEliminatedMixin*/  {
-  synthetic constructor •() → self::_TestSchedulerBinding&BindingBase&SchedulerBinding*
-    : super fou::BindingBase::•()
-    ;
-  abstract member-signature method /* from org-dartlang-testcase:///scheduler_binding_lib.dart */ registerSignalServiceExtension({core::String* name = #C1, () →* asy::Future<core::Null?>* callback = #C1}) → void;
-  abstract member-signature get /* from org-dartlang-testcase:///scheduler_binding_lib.dart */ _identityHashCode() → core::int*;
-  abstract member-signature method /* from org-dartlang-testcase:///scheduler_binding_lib.dart */ _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*;
-  abstract member-signature method /* from org-dartlang-testcase:///scheduler_binding_lib.dart */ _simpleInstanceOf(dynamic type) → core::bool*;
-  abstract member-signature method /* from org-dartlang-testcase:///scheduler_binding_lib.dart */ _simpleInstanceOfTrue(dynamic type) → core::bool*;
-  abstract member-signature method /* from org-dartlang-testcase:///scheduler_binding_lib.dart */ _simpleInstanceOfFalse(dynamic type) → core::bool*;
-  abstract member-signature operator /* from org-dartlang-testcase:///scheduler_binding_lib.dart */ ==(dynamic other) → core::bool*;
-  abstract member-signature get /* from org-dartlang-testcase:///scheduler_binding_lib.dart */ hashCode() → core::int*;
-  abstract member-signature method /* from org-dartlang-testcase:///scheduler_binding_lib.dart */ toString() → core::String*;
-  abstract member-signature method /* from org-dartlang-testcase:///scheduler_binding_lib.dart */ noSuchMethod(core::Invocation* invocation) → dynamic;
-  abstract member-signature get /* from org-dartlang-testcase:///scheduler_binding_lib.dart */ runtimeType() → core::Type*;
-}
-abstract class _TestSchedulerBinding&BindingBase&SchedulerBinding&ServicesBinding extends self::_TestSchedulerBinding&BindingBase&SchedulerBinding implements ser::ServicesBinding /*isAnonymousMixin,isEliminatedMixin*/  {
-  synthetic constructor •() → self::_TestSchedulerBinding&BindingBase&SchedulerBinding&ServicesBinding*
-    : super self::_TestSchedulerBinding&BindingBase&SchedulerBinding::•()
-    ;
-}
-class TestSchedulerBinding extends self::_TestSchedulerBinding&BindingBase&SchedulerBinding&ServicesBinding {
-  synthetic constructor •() → self::TestSchedulerBinding*
-    : super self::_TestSchedulerBinding&BindingBase&SchedulerBinding&ServicesBinding::•()
-    ;
-}
-static method main() → dynamic {}
-
-library /*isNonNullableByDefault*/;
-import self as self2;
-import "dart:async" as asy;
-import "dart:core" as core;
-
-typedef AsyncCallback = () → asy::Future<core::Null?>;
-
-library /*isNonNullableByDefault*/;
-import self as fou;
-import "dart:core" as core;
-import "dart:async" as asy;
-
-import "org-dartlang-testcase:///foundation_basic_types_lib.dart";
-
-abstract class BindingBase extends core::Object {
-  synthetic constructor •() → fou::BindingBase
-    : super core::Object::•()
-    ;
-  method registerSignalServiceExtension({required core::String name = #C1, required () → asy::Future<core::Null?> callback = #C1}) → void {}
-}
-
-library;
-import self as self3;
-import "foundation_basic_types_lib.dart" as self2;
-import "foundation_binding_lib.dart" as fou;
-additionalExports = (self2::AsyncCallback,
-  fou::BindingBase)
-
-export "org-dartlang-testcase:///foundation_basic_types_lib.dart";
-export "org-dartlang-testcase:///foundation_binding_lib.dart";
-
-
-library;
-import self as sch;
-import "foundation_binding_lib.dart" as fou;
-import "dart:core" as core;
-import "dart:async" as asy;
-
-import "org-dartlang-testcase:///foundation_lib.dart";
-
-abstract class SchedulerBinding extends fou::BindingBase /*isMixinDeclaration*/  {
-  abstract member-signature method registerSignalServiceExtension({core::String* name = #C1, () →* asy::Future<core::Null?>* callback = #C1}) → void;
-  abstract member-signature get _identityHashCode() → core::int*;
-  abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*;
-  abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*;
-  abstract member-signature method _simpleInstanceOfTrue(dynamic type) → core::bool*;
-  abstract member-signature method _simpleInstanceOfFalse(dynamic type) → core::bool*;
-  abstract member-signature operator ==(dynamic other) → core::bool*;
-  abstract member-signature get hashCode() → core::int*;
-  abstract member-signature method toString() → core::String*;
-  abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic;
-  abstract member-signature get runtimeType() → core::Type*;
-}
-
-library;
-import self as self4;
-import "scheduler_binding_lib.dart" as sch;
-additionalExports = (sch::SchedulerBinding)
-
-export "org-dartlang-testcase:///scheduler_binding_lib.dart";
-
-
-library;
-import self as ser;
-import "dart:core" as core;
-import "foundation_binding_lib.dart" as fou;
-import "scheduler_binding_lib.dart" as sch;
-import "dart:async" as asy;
-
-import "org-dartlang-testcase:///foundation_lib.dart";
-import "org-dartlang-testcase:///scheduler_lib.dart";
-
-abstract class _ServicesBinding&BindingBase&SchedulerBinding extends core::Object implements fou::BindingBase, sch::SchedulerBinding /*isAnonymousMixin*/  {
-  synthetic constructor •() → ser::_ServicesBinding&BindingBase&SchedulerBinding*
-    : super core::Object::•()
-    ;
-  abstract member-signature get _identityHashCode() → core::int*;
-  abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*;
-  abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*;
-  abstract member-signature method _simpleInstanceOfTrue(dynamic type) → core::bool*;
-  abstract member-signature method _simpleInstanceOfFalse(dynamic type) → core::bool*;
-  abstract member-signature operator ==(dynamic other) → core::bool*;
-  abstract member-signature get hashCode() → core::int*;
-  abstract member-signature method toString() → core::String*;
-  abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic;
-  abstract member-signature get runtimeType() → core::Type*;
-  abstract member-signature method registerSignalServiceExtension({core::String* name = #C1, () →* asy::Future<core::Null?>* callback = #C1}) → void;
-}
-abstract class ServicesBinding extends ser::_ServicesBinding&BindingBase&SchedulerBinding /*isMixinDeclaration*/  {
-}
-
-library;
-import self as self5;
-import "services_binding_lib.dart" as ser;
-additionalExports = (ser::ServicesBinding)
-
-export "org-dartlang-testcase:///services_binding_lib.dart";
-
-
-constants  {
-  #C1 = null
-}
diff --git a/pkg/front_end/testcases/nnbd_mixed/issue42387/scheduler_tester.dart.weak.expect b/pkg/front_end/testcases/nnbd_mixed/issue42387/scheduler_tester.dart.weak.expect
index dcefbab..4d3ffdd 100644
--- a/pkg/front_end/testcases/nnbd_mixed/issue42387/scheduler_tester.dart.weak.expect
+++ b/pkg/front_end/testcases/nnbd_mixed/issue42387/scheduler_tester.dart.weak.expect
@@ -2,8 +2,6 @@
 import self as self;
 import "foundation_binding_lib.dart" as fou;
 import "scheduler_binding_lib.dart" as sch;
-import "dart:core" as core;
-import "dart:async" as asy;
 import "services_binding_lib.dart" as ser;
 
 import "org-dartlang-testcase:///foundation_lib.dart";
@@ -14,17 +12,6 @@
   synthetic constructor •() → self::_TestSchedulerBinding&BindingBase&SchedulerBinding*
     : super fou::BindingBase::•()
     ;
-  abstract member-signature method registerSignalServiceExtension({core::String* name = #C1, () →* asy::Future<core::Null?>* callback = #C1}) → void;
-  abstract member-signature get _identityHashCode() → core::int*;
-  abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*;
-  abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*;
-  abstract member-signature method _simpleInstanceOfTrue(dynamic type) → core::bool*;
-  abstract member-signature method _simpleInstanceOfFalse(dynamic type) → core::bool*;
-  abstract member-signature operator ==(dynamic other) → core::bool*;
-  abstract member-signature get hashCode() → core::int*;
-  abstract member-signature method toString() → core::String*;
-  abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic;
-  abstract member-signature get runtimeType() → core::Type*;
 }
 abstract class _TestSchedulerBinding&BindingBase&SchedulerBinding&ServicesBinding = self::_TestSchedulerBinding&BindingBase&SchedulerBinding with ser::ServicesBinding /*isAnonymousMixin*/  {
   synthetic constructor •() → self::_TestSchedulerBinding&BindingBase&SchedulerBinding&ServicesBinding*
@@ -38,35 +25,8 @@
 }
 static method main() → dynamic {}
 
-library;
-import self as self2;
-import "foundation_basic_types_lib.dart" as fou2;
-import "foundation_binding_lib.dart" as fou;
-additionalExports = (fou2::AsyncCallback,
-  fou::BindingBase)
-
-export "org-dartlang-testcase:///foundation_basic_types_lib.dart";
-export "org-dartlang-testcase:///foundation_binding_lib.dart";
-
-
-library;
-import self as self3;
-import "services_binding_lib.dart" as ser;
-additionalExports = (ser::ServicesBinding)
-
-export "org-dartlang-testcase:///services_binding_lib.dart";
-
-
-library;
-import self as self4;
-import "scheduler_binding_lib.dart" as sch;
-additionalExports = (sch::SchedulerBinding)
-
-export "org-dartlang-testcase:///scheduler_binding_lib.dart";
-
-
 library /*isNonNullableByDefault*/;
-import self as fou2;
+import self as self2;
 import "dart:async" as asy;
 import "dart:core" as core;
 
@@ -87,6 +47,47 @@
 }
 
 library;
+import self as self3;
+import "foundation_basic_types_lib.dart" as self2;
+import "foundation_binding_lib.dart" as fou;
+additionalExports = (self2::AsyncCallback,
+  fou::BindingBase)
+
+export "org-dartlang-testcase:///foundation_basic_types_lib.dart";
+export "org-dartlang-testcase:///foundation_binding_lib.dart";
+
+
+library;
+import self as sch;
+import "foundation_binding_lib.dart" as fou;
+import "dart:core" as core;
+import "dart:async" as asy;
+
+import "org-dartlang-testcase:///foundation_lib.dart";
+
+abstract class SchedulerBinding extends fou::BindingBase /*isMixinDeclaration*/  {
+  abstract member-signature method registerSignalServiceExtension({core::String* name = #C1, () →* asy::Future<core::Null?>* callback = #C1}) → void;
+  abstract member-signature get _identityHashCode() → core::int*;
+  abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*;
+  abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*;
+  abstract member-signature method _simpleInstanceOfTrue(dynamic type) → core::bool*;
+  abstract member-signature method _simpleInstanceOfFalse(dynamic type) → core::bool*;
+  abstract member-signature operator ==(dynamic other) → core::bool*;
+  abstract member-signature get hashCode() → core::int*;
+  abstract member-signature method toString() → core::String*;
+  abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic;
+  abstract member-signature get runtimeType() → core::Type*;
+}
+
+library;
+import self as self4;
+import "scheduler_binding_lib.dart" as sch;
+additionalExports = (sch::SchedulerBinding)
+
+export "org-dartlang-testcase:///scheduler_binding_lib.dart";
+
+
+library;
 import self as ser;
 import "dart:core" as core;
 import "foundation_binding_lib.dart" as fou;
@@ -116,26 +117,12 @@
 }
 
 library;
-import self as sch;
-import "foundation_binding_lib.dart" as fou;
-import "dart:core" as core;
-import "dart:async" as asy;
+import self as self5;
+import "services_binding_lib.dart" as ser;
+additionalExports = (ser::ServicesBinding)
 
-import "org-dartlang-testcase:///foundation_lib.dart";
+export "org-dartlang-testcase:///services_binding_lib.dart";
 
-abstract class SchedulerBinding extends fou::BindingBase /*isMixinDeclaration*/  {
-  abstract member-signature method registerSignalServiceExtension({core::String* name = #C1, () →* asy::Future<core::Null?>* callback = #C1}) → void;
-  abstract member-signature get _identityHashCode() → core::int*;
-  abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*;
-  abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*;
-  abstract member-signature method _simpleInstanceOfTrue(dynamic type) → core::bool*;
-  abstract member-signature method _simpleInstanceOfFalse(dynamic type) → core::bool*;
-  abstract member-signature operator ==(dynamic other) → core::bool*;
-  abstract member-signature get hashCode() → core::int*;
-  abstract member-signature method toString() → core::String*;
-  abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic;
-  abstract member-signature get runtimeType() → core::Type*;
-}
 
 constants  {
   #C1 = null
diff --git a/pkg/front_end/testcases/nnbd_mixed/issue42387/scheduler_tester.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd_mixed/issue42387/scheduler_tester.dart.weak.transformed.expect
index bdc0c68..3670831 100644
--- a/pkg/front_end/testcases/nnbd_mixed/issue42387/scheduler_tester.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/nnbd_mixed/issue42387/scheduler_tester.dart.weak.transformed.expect
@@ -38,35 +38,8 @@
 }
 static method main() → dynamic {}
 
-library;
-import self as self2;
-import "foundation_basic_types_lib.dart" as fou2;
-import "foundation_binding_lib.dart" as fou;
-additionalExports = (fou2::AsyncCallback,
-  fou::BindingBase)
-
-export "org-dartlang-testcase:///foundation_basic_types_lib.dart";
-export "org-dartlang-testcase:///foundation_binding_lib.dart";
-
-
-library;
-import self as self3;
-import "services_binding_lib.dart" as ser;
-additionalExports = (ser::ServicesBinding)
-
-export "org-dartlang-testcase:///services_binding_lib.dart";
-
-
-library;
-import self as self4;
-import "scheduler_binding_lib.dart" as sch;
-additionalExports = (sch::SchedulerBinding)
-
-export "org-dartlang-testcase:///scheduler_binding_lib.dart";
-
-
 library /*isNonNullableByDefault*/;
-import self as fou2;
+import self as self2;
 import "dart:async" as asy;
 import "dart:core" as core;
 
@@ -87,6 +60,47 @@
 }
 
 library;
+import self as self3;
+import "foundation_basic_types_lib.dart" as self2;
+import "foundation_binding_lib.dart" as fou;
+additionalExports = (self2::AsyncCallback,
+  fou::BindingBase)
+
+export "org-dartlang-testcase:///foundation_basic_types_lib.dart";
+export "org-dartlang-testcase:///foundation_binding_lib.dart";
+
+
+library;
+import self as sch;
+import "foundation_binding_lib.dart" as fou;
+import "dart:core" as core;
+import "dart:async" as asy;
+
+import "org-dartlang-testcase:///foundation_lib.dart";
+
+abstract class SchedulerBinding extends fou::BindingBase /*isMixinDeclaration*/  {
+  abstract member-signature method registerSignalServiceExtension({core::String* name = #C1, () →* asy::Future<core::Null?>* callback = #C1}) → void;
+  abstract member-signature get _identityHashCode() → core::int*;
+  abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*;
+  abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*;
+  abstract member-signature method _simpleInstanceOfTrue(dynamic type) → core::bool*;
+  abstract member-signature method _simpleInstanceOfFalse(dynamic type) → core::bool*;
+  abstract member-signature operator ==(dynamic other) → core::bool*;
+  abstract member-signature get hashCode() → core::int*;
+  abstract member-signature method toString() → core::String*;
+  abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic;
+  abstract member-signature get runtimeType() → core::Type*;
+}
+
+library;
+import self as self4;
+import "scheduler_binding_lib.dart" as sch;
+additionalExports = (sch::SchedulerBinding)
+
+export "org-dartlang-testcase:///scheduler_binding_lib.dart";
+
+
+library;
 import self as ser;
 import "dart:core" as core;
 import "foundation_binding_lib.dart" as fou;
@@ -116,26 +130,12 @@
 }
 
 library;
-import self as sch;
-import "foundation_binding_lib.dart" as fou;
-import "dart:core" as core;
-import "dart:async" as asy;
+import self as self5;
+import "services_binding_lib.dart" as ser;
+additionalExports = (ser::ServicesBinding)
 
-import "org-dartlang-testcase:///foundation_lib.dart";
+export "org-dartlang-testcase:///services_binding_lib.dart";
 
-abstract class SchedulerBinding extends fou::BindingBase /*isMixinDeclaration*/  {
-  abstract member-signature method registerSignalServiceExtension({core::String* name = #C1, () →* asy::Future<core::Null?>* callback = #C1}) → void;
-  abstract member-signature get _identityHashCode() → core::int*;
-  abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*;
-  abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*;
-  abstract member-signature method _simpleInstanceOfTrue(dynamic type) → core::bool*;
-  abstract member-signature method _simpleInstanceOfFalse(dynamic type) → core::bool*;
-  abstract member-signature operator ==(dynamic other) → core::bool*;
-  abstract member-signature get hashCode() → core::int*;
-  abstract member-signature method toString() → core::String*;
-  abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic;
-  abstract member-signature get runtimeType() → core::Type*;
-}
 
 constants  {
   #C1 = null
diff --git a/pkg/front_end/testcases/nnbd_mixed/nullable_extension_on_opt_out.dart b/pkg/front_end/testcases/nnbd_mixed/nullable_extension_on_opt_out.dart
new file mode 100644
index 0000000..dcab231
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd_mixed/nullable_extension_on_opt_out.dart
@@ -0,0 +1,18 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'nullable_extension_on_opt_out_lib.dart';
+
+extension on A? {
+  String get text => "Lily was here";
+}
+
+void main() {
+  A? a = null;
+  expect("Lily was here", a.text);
+}
+
+expect(expected, actual) {
+  if (expected != actual) throw 'Expected $expected, actual $actual';
+}
diff --git a/pkg/front_end/testcases/nnbd_mixed/nullable_extension_on_opt_out.dart.textual_outline.expect b/pkg/front_end/testcases/nnbd_mixed/nullable_extension_on_opt_out.dart.textual_outline.expect
new file mode 100644
index 0000000..9276dfd
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd_mixed/nullable_extension_on_opt_out.dart.textual_outline.expect
@@ -0,0 +1,6 @@
+import 'nullable_extension_on_opt_out_lib.dart';
+extension on ;
+A;
+? { String get text => "Lily was here"; }
+void main() { }
+expect(expected, actual) { }
diff --git a/pkg/front_end/testcases/nnbd_mixed/nullable_extension_on_opt_out.dart.weak.expect b/pkg/front_end/testcases/nnbd_mixed/nullable_extension_on_opt_out.dart.weak.expect
new file mode 100644
index 0000000..a8faa33
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd_mixed/nullable_extension_on_opt_out.dart.weak.expect
@@ -0,0 +1,41 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "nullable_extension_on_opt_out_lib.dart" as nul;
+import "dart:core" as core;
+
+import "org-dartlang-testcase:///nullable_extension_on_opt_out_lib.dart";
+
+extension _extension#0 on nul::A? {
+  get text = self::_extension#0|get#text;
+}
+static method _extension#0|get#text(final nul::A? #this) → core::String
+  return "Lily was here";
+static method main() → void {
+  nul::A? a = null;
+  self::expect("Lily was here", self::_extension#0|get#text(a));
+}
+static method expect(dynamic expected, dynamic actual) → dynamic {
+  if(!expected.{core::Object::==}(actual))
+    throw "Expected ${expected}, actual ${actual}";
+}
+
+library;
+import self as nul;
+import "dart:core" as core;
+
+class A extends core::Object {
+  field core::String* text = "";
+  synthetic constructor •() → nul::A*
+    : super core::Object::•()
+    ;
+  abstract member-signature get _identityHashCode() → core::int*;
+  abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*;
+  abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*;
+  abstract member-signature method _simpleInstanceOfTrue(dynamic type) → core::bool*;
+  abstract member-signature method _simpleInstanceOfFalse(dynamic type) → core::bool*;
+  abstract member-signature operator ==(dynamic other) → core::bool*;
+  abstract member-signature get hashCode() → core::int*;
+  abstract member-signature method toString() → core::String*;
+  abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic;
+  abstract member-signature get runtimeType() → core::Type*;
+}
diff --git a/pkg/front_end/testcases/nnbd_mixed/nullable_extension_on_opt_out.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd_mixed/nullable_extension_on_opt_out.dart.weak.transformed.expect
new file mode 100644
index 0000000..a8faa33
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd_mixed/nullable_extension_on_opt_out.dart.weak.transformed.expect
@@ -0,0 +1,41 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "nullable_extension_on_opt_out_lib.dart" as nul;
+import "dart:core" as core;
+
+import "org-dartlang-testcase:///nullable_extension_on_opt_out_lib.dart";
+
+extension _extension#0 on nul::A? {
+  get text = self::_extension#0|get#text;
+}
+static method _extension#0|get#text(final nul::A? #this) → core::String
+  return "Lily was here";
+static method main() → void {
+  nul::A? a = null;
+  self::expect("Lily was here", self::_extension#0|get#text(a));
+}
+static method expect(dynamic expected, dynamic actual) → dynamic {
+  if(!expected.{core::Object::==}(actual))
+    throw "Expected ${expected}, actual ${actual}";
+}
+
+library;
+import self as nul;
+import "dart:core" as core;
+
+class A extends core::Object {
+  field core::String* text = "";
+  synthetic constructor •() → nul::A*
+    : super core::Object::•()
+    ;
+  abstract member-signature get _identityHashCode() → core::int*;
+  abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*;
+  abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*;
+  abstract member-signature method _simpleInstanceOfTrue(dynamic type) → core::bool*;
+  abstract member-signature method _simpleInstanceOfFalse(dynamic type) → core::bool*;
+  abstract member-signature operator ==(dynamic other) → core::bool*;
+  abstract member-signature get hashCode() → core::int*;
+  abstract member-signature method toString() → core::String*;
+  abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic;
+  abstract member-signature get runtimeType() → core::Type*;
+}
diff --git a/pkg/front_end/testcases/nnbd_mixed/nullable_extension_on_opt_out_lib.dart b/pkg/front_end/testcases/nnbd_mixed/nullable_extension_on_opt_out_lib.dart
new file mode 100644
index 0000000..0a66ebb
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd_mixed/nullable_extension_on_opt_out_lib.dart
@@ -0,0 +1,9 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// @dart=2.6
+
+class A {
+  String text = "";
+}
diff --git a/pkg/front_end/testcases/nnbd_mixed/type_parameter_nullability.dart b/pkg/front_end/testcases/nnbd_mixed/type_parameter_nullability.dart
new file mode 100644
index 0000000..f19e9e7
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd_mixed/type_parameter_nullability.dart
@@ -0,0 +1,31 @@
+// Copyright (c) 2020, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'type_parameter_nullability_lib.dart';
+
+class C<T extends num?, S, U> {
+  void promoteNullable(T? t) {
+    if (t is int) /* Creates T? & int! */ {
+      t;
+    }
+    if (t is int?) /* Creates T? & int? */ {
+      t;
+    }
+  }
+
+  void nullableAsUndetermined(S? s) {
+    s as U; /* Creates S? & U% */
+  }
+}
+
+main() {
+  var c = new C<num, num, num>();
+  c.promoteNullable(null);
+  c.promoteNullable(0);
+  c.nullableAsUndetermined(null);
+  c.nullableAsUndetermined(0);
+  var d = new D<num>();
+  d.promoteLegacy(null);
+  d.promoteLegacy(0);
+}
diff --git a/pkg/front_end/testcases/nnbd_mixed/type_parameter_nullability.dart.textual_outline.expect b/pkg/front_end/testcases/nnbd_mixed/type_parameter_nullability.dart.textual_outline.expect
new file mode 100644
index 0000000..1d57193
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd_mixed/type_parameter_nullability.dart.textual_outline.expect
@@ -0,0 +1,8 @@
+import 'type_parameter_nullability_lib.dart';
+
+class C<T extends num?, S, U> {
+  void promoteNullable(T? t) {}
+  void nullableAsUndetermined(S? s) {}
+}
+
+main() {}
diff --git a/pkg/front_end/testcases/nnbd_mixed/type_parameter_nullability.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/nnbd_mixed/type_parameter_nullability.dart.textual_outline_modelled.expect
new file mode 100644
index 0000000..89436c2
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd_mixed/type_parameter_nullability.dart.textual_outline_modelled.expect
@@ -0,0 +1,8 @@
+import 'type_parameter_nullability_lib.dart';
+
+class C<T extends num?, S, U> {
+  void nullableAsUndetermined(S? s) {}
+  void promoteNullable(T? t) {}
+}
+
+main() {}
diff --git a/pkg/front_end/testcases/nnbd_mixed/type_parameter_nullability.dart.weak.expect b/pkg/front_end/testcases/nnbd_mixed/type_parameter_nullability.dart.weak.expect
new file mode 100644
index 0000000..e578dcc
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd_mixed/type_parameter_nullability.dart.weak.expect
@@ -0,0 +1,58 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+import "type_parameter_nullability_lib.dart" as typ;
+
+import "org-dartlang-testcase:///type_parameter_nullability_lib.dart";
+
+class C<T extends core::num? = core::num?, S extends core::Object? = dynamic, U extends core::Object? = dynamic> extends core::Object {
+  synthetic constructor •() → self::C<self::C::T%, self::C::S%, self::C::U%>
+    : super core::Object::•()
+    ;
+  method promoteNullable(generic-covariant-impl self::C::T? t) → void {
+    if(t is{ForNonNullableByDefault} core::int) {
+      t{self::C::T? & core::int /* '?' & '!' = '!' */};
+    }
+    if(t is{ForNonNullableByDefault} core::int?) {
+      t{self::C::T? & core::int? /* '?' & '?' = '?' */};
+    }
+  }
+  method nullableAsUndetermined(generic-covariant-impl self::C::S? s) → void {
+    s as{ForNonNullableByDefault} self::C::U%;
+  }
+}
+static method main() → dynamic {
+  self::C<core::num, core::num, core::num> c = new self::C::•<core::num, core::num, core::num>();
+  c.{self::C::promoteNullable}(null);
+  c.{self::C::promoteNullable}(0);
+  c.{self::C::nullableAsUndetermined}(null);
+  c.{self::C::nullableAsUndetermined}(0);
+  typ::D<core::num> d = new typ::D::•<core::num>();
+  d.{typ::D::promoteLegacy}(null);
+  d.{typ::D::promoteLegacy}(0);
+}
+
+library;
+import self as typ;
+import "dart:core" as core;
+
+class D<T extends core::num* = core::num*> extends core::Object {
+  synthetic constructor •() → typ::D<typ::D::T*>*
+    : super core::Object::•()
+    ;
+  method promoteLegacy(generic-covariant-impl typ::D::T* t) → void {
+    if(t is core::int*) {
+      let final typ::D::T* & core::int* /* '*' & '*' = '*' */ #t1 = t{typ::D::T* & core::int* /* '*' & '*' = '*' */} in #t1.{core::num::==}(null) ?{core::bool*} null : #t1.{core::int::isEven};
+    }
+  }
+  abstract member-signature get _identityHashCode() → core::int*;
+  abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*;
+  abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*;
+  abstract member-signature method _simpleInstanceOfTrue(dynamic type) → core::bool*;
+  abstract member-signature method _simpleInstanceOfFalse(dynamic type) → core::bool*;
+  abstract member-signature operator ==(dynamic other) → core::bool*;
+  abstract member-signature get hashCode() → core::int*;
+  abstract member-signature method toString() → core::String*;
+  abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic;
+  abstract member-signature get runtimeType() → core::Type*;
+}
diff --git a/pkg/front_end/testcases/nnbd_mixed/type_parameter_nullability.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd_mixed/type_parameter_nullability.dart.weak.transformed.expect
new file mode 100644
index 0000000..e578dcc
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd_mixed/type_parameter_nullability.dart.weak.transformed.expect
@@ -0,0 +1,58 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+import "type_parameter_nullability_lib.dart" as typ;
+
+import "org-dartlang-testcase:///type_parameter_nullability_lib.dart";
+
+class C<T extends core::num? = core::num?, S extends core::Object? = dynamic, U extends core::Object? = dynamic> extends core::Object {
+  synthetic constructor •() → self::C<self::C::T%, self::C::S%, self::C::U%>
+    : super core::Object::•()
+    ;
+  method promoteNullable(generic-covariant-impl self::C::T? t) → void {
+    if(t is{ForNonNullableByDefault} core::int) {
+      t{self::C::T? & core::int /* '?' & '!' = '!' */};
+    }
+    if(t is{ForNonNullableByDefault} core::int?) {
+      t{self::C::T? & core::int? /* '?' & '?' = '?' */};
+    }
+  }
+  method nullableAsUndetermined(generic-covariant-impl self::C::S? s) → void {
+    s as{ForNonNullableByDefault} self::C::U%;
+  }
+}
+static method main() → dynamic {
+  self::C<core::num, core::num, core::num> c = new self::C::•<core::num, core::num, core::num>();
+  c.{self::C::promoteNullable}(null);
+  c.{self::C::promoteNullable}(0);
+  c.{self::C::nullableAsUndetermined}(null);
+  c.{self::C::nullableAsUndetermined}(0);
+  typ::D<core::num> d = new typ::D::•<core::num>();
+  d.{typ::D::promoteLegacy}(null);
+  d.{typ::D::promoteLegacy}(0);
+}
+
+library;
+import self as typ;
+import "dart:core" as core;
+
+class D<T extends core::num* = core::num*> extends core::Object {
+  synthetic constructor •() → typ::D<typ::D::T*>*
+    : super core::Object::•()
+    ;
+  method promoteLegacy(generic-covariant-impl typ::D::T* t) → void {
+    if(t is core::int*) {
+      let final typ::D::T* & core::int* /* '*' & '*' = '*' */ #t1 = t{typ::D::T* & core::int* /* '*' & '*' = '*' */} in #t1.{core::num::==}(null) ?{core::bool*} null : #t1.{core::int::isEven};
+    }
+  }
+  abstract member-signature get _identityHashCode() → core::int*;
+  abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*;
+  abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*;
+  abstract member-signature method _simpleInstanceOfTrue(dynamic type) → core::bool*;
+  abstract member-signature method _simpleInstanceOfFalse(dynamic type) → core::bool*;
+  abstract member-signature operator ==(dynamic other) → core::bool*;
+  abstract member-signature get hashCode() → core::int*;
+  abstract member-signature method toString() → core::String*;
+  abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic;
+  abstract member-signature get runtimeType() → core::Type*;
+}
diff --git a/pkg/front_end/testcases/nnbd_mixed/type_parameter_nullability_lib.dart b/pkg/front_end/testcases/nnbd_mixed/type_parameter_nullability_lib.dart
new file mode 100644
index 0000000..e47c1a9
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd_mixed/type_parameter_nullability_lib.dart
@@ -0,0 +1,13 @@
+// Copyright (c) 2020, the Dart project authors. Please see the AUTHORS file
+// for 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=2.6
+
+class D<T extends num> {
+  void promoteLegacy(T t) {
+    if (t is int) {
+      t?.isEven; // Creates T* & int!
+    }
+  }
+}
diff --git a/pkg/front_end/testcases/regress/issue_29983.dart.outline.expect b/pkg/front_end/testcases/regress/issue_29983.dart.outline.expect
index ba358b5..6f674f3 100644
--- a/pkg/front_end/testcases/regress/issue_29983.dart.outline.expect
+++ b/pkg/front_end/testcases/regress/issue_29983.dart.outline.expect
@@ -1,11 +1,11 @@
 library;
 import self as self;
 
-static method f() → dynamic
+static method f() → dynamic sync* 
   ;
-static method g() → dynamic
+static method g() → dynamic sync* 
   ;
-static method h() → dynamic
+static method h() → dynamic sync* 
   ;
 static method main() → dynamic
   ;
diff --git a/pkg/front_end/testcases/regress/issue_34850.dart.outline.expect b/pkg/front_end/testcases/regress/issue_34850.dart.outline.expect
index 71b4abc..393c9ed 100644
--- a/pkg/front_end/testcases/regress/issue_34850.dart.outline.expect
+++ b/pkg/front_end/testcases/regress/issue_34850.dart.outline.expect
@@ -57,9 +57,9 @@
   ;
 static method Future<List extends core::Object* = dynamic>() → invalid-type
   ;
-static method f2() → dynamic
+static method f2() → dynamic async 
   ;
-static method f3() → invalid-type
+static method f3() → invalid-type async 
   ;
-static method main() → dynamic
+static method main() → dynamic async 
   ;
diff --git a/pkg/front_end/testcases/regress/issue_37681.dart.outline.expect b/pkg/front_end/testcases/regress/issue_37681.dart.outline.expect
index 6a28c0d..b3304ef 100644
--- a/pkg/front_end/testcases/regress/issue_37681.dart.outline.expect
+++ b/pkg/front_end/testcases/regress/issue_37681.dart.outline.expect
@@ -1,5 +1,5 @@
 library;
 import self as self;
 
-static method main() → dynamic
+static method main() → dynamic async 
   ;
diff --git a/pkg/front_end/testcases/set_literals/disambiguation_rule.dart.outline.expect b/pkg/front_end/testcases/set_literals/disambiguation_rule.dart.outline.expect
index a7d30a3..2b3e31a 100644
--- a/pkg/front_end/testcases/set_literals/disambiguation_rule.dart.outline.expect
+++ b/pkg/front_end/testcases/set_literals/disambiguation_rule.dart.outline.expect
@@ -7,17 +7,17 @@
 import "dart:async";
 import "dart:collection";
 
-static method main() → dynamic
+static method main() → dynamic async 
   ;
-static method mapfun() → asy::Future<core::Map<core::int*, core::bool*>*>*
+static method mapfun() → asy::Future<core::Map<core::int*, core::bool*>*>* async 
   ;
-static method setfun() → asy::Future<core::Set<core::int*>*>*
+static method setfun() → asy::Future<core::Set<core::int*>*>* async 
   ;
-static method iterablefun() → asy::Future<core::Iterable<core::int*>*>*
+static method iterablefun() → asy::Future<core::Iterable<core::int*>*>* async 
   ;
-static method lhsfun() → asy::Future<col::LinkedHashSet<core::int*>*>*
+static method lhsfun() → asy::Future<col::LinkedHashSet<core::int*>*>* async 
   ;
-static method lhmfun() → asy::Future<col::LinkedHashMap<core::int*, core::bool*>*>*
+static method lhmfun() → asy::Future<col::LinkedHashMap<core::int*, core::bool*>*>* async 
   ;
 static method mapfun2() → FutureOr<core::Map<core::int*, core::bool*>*>*
   ;
diff --git a/pkg/kernel/binary.md b/pkg/kernel/binary.md
index 2b37b2c..72e2057 100644
--- a/pkg/kernel/binary.md
+++ b/pkg/kernel/binary.md
@@ -143,7 +143,8 @@
 
 type ComponentFile {
   UInt32 magic = 0x90ABCDEF;
-  UInt32 formatVersion = 42;
+  UInt32 formatVersion = 43;
+  Byte[10] shortSdkHash;
   List<String> problemsAsJson; // Described in problems.md.
   Library[] libraries;
   UriSource sourceMap;
diff --git a/pkg/kernel/lib/ast.dart b/pkg/kernel/lib/ast.dart
index 7eff1a0..89a0398 100644
--- a/pkg/kernel/lib/ast.dart
+++ b/pkg/kernel/lib/ast.dart
@@ -2818,14 +2818,15 @@
             .applyToFunctionType(computeThisFunctionType(nullability));
   }
 
-  /// Return function type of node: return [typedefType], reuse type parameters.
+  /// Return function type of node returning [typedefType] reuse type parameters
   ///
   /// When this getter is invoked, the parent must be a [Constructor].
   /// This getter works similarly to [computeThisFunctionType], but uses
   /// [typedef] to compute the return type of the returned function type. It
   /// is useful in some contexts, especially during inference of aliased
   /// constructor invocations.
-  FunctionType computeAliasedFunctionType(Typedef typedef, Library library) {
+  FunctionType computeAliasedConstructorFunctionType(
+      Typedef typedef, Library library) {
     TreeNode parent = this.parent;
     assert(parent is Constructor, "Only run this method on constructors");
     Constructor parentConstructor = parent;
@@ -2855,7 +2856,51 @@
             isRequired: decl.isRequired))
         .toList(growable: false);
     named.sort();
-    return new FunctionType(positional, typedefType, library.nonNullable,
+    return FunctionType(positional, typedefType.unalias, library.nonNullable,
+        namedParameters: named,
+        typeParameters: typedefTypeParametersCopy,
+        requiredParameterCount: requiredParameterCount);
+  }
+
+  /// Return function type of node returning [typedefType] reuse type parameters
+  ///
+  /// When this getter is invoked, the parent must be a [Procedure] which is a
+  /// redirecting factory constructor. This getter works similarly to
+  /// [computeThisFunctionType], but uses [typedef] to compute the return type
+  /// of the returned function type. It is useful in some contexts, especially
+  /// during inference of aliased factory invocations.
+  FunctionType computeAliasedFactoryFunctionType(
+      Typedef typedef, Library library) {
+    assert(
+        parent is Procedure &&
+            (parent as Procedure).kind == ProcedureKind.Factory,
+        "Only run this method on a factory");
+    // We need create a copy of the list of type parameters, otherwise
+    // transformations like erasure don't work.
+    List<TypeParameter> classTypeParametersCopy = List.from(typeParameters);
+    List<TypeParameter> typedefTypeParametersCopy =
+        List.from(typedef.typeParameters);
+    List<DartType> asTypeArguments =
+        getAsTypeArguments(typedefTypeParametersCopy, library);
+    TypedefType typedefType =
+        TypedefType(typedef, library.nonNullable, asTypeArguments);
+    DartType unaliasedTypedef = typedefType.unalias;
+    assert(unaliasedTypedef is InterfaceType,
+        "[typedef] is assumed to resolve to an interface type");
+    InterfaceType targetType = unaliasedTypedef;
+    Substitution substitution = Substitution.fromPairs(
+        classTypeParametersCopy, targetType.typeArguments);
+    List<DartType> positional = positionalParameters
+        .map((VariableDeclaration decl) =>
+            substitution.substituteType(decl.type))
+        .toList(growable: false);
+    List<NamedType> named = namedParameters
+        .map((VariableDeclaration decl) => NamedType(
+            decl.name, substitution.substituteType(decl.type),
+            isRequired: decl.isRequired))
+        .toList(growable: false);
+    named.sort();
+    return FunctionType(positional, typedefType.unalias, library.nonNullable,
         namedParameters: named,
         typeParameters: typedefTypeParametersCopy,
         requiredParameterCount: requiredParameterCount);
@@ -5438,7 +5483,7 @@
   }
 
   DartType getStaticType(StaticTypeContext context) {
-    return context.typeEnvironment.unfutureType(operand.getStaticType(context));
+    return context.typeEnvironment.flatten(operand.getStaticType(context));
   }
 
   R accept<R>(ExpressionVisitor<R> v) => v.visitAwaitExpression(this);
@@ -6915,6 +6960,13 @@
   }
 
   @override
+  String toStringInternal() {
+    AstPrinter printer = new AstPrinter(defaultAstTextStrategy);
+    printer.writeVariableDeclaration(this, includeInitializer: false);
+    return printer.getText();
+  }
+
+  @override
   void toTextInternal(AstPrinter printer) {
     printer.writeVariableDeclaration(this);
     printer.write(';');
@@ -7990,12 +8042,88 @@
   /// is therefore the same as the bound of [parameter].
   DartType promotedBound;
 
-  TypeParameterType(this.parameter, this.declaredNullability,
-      [this.promotedBound]);
+  TypeParameterType.internal(
+      this.parameter, this.declaredNullability, this.promotedBound) {
+    assert(
+        promotedBound == null ||
+            (declaredNullability == Nullability.nonNullable &&
+                promotedBound.nullability == Nullability.nonNullable) ||
+            (declaredNullability == Nullability.nonNullable &&
+                promotedBound.nullability == Nullability.undetermined) ||
+            (declaredNullability == Nullability.legacy &&
+                promotedBound.nullability == Nullability.legacy) ||
+            (declaredNullability == Nullability.undetermined &&
+                promotedBound.nullability == Nullability.nonNullable) ||
+            (declaredNullability == Nullability.undetermined &&
+                promotedBound.nullability == Nullability.nullable) ||
+            (declaredNullability == Nullability.undetermined &&
+                promotedBound.nullability == Nullability.undetermined)
+            // These are observed in real situations:
+            ||
+            // pkg/front_end/test/id_tests/type_promotion_test
+            // replicated in nnbd_mixed/type_parameter_nullability
+            (declaredNullability == Nullability.nullable &&
+                promotedBound.nullability == Nullability.nonNullable) ||
+            // pkg/front_end/test/fasta/types/kernel_type_parser_test
+            // pkg/front_end/test/fasta/incremental_hello_test
+            // pkg/front_end/test/fasta/types/fasta_types_test
+            // pkg/front_end/test/explicit_creation_test
+            // pkg/front_end/tool/fasta_perf_test
+            // nnbd/issue42089
+            // replicated in nnbd_mixed/type_parameter_nullability
+            (declaredNullability == Nullability.nullable &&
+                promotedBound.nullability == Nullability.nullable) ||
+            // pkg/front_end/test/explicit_creation_test
+            // pkg/front_end/test/dill_round_trip_test
+            // pkg/front_end/test/compile_dart2js_with_no_sdk_test
+            // pkg/front_end/test/fasta/types/large_app_benchmark_test
+            // pkg/front_end/test/incremental_dart2js_test
+            // pkg/front_end/test/read_dill_from_binary_md_test
+            // pkg/front_end/test/static_types/static_type_test
+            // pkg/front_end/test/split_dill_test
+            // pkg/front_end/tool/incremental_perf_test
+            // pkg/vm/test/kernel_front_end_test
+            // general/promoted_null_aware_access
+            // inference/constructors_infer_from_arguments_factory
+            // inference/infer_types_on_loop_indices_for_each_loop
+            // inference/infer_types_on_loop_indices_for_each_loop_async
+            // replicated in nnbd_mixed/type_parameter_nullability
+            (declaredNullability == Nullability.legacy &&
+                promotedBound.nullability == Nullability.nonNullable) ||
+            // pkg/front_end/test/fasta/incremental_hello_test
+            // pkg/front_end/test/explicit_creation_test
+            // pkg/front_end/tool/fasta_perf_test
+            // replicated in nnbd_mixed/type_parameter_nullability
+            (declaredNullability == Nullability.nullable &&
+                promotedBound.nullability == Nullability.undetermined) ||
+            // These are only observed in tests and might be artifacts of the
+            // tests rather than real situations:
+            //
+            // pkg/front_end/test/fasta/types/kernel_type_parser_test
+            // pkg/front_end/test/fasta/types/fasta_types_test
+            (declaredNullability == Nullability.legacy &&
+                promotedBound.nullability == Nullability.nullable) ||
+            // pkg/front_end/test/fasta/types/kernel_type_parser_test
+            // pkg/front_end/test/fasta/types/fasta_types_test
+            (declaredNullability == Nullability.nonNullable &&
+                promotedBound.nullability == Nullability.nullable) ||
+            // pkg/front_end/test/fasta/types/kernel_type_parser_test
+            // pkg/front_end/test/fasta/types/fasta_types_test
+            (declaredNullability == Nullability.undetermined &&
+                promotedBound.nullability == Nullability.legacy),
+        "Unexpected nullabilities for $parameter & $promotedBound: "
+        "declaredNullability = $declaredNullability, "
+        "promoted bound nullability = ${promotedBound.nullability}.");
+  }
+
+  TypeParameterType(TypeParameter parameter, Nullability declaredNullability,
+      [DartType promotedBound])
+      : this.internal(parameter, declaredNullability, promotedBound);
 
   /// Creates an intersection type between a type parameter and [promotedBound].
-  TypeParameterType.intersection(
-      this.parameter, this.declaredNullability, this.promotedBound);
+  TypeParameterType.intersection(TypeParameter parameter,
+      Nullability declaredNullability, DartType promotedBound)
+      : this.internal(parameter, declaredNullability, promotedBound);
 
   /// Creates a type-parameter type to be used in alpha-renaming.
   ///
@@ -8194,16 +8322,80 @@
     //
     // | LHS \ RHS |  !  |  ?  |  *  |  %  |
     // |-----------|-----|-----|-----|-----|
-    // |     !     |  !  | N/A | N/A |  !  |
-    // |     ?     | N/A | N/A | N/A | N/A |
-    // |     *     | N/A | N/A |  *  | N/A |
-    // |     %     |  !  |  %  | N/A |  %  |
+    // |     !     |  !  |  +  | N/A |  !  |
+    // |     ?     | (!) | (?) | N/A | (%) |
+    // |     *     | (*) |  +  |  *  | N/A |
+    // |     %     |  !  |  %  |  +  |  %  |
     //
     // In the table, LHS corresponds to lhsNullability in the code below; RHS
     // corresponds to promotedBound.nullability; !, ?, *, and % correspond to
     // nonNullable, nullable, legacy, and undetermined values of the Nullability
     // enum.
-    //
+
+    assert(
+        (lhsNullability == Nullability.nonNullable &&
+                promotedBound.nullability == Nullability.nonNullable) ||
+            (lhsNullability == Nullability.nonNullable &&
+                promotedBound.nullability == Nullability.undetermined) ||
+            (lhsNullability == Nullability.legacy &&
+                promotedBound.nullability == Nullability.legacy) ||
+            (lhsNullability == Nullability.undetermined &&
+                promotedBound.nullability == Nullability.nonNullable) ||
+            (lhsNullability == Nullability.undetermined &&
+                promotedBound.nullability == Nullability.nullable) ||
+            (lhsNullability == Nullability.undetermined &&
+                promotedBound.nullability == Nullability.undetermined)
+            // Apparently these happens as well:
+            ||
+            // pkg/front_end/test/id_tests/type_promotion_test
+            (lhsNullability == Nullability.nullable &&
+                promotedBound.nullability == Nullability.nonNullable) ||
+            // pkg/front_end/test/fasta/types/kernel_type_parser_test
+            // pkg/front_end/test/fasta/incremental_hello_test
+            // pkg/front_end/test/fasta/types/fasta_types_test
+            // pkg/front_end/test/explicit_creation_test
+            // pkg/front_end/tool/fasta_perf_test
+            // nnbd/issue42089
+            (lhsNullability == Nullability.nullable &&
+                promotedBound.nullability == Nullability.nullable) ||
+            // pkg/front_end/test/explicit_creation_test
+            // pkg/front_end/test/dill_round_trip_test
+            // pkg/front_end/test/compile_dart2js_with_no_sdk_test
+            // pkg/front_end/test/fasta/types/large_app_benchmark_test
+            // pkg/front_end/test/incremental_dart2js_test
+            // pkg/front_end/test/read_dill_from_binary_md_test
+            // pkg/front_end/test/static_types/static_type_test
+            // pkg/front_end/test/split_dill_test
+            // pkg/front_end/tool/incremental_perf_test
+            // pkg/vm/test/kernel_front_end_test
+            // general/promoted_null_aware_access
+            // inference/constructors_infer_from_arguments_factory
+            // inference/infer_types_on_loop_indices_for_each_loop
+            // inference/infer_types_on_loop_indices_for_each_loop_async
+            (lhsNullability == Nullability.legacy &&
+                promotedBound.nullability == Nullability.nonNullable) ||
+            // pkg/front_end/test/fasta/incremental_hello_test
+            // pkg/front_end/test/explicit_creation_test
+            // pkg/front_end/tool/fasta_perf_test
+            // pkg/front_end/test/fasta/incremental_hello_test
+            (lhsNullability == Nullability.nullable &&
+                promotedBound.nullability == Nullability.undetermined) ||
+
+            // This is created but never observed.
+            // (lhsNullability == Nullability.legacy &&
+            //     promotedBound.nullability == Nullability.nullable) ||
+
+            // pkg/front_end/test/fasta/types/kernel_type_parser_test
+            // pkg/front_end/test/fasta/types/fasta_types_test
+            (lhsNullability == Nullability.undetermined &&
+                promotedBound.nullability == Nullability.legacy) ||
+            // pkg/front_end/test/fasta/types/kernel_type_parser_test
+            // pkg/front_end/test/fasta/types/fasta_types_test
+            (lhsNullability == Nullability.nonNullable &&
+                promotedBound.nullability == Nullability.nullable),
+        "Unexpected nullabilities for: LHS nullability = $lhsNullability, "
+        "RHS nullability = ${promotedBound.nullability}.");
+
     // Whenever there's N/A in the table, it means that the corresponding
     // combination of the LHS and RHS nullability is not possible when compiling
     // from Dart source files, so we can define it to be whatever is faster and
@@ -8215,10 +8407,30 @@
     // | LHS \ RHS |  !  |  ?  |  *  |  %  |
     // |-----------|-----|-----|-----|-----|
     // |     !     |  !  |  !  |  !  |  !  |
-    // |     ?     |  !  |  *  |  *  |  %  |
-    // |     *     |  !  |  *  |  *  |  %  |
+    // |     ?     | (!) | (?) |  *  | (%) |
+    // |     *     | (*) |  *  |  *  |  %  |
     // |     %     |  !  |  %  |  %  |  %  |
 
+    if (lhsNullability == Nullability.nullable &&
+        promotedBound.nullability == Nullability.nonNullable) {
+      return Nullability.nonNullable;
+    }
+
+    if (lhsNullability == Nullability.nullable &&
+        promotedBound.nullability == Nullability.nullable) {
+      return Nullability.nullable;
+    }
+
+    if (lhsNullability == Nullability.legacy &&
+        promotedBound.nullability == Nullability.nonNullable) {
+      return Nullability.legacy;
+    }
+
+    if (lhsNullability == Nullability.nullable &&
+        promotedBound.nullability == Nullability.undetermined) {
+      return Nullability.undetermined;
+    }
+
     // Intersection with a non-nullable type always yields a non-nullable type,
     // as it's the most restrictive kind of types.
     if (lhsNullability == Nullability.nonNullable ||
@@ -8258,22 +8470,17 @@
 
   @override
   void toTextInternal(AstPrinter printer) {
-    printer.writeTypeParameterName(parameter);
-    printer.write(nullabilityToString(declaredNullability));
     if (promotedBound != null) {
+      printer.write('(');
+      printer.writeTypeParameterName(parameter);
+      printer.write(nullabilityToString(declaredNullability));
       printer.write(" & ");
-      printer.write(promotedBound.toStringInternal());
-      printer.write(" /* '");
+      printer.writeType(promotedBound);
+      printer.write(')');
+      printer.write(nullabilityToString(nullability));
+    } else {
+      printer.writeTypeParameterName(parameter);
       printer.write(nullabilityToString(declaredNullability));
-      printer.write("' & '");
-      if (promotedBound is InvalidType) {
-        printer.write(nullabilityToString(Nullability.undetermined));
-      } else {
-        printer.write(nullabilityToString(promotedBound.nullability));
-      }
-      printer.write("' = '");
-      printer.write(nullabilityToString(declaredNullability));
-      printer.write("' */");
     }
   }
 }
diff --git a/pkg/kernel/lib/binary/ast_from_binary.dart b/pkg/kernel/lib/binary/ast_from_binary.dart
index 9a32677..b5e70b6 100644
--- a/pkg/kernel/lib/binary/ast_from_binary.dart
+++ b/pkg/kernel/lib/binary/ast_from_binary.dart
@@ -5,6 +5,7 @@
 
 import 'dart:core' hide MapEntry;
 import 'dart:developer';
+import 'dart:convert';
 import 'dart:typed_data';
 
 import '../ast.dart';
@@ -28,11 +29,22 @@
   InvalidKernelVersionError(this.version);
 
   String toString() {
-    return 'Unexpected Kernel version ${version} '
+    return 'Unexpected Kernel Format Version ${version} '
         '(expected ${Tag.BinaryFormatVersion}).';
   }
 }
 
+class InvalidKernelSdkVersionError {
+  final String version;
+
+  InvalidKernelSdkVersionError(this.version);
+
+  String toString() {
+    return 'Unexpected Kernel SDK Version ${version} '
+        '(expected ${expectedSdkHash}).';
+  }
+}
+
 class CompilationModeError {
   final String message;
 
@@ -484,6 +496,13 @@
     if (_bytes.length == 0) throw new StateError("Empty input given.");
   }
 
+  void _readAndVerifySdkHash() {
+    final sdkHash = ascii.decode(readBytes(sdkHashLength));
+    if (!isValidSdkHash(sdkHash)) {
+      throw InvalidKernelSdkVersionError(sdkHash);
+    }
+  }
+
   /// Deserializes a kernel component and stores it in [component].
   ///
   /// When linking with a non-empty component, canonical names must have been
@@ -511,6 +530,9 @@
       if (version != Tag.BinaryFormatVersion) {
         throw InvalidKernelVersionError(version);
       }
+
+      _readAndVerifySdkHash();
+
       _byteOffset = offset;
       List<int> componentFileSizes = _indexComponents();
       if (componentFileSizes.length > 1) {
@@ -694,6 +716,8 @@
       throw InvalidKernelVersionError(formatVersion);
     }
 
+    _readAndVerifySdkHash();
+
     // Read component index from the end of this ComponentFiles serialized data.
     _ComponentIndex index = _readComponentIndex(componentFileSize);
 
@@ -718,6 +742,8 @@
       throw InvalidKernelVersionError(formatVersion);
     }
 
+    _readAndVerifySdkHash();
+
     List<String> problemsAsJson = readListOfStrings();
     if (problemsAsJson != null) {
       component.problemsAsJson ??= <String>[];
diff --git a/pkg/kernel/lib/binary/ast_to_binary.dart b/pkg/kernel/lib/binary/ast_to_binary.dart
index 57ccd2f..dc3be1e 100644
--- a/pkg/kernel/lib/binary/ast_to_binary.dart
+++ b/pkg/kernel/lib/binary/ast_to_binary.dart
@@ -4,6 +4,7 @@
 library kernel.ast_to_binary;
 
 import 'dart:core' hide MapEntry;
+import 'dart:convert';
 import 'dart:developer';
 import 'dart:io' show BytesBuilder;
 import 'dart:typed_data';
@@ -537,6 +538,7 @@
       final componentOffset = getBufferOffset();
       writeUInt32(Tag.ComponentFile);
       writeUInt32(Tag.BinaryFormatVersion);
+      writeBytes(ascii.encode(expectedSdkHash));
       writeListOfStrings(component.problemsAsJson);
       indexLinkTable(component);
       _collectMetadata(component);
diff --git a/pkg/kernel/lib/binary/tag.dart b/pkg/kernel/lib/binary/tag.dart
index cec2308..79cea32 100644
--- a/pkg/kernel/lib/binary/tag.dart
+++ b/pkg/kernel/lib/binary/tag.dart
@@ -149,7 +149,7 @@
   /// Internal version of kernel binary format.
   /// Bump it when making incompatible changes in kernel binaries.
   /// Keep in sync with runtime/vm/kernel_binary.h, pkg/kernel/binary.md.
-  static const int BinaryFormatVersion = 42;
+  static const int BinaryFormatVersion = 43;
 }
 
 abstract class ConstantTag {
@@ -169,3 +169,27 @@
   static const int UnevaluatedConstant = 12;
   // 13 is occupied by [SetConstant]
 }
+
+const int sdkHashLength = 10; // Bytes, a Git "short hash".
+
+const String sdkHashNull = '0000000000';
+
+// Will be correct hash for Flutter SDK / Dart SDK we distribute.
+// If non-null we will validate when consuming kernel, will use when producing
+// kernel.
+// If null, local development setting (e.g. run gen_kernel.dart from source),
+// we put 0x00..00 into when producing, do not validate when consuming.
+String get expectedSdkHash {
+  final sdkHash =
+      const String.fromEnvironment('sdk_hash', defaultValue: sdkHashNull);
+  if (sdkHash.length != sdkHashLength) {
+    throw '-Dsdk_hash=<hash> must be a ${sdkHashLength} byte string!';
+  }
+  return sdkHash;
+}
+
+bool isValidSdkHash(String sdkHash) {
+  return (sdkHash == sdkHashNull ||
+      expectedSdkHash == sdkHashNull ||
+      sdkHash == expectedSdkHash);
+}
diff --git a/pkg/kernel/lib/src/dart_type_equivalence.dart b/pkg/kernel/lib/src/dart_type_equivalence.dart
index cdb6586..35def49 100644
--- a/pkg/kernel/lib/src/dart_type_equivalence.dart
+++ b/pkg/kernel/lib/src/dart_type_equivalence.dart
@@ -240,7 +240,7 @@
       }
       assert(node.typeArguments.length == other.typeArguments.length);
       for (int i = 0; i < node.typeArguments.length; ++i) {
-        if (!node.typeArguments[i].accept1(this, node.typeArguments[i])) {
+        if (!node.typeArguments[i].accept1(this, other.typeArguments[i])) {
           return false;
         }
       }
diff --git a/pkg/kernel/lib/src/future_value_type.dart b/pkg/kernel/lib/src/future_value_type.dart
new file mode 100644
index 0000000..939bb69
--- /dev/null
+++ b/pkg/kernel/lib/src/future_value_type.dart
@@ -0,0 +1,101 @@
+// Copyright (c) 2020, the Dart project authors.  Please see the AUTHORS file
+// for 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 '../ast.dart';
+import '../core_types.dart';
+
+DartType computeFutureValueType(CoreTypes coreTypes, DartType type) {
+  return type.accept1(const FutureValueTypeVisitor(), coreTypes);
+}
+
+class FutureValueTypeVisitor implements DartTypeVisitor1<DartType, CoreTypes> {
+  /// Helper function invoked on unknown implementers of [DartType].
+  ///
+  /// Its arguments are the unhandled type and the function that can be invoked
+  /// from within the handler on parts of the unknown type to recursively call
+  /// the visitor.  If not set, an exception is thrown then an unhandled
+  /// implementer of [DartType] is encountered.
+  final DartType Function(DartType node, CoreTypes coreTypes,
+          DartType Function(DartType node, CoreTypes coreTypes) recursor)
+      unhandledTypeHandler;
+
+  const FutureValueTypeVisitor({this.unhandledTypeHandler});
+
+  DartType visit(DartType node, CoreTypes coreTypes) =>
+      node.accept1(this, coreTypes);
+
+  @override
+  DartType defaultDartType(DartType node, CoreTypes coreTypes) {
+    if (unhandledTypeHandler == null) {
+      throw new UnsupportedError("Unsupported type '${node.runtimeType}'.");
+    } else {
+      return unhandledTypeHandler(node, coreTypes, visit);
+    }
+  }
+
+  @override
+  DartType visitBottomType(BottomType node, CoreTypes coreTypes) {
+    // Otherwise, for all S, futureValueType(S) = Object?.
+    return coreTypes.objectNullableRawType;
+  }
+
+  @override
+  DartType visitDynamicType(DynamicType node, CoreTypes coreTypes) {
+    // futureValueType(dynamic) = dynamic.
+    return node;
+  }
+
+  @override
+  DartType visitFunctionType(FunctionType node, CoreTypes coreTypes) {
+    // Otherwise, for all S, futureValueType(S) = Object?.
+    return coreTypes.objectNullableRawType;
+  }
+
+  @override
+  DartType visitInterfaceType(InterfaceType node, CoreTypes coreTypes) {
+    if (node.classNode == coreTypes.futureClass) {
+      // futureValueType(Future<S>) = S, for all S.
+      return node.typeArguments.single;
+    }
+    // Otherwise, for all S, futureValueType(S) = Object?.
+    return coreTypes.objectNullableRawType;
+  }
+
+  @override
+  DartType visitFutureOrType(FutureOrType node, CoreTypes coreTypes) {
+    // futureValueType(FutureOr<S>) = S, for all S.
+    return node.typeArgument;
+  }
+
+  @override
+  DartType visitInvalidType(InvalidType node, CoreTypes coreTypes) {
+    // Return the invalid type itself to continue the encapsulation of the
+    // error state.
+    return node;
+  }
+
+  @override
+  DartType visitNeverType(DartType node, CoreTypes coreTypes) {
+    // Otherwise, for all S, futureValueType(S) = Object?.
+    return coreTypes.objectNullableRawType;
+  }
+
+  @override
+  DartType visitTypeParameterType(DartType node, CoreTypes coreTypes) {
+    // Otherwise, for all S, futureValueType(S) = Object?.
+    return coreTypes.objectNullableRawType;
+  }
+
+  @override
+  DartType visitTypedefType(DartType node, CoreTypes coreTypes) {
+    // Otherwise, for all S, futureValueType(S) = Object?.
+    return coreTypes.objectNullableRawType;
+  }
+
+  @override
+  DartType visitVoidType(DartType node, CoreTypes coreTypes) {
+    // futureValueType(void) = void.
+    return node;
+  }
+}
diff --git a/pkg/kernel/lib/src/printer.dart b/pkg/kernel/lib/src/printer.dart
index 82670c4..0e9223d 100644
--- a/pkg/kernel/lib/src/printer.dart
+++ b/pkg/kernel/lib/src/printer.dart
@@ -363,7 +363,10 @@
   /// If [isLate] and [type] are provided, these values are used instead of
   /// the corresponding properties on [node].
   void writeVariableDeclaration(VariableDeclaration node,
-      {bool includeModifiersAndType: true, bool isLate, DartType type}) {
+      {bool includeModifiersAndType: true,
+      bool isLate,
+      DartType type,
+      bool includeInitializer: true}) {
     if (includeModifiersAndType) {
       if (node.isRequired) {
         _sb.write('required ');
@@ -381,7 +384,7 @@
       _sb.write(' ');
     }
     _sb.write(getVariableName(node));
-    if (node.initializer != null && !node.isRequired) {
+    if (includeInitializer && node.initializer != null && !node.isRequired) {
       _sb.write(' = ');
       writeExpression(node.initializer);
     }
diff --git a/pkg/kernel/lib/testing/type_parser_environment.dart b/pkg/kernel/lib/testing/type_parser_environment.dart
index 2e07a3e..10ffc59f 100644
--- a/pkg/kernel/lib/testing/type_parser_environment.dart
+++ b/pkg/kernel/lib/testing/type_parser_environment.dart
@@ -121,6 +121,13 @@
     _libraryEnvironment =
         _libraryEnvironment.extendWithTypeParameters(typeParameters);
   }
+
+  void withTypeParameters(String typeParameters, void Function() f) {
+    TypeParserEnvironment oldLibraryEnvironment = _libraryEnvironment;
+    extendWithTypeParameters(typeParameters);
+    f();
+    _libraryEnvironment = oldLibraryEnvironment;
+  }
 }
 
 class TypeParserEnvironment {
diff --git a/pkg/kernel/lib/type_checker.dart b/pkg/kernel/lib/type_checker.dart
index 9631b2c..d5a0a2e 100644
--- a/pkg/kernel/lib/type_checker.dart
+++ b/pkg/kernel/lib/type_checker.dart
@@ -423,7 +423,7 @@
 
   @override
   DartType visitAwaitExpression(AwaitExpression node) {
-    return environment.unfutureType(visitExpression(node.operand));
+    return environment.flatten(visitExpression(node.operand));
   }
 
   @override
@@ -993,7 +993,7 @@
       } else {
         var type = visitExpression(node.expression);
         if (currentAsyncMarker == AsyncMarker.Async) {
-          type = environment.unfutureType(type);
+          type = environment.flatten(type);
         }
         checkAssignable(node.expression, type, currentReturnType);
       }
diff --git a/pkg/kernel/lib/type_environment.dart b/pkg/kernel/lib/type_environment.dart
index 2426f31..14bb59d 100644
--- a/pkg/kernel/lib/type_environment.dart
+++ b/pkg/kernel/lib/type_environment.dart
@@ -3,6 +3,8 @@
 // BSD-style license that can be found in the LICENSE file.
 library kernel.type_environment;
 
+import 'package:kernel/type_algebra.dart';
+
 import 'ast.dart';
 import 'class_hierarchy.dart';
 import 'core_types.dart';
@@ -79,27 +81,38 @@
         coreTypes.futureClass, nullability, <DartType>[type]);
   }
 
-  /// Removes a level of `Future<>` types wrapping a type.
-  ///
-  /// This implements the function `flatten` from the spec, which unwraps a
+  DartType _withDeclaredNullability(DartType type, Nullability nullability) {
+    if (type == nullType) return type;
+    return type.withDeclaredNullability(
+        uniteNullabilities(type.declaredNullability, nullability));
+  }
+
+  /// Returns the `flatten` of [type] as defined in the spec, which unwraps a
   /// layer of Future or FutureOr from a type.
-  DartType unfutureType(DartType type) {
-    if (type is FutureOrType) return type.typeArgument;
-    if (type is InterfaceType) {
-      if (type.classNode == coreTypes.futureClass) {
-        return type.typeArguments[0];
-      }
-      // It is a compile-time error to implement, extend, or mixin FutureOr so
-      // we aren't concerned with it.  If a class implements multiple
-      // instantiations of Future, getTypeAsInstanceOf is responsible for
-      // picking the least one in the sense required by the spec.
+  DartType flatten(DartType t) {
+    // if T is S? then flatten(T) = flatten(S)?
+    // otherwise if T is S* then flatten(T) = flatten(S)*
+    // -- this is preserve with the calls to [_withDeclaredNullability] below.
+
+    // otherwise if T is FutureOr<S> then flatten(T) = S
+    if (t is FutureOrType) {
+      return _withDeclaredNullability(t.typeArgument, t.declaredNullability);
+    }
+
+    // otherwise if T <: Future then let S be a type such that T <: Future<S>
+    //   and for all R, if T <: Future<R> then S <: R; then flatten(T) = S
+    DartType resolved = _resolveTypeParameterType(t);
+    if (resolved is InterfaceType) {
       List<DartType> futureArguments =
-          getTypeArgumentsAsInstanceOf(type, coreTypes.futureClass);
+          getTypeArgumentsAsInstanceOf(resolved, coreTypes.futureClass);
       if (futureArguments != null) {
-        return futureArguments[0];
+        return _withDeclaredNullability(
+            futureArguments.single, t.declaredNullability);
       }
     }
-    return type;
+
+    // otherwise flatten(T) = T
+    return t;
   }
 
   /// Returns the non-type parameter type bound of [type].
diff --git a/pkg/kernel/test/dart_type_equivalence_test.dart b/pkg/kernel/test/dart_type_equivalence_test.dart
index 4ec0895..4f27768 100644
--- a/pkg/kernel/test/dart_type_equivalence_test.dart
+++ b/pkg/kernel/test/dart_type_equivalence_test.dart
@@ -147,6 +147,21 @@
       equateTopTypes: true, ignoreAllNullabilities: true);
   notEqual("FutureOr<Object>", "Object",
       equateTopTypes: true, ignoreAllNullabilities: true);
+
+  // Typedef types.
+  areEqual("Typedef<int>", "Typedef<int>");
+  notEqual("Typedef<String>", "Typedef<num>");
+  notEqual("Typedef<num?>?", "Typedef<num>");
+  notEqual("Typedef<num?>?", "Typedef<num>", ignoreTopLevelNullability: true);
+  areEqual("Typedef<num?>?", "Typedef<num>", ignoreAllNullabilities: true);
+  notEqual("Typedef<Object?>?", "Typedef<dynamic>");
+  notEqual("Typedef<Object?>?", "Typedef<dynamic>",
+      ignoreTopLevelNullability: true);
+  notEqual("Typedef<Object?>?", "Typedef<dynamic>",
+      ignoreAllNullabilities: true);
+  notEqual("Typedef<Object?>?", "Typedef<dynamic>", equateTopTypes: true);
+  areEqual("Typedef<Object?>?", "Typedef<dynamic>",
+      equateTopTypes: true, ignoreTopLevelNullability: true);
 }
 
 areEqual(String type1, String type2,
@@ -154,7 +169,8 @@
     bool equateTopTypes = false,
     bool ignoreAllNullabilities = false,
     bool ignoreTopLevelNullability = false}) {
-  Env env = new Env('')..extendWithTypeParameters(typeParameters);
+  Env env = new Env("typedef Typedef<T> () -> T;\n")
+    ..extendWithTypeParameters(typeParameters);
   DartType t1 = env.parseType(type1);
   DartType t2 = env.parseType(type2);
 
@@ -192,7 +208,8 @@
     bool equateTopTypes = false,
     bool ignoreAllNullabilities = false,
     bool ignoreTopLevelNullability = false}) {
-  Env env = new Env('')..extendWithTypeParameters(typeParameters);
+  Env env = new Env("typedef Typedef<T> () -> T;\n")
+    ..extendWithTypeParameters(typeParameters);
   DartType t1 = env.parseType(type1);
   DartType t2 = env.parseType(type2);
 
diff --git a/pkg/kernel/test/flatten_test.dart b/pkg/kernel/test/flatten_test.dart
new file mode 100644
index 0000000..ab6c1ee
--- /dev/null
+++ b/pkg/kernel/test/flatten_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:expect/expect.dart" show Expect;
+
+import 'package:kernel/ast.dart' hide MapEntry;
+import 'package:kernel/class_hierarchy.dart';
+import 'package:kernel/testing/type_parser_environment.dart';
+import 'package:kernel/type_environment.dart';
+
+const Set<Test> data = {
+  const Test('Null', 'Null'),
+  const Test('Never?', 'Never?'),
+  const Test('void', 'void'),
+  const Test('dynamic', 'dynamic'),
+  const Test('bool', 'bool'),
+  const Test('bool?', 'bool?'),
+  const Test('bool*', 'bool*'),
+  const Test('List<bool>', 'List<bool>'),
+  const Test('List<bool>?', 'List<bool>?'),
+  const Test('List<bool>*', 'List<bool>*'),
+  const Test('FutureOr<bool>', 'bool'),
+  const Test('FutureOr<bool>?', 'bool?'),
+  const Test('FutureOr<bool>*', 'bool*'),
+  const Test('FutureOr<bool?>*', 'bool?'),
+  const Test('FutureOr<bool?>?', 'bool?'),
+  const Test('FutureOr<bool*>?', 'bool?'),
+  const Test('FutureOr<Null>', 'Null'),
+  const Test('FutureOr<Null>?', 'Null'),
+  const Test('FutureOr<Null>*', 'Null'),
+  const Test('Future<bool>', 'bool'),
+  const Test('Future<bool>?', 'bool?'),
+  const Test('Future<bool>*', 'bool*'),
+  const Test('Future<bool?>', 'bool?'),
+  const Test('Future<bool*>', 'bool*'),
+  const Test('() ->* bool*', '() ->* bool*'),
+  const Test('() -> bool*', '() -> bool*'),
+  const Test('() ->? bool*', '() ->? bool*'),
+  const Test('() ->* bool', '() ->* bool'),
+  const Test('() ->? bool', '() ->? bool'),
+  const Test('() -> bool', '() -> bool'),
+  const Test('T', 'T', 'T'),
+  const Test('T?', 'T?', 'T'),
+  const Test('T*', 'T*', 'T'),
+  const Test('T', 'T', 'T extends bool'),
+  const Test('T?', 'T?', 'T extends bool'),
+  const Test('T*', 'T*', 'T extends bool'),
+  const Test('T', 'T', 'T extends FutureOr<bool>'),
+  const Test('T?', 'T?', 'T extends FutureOr<bool>'),
+  const Test('T*', 'T*', 'T extends FutureOr<bool>'),
+  const Test('T', 'bool', 'T extends Future<bool>'),
+  const Test('T?', 'bool?', 'T extends Future<bool>'),
+  const Test('T*', 'bool*', 'T extends Future<bool>'),
+  const Test('T & bool', 'T & bool', 'T'),
+  const Test('T & bool?', 'T & bool?', 'T'),
+  const Test('T & bool*', 'T & bool*', 'T'),
+};
+
+class Test {
+  final String input;
+  final String output;
+  final String typeParameters;
+
+  const Test(this.input, this.output, [this.typeParameters]);
+}
+
+main() {
+  Env env = new Env('');
+  ClassHierarchy classHierarchy =
+      new ClassHierarchy(env.component, env.coreTypes);
+  TypeEnvironment typeEnvironment =
+      new TypeEnvironment(env.coreTypes, classHierarchy);
+  data.forEach((Test test) {
+    env.withTypeParameters(test.typeParameters, () {
+      String input = test.input;
+      String output = test.output;
+      DartType inputType = env.parseType(input);
+      DartType expectedOutputType = env.parseType(output);
+      DartType actualOutputType = typeEnvironment.flatten(inputType);
+      print('flatten($inputType) '
+          '${test.typeParameters != null ? 'with ${test.typeParameters} ' : ''}'
+          '= $actualOutputType, expected $expectedOutputType');
+      Expect.equals(
+          expectedOutputType,
+          actualOutputType,
+          "Unexpected flatten of $inputType ('$input'):\n"
+          "Expected: ${expectedOutputType} ('$output')\n"
+          "Actual: ${actualOutputType}");
+    });
+  });
+}
diff --git a/pkg/kernel/test/future_value_type_test.dart b/pkg/kernel/test/future_value_type_test.dart
new file mode 100644
index 0000000..5c0f032
--- /dev/null
+++ b/pkg/kernel/test/future_value_type_test.dart
@@ -0,0 +1,89 @@
+// 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" show Expect;
+
+import 'package:kernel/ast.dart' hide MapEntry;
+import 'package:kernel/src/future_value_type.dart';
+import 'package:kernel/testing/type_parser_environment.dart';
+
+const Map<String, String> data = {
+  'Null': 'Object?',
+  'Never': 'Object?',
+  'Never?': 'Object?',
+  'void': 'void',
+  'dynamic': 'dynamic',
+  'bool': 'Object?',
+  'bool?': 'Object?',
+  'bool*': 'Object?',
+  'List<bool>': 'Object?',
+  '() -> void': 'Object?',
+  '<T>(T) -> void': 'Object?',
+  'X': 'Object?',
+  'X_extends_FutureInt': 'Object?',
+  'X_extends_FutureOrInt': 'Object?',
+  'Future<dynamic>': 'dynamic',
+  'Future<dynamic>?': 'dynamic',
+  'Future<dynamic>*': 'dynamic',
+  'Future<Object>': 'Object',
+  'Future<Object>?': 'Object',
+  'Future<Object>*': 'Object',
+  'Future<int?>': 'int?',
+  'Future<int?>?': 'int?',
+  'Future<int?>*': 'int?',
+  'Future<Future<int>?>': 'Future<int>?',
+  'Future<Future<int>?>?': 'Future<int>?',
+  'Future<Future<int>?>*': 'Future<int>?',
+  'Future<FutureOr<int>?>': 'FutureOr<int>?',
+  'Future<FutureOr<int>?>?': 'FutureOr<int>?',
+  'Future<FutureOr<int>?>*': 'FutureOr<int>?',
+  'Future<Null>': 'Null',
+  'Future<Null>?': 'Null',
+  'Future<Null>*': 'Null',
+  'Future<void>': 'void',
+  'Future<void>?': 'void',
+  'Future<void>*': 'void',
+  'FutureOr<dynamic>': 'dynamic',
+  'FutureOr<dynamic>?': 'dynamic',
+  'FutureOr<dynamic>*': 'dynamic',
+  'FutureOr<Object>': 'Object',
+  'FutureOr<Object>?': 'Object',
+  'FutureOr<Object>*': 'Object',
+  'FutureOr<int?>': 'int?',
+  'FutureOr<int?>?': 'int?',
+  'FutureOr<int?>*': 'int?',
+  'FutureOr<Future<int>?>': 'Future<int>?',
+  'FutureOr<Future<int>?>?': 'Future<int>?',
+  'FutureOr<Future<int>?>*': 'Future<int>?',
+  'FutureOr<FutureOr<int>?>': 'FutureOr<int>?',
+  'FutureOr<FutureOr<int>?>?': 'FutureOr<int>?',
+  'FutureOr<FutureOr<int>?>*': 'FutureOr<int>?',
+  'FutureOr<Null>': 'Null',
+  'FutureOr<Null>?': 'Null',
+  'FutureOr<Null>*': 'Null',
+  'FutureOr<void>': 'void',
+  'FutureOr<void>?': 'void',
+  'FutureOr<void>*': 'void',
+};
+
+main() {
+  Env env = new Env('')
+    ..extendWithTypeParameters('X,'
+        'X_extends_FutureInt extends Future<int>,'
+        'X_extends_FutureOrInt extends FutureOr<int>');
+  data.forEach((String input, String output) {
+    DartType inputType = env.parseType(input);
+    DartType expectedOutputType = env.parseType(output);
+    DartType actualOutputType =
+        computeFutureValueType(env.coreTypes, inputType);
+    print(
+        'futureValueType($inputType) = $actualOutputType: $expectedOutputType');
+    Expect.equals(
+        expectedOutputType,
+        actualOutputType,
+        "Unexpected future value type of $inputType ('$input'):\n"
+        "Expected: ${expectedOutputType} ('$output')\n"
+        "Actual: ${actualOutputType}");
+  });
+}
diff --git a/pkg/nnbd_migration/lib/migration_cli.dart b/pkg/nnbd_migration/lib/migration_cli.dart
index 3c5a8d9..8573990 100644
--- a/pkg/nnbd_migration/lib/migration_cli.dart
+++ b/pkg/nnbd_migration/lib/migration_cli.dart
@@ -509,6 +509,19 @@
     return stream.first;
   }
 
+  /// Computes the internet address that should be passed to `HttpServer.bind`
+  /// when starting the preview server.  May be overridden in derived classes.
+  Object computeBindAddress() {
+    var hostname = options.previewHostname;
+    if (hostname == 'localhost') {
+      return InternetAddress.loopbackIPv4;
+    } else if (hostname == 'any') {
+      return InternetAddress.anyIPv6;
+    } else {
+      return hostname;
+    }
+  }
+
   /// Computes the set of file paths that should be analyzed by the migration
   /// engine.  May be overridden by a derived class.
   ///
@@ -525,15 +538,16 @@
           .where((s) => s.endsWith('.dart'))
           .toSet();
 
-  NonNullableFix createNonNullableFix(DartFixListener listener,
-      ResourceProvider resourceProvider, LineInfo getLineInfo(String path),
+  NonNullableFix createNonNullableFix(
+      DartFixListener listener,
+      ResourceProvider resourceProvider,
+      LineInfo getLineInfo(String path),
+      Object bindAddress,
       {List<String> included = const <String>[],
-      String hostname,
       int preferredPort,
       String summaryPath}) {
-    return NonNullableFix(listener, resourceProvider, getLineInfo,
+    return NonNullableFix(listener, resourceProvider, getLineInfo, bindAddress,
         included: included,
-        hostname: hostname,
         preferredPort: preferredPort,
         summaryPath: summaryPath);
   }
@@ -566,10 +580,9 @@
     _fixCodeProcessor = _FixCodeProcessor(context, this);
     _dartFixListener = DartFixListener(
         DriverProviderImpl(resourceProvider, context), _exceptionReported);
-    nonNullableFix = createNonNullableFix(
-        _dartFixListener, resourceProvider, _fixCodeProcessor.getLineInfo,
+    nonNullableFix = createNonNullableFix(_dartFixListener, resourceProvider,
+        _fixCodeProcessor.getLineInfo, computeBindAddress(),
         included: [options.directory],
-        hostname: options.previewHostname,
         preferredPort: options.previewPort,
         summaryPath: options.summary);
     nonNullableFix.rerunFunction = _rerunFunction;
diff --git a/pkg/nnbd_migration/lib/src/edge_builder.dart b/pkg/nnbd_migration/lib/src/edge_builder.dart
index f155562..d60252d 100644
--- a/pkg/nnbd_migration/lib/src/edge_builder.dart
+++ b/pkg/nnbd_migration/lib/src/edge_builder.dart
@@ -776,6 +776,11 @@
   }
 
   @override
+  DecoratedType visitExtensionOverride(ExtensionOverride node) {
+    return _dispatch(node.argumentList.arguments.single);
+  }
+
+  @override
   DecoratedType visitFieldFormalParameter(FieldFormalParameter node) {
     _dispatchList(node.metadata);
     _dispatch(node.parameters);
diff --git a/pkg/nnbd_migration/lib/src/fix_builder.dart b/pkg/nnbd_migration/lib/src/fix_builder.dart
index ad8710d..c53d9a5 100644
--- a/pkg/nnbd_migration/lib/src/fix_builder.dart
+++ b/pkg/nnbd_migration/lib/src/fix_builder.dart
@@ -24,6 +24,7 @@
 import 'package:analyzer/src/generated/migration.dart';
 import 'package:analyzer/src/generated/resolver.dart';
 import 'package:analyzer/src/generated/source.dart';
+import 'package:analyzer/src/generated/type_system.dart';
 import 'package:analyzer/src/generated/utilities_dart.dart';
 import 'package:analyzer/src/task/strong/checker.dart';
 import 'package:nnbd_migration/fix_reason_target.dart';
@@ -382,6 +383,15 @@
       });
 
   @override
+  DartType getExtendedType(ExtensionElementImpl element) {
+    return _wrapExceptions(
+        _fixBuilder.unit,
+        () => element.extendedTypeInternal,
+        () => _fixBuilder._variables
+            .toFinalType(_fixBuilder._variables.decoratedElementType(element)));
+  }
+
+  @override
   DartType getFieldType(PropertyInducingElementImpl element) =>
       _wrapExceptions(_fixBuilder.unit, () => element.typeInternal, () {
         assert(!element.isSynthetic);
diff --git a/pkg/nnbd_migration/lib/src/front_end/non_nullable_fix.dart b/pkg/nnbd_migration/lib/src/front_end/non_nullable_fix.dart
index fb43d4e..9e385ee 100644
--- a/pkg/nnbd_migration/lib/src/front_end/non_nullable_fix.dart
+++ b/pkg/nnbd_migration/lib/src/front_end/non_nullable_fix.dart
@@ -38,7 +38,10 @@
 
   static final List<HttpPreviewServer> _allServers = [];
 
-  final String hostname;
+  /// The internet address the server should bind to.  Should be suitable for
+  /// passing to HttpServer.bind, i.e. either a [String] or an
+  /// [InternetAddress].
+  final Object bindAddress;
 
   final int preferredPort;
 
@@ -80,11 +83,9 @@
   /// A list of the URLs corresponding to the included roots.
   List<String> previewUrls;
 
-  NonNullableFix(this.listener, this.resourceProvider, this._getLineInfo,
-      {List<String> included = const [],
-      this.hostname,
-      this.preferredPort,
-      this.summaryPath})
+  NonNullableFix(
+      this.listener, this.resourceProvider, this._getLineInfo, this.bindAddress,
+      {List<String> included = const [], this.preferredPort, this.summaryPath})
       : includedRoot =
             _getIncludedRoot(included, listener.server.resourceProvider) {
     reset();
@@ -184,7 +185,7 @@
 
   Future<void> startPreviewServer(MigrationState state) async {
     if (_server == null) {
-      _server = HttpPreviewServer(state, rerun, hostname, preferredPort);
+      _server = HttpPreviewServer(state, rerun, bindAddress, preferredPort);
       _server.serveHttp();
       _allServers.add(_server);
       var serverHostname = await _server.boundHostname;
diff --git a/pkg/nnbd_migration/lib/src/front_end/resources/migration.css b/pkg/nnbd_migration/lib/src/front_end/resources/migration.css
index 53fb7cc..0d594f0 100644
--- a/pkg/nnbd_migration/lib/src/front_end/resources/migration.css
+++ b/pkg/nnbd_migration/lib/src/front_end/resources/migration.css
@@ -384,9 +384,9 @@
   background-color: #178afd; /* $dark-selection-color */
   color: #fff;
   display: inline-block;
-  height: 18px;
+  height: 14px;
   position: relative;
-  top: 3px;
+  top: 1px;
 }
 
 .target {
diff --git a/pkg/nnbd_migration/lib/src/front_end/resources/resources.g.dart b/pkg/nnbd_migration/lib/src/front_end/resources/resources.g.dart
index 52c6871..930fdbd 100644
--- a/pkg/nnbd_migration/lib/src/front_end/resources/resources.g.dart
+++ b/pkg/nnbd_migration/lib/src/front_end/resources/resources.g.dart
@@ -7486,7 +7486,7 @@
 ''';
 
 String _migration_css;
-// migration_css md5 is 'b0c95ec84cbd6de507ca2e6a7d6a45b7'
+// migration_css md5 is 'c3045f5a8c1f62b4e8f5efd90e079029'
 String _migration_css_base64 = '''
 LyogQ29weXJpZ2h0IChjKSAyMDE5LCB0aGUgRGFydCBwcm9qZWN0IGF1dGhvcnMuIFBsZWFzZSBzZWUg
 dGhlIEFVVEhPUlMgZmlsZSAgKi8KLyogZm9yIGRldGFpbHMuIEFsbCByaWdodHMgcmVzZXJ2ZWQuIFVz
@@ -7595,7 +7595,7 @@
 dW5kLWNvbG9yOiAjRkE1NTdkOyAvKiAkZGFyay1waW5rICovCiAgY29sb3I6ICNmZmY7Cn0KCi5yZWdp
 b24uaW5mb3JtYXRpdmUtcmVnaW9uIHsKICBiYWNrZ3JvdW5kLWNvbG9yOiAjMTc4YWZkOyAvKiAkZGFy
 ay1zZWxlY3Rpb24tY29sb3IgKi8KICBjb2xvcjogI2ZmZjsKICBkaXNwbGF5OiBpbmxpbmUtYmxvY2s7
-CiAgaGVpZ2h0OiAxOHB4OwogIHBvc2l0aW9uOiByZWxhdGl2ZTsKICB0b3A6IDNweDsKfQoKLnRhcmdl
+CiAgaGVpZ2h0OiAxNHB4OwogIHBvc2l0aW9uOiByZWxhdGl2ZTsKICB0b3A6IDFweDsKfQoKLnRhcmdl
 dCB7CiAgYmFja2dyb3VuZC1jb2xvcjogIzQ0NDsKICBwb3NpdGlvbjogcmVsYXRpdmU7CiAgdmlzaWJp
 bGl0eTogdmlzaWJsZTsKICBmb250LXdlaWdodDogNjAwOwp9CgouaW5mby1wYW5lbCB7CiAgZmxleDog
 MSAyMDBweDsKICBtYXJnaW46IDA7CiAgaGVpZ2h0OiAxMDAlOwogIGRpc3BsYXk6IGZsZXg7CiAgZmxl
diff --git a/pkg/nnbd_migration/lib/src/nullability_migration_impl.dart b/pkg/nnbd_migration/lib/src/nullability_migration_impl.dart
index 39e6c85..85b7e2c 100644
--- a/pkg/nnbd_migration/lib/src/nullability_migration_impl.dart
+++ b/pkg/nnbd_migration/lib/src/nullability_migration_impl.dart
@@ -5,8 +5,8 @@
 import 'package:analyzer/dart/analysis/results.dart';
 import 'package:analyzer/file_system/physical_file_system.dart';
 import 'package:analyzer/src/dart/analysis/session.dart';
-import 'package:analyzer/src/generated/resolver.dart';
 import 'package:analyzer/src/generated/source.dart';
+import 'package:analyzer/src/generated/type_system.dart';
 import 'package:analyzer_plugin/protocol/protocol_common.dart';
 import 'package:nnbd_migration/instrumentation.dart';
 import 'package:nnbd_migration/nnbd_migration.dart';
diff --git a/pkg/nnbd_migration/lib/src/preview/http_preview_server.dart b/pkg/nnbd_migration/lib/src/preview/http_preview_server.dart
index 3afdadb..18eefbb 100644
--- a/pkg/nnbd_migration/lib/src/preview/http_preview_server.dart
+++ b/pkg/nnbd_migration/lib/src/preview/http_preview_server.dart
@@ -35,15 +35,19 @@
   // A function which allows the migration to be rerun, taking changed paths.
   final Future<MigrationState> Function() rerunFunction;
 
-  final String hostname;
+  /// The internet address the server should bind to.  Should be suitable for
+  /// passing to HttpServer.bind, i.e. either a [String] or an
+  /// [InternetAddress].
+  final Object bindAddress;
 
   /// Integer for a port to run the preview server on.  If null or zero, allow
   /// [HttpServer.bind] to pick one.
   final int preferredPort;
 
   /// Initialize a newly created HTTP server.
-  HttpPreviewServer(this.migrationState, this.rerunFunction, this.hostname,
-      this.preferredPort);
+  HttpPreviewServer(this.migrationState, this.rerunFunction, this.bindAddress,
+      this.preferredPort)
+      : assert(bindAddress is String || bindAddress is InternetAddress);
 
   Future<String> get authToken async {
     await _serverFuture;
@@ -74,16 +78,7 @@
     }
 
     try {
-      if (hostname == 'localhost') {
-        _serverFuture =
-            HttpServer.bind(InternetAddress.loopbackIPv4, preferredPort ?? 0);
-      } else if (hostname == 'any') {
-        _serverFuture =
-            HttpServer.bind(InternetAddress.anyIPv6, preferredPort ?? 0);
-      } else {
-        _serverFuture = HttpServer.bind(hostname, preferredPort ?? 0);
-      }
-
+      _serverFuture = HttpServer.bind(bindAddress, preferredPort ?? 0);
       var server = await _serverFuture;
       _handleServer(server);
       return server.port;
diff --git a/pkg/nnbd_migration/lib/src/variables.dart b/pkg/nnbd_migration/lib/src/variables.dart
index 7ff4f24..9744968 100644
--- a/pkg/nnbd_migration/lib/src/variables.dart
+++ b/pkg/nnbd_migration/lib/src/variables.dart
@@ -13,7 +13,6 @@
 import 'package:analyzer/src/dart/element/member.dart';
 import 'package:analyzer/src/dart/element/type.dart';
 import 'package:analyzer/src/generated/element_type_provider.dart';
-import 'package:analyzer/src/generated/resolver.dart';
 import 'package:analyzer/src/generated/source.dart';
 import 'package:analyzer/src/generated/utilities_dart.dart';
 import 'package:meta/meta.dart';
diff --git a/pkg/nnbd_migration/test/api_test.dart b/pkg/nnbd_migration/test/api_test.dart
index 2e35ce0..f197947 100644
--- a/pkg/nnbd_migration/test/api_test.dart
+++ b/pkg/nnbd_migration/test/api_test.dart
@@ -2023,7 +2023,39 @@
     await _checkSingleFileChanges(content, expected, removeViaComments: true);
   }
 
-  @FailingTest(issue: 'https://github.com/dart-lang/sdk/issues/40023')
+  Future<void> test_extension_null_check_target() async {
+    var content = '''
+extension E on int/*!*/ {
+  int get plusOne => this + 1;
+}
+int f(int/*?*/ x) => x.plusOne;
+''';
+    var expected = '''
+extension E on int {
+  int get plusOne => this + 1;
+}
+int f(int? x) => x!.plusOne;
+''';
+    await _checkSingleFileChanges(content, expected);
+  }
+
+  @FailingTest(issue: 'https://github.com/dart-lang/sdk/issues/42529')
+  Future<void> test_extension_nullable_target() async {
+    var content = '''
+extension E on int {
+  int get one => 1;
+}
+int f(int/*?*/ x) => x.one;
+''';
+    var expected = '''
+extension E on int? {
+  int get one => 1;
+}
+int f(int? x) => x.one;
+''';
+    await _checkSingleFileChanges(content, expected);
+  }
+
   Future<void> test_extension_nullableOnType_addsNullCheckToThis() async {
     var content = '''
 extension E on String /*?*/ {
@@ -2075,7 +2107,6 @@
     await _checkSingleFileChanges(content, expected);
   }
 
-  @FailingTest(issue: 'https://github.com/dart-lang/sdk/issues/40023')
   Future<void> test_extension_nullableOnType_viaExplicitInvocation() async {
     var content = '''
 class C {}
@@ -2157,6 +2188,71 @@
     await _checkSingleFileChanges(content, expected);
   }
 
+  Future<void> test_extension_override() async {
+    var content = '''
+extension E on int {
+  int get plusOne => this + 1;
+}
+int f(int x) => E(x).plusOne;
+''';
+    var expected = '''
+extension E on int {
+  int get plusOne => this + 1;
+}
+int f(int x) => E(x).plusOne;
+''';
+    await _checkSingleFileChanges(content, expected);
+  }
+
+  Future<void> test_extension_override_null_check_target() async {
+    var content = '''
+extension E on int/*!*/ {
+  int get plusOne => this + 1;
+}
+int f(int/*?*/ x) => E(x).plusOne;
+''';
+    var expected = '''
+extension E on int {
+  int get plusOne => this + 1;
+}
+int f(int? x) => E(x!).plusOne;
+''';
+    await _checkSingleFileChanges(content, expected);
+  }
+
+  Future<void> test_extension_override_nullable_result_type() async {
+    var content = '''
+extension E on int {
+  int get nullValue => null;
+}
+int f(int x) => E(x).nullValue;
+''';
+    var expected = '''
+extension E on int {
+  int? get nullValue => null;
+}
+int? f(int x) => E(x).nullValue;
+''';
+    await _checkSingleFileChanges(content, expected);
+  }
+
+  @FailingTest(issue: 'https://github.com/dart-lang/sdk/issues/42529')
+  Future<void> test_extension_override_nullable_target() async {
+    var content = '''
+extension E on int {
+  int get one => 1;
+}
+int f(int/*?*/ x) => E(x).one;
+''';
+    var expected = '''
+extension E on int? {
+  int get one => 1;
+}
+int f(int? x) => E(x).one;
+''';
+    await _checkSingleFileChanges(content, expected);
+  }
+
   Future<void> test_field_final_uninitalized_used() async {
     var content = '''
 class C {
diff --git a/pkg/nnbd_migration/test/migration_cli_test.dart b/pkg/nnbd_migration/test/migration_cli_test.dart
index 1c43754..cdacccf 100644
--- a/pkg/nnbd_migration/test/migration_cli_test.dart
+++ b/pkg/nnbd_migration/test/migration_cli_test.dart
@@ -58,15 +58,16 @@
 /// Specialization of [NonNullableFix] that generates artificial exceptions, so
 /// that we can test they are properly propagated to top level.
 class _ExceptionGeneratingNonNullableFix extends NonNullableFix {
-  _ExceptionGeneratingNonNullableFix(DartFixListener listener,
-      ResourceProvider resourceProvider, LineInfo Function(String) getLineInfo,
+  _ExceptionGeneratingNonNullableFix(
+      DartFixListener listener,
+      ResourceProvider resourceProvider,
+      LineInfo Function(String) getLineInfo,
+      Object bindAddress,
       {List<String> included = const <String>[],
-      String hostname,
       int preferredPort,
       String summaryPath})
-      : super(listener, resourceProvider, getLineInfo,
+      : super(listener, resourceProvider, getLineInfo, bindAddress,
             included: included,
-            hostname: hostname,
             preferredPort: preferredPort,
             summaryPath: summaryPath);
 
@@ -116,27 +117,38 @@
   }
 
   @override
+  Object computeBindAddress() {
+    var address = super.computeBindAddress();
+    if (Platform.environment.containsKey('FORCE_IPV6') &&
+        address == InternetAddress.loopbackIPv4) {
+      return InternetAddress.loopbackIPv6;
+    }
+    return address;
+  }
+
+  @override
   Set<String> computePathsToProcess(DriverBasedAnalysisContext context) =>
       cli._test.overridePathsToProcess ?? super.computePathsToProcess(context);
 
   @override
-  NonNullableFix createNonNullableFix(DartFixListener listener,
-      ResourceProvider resourceProvider, LineInfo getLineInfo(String path),
+  NonNullableFix createNonNullableFix(
+      DartFixListener listener,
+      ResourceProvider resourceProvider,
+      LineInfo getLineInfo(String path),
+      Object bindAddress,
       {List<String> included = const <String>[],
-      String hostname,
       int preferredPort,
       String summaryPath}) {
     if (cli._test.injectArtificialException) {
       return _ExceptionGeneratingNonNullableFix(
-          listener, resourceProvider, getLineInfo,
+          listener, resourceProvider, getLineInfo, bindAddress,
           included: included,
-          hostname: hostname,
           preferredPort: preferredPort,
           summaryPath: summaryPath);
     } else {
-      return super.createNonNullableFix(listener, resourceProvider, getLineInfo,
+      return super.createNonNullableFix(
+          listener, resourceProvider, getLineInfo, bindAddress,
           included: included,
-          hostname: hostname,
           preferredPort: preferredPort,
           summaryPath: summaryPath);
     }
@@ -762,9 +774,12 @@
     var projectDir = await createProjectDir(projectContents);
     var cli = _createCli();
     await runWithPreviewServer(cli, [projectDir], (url) async {
+      var localhostAddressText = Platform.environment.containsKey('FORCE_IPV6')
+          ? '[::1]'
+          : '127.0.0.1';
       expect(
           logger.stdoutBuffer.toString(), contains('No analysis issues found'));
-      expect(url, startsWith('http://127.0.0.1:'));
+      expect(url, startsWith('http://$localhostAddressText:'));
       await assertPreviewServerResponsive(url);
     });
     // No changes should have been made.
diff --git a/pkg/nnbd_migration/test/migration_visitor_test_base.dart b/pkg/nnbd_migration/test/migration_visitor_test_base.dart
index 3e3cf4e..ea65844 100644
--- a/pkg/nnbd_migration/test/migration_visitor_test_base.dart
+++ b/pkg/nnbd_migration/test/migration_visitor_test_base.dart
@@ -8,8 +8,8 @@
 import 'package:analyzer/dart/element/type_provider.dart';
 import 'package:analyzer/src/dart/element/element.dart';
 import 'package:analyzer/src/dart/element/type.dart';
-import 'package:analyzer/src/generated/resolver.dart' show TypeSystemImpl;
 import 'package:analyzer/src/generated/source.dart';
+import 'package:analyzer/src/generated/type_system.dart';
 import 'package:analyzer/src/generated/utilities_dart.dart';
 import 'package:meta/meta.dart';
 import 'package:nnbd_migration/instrumentation.dart';
diff --git a/pkg/pkg.status b/pkg/pkg.status
index 4cc5873..18fe5c2 100644
--- a/pkg/pkg.status
+++ b/pkg/pkg.status
@@ -134,6 +134,7 @@
 compiler/test/end_to_end/dart2js_batch_test: Slow, Pass
 compiler/test/end_to_end/exit_code_test: Slow, Pass
 compiler/test/end_to_end/in_user_code_test: Slow, Pass
+vm_snapshot_analysis/test/precompiler_trace_test: SkipSlow
 
 [ $runtime == dart_precompiled ]
 *: SkipByDesign # The pkg test framework imports dart:mirrors.
diff --git a/pkg/vm/lib/transformations/list_factory_specializer.dart b/pkg/vm/lib/transformations/list_factory_specializer.dart
index 60aff5f..a759199 100644
--- a/pkg/vm/lib/transformations/list_factory_specializer.dart
+++ b/pkg/vm/lib/transformations/list_factory_specializer.dart
@@ -13,13 +13,17 @@
 /// new List() => new _GrowableList(0)
 /// new List(n) => new _List(n)
 /// new List.filled(n, null, growable: true) => new _GrowableList(n)
+/// new List.filled(n, x, growable: true) => new _GrowableList.filled(n, x)
 /// new List.filled(n, null) => new _List(n)
+/// new List.filled(n, x) => new _List.filled(n, x)
 ///
 class ListFactorySpecializer {
   final Procedure _defaultListFactory;
   final Procedure _listFilledFactory;
   final Procedure _growableListFactory;
+  final Procedure _growableListFilledFactory;
   final Procedure _fixedListFactory;
+  final Procedure _fixedListFilledFactory;
 
   ListFactorySpecializer(CoreTypes coreTypes)
       : _defaultListFactory =
@@ -28,12 +32,17 @@
             coreTypes.index.getMember('dart:core', 'List', 'filled'),
         _growableListFactory =
             coreTypes.index.getMember('dart:core', '_GrowableList', ''),
-        _fixedListFactory =
-            coreTypes.index.getMember('dart:core', '_List', '') {
+        _growableListFilledFactory =
+            coreTypes.index.getMember('dart:core', '_GrowableList', 'filled'),
+        _fixedListFactory = coreTypes.index.getMember('dart:core', '_List', ''),
+        _fixedListFilledFactory =
+            coreTypes.index.getMember('dart:core', '_List', 'filled') {
     assert(_defaultListFactory.isFactory);
     assert(_listFilledFactory.isFactory);
     assert(_growableListFactory.isFactory);
+    assert(_growableListFilledFactory.isFactory);
     assert(_fixedListFactory.isFactory);
+    assert(_fixedListFilledFactory.isFactory);
   }
 
   TreeNode transformStaticInvocation(StaticInvocation node) {
@@ -53,10 +62,8 @@
       assert(args.positional.length == 2);
       final length = args.positional[0];
       final fill = args.positional[1];
-      if (fill is! NullLiteral &&
-          !(fill is ConstantExpression && fill.constant is NullConstant)) {
-        return node;
-      }
+      final fillingWithNull = fill is NullLiteral ||
+          (fill is ConstantExpression && fill.constant is NullConstant);
       bool growable;
       if (args.named.isEmpty) {
         growable = false;
@@ -78,13 +85,25 @@
         }
       }
       if (growable) {
-        return StaticInvocation(
-            _growableListFactory, Arguments([length], types: args.types))
-          ..fileOffset = node.fileOffset;
+        if (fillingWithNull) {
+          return StaticInvocation(
+              _growableListFactory, Arguments([length], types: args.types))
+            ..fileOffset = node.fileOffset;
+        } else {
+          return StaticInvocation(_growableListFilledFactory,
+              Arguments([length, fill], types: args.types))
+            ..fileOffset = node.fileOffset;
+        }
       } else {
-        return StaticInvocation(
-            _fixedListFactory, Arguments([length], types: args.types))
-          ..fileOffset = node.fileOffset;
+        if (fillingWithNull) {
+          return StaticInvocation(
+              _fixedListFactory, Arguments([length], types: args.types))
+            ..fileOffset = node.fileOffset;
+        } else {
+          return StaticInvocation(_fixedListFilledFactory,
+              Arguments([length, fill], types: args.types))
+            ..fileOffset = node.fileOffset;
+        }
       }
     }
 
diff --git a/pkg/vm/lib/transformations/type_flow/table_selector.dart b/pkg/vm/lib/transformations/type_flow/table_selector.dart
index 571f190..00d5651 100644
--- a/pkg/vm/lib/transformations/type_flow/table_selector.dart
+++ b/pkg/vm/lib/transformations/type_flow/table_selector.dart
@@ -4,6 +4,7 @@
 
 import 'package:kernel/ast.dart';
 
+import 'utils.dart' show assertx, UnionFind;
 import '../../metadata/procedure_attributes.dart';
 import '../../metadata/table_selector.dart';
 
@@ -13,51 +14,102 @@
 class TableSelectorAssigner {
   final TableSelectorMetadata metadata = TableSelectorMetadata();
 
-  final Map<Name, int> _methodSelectorId = {};
-  final Map<Name, int> _getterSelectorId = {};
-  final Map<Name, int> _setterSelectorId = {};
+  final Map<Class, Map<Name, int>> _getterMemberIds = {};
+  final Map<Class, Map<Name, int>> _methodOrSetterMemberIds = {};
 
-  int _selectorIdForMap(Map<Name, int> map, Member member) {
-    return map.putIfAbsent(member.name, () => metadata.addSelector());
+  final UnionFind _unionFind = UnionFind();
+  List<int> _selectorIdForMemberId;
+
+  TableSelectorAssigner(Component component) {
+    for (Library library in component.libraries) {
+      for (Class cls in library.classes) {
+        _memberIdsForClass(cls, getter: false);
+        _memberIdsForClass(cls, getter: true);
+      }
+    }
+    _selectorIdForMemberId = List(_unionFind.size);
+  }
+
+  Map<Name, int> _memberIdsForClass(Class cls, {bool getter}) {
+    if (cls == null) return {};
+
+    final cache = getter ? _getterMemberIds : _methodOrSetterMemberIds;
+
+    // Already computed for this class?
+    Map<Name, int> memberIds = cache[cls];
+    if (memberIds != null) return memberIds;
+
+    // Merge maps from supertypes.
+    memberIds = Map.from(_memberIdsForClass(cls.superclass, getter: getter));
+    for (Supertype impl in cls.implementedTypes) {
+      _memberIdsForClass(impl.classNode, getter: getter).forEach((name, id) {
+        final int firstId = memberIds[name];
+        if (firstId == null) {
+          memberIds[name] = id;
+        } else if (firstId != id) {
+          _unionFind.union(firstId, id);
+        }
+      });
+    }
+
+    // Add declared instance members.
+    for (Member member in cls.members) {
+      if (member.isInstanceMember) {
+        bool addToMap;
+        if (member is Procedure) {
+          switch (member.kind) {
+            case ProcedureKind.Method:
+              addToMap = true;
+              break;
+            case ProcedureKind.Operator:
+            case ProcedureKind.Setter:
+              addToMap = !getter;
+              break;
+            case ProcedureKind.Getter:
+              addToMap = getter;
+              break;
+            default:
+              throw "Unexpected procedure kind '${member.kind}'";
+          }
+        } else if (member is Field) {
+          addToMap = true;
+        } else {
+          throw "Unexpected member kind '${member.runtimeType}'";
+        }
+        if (addToMap && !memberIds.containsKey(member.name)) {
+          memberIds[member.name] = _unionFind.add();
+        }
+      }
+    }
+
+    return cache[cls] = memberIds;
+  }
+
+  int _selectorIdForMap(Map<Class, Map<Name, int>> map, Member member) {
+    int memberId = map[member.enclosingClass][member.name];
+    if (memberId == null) {
+      assertx(member is Procedure &&
+          ((identical(map, _getterMemberIds) &&
+                  (member.kind == ProcedureKind.Operator ||
+                      member.kind == ProcedureKind.Setter)) ||
+              identical(map, _methodOrSetterMemberIds) &&
+                  member.kind == ProcedureKind.Getter));
+      return ProcedureAttributesMetadata.kInvalidSelectorId;
+    }
+    memberId = _unionFind.find(memberId);
+    int selectorId = _selectorIdForMemberId[memberId];
+    if (selectorId == null) {
+      _selectorIdForMemberId[memberId] = selectorId = metadata.addSelector();
+    }
+    return selectorId;
   }
 
   int methodOrSetterSelectorId(Member member) {
-    if (member is Procedure) {
-      switch (member.kind) {
-        case ProcedureKind.Method:
-        case ProcedureKind.Operator:
-          return _selectorIdForMap(_methodSelectorId, member);
-        case ProcedureKind.Setter:
-          return _selectorIdForMap(_setterSelectorId, member);
-        case ProcedureKind.Getter:
-          return ProcedureAttributesMetadata.kInvalidSelectorId;
-        default:
-          throw "Unexpected procedure kind '${member.kind}'";
-      }
-    }
-    if (member is Field) {
-      return _selectorIdForMap(_setterSelectorId, member);
-    }
-    throw "Unexpected member kind '${member.runtimeType}'";
+    return _selectorIdForMap(_methodOrSetterMemberIds, member);
   }
 
   int getterSelectorId(Member member) {
-    if (member is Procedure) {
-      switch (member.kind) {
-        case ProcedureKind.Getter:
-        case ProcedureKind.Method:
-          return _selectorIdForMap(_getterSelectorId, member);
-        case ProcedureKind.Operator:
-        case ProcedureKind.Setter:
-          return ProcedureAttributesMetadata.kInvalidSelectorId;
-        default:
-          throw "Unexpected procedure kind '${member.kind}'";
-      }
-    }
-    if (member is Field) {
-      return _selectorIdForMap(_getterSelectorId, member);
-    }
-    throw "Unexpected member kind '${member.runtimeType}'";
+    return _selectorIdForMap(_getterMemberIds, member);
   }
 
   void registerMethodOrSetterCall(Member member, bool calledOnNull) {
diff --git a/pkg/vm/lib/transformations/type_flow/transformer.dart b/pkg/vm/lib/transformations/type_flow/transformer.dart
index ce7f06e..0509644 100644
--- a/pkg/vm/lib/transformations/type_flow/transformer.dart
+++ b/pkg/vm/lib/transformations/type_flow/transformer.dart
@@ -163,7 +163,7 @@
         _procedureAttributesMetadata =
             new ProcedureAttributesMetadataRepository(),
         _tableSelectorMetadata = new TableSelectorMetadataRepository(),
-        _tableSelectorAssigner = new TableSelectorAssigner(),
+        _tableSelectorAssigner = new TableSelectorAssigner(component),
         _unboxingInfoMetadata = new UnboxingInfoMetadataRepository(),
         _intClass = _typeFlowAnalysis.environment.coreTypes.intClass {
     component.addMetadataRepository(_inferredTypeMetadata);
diff --git a/pkg/vm/lib/transformations/type_flow/utils.dart b/pkg/vm/lib/transformations/type_flow/utils.dart
index 0d68b35..b7cebd7 100644
--- a/pkg/vm/lib/transformations/type_flow/utils.dart
+++ b/pkg/vm/lib/transformations/type_flow/utils.dart
@@ -261,6 +261,48 @@
   return list.length;
 }
 
+/// A Union-Find data structure over integers.
+class UnionFind {
+  // Negative weight if root, parent index otherwise.
+  final List<int> _elements;
+
+  UnionFind([int initialSize = 0])
+      : _elements = List<int>.filled(initialSize, -1, growable: true);
+
+  /// Add a new singleton set.
+  int add() {
+    int id = _elements.length;
+    _elements.add(-1);
+    return id;
+  }
+
+  /// Find the canonical element for the set containing the given element.
+  /// Two elements belonging to the same set have the same canonical element.
+  int find(int id) {
+    return _elements[id] < 0 ? id : _elements[id] = find(_elements[id]);
+  }
+
+  /// Merge the sets containing the given elements.
+  void union(int id1, int id2) {
+    id1 = find(id1);
+    id2 = find(id2);
+    if (id1 == id2) return;
+    final int w1 = _elements[id1];
+    final int w2 = _elements[id2];
+    assertx(w1 < 0 && w2 < 0);
+    if (w1 < w2) {
+      _elements[id1] += w2;
+      _elements[id2] = id1;
+    } else {
+      _elements[id2] += w1;
+      _elements[id1] = id2;
+    }
+  }
+
+  /// Total number of elements in the sets.
+  int get size => _elements.length;
+}
+
 const nullabilitySuffix = {
   Nullability.legacy: '*',
   Nullability.nullable: '?',
diff --git a/pkg/vm/testcases/transformations/type_flow/transformer/invalidation_field_initializer.dart.expect b/pkg/vm/testcases/transformations/type_flow/transformer/invalidation_field_initializer.dart.expect
index d11688a..2739a4d 100644
--- a/pkg/vm/testcases/transformations/type_flow/transformer/invalidation_field_initializer.dart.expect
+++ b/pkg/vm/testcases/transformations/type_flow/transformer/invalidation_field_initializer.dart.expect
@@ -52,13 +52,13 @@
   synthetic constructor •() → self::DeepCaller2*
     : super core::Object::•()
     ;
-[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:3,getterSelectorId:4]  method barL1([@vm.inferred-type.metadata=#lib::D] self::D* dd) → dynamic
+[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:13,getterSelectorId:14]  method barL1([@vm.inferred-type.metadata=#lib::D] self::D* dd) → dynamic
     return [@vm.direct-call.metadata=#lib::DeepCaller2.barL2] [@vm.inferred-type.metadata=! (skip check)] this.{self::DeepCaller2::barL2}(dd);
-[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasNonThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:5,getterSelectorId:6]  method barL2([@vm.inferred-type.metadata=#lib::D] self::D* dd) → dynamic
+[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasNonThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:15,getterSelectorId:16]  method barL2([@vm.inferred-type.metadata=#lib::D] self::D* dd) → dynamic
     return [@vm.direct-call.metadata=#lib::DeepCaller2.barL3] [@vm.inferred-type.metadata=! (skip check)] this.{self::DeepCaller2::barL3}(dd);
-[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasNonThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:7,getterSelectorId:8]  method barL3([@vm.inferred-type.metadata=#lib::D] self::D* dd) → dynamic
+[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasNonThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:17,getterSelectorId:18]  method barL3([@vm.inferred-type.metadata=#lib::D] self::D* dd) → dynamic
     return [@vm.direct-call.metadata=#lib::DeepCaller2.barL4] [@vm.inferred-type.metadata=! (skip check)] this.{self::DeepCaller2::barL4}(dd);
-[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasNonThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:9,getterSelectorId:10]  method barL4([@vm.inferred-type.metadata=#lib::D] self::D* dd) → dynamic
+[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasNonThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:19,getterSelectorId:20]  method barL4([@vm.inferred-type.metadata=#lib::D] self::D* dd) → dynamic
     return [@vm.direct-call.metadata=#lib::D.field2] [@vm.inferred-type.metadata=!] dd.{self::D::field2};
 }
 [@vm.inferred-type.metadata=dart.core::Null? (value: null)]static field core::Function* unknown;
diff --git a/pkg/vm/testcases/transformations/type_flow/transformer/invalidation_new_dynamic_target.dart.expect b/pkg/vm/testcases/transformations/type_flow/transformer/invalidation_new_dynamic_target.dart.expect
index c86de6e..9db28b3 100644
--- a/pkg/vm/testcases/transformations/type_flow/transformer/invalidation_new_dynamic_target.dart.expect
+++ b/pkg/vm/testcases/transformations/type_flow/transformer/invalidation_new_dynamic_target.dart.expect
@@ -32,11 +32,11 @@
   synthetic constructor •() → self::B*
     : super core::Object::•()
     ;
-[@vm.procedure-attributes.metadata=getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:1,getterSelectorId:2]  method foo() → dynamic
+[@vm.procedure-attributes.metadata=getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:7,getterSelectorId:8]  method foo() → dynamic
     return new self::T1::•();
-[@vm.procedure-attributes.metadata=getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:3,getterSelectorId:4]  method bar() → dynamic
+[@vm.procedure-attributes.metadata=getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:9,getterSelectorId:10]  method bar() → dynamic
     return new self::T2::•();
-[@vm.procedure-attributes.metadata=getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:5,getterSelectorId:6]  method bazz() → dynamic
+[@vm.procedure-attributes.metadata=getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:11,getterSelectorId:12]  method bazz() → dynamic
     return new self::T3::•();
 }
 [@vm.inferred-type.metadata=dart.core::Null? (value: null)]static field core::Function* unknown;
diff --git a/pkg/vm/testcases/transformations/type_flow/transformer/invalidation_set_field.dart.expect b/pkg/vm/testcases/transformations/type_flow/transformer/invalidation_set_field.dart.expect
index 033e822..64655ae 100644
--- a/pkg/vm/testcases/transformations/type_flow/transformer/invalidation_set_field.dart.expect
+++ b/pkg/vm/testcases/transformations/type_flow/transformer/invalidation_set_field.dart.expect
@@ -36,13 +36,13 @@
   synthetic constructor •() → self::DeepCaller2*
     : super core::Object::•()
     ;
-[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:5,getterSelectorId:6]  method barL1([@vm.inferred-type.metadata=#lib::A?] self::A* aa) → dynamic
+[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:13,getterSelectorId:14]  method barL1([@vm.inferred-type.metadata=#lib::A?] self::A* aa) → dynamic
     return [@vm.direct-call.metadata=#lib::DeepCaller2.barL2] [@vm.inferred-type.metadata=! (skip check)] this.{self::DeepCaller2::barL2}(aa);
-[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasNonThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:7,getterSelectorId:8]  method barL2([@vm.inferred-type.metadata=#lib::A?] self::A* aa) → dynamic
+[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasNonThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:15,getterSelectorId:16]  method barL2([@vm.inferred-type.metadata=#lib::A?] self::A* aa) → dynamic
     return [@vm.direct-call.metadata=#lib::DeepCaller2.barL3] [@vm.inferred-type.metadata=! (skip check)] this.{self::DeepCaller2::barL3}(aa);
-[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasNonThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:9,getterSelectorId:10]  method barL3([@vm.inferred-type.metadata=#lib::A?] self::A* aa) → dynamic
+[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasNonThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:17,getterSelectorId:18]  method barL3([@vm.inferred-type.metadata=#lib::A?] self::A* aa) → dynamic
     return [@vm.direct-call.metadata=#lib::DeepCaller2.barL4] [@vm.inferred-type.metadata=! (skip check)] this.{self::DeepCaller2::barL4}(aa);
-[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasNonThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:11,getterSelectorId:12]  method barL4([@vm.inferred-type.metadata=#lib::A?] self::A* aa) → dynamic
+[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasNonThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:19,getterSelectorId:20]  method barL4([@vm.inferred-type.metadata=#lib::A?] self::A* aa) → dynamic
     return [@vm.direct-call.metadata=#lib::A.field2??] [@vm.inferred-type.metadata=!] aa.{self::A::field2};
 }
 [@vm.inferred-type.metadata=dart.core::Null? (value: null)]static field core::Function* unknown;
diff --git a/pkg/vm/testcases/transformations/type_flow/transformer/no_such_method.dart.expect b/pkg/vm/testcases/transformations/type_flow/transformer/no_such_method.dart.expect
index 2b57885..5e5e550 100644
--- a/pkg/vm/testcases/transformations/type_flow/transformer/no_such_method.dart.expect
+++ b/pkg/vm/testcases/transformations/type_flow/transformer/no_such_method.dart.expect
@@ -104,7 +104,7 @@
   synthetic constructor •() → self::H*
     : super core::Object::•()
     ;
-[@vm.procedure-attributes.metadata=getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:1,getterSelectorId:2]  method foo({[@vm.inferred-type.metadata=dart.core::_Smi (value: 1)] dynamic left = #C1, [@vm.inferred-type.metadata=dart.core::_Smi (value: 2)] dynamic right = #C1}) → dynamic
+[@vm.procedure-attributes.metadata=getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:8,getterSelectorId:9]  method foo({[@vm.inferred-type.metadata=dart.core::_Smi (value: 1)] dynamic left = #C1, [@vm.inferred-type.metadata=dart.core::_Smi (value: 2)] dynamic right = #C1}) → dynamic
     return new self::T6::•();
 [@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:6,getterSelectorId:7]  method noSuchMethod(core::Invocation* invocation) → dynamic {
     return new self::T7::•();
diff --git a/pkg/vm/testcases/transformations/type_flow/transformer/protobuf_handler/lib/create_test.dart.expect b/pkg/vm/testcases/transformations/type_flow/transformer/protobuf_handler/lib/create_test.dart.expect
index f23f5f6..84595a6 100644
--- a/pkg/vm/testcases/transformations/type_flow/transformer/protobuf_handler/lib/create_test.dart.expect
+++ b/pkg/vm/testcases/transformations/type_flow/transformer/protobuf_handler/lib/create_test.dart.expect
@@ -55,20 +55,20 @@
   @#C10
   static method create() → self::FooKeep*
     return new self::FooKeep::_();
-[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasNonThisUses:false,hasTearOffUses:false,getterSelectorId:4]  @#C12
+[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasNonThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:4,getterSelectorId:5]  @#C12
   get barKeep() → self::BarKeep*
     return [@vm.direct-call.metadata=protobuf::GeneratedMessage.$_getN] [@vm.inferred-type.metadata=foo.pb.dart::BarKeep? (skip check)] this.{pro::GeneratedMessage::$_getN}<self::BarKeep*>(0);
-[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:5]  @#C12
+[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:4,getterSelectorId:5]  @#C12
   set barKeep([@vm.inferred-type.metadata=foo.pb.dart::BarKeep] self::BarKeep* v) → void {
     [@vm.direct-call.metadata=protobuf::GeneratedMessage.setField] [@vm.inferred-type.metadata=!? (skip check)] this.{pro::GeneratedMessage::setField}(1, v);
   }
 [@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasNonThisUses:false,hasTearOffUses:false,getterSelectorId:6]  @#C14
   get mapKeep() → core::Map<core::String*, self::BarKeep*>*
     return [@vm.direct-call.metadata=protobuf::GeneratedMessage.$_getMap] [@vm.inferred-type.metadata=! (skip check)] this.{pro::GeneratedMessage::$_getMap}<core::String*, self::BarKeep*>(2);
-[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasNonThisUses:false,hasTearOffUses:false,getterSelectorId:7]  @#C16
+[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasNonThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:7,getterSelectorId:8]  @#C16
   get aKeep() → core::int*
     return [@vm.direct-call.metadata=protobuf::GeneratedMessage.$_getIZ] [@vm.inferred-type.metadata=int (skip check)] this.{pro::GeneratedMessage::$_getIZ}(4);
-[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:8]  @#C16
+[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:7,getterSelectorId:8]  @#C16
   set aKeep([@vm.inferred-type.metadata=dart.core::_Smi (value: 43)] core::int* v) → void {
     [@vm.direct-call.metadata=protobuf::GeneratedMessage.$_setSignedInt32] [@vm.inferred-type.metadata=!? (skip check)] this.{pro::GeneratedMessage::$_setSignedInt32}(4, v);
   }
@@ -95,10 +95,10 @@
   @#C10
   static method create() → self::BarKeep*
     return new self::BarKeep::_();
-[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasNonThisUses:false,hasTearOffUses:false,getterSelectorId:7]  @#C12
+[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasNonThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:13,getterSelectorId:14]  @#C12
   get aKeep() → core::int*
     return [@vm.direct-call.metadata=protobuf::GeneratedMessage.$_getIZ] [@vm.inferred-type.metadata=int (skip check)] this.{pro::GeneratedMessage::$_getIZ}(0);
-[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:8]  @#C12
+[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:13,getterSelectorId:14]  @#C12
   set aKeep([@vm.inferred-type.metadata=dart.core::_Smi] core::int* v) → void {
     [@vm.direct-call.metadata=protobuf::GeneratedMessage.$_setSignedInt32] [@vm.inferred-type.metadata=!? (skip check)] this.{pro::GeneratedMessage::$_setSignedInt32}(0, v);
   }
diff --git a/pkg/vm/testcases/transformations/type_flow/transformer/protobuf_handler/lib/decode_test.dart.expect b/pkg/vm/testcases/transformations/type_flow/transformer/protobuf_handler/lib/decode_test.dart.expect
index 6ffe522..7727512 100644
--- a/pkg/vm/testcases/transformations/type_flow/transformer/protobuf_handler/lib/decode_test.dart.expect
+++ b/pkg/vm/testcases/transformations/type_flow/transformer/protobuf_handler/lib/decode_test.dart.expect
@@ -92,7 +92,7 @@
   @#C11
   static method create() → self::BarKeep*
     return new self::BarKeep::_();
-[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasNonThisUses:false,hasTearOffUses:false,getterSelectorId:7]  @#C13
+[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasNonThisUses:false,hasTearOffUses:false,getterSelectorId:12]  @#C13
   get aKeep() → core::int*
     return [@vm.direct-call.metadata=protobuf::GeneratedMessage.$_getIZ] [@vm.inferred-type.metadata=int (skip check)] this.{pro::GeneratedMessage::$_getIZ}(0);
 }
diff --git a/pkg/vm/testcases/transformations/type_flow/transformer/protobuf_handler/lib/encode_all_fields.dart.expect b/pkg/vm/testcases/transformations/type_flow/transformer/protobuf_handler/lib/encode_all_fields.dart.expect
index 5ac9e51..2acd6e9 100644
--- a/pkg/vm/testcases/transformations/type_flow/transformer/protobuf_handler/lib/encode_all_fields.dart.expect
+++ b/pkg/vm/testcases/transformations/type_flow/transformer/protobuf_handler/lib/encode_all_fields.dart.expect
@@ -101,11 +101,11 @@
   @#C11
   static method create() → self::BarKeep*
     return new self::BarKeep::_();
-[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:6]  @#C13
+[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:9]  @#C13
   set aKeep([@vm.inferred-type.metadata=dart.core::_Smi] core::int* v) → void {
     [@vm.direct-call.metadata=protobuf::GeneratedMessage.$_setSignedInt32] [@vm.inferred-type.metadata=!? (skip check)] this.{pro::GeneratedMessage::$_setSignedInt32}(0, v);
   }
-[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:9]  @#C25
+[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:10]  @#C25
   set bDrop([@vm.inferred-type.metadata=dart.core::_Smi (value: 4)] core::int* v) → void {
     [@vm.direct-call.metadata=protobuf::GeneratedMessage.$_setSignedInt32] [@vm.inferred-type.metadata=!? (skip check)] this.{pro::GeneratedMessage::$_setSignedInt32}(1, v);
   }
@@ -157,7 +157,7 @@
   @#C11
   static method create() → self::ZopDrop*
     return new self::ZopDrop::_();
-[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:10]  @#C13
+[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:11]  @#C13
   set aDrop([@vm.inferred-type.metadata=dart.core::_Smi (value: 3)] core::int* v) → void {
     [@vm.direct-call.metadata=protobuf::GeneratedMessage.$_setSignedInt32] [@vm.inferred-type.metadata=!? (skip check)] this.{pro::GeneratedMessage::$_setSignedInt32}(0, v);
   }
diff --git a/pkg/vm/testcases/transformations/type_flow/transformer/protobuf_handler/lib/freeze_test.dart.expect b/pkg/vm/testcases/transformations/type_flow/transformer/protobuf_handler/lib/freeze_test.dart.expect
index ed24036..768a154 100644
--- a/pkg/vm/testcases/transformations/type_flow/transformer/protobuf_handler/lib/freeze_test.dart.expect
+++ b/pkg/vm/testcases/transformations/type_flow/transformer/protobuf_handler/lib/freeze_test.dart.expect
@@ -59,20 +59,20 @@
   @#C10
   static method create() → self::FooKeep*
     return new self::FooKeep::_();
-[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasNonThisUses:false,hasTearOffUses:false,getterSelectorId:4]  @#C12
+[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasNonThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:4,getterSelectorId:5]  @#C12
   get barKeep() → self::BarKeep*
     return [@vm.direct-call.metadata=protobuf::GeneratedMessage.$_getN] [@vm.inferred-type.metadata=foo.pb.dart::BarKeep? (skip check)] this.{pro::GeneratedMessage::$_getN}<self::BarKeep*>(0);
-[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:5]  @#C12
+[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:4,getterSelectorId:5]  @#C12
   set barKeep([@vm.inferred-type.metadata=foo.pb.dart::BarKeep] self::BarKeep* v) → void {
     [@vm.direct-call.metadata=protobuf::GeneratedMessage.setField] [@vm.inferred-type.metadata=!? (skip check)] this.{pro::GeneratedMessage::setField}(1, v);
   }
 [@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasNonThisUses:false,hasTearOffUses:false,getterSelectorId:6]  @#C14
   get mapKeep() → core::Map<core::String*, self::BarKeep*>*
     return [@vm.direct-call.metadata=protobuf::GeneratedMessage.$_getMap] [@vm.inferred-type.metadata=! (skip check)] this.{pro::GeneratedMessage::$_getMap}<core::String*, self::BarKeep*>(2);
-[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasNonThisUses:false,hasTearOffUses:false,getterSelectorId:7]  @#C16
+[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasNonThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:7,getterSelectorId:8]  @#C16
   get aKeep() → core::int*
     return [@vm.direct-call.metadata=protobuf::GeneratedMessage.$_getIZ] [@vm.inferred-type.metadata=int (skip check)] this.{pro::GeneratedMessage::$_getIZ}(4);
-[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:8]  @#C16
+[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:7,getterSelectorId:8]  @#C16
   set aKeep([@vm.inferred-type.metadata=dart.core::_Smi (value: 43)] core::int* v) → void {
     [@vm.direct-call.metadata=protobuf::GeneratedMessage.$_setSignedInt32] [@vm.inferred-type.metadata=!? (skip check)] this.{pro::GeneratedMessage::$_setSignedInt32}(4, v);
   }
@@ -99,10 +99,10 @@
   @#C10
   static method create() → self::BarKeep*
     return new self::BarKeep::_();
-[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasNonThisUses:false,hasTearOffUses:false,getterSelectorId:7]  @#C12
+[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasNonThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:13,getterSelectorId:14]  @#C12
   get aKeep() → core::int*
     return [@vm.direct-call.metadata=protobuf::GeneratedMessage.$_getIZ] [@vm.inferred-type.metadata=int (skip check)] this.{pro::GeneratedMessage::$_getIZ}(0);
-[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:8]  @#C12
+[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:13,getterSelectorId:14]  @#C12
   set aKeep([@vm.inferred-type.metadata=dart.core::_Smi] core::int* v) → void {
     [@vm.direct-call.metadata=protobuf::GeneratedMessage.$_setSignedInt32] [@vm.inferred-type.metadata=!? (skip check)] this.{pro::GeneratedMessage::$_setSignedInt32}(0, v);
   }
diff --git a/pkg/vm/testcases/transformations/type_flow/transformer/regress_flutter16182.dart.expect b/pkg/vm/testcases/transformations/type_flow/transformer/regress_flutter16182.dart.expect
index ff072cb..8b32913 100644
--- a/pkg/vm/testcases/transformations/type_flow/transformer/regress_flutter16182.dart.expect
+++ b/pkg/vm/testcases/transformations/type_flow/transformer/regress_flutter16182.dart.expect
@@ -38,27 +38,27 @@
   }
 }
 class A2 extends core::Object {
-[@vm.inferred-type.metadata=#lib::T2?] [@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,hasNonThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:5,getterSelectorId:6]  field dynamic foo = null;
+[@vm.inferred-type.metadata=#lib::T2?] [@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,hasNonThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:13,getterSelectorId:14]  field dynamic foo = null;
   synthetic constructor •() → self::A2*
     : super core::Object::•()
     ;
-[@vm.procedure-attributes.metadata=getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:3,getterSelectorId:4]  method call([dynamic a1 = #C1, dynamic a2 = #C1, dynamic a3 = #C1, [@vm.inferred-type.metadata=dart.core::_Smi?] dynamic a4 = #C1, [@vm.inferred-type.metadata=dart.core::_Smi?] dynamic a5 = #C1, [@vm.inferred-type.metadata=#lib::T2?] dynamic a6 = #C1]) → void {
+[@vm.procedure-attributes.metadata=getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:11,getterSelectorId:12]  method call([dynamic a1 = #C1, dynamic a2 = #C1, dynamic a3 = #C1, [@vm.inferred-type.metadata=dart.core::_Smi?] dynamic a4 = #C1, [@vm.inferred-type.metadata=dart.core::_Smi?] dynamic a5 = #C1, [@vm.inferred-type.metadata=#lib::T2?] dynamic a6 = #C1]) → void {
     [@vm.direct-call.metadata=#lib::A2.foo] [@vm.inferred-type.metadata=!? (skip check)] this.{self::A2::foo} = a6;
   }
 }
 abstract class B2Base extends core::Object {
-[@vm.inferred-type.metadata=#lib::A2] [@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasNonThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:12,getterSelectorId:13]  field dynamic _aa = new self::A2::•();
+[@vm.inferred-type.metadata=#lib::A2] [@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasNonThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:16,getterSelectorId:17]  field dynamic _aa = new self::A2::•();
   synthetic constructor •() → self::B2Base*
     : super core::Object::•()
     ;
-[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasNonThisUses:false,hasTearOffUses:false,getterSelectorId:11]  get aa2() → dynamic
+[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasNonThisUses:false,hasTearOffUses:false,getterSelectorId:15]  get aa2() → dynamic
     return [@vm.direct-call.metadata=#lib::B2Base._aa] [@vm.inferred-type.metadata=#lib::A2] this.{self::B2Base::_aa};
 }
 class B2 extends self::B2Base {
   synthetic constructor •() → self::B2*
     : super self::B2Base::•()
     ;
-[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:14,getterSelectorId:15]  method doSuperCall() → void {
+[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:18,getterSelectorId:19]  method doSuperCall() → void {
     [@vm.call-site-attributes.metadata=receiverType:dynamic] [@vm.direct-call.metadata=#lib::A2.call] [@vm.inferred-type.metadata=!? (receiver not int)] [@vm.inferred-type.metadata=#lib::A2] super.{self::B2Base::aa2}.call(1, 2, 3, 4, 5, new self::T2::•());
   }
 }
@@ -66,21 +66,21 @@
   synthetic constructor •() → self::T3*
     : super core::Object::•()
     ;
-[@vm.procedure-attributes.metadata=getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:16,getterSelectorId:17]  method doTest3() → void {
+[@vm.procedure-attributes.metadata=getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:20,getterSelectorId:21]  method doTest3() → void {
     self::ok = true;
   }
 }
 class A3 extends core::Object {
-[@vm.inferred-type.metadata=#lib::T3?] [@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,hasNonThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:5,getterSelectorId:6]  field dynamic foo = null;
+[@vm.inferred-type.metadata=#lib::T3?] [@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,hasNonThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:24,getterSelectorId:25]  field dynamic foo = null;
   synthetic constructor •() → self::A3*
     : super core::Object::•()
     ;
-[@vm.procedure-attributes.metadata=getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:3,getterSelectorId:4]  method call([dynamic a1 = #C1, dynamic a2 = #C1, dynamic a3 = #C1, [@vm.inferred-type.metadata=dart.core::_Smi?] dynamic a4 = #C1, [@vm.inferred-type.metadata=dart.core::_Smi?] dynamic a5 = #C1, [@vm.inferred-type.metadata=dart.core::_Smi?] dynamic a6 = #C1, [@vm.inferred-type.metadata=#lib::T3?] dynamic a7 = #C1]) → void {
+[@vm.procedure-attributes.metadata=getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:22,getterSelectorId:23]  method call([dynamic a1 = #C1, dynamic a2 = #C1, dynamic a3 = #C1, [@vm.inferred-type.metadata=dart.core::_Smi?] dynamic a4 = #C1, [@vm.inferred-type.metadata=dart.core::_Smi?] dynamic a5 = #C1, [@vm.inferred-type.metadata=dart.core::_Smi?] dynamic a6 = #C1, [@vm.inferred-type.metadata=#lib::T3?] dynamic a7 = #C1]) → void {
     [@vm.direct-call.metadata=#lib::A3.foo] [@vm.inferred-type.metadata=!? (skip check)] this.{self::A3::foo} = a7;
   }
 }
 class B3 extends core::Object {
-[@vm.inferred-type.metadata=#lib::A3] [@vm.procedure-attributes.metadata=hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:18,getterSelectorId:19]  field self::A3* aa3 = new self::A3::•();
+[@vm.inferred-type.metadata=#lib::A3] [@vm.procedure-attributes.metadata=hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:26,getterSelectorId:27]  field self::A3* aa3 = new self::A3::•();
   synthetic constructor •() → self::B3*
     : super core::Object::•()
     ;
@@ -89,25 +89,25 @@
   synthetic constructor •() → self::T4*
     : super core::Object::•()
     ;
-[@vm.procedure-attributes.metadata=getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:20,getterSelectorId:21]  method doTest4() → void {
+[@vm.procedure-attributes.metadata=getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:28,getterSelectorId:29]  method doTest4() → void {
     self::ok = true;
   }
 }
 class A4 extends core::Object {
-[@vm.inferred-type.metadata=#lib::T4?] [@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,hasNonThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:5,getterSelectorId:6]  field dynamic foo = null;
+[@vm.inferred-type.metadata=#lib::T4?] [@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,hasNonThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:32,getterSelectorId:33]  field dynamic foo = null;
   synthetic constructor •() → self::A4*
     : super core::Object::•()
     ;
-[@vm.procedure-attributes.metadata=getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:3,getterSelectorId:4]  method call([dynamic a1 = #C1, dynamic a2 = #C1, dynamic a3 = #C1, [@vm.inferred-type.metadata=dart.core::_Smi?] dynamic a4 = #C1, [@vm.inferred-type.metadata=dart.core::_Smi?] dynamic a5 = #C1, [@vm.inferred-type.metadata=dart.core::_Smi?] dynamic a6 = #C1, [@vm.inferred-type.metadata=dart.core::_Smi?] dynamic a7 = #C1, [@vm.inferred-type.metadata=#lib::T4?] dynamic a8 = #C1]) → void {
+[@vm.procedure-attributes.metadata=getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:30,getterSelectorId:31]  method call([dynamic a1 = #C1, dynamic a2 = #C1, dynamic a3 = #C1, [@vm.inferred-type.metadata=dart.core::_Smi?] dynamic a4 = #C1, [@vm.inferred-type.metadata=dart.core::_Smi?] dynamic a5 = #C1, [@vm.inferred-type.metadata=dart.core::_Smi?] dynamic a6 = #C1, [@vm.inferred-type.metadata=dart.core::_Smi?] dynamic a7 = #C1, [@vm.inferred-type.metadata=#lib::T4?] dynamic a8 = #C1]) → void {
     [@vm.direct-call.metadata=#lib::A4.foo] [@vm.inferred-type.metadata=!? (skip check)] this.{self::A4::foo} = a8;
   }
 }
 class B4 extends core::Object {
-[@vm.inferred-type.metadata=#lib::A4] [@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasNonThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:12,getterSelectorId:13]  field dynamic _aa = new self::A4::•();
+[@vm.inferred-type.metadata=#lib::A4] [@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasNonThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:35,getterSelectorId:36]  field dynamic _aa = new self::A4::•();
   synthetic constructor •() → self::B4*
     : super core::Object::•()
     ;
-[@vm.procedure-attributes.metadata=hasThisUses:false,hasTearOffUses:false,getterSelectorId:22]  get aa4() → dynamic
+[@vm.procedure-attributes.metadata=hasThisUses:false,hasTearOffUses:false,getterSelectorId:34]  get aa4() → dynamic
     return [@vm.direct-call.metadata=#lib::B4._aa] [@vm.inferred-type.metadata=#lib::A4] this.{self::B4::_aa};
 }
 [@vm.inferred-type.metadata=dart.core::bool?]static field core::bool* ok;
diff --git a/pkg/vm/testcases/transformations/type_flow/transformer/selector_id_assignments.dart b/pkg/vm/testcases/transformations/type_flow/transformer/selector_id_assignments.dart
new file mode 100644
index 0000000..f6ee1ad
--- /dev/null
+++ b/pkg/vm/testcases/transformations/type_flow/transformer/selector_id_assignments.dart
@@ -0,0 +1,92 @@
+// Copyright (c) 2020, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// Validate the partitioning of methods for selector ID assignment.
+// Two members should get the same selector ID(s) iff they have the same name
+// and are defined in classes with the same number.
+
+class X {}
+
+class A1 {
+  void foo() {
+    print("A1");
+  }
+}
+
+class B1 extends A1 {}
+
+class C1 extends B1 {
+  void foo() {
+    print("C1");
+  }
+}
+
+class A2 {
+  void foo() {
+    print("A2");
+  }
+}
+
+class B2 extends A2 implements X {
+  void foo() {
+    print("B2");
+  }
+}
+
+abstract class A3 {
+  void foo();
+}
+
+class B3 extends A3 implements X {
+  void foo() {
+    print("B3");
+  }
+}
+
+class C3 implements A3 {
+  void foo() {
+    print("C3");
+  }
+}
+
+class A4 {
+  void foo() {
+    print("A4");
+  }
+}
+
+class B4 {
+  void foo() {
+    print("B4");
+  }
+}
+
+class C4 {
+  void foo() {
+    print("C4");
+  }
+}
+
+class D4 extends A4 implements B4 {
+  void foo() {
+    print("D4");
+  }
+}
+
+class E4 extends C4 implements B4 {}
+
+main() {
+  List<A1> x1 = [A1(), B1(), C1()];
+  for (A1 o in x1) o.foo();
+  List<A2> x2 = [A2(), B2()];
+  for (A2 o in x2) o.foo();
+  List<A3> x3 = [B3(), C3()];
+  for (A3 o in x3) o.foo();
+  List<A4> x4 = [A4(), D4()];
+  for (A4 o in x4) o.foo();
+  List<B4> y4 = [B4(), D4(), E4()];
+  for (B4 o in y4) o.foo();
+  List<C4> z4 = [C4(), E4()];
+  for (C4 o in z4) o.foo();
+}
diff --git a/pkg/vm/testcases/transformations/type_flow/transformer/selector_id_assignments.dart.expect b/pkg/vm/testcases/transformations/type_flow/transformer/selector_id_assignments.dart.expect
new file mode 100644
index 0000000..7b4579e
--- /dev/null
+++ b/pkg/vm/testcases/transformations/type_flow/transformer/selector_id_assignments.dart.expect
@@ -0,0 +1,152 @@
+library #lib;
+import self as self;
+import "dart:core" as core;
+
+abstract class X extends core::Object {
+}
+class A1 extends core::Object {
+  synthetic constructor •() → self::A1*
+    : super core::Object::•()
+    ;
+[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:1,getterSelectorId:2]  method foo() → void {
+    core::print("A1");
+  }
+}
+class B1 extends self::A1 {
+  synthetic constructor •() → self::B1*
+    : super self::A1::•()
+    ;
+}
+class C1 extends self::B1 {
+  synthetic constructor •() → self::C1*
+    : super self::B1::•()
+    ;
+[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:1,getterSelectorId:2]  method foo() → void {
+    core::print("C1");
+  }
+}
+class A2 extends core::Object {
+  synthetic constructor •() → self::A2*
+    : super core::Object::•()
+    ;
+[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:3,getterSelectorId:4]  method foo() → void {
+    core::print("A2");
+  }
+}
+class B2 extends self::A2 implements self::X {
+  synthetic constructor •() → self::B2*
+    : super self::A2::•()
+    ;
+[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:3,getterSelectorId:4]  method foo() → void {
+    core::print("B2");
+  }
+}
+abstract class A3 extends core::Object {
+  synthetic constructor •() → self::A3*
+    : super core::Object::•()
+    ;
+[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasNonThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:5,getterSelectorId:6]  abstract method foo() → void;
+}
+class B3 extends self::A3 implements self::X {
+  synthetic constructor •() → self::B3*
+    : super self::A3::•()
+    ;
+[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:5,getterSelectorId:6]  method foo() → void {
+    core::print("B3");
+  }
+}
+class C3 extends core::Object implements self::A3 {
+  synthetic constructor •() → self::C3*
+    : super core::Object::•()
+    ;
+[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:5,getterSelectorId:6]  method foo() → void {
+    core::print("C3");
+  }
+}
+class A4 extends core::Object {
+  synthetic constructor •() → self::A4*
+    : super core::Object::•()
+    ;
+[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:7,getterSelectorId:8]  method foo() → void {
+    core::print("A4");
+  }
+}
+class B4 extends core::Object {
+  synthetic constructor •() → self::B4*
+    : super core::Object::•()
+    ;
+[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:7,getterSelectorId:8]  method foo() → void {
+    core::print("B4");
+  }
+}
+class C4 extends core::Object {
+  synthetic constructor •() → self::C4*
+    : super core::Object::•()
+    ;
+[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:7,getterSelectorId:8]  method foo() → void {
+    core::print("C4");
+  }
+}
+class D4 extends self::A4 implements self::B4 {
+  synthetic constructor •() → self::D4*
+    : super self::A4::•()
+    ;
+[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:7,getterSelectorId:8]  method foo() → void {
+    core::print("D4");
+  }
+}
+class E4 extends self::C4 implements self::B4 {
+  synthetic constructor •() → self::E4*
+    : super self::C4::•()
+    ;
+}
+static method main() → dynamic {
+  core::List<self::A1*>* x1 = <self::A1*>[new self::A1::•(), new self::B1::•(), new self::C1::•()];
+  {
+    core::Iterator<self::A1*>* :sync-for-iterator = [@vm.direct-call.metadata=dart.core::_GrowableList.iterator] [@vm.inferred-type.metadata=dart._internal::ListIterator<#lib::A1*>] x1.{core::Iterable::iterator};
+    for (; [@vm.direct-call.metadata=dart._internal::ListIterator.moveNext] [@vm.inferred-type.metadata=dart.core::bool (skip check)] :sync-for-iterator.{core::Iterator::moveNext}(); ) {
+      self::A1* o = [@vm.direct-call.metadata=dart._internal::ListIterator.current] :sync-for-iterator.{core::Iterator::current};
+      o.{self::A1::foo}();
+    }
+  }
+  core::List<self::A2*>* x2 = <self::A2*>[new self::A2::•(), new self::B2::•()];
+  {
+    core::Iterator<self::A2*>* :sync-for-iterator = [@vm.direct-call.metadata=dart.core::_GrowableList.iterator] [@vm.inferred-type.metadata=dart._internal::ListIterator<#lib::A2*>] x2.{core::Iterable::iterator};
+    for (; [@vm.direct-call.metadata=dart._internal::ListIterator.moveNext] [@vm.inferred-type.metadata=dart.core::bool (skip check)] :sync-for-iterator.{core::Iterator::moveNext}(); ) {
+      self::A2* o = [@vm.direct-call.metadata=dart._internal::ListIterator.current] :sync-for-iterator.{core::Iterator::current};
+      o.{self::A2::foo}();
+    }
+  }
+  core::List<self::A3*>* x3 = <self::A3*>[new self::B3::•(), new self::C3::•()];
+  {
+    core::Iterator<self::A3*>* :sync-for-iterator = [@vm.direct-call.metadata=dart.core::_GrowableList.iterator] [@vm.inferred-type.metadata=dart._internal::ListIterator<#lib::A3*>] x3.{core::Iterable::iterator};
+    for (; [@vm.direct-call.metadata=dart._internal::ListIterator.moveNext] [@vm.inferred-type.metadata=dart.core::bool (skip check)] :sync-for-iterator.{core::Iterator::moveNext}(); ) {
+      self::A3* o = [@vm.direct-call.metadata=dart._internal::ListIterator.current] :sync-for-iterator.{core::Iterator::current};
+      o.{self::A3::foo}();
+    }
+  }
+  core::List<self::A4*>* x4 = <self::A4*>[new self::A4::•(), new self::D4::•()];
+  {
+    core::Iterator<self::A4*>* :sync-for-iterator = [@vm.direct-call.metadata=dart.core::_GrowableList.iterator] [@vm.inferred-type.metadata=dart._internal::ListIterator<#lib::A4*>] x4.{core::Iterable::iterator};
+    for (; [@vm.direct-call.metadata=dart._internal::ListIterator.moveNext] [@vm.inferred-type.metadata=dart.core::bool (skip check)] :sync-for-iterator.{core::Iterator::moveNext}(); ) {
+      self::A4* o = [@vm.direct-call.metadata=dart._internal::ListIterator.current] :sync-for-iterator.{core::Iterator::current};
+      o.{self::A4::foo}();
+    }
+  }
+  core::List<self::B4*>* y4 = <self::B4*>[new self::B4::•(), new self::D4::•(), new self::E4::•()];
+  {
+    core::Iterator<self::B4*>* :sync-for-iterator = [@vm.direct-call.metadata=dart.core::_GrowableList.iterator] [@vm.inferred-type.metadata=dart._internal::ListIterator<#lib::B4*>] y4.{core::Iterable::iterator};
+    for (; [@vm.direct-call.metadata=dart._internal::ListIterator.moveNext] [@vm.inferred-type.metadata=dart.core::bool (skip check)] :sync-for-iterator.{core::Iterator::moveNext}(); ) {
+      self::B4* o = [@vm.direct-call.metadata=dart._internal::ListIterator.current] :sync-for-iterator.{core::Iterator::current};
+      o.{self::B4::foo}();
+    }
+  }
+  core::List<self::C4*>* z4 = <self::C4*>[new self::C4::•(), new self::E4::•()];
+  {
+    core::Iterator<self::C4*>* :sync-for-iterator = [@vm.direct-call.metadata=dart.core::_GrowableList.iterator] [@vm.inferred-type.metadata=dart._internal::ListIterator<#lib::C4*>] z4.{core::Iterable::iterator};
+    for (; [@vm.direct-call.metadata=dart._internal::ListIterator.moveNext] [@vm.inferred-type.metadata=dart.core::bool (skip check)] :sync-for-iterator.{core::Iterator::moveNext}(); ) {
+      self::C4* o = [@vm.direct-call.metadata=dart._internal::ListIterator.current] :sync-for-iterator.{core::Iterator::current};
+      [@vm.direct-call.metadata=#lib::C4.foo??] [@vm.inferred-type.metadata=!? (skip check)] o.{self::C4::foo}();
+    }
+  }
+}
diff --git a/pkg/vm/testcases/transformations/type_flow/transformer/tear_off_super_method.dart.expect b/pkg/vm/testcases/transformations/type_flow/transformer/tear_off_super_method.dart.expect
index b7fdab8..e630a88 100644
--- a/pkg/vm/testcases/transformations/type_flow/transformer/tear_off_super_method.dart.expect
+++ b/pkg/vm/testcases/transformations/type_flow/transformer/tear_off_super_method.dart.expect
@@ -20,16 +20,16 @@
   synthetic constructor •() → self::Base*
     : super core::Object::•()
     ;
-[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasNonThisUses:false,methodOrSetterSelectorId:1,getterSelectorId:2]  method foo() → core::int*
+[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasNonThisUses:false,methodOrSetterSelectorId:3,getterSelectorId:4]  method foo() → core::int*
     return _in::unsafeCast<core::int*>([@vm.direct-call.metadata=dart.core::_IntegerImplementation.+] [@vm.inferred-type.metadata=int (skip check)] 3.{core::num::+}(_in::unsafeCast<core::num>([@vm.direct-call.metadata=#lib::B.foo] [@vm.inferred-type.metadata=int? (receiver not int)] [@vm.inferred-type.metadata=#lib::B] self::knownResult().foo())));
-[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasNonThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:3,getterSelectorId:4]  method doCall(dynamic x) → core::int*
+[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasNonThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:5,getterSelectorId:6]  method doCall(dynamic x) → core::int*
     return [@vm.call-site-attributes.metadata=receiverType:dynamic] x.call() as{TypeError,ForDynamic} core::int*;
 }
 class TearOffSuperMethod extends self::Base {
   synthetic constructor •() → self::TearOffSuperMethod*
     : super self::Base::•()
     ;
-[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:5,getterSelectorId:6]  method bar() → core::int*
+[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:7,getterSelectorId:8]  method bar() → core::int*
     return [@vm.direct-call.metadata=#lib::Base.doCall] [@vm.inferred-type.metadata=int? (skip check)] this.{self::Base::doCall}(super.{self::Base::foo});
 }
 [@vm.inferred-type.metadata=#lib::B?]static field self::A* aa = new self::B::•();
diff --git a/pkg/vm/testcases/transformations/type_flow/transformer/write_only_field3_nnbd.dart.expect b/pkg/vm/testcases/transformations/type_flow/transformer/write_only_field3_nnbd.dart.expect
index b951307..f08f804 100644
--- a/pkg/vm/testcases/transformations/type_flow/transformer/write_only_field3_nnbd.dart.expect
+++ b/pkg/vm/testcases/transformations/type_flow/transformer/write_only_field3_nnbd.dart.expect
@@ -12,11 +12,11 @@
 [@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasNonThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:3]  set /*isNullableByDefault*/ x(core::int value) → void;
 }
 class B extends core::Object {
-[@vm.inferred-type.metadata=dart.core::_Smi?] [@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasNonThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:3,getterSelectorId:4]  late final [setter] field core::int x;
+[@vm.inferred-type.metadata=dart.core::_Smi?] [@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasNonThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:6,getterSelectorId:7]  late final [setter] field core::int x;
   synthetic constructor •() → self::B
     : super core::Object::•()
     ;
-[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:1,getterSelectorId:2]  method use() → dynamic {
+[@vm.procedure-attributes.metadata=methodOrSetterCalledDynamically:false,getterCalledDynamically:false,hasThisUses:false,hasTearOffUses:false,methodOrSetterSelectorId:4,getterSelectorId:5]  method use() → dynamic {
     [@vm.direct-call.metadata=#lib::B.x] [@vm.inferred-type.metadata=!? (skip check)] this.{self::B::x} = 3;
   }
 }
diff --git a/pkg/vm_snapshot_analysis/CHANGELOG.md b/pkg/vm_snapshot_analysis/CHANGELOG.md
index 579c590..4c1fc39 100644
--- a/pkg/vm_snapshot_analysis/CHANGELOG.md
+++ b/pkg/vm_snapshot_analysis/CHANGELOG.md
@@ -1,5 +1,18 @@
 # Changelog
 
+## 0.4.0
+
+- Add `buildComparisonTreemap` for constructing treemap representing the diff
+between two size profiles.
+- Implemented support for extracting call graph information from the AOT
+compiler trace (`--trace-precompiler-to` flag), see `precompiler_trace.dart`.
+- New command `explain dynamic-calls` which estimates the impact of different
+dynamic calls on the resulting AOT snapshot size using information from the
+size dump (e.g. V8 snapshot profile) and AOT compiler trace.
+- `summary` command can now use information from the AOT compiler trace to
+group packages/libraries together with their dependencies to given more precise
+estimate of how much a specific package/library brings into the snapshot.
+
 ## 0.3.0
 
 - Extract treemap construction code into a separate library, to make it
diff --git a/pkg/vm_snapshot_analysis/README.md b/pkg/vm_snapshot_analysis/README.md
index 1e57bf9..5484b91 100644
--- a/pkg/vm_snapshot_analysis/README.md
+++ b/pkg/vm_snapshot_analysis/README.md
@@ -2,7 +2,8 @@
 
 This package provides libraries and a utility for analysing the size and
 contents of Dart VM AOT snapshots based on the output of
-`--print-instructions-sizes-to` and `--write-v8-snapshot-profile-to` VM flags.
+`--print-instructions-sizes-to`, `--write-v8-snapshot-profile-to` and
+`--trace-precompiler-to` VM flags.
 
 ## AOT Snapshot Basics
 
@@ -24,6 +25,9 @@
 * `--write-v8-snapshot-profile-to` is a graph representation of the snapshot,
 it attributes bytes written into a snapshot to a node in the heap graph. This
 format covers both data and code sections of the snapshot.
+* `--trace-precompiler-to` gives information about dependencies between
+compiled functions, allowing to determine why certain function was pulled into
+the snapshot.
 
 ### Passing flags to the AOT compiler
 
@@ -92,6 +96,45 @@
 at the same time objects which can be attributed to `dart:core` library
 but not to any specific class within this library take `3.33%` of the snapshot.
 
+This command also supports _estimating_ cumulative impact of a library or a
+package together with its dependencies - which can be computed from
+a precompiler trace (`--trace-precompiler-to` options). For example:
+
+```console
+$ snapshot_analysis summary -b package /tmp/profile.json
++-----------------------------+--------------+---------+
+| Package                     | Size (Bytes) | Percent |
++-----------------------------+--------------+---------+
+| package:compiler            |      5369933 |  38.93% |
+| package:front_end           |      2644942 |  19.18% |
+| package:kernel              |      1443568 |  10.47% |
+| package:_fe_analyzer_shared |       944555 |   6.85% |
+...
+$ snapshot_analysis summary -b package -d 1 --precompiler-trace=/tmp/trace.json /tmp/profile.json
++------------------------------+--------------+---------+
+| Package                      | Size (Bytes) | Percent |
++------------------------------+--------------+---------+
+| package:compiler (+ 8 deps)  |      5762761 |  41.78% |
+| package:front_end (+ 1 deps) |      2708981 |  19.64% |
+| package:kernel               |      1443568 |  10.47% |
+| package:_fe_analyzer_shared  |       944555 |   6.85% |
+...
+Dependency trees:
+
+package:compiler (total 5762761 bytes)
+├── package:js_ast (total 242490 bytes)
+├── package:dart2js_info (total 101280 bytes)
+├── package:crypto (total 27434 bytes)
+│   ├── package:typed_data (total 11850 bytes)
+│   └── package:convert (total 5185 bytes)
+├── package:collection (total 15182 bytes)
+├── package:_js_interop_checks (total 4627 bytes)
+└── package:js_runtime (total 1815 bytes)
+
+package:front_end (total 2708981 bytes)
+└── package:package_config (total 64039 bytes)
+```
+
 
 ### `compare`
 
@@ -141,6 +184,31 @@
 data or executable code.
 * `object-type` (default) collapses snapshot nodes based on their type only.
 
+### `explain`
+
+#### `explain dynamic-calls`
+
+```console
+$ snapshot_analysis explain dynamic-calls <profile.json> <trace.json>
+```
+
+This command generates a report listing dynamically dispatched selectors
+and their approximate impact on the code size.
+
+```console
+snapshot_analysis explain dynamic-calls /tmp/profile.json /tmp/trace.json
++------------------------------+--------------+---------+----------+
+| Selector                     | Size (Bytes) | Percent | Of total |
++------------------------------+--------------+---------+----------+
+| set:requestHeader            |        10054 |  28.00% |    0.03% |
+| get:scale                    |         3630 |  10.11% |    0.01% |
+...
+Dynamic call to set:requestHeader (retaining ~10054 bytes) occurs in:
+    package:my-super-app/src/injector.dart::Injector.handle{body}
+
+Dynamic call to get:scale (retaining ~3630 bytes) occurs in:
+    package:some-dependency/src/image.dart::Image.==
+```
 
 ## API
 
@@ -162,6 +230,48 @@
 and creates `ProgramInfo` in an appropriate way, allowing to write code
 which works in the same way with both formats.
 
+## Precompiler Trace Format (`--write-precompiler-trace-to=...`)
+
+AOT compiler can produce a JSON file containing information about compiled
+functions and dependencies between them. This file has the following structure:
+
+```json
+{
+    "trace": traceArray,
+    "entities": entitiesArray,
+    "strings": stringsArray,
+}
+```
+
+- `stringsArray` is an array of strings referenced by other parts of the trace
+by their index in this array.
+- `entitiesArray` is an flattened array of entities:
+
+    - `"C", <library-uri-idx>, <class-name-idx>, 0` - class record;
+    - `"V", <class-idx>, <name-idx>, 0` - static field record;
+    - `"F"|"S", <class-idx>, <name-idx>, <selector-id>` - function record (`F` for dynamic functions and `S` for static functions);
+
+  Note that all records in this array occupy the same amount of elements (`4`)
+  to make random access by index possible.
+
+- `traceArray` is an flattened array of precompilation events:
+
+    - `"R"` - root event (always the first element)
+    - `"E"` - end event (always the last element)
+    - `"C", <function-idx>` - function compilation event
+
+  Root and function compilation events can additionally be followed by a
+  sequence of references which enumerate outgoing dependencies discovered
+  by the AOT compiler:
+
+    - `<entity-idx>` - a reference to a function or a static field;
+    - `"S", <selector-idx>` - a dynamic call with the given selector;
+    - `"T", <selector-id>` - dispatch table call with the given selector id;
+
+*Flattened array* is an array of records formed by consecutive elements:
+`[R0_0, R0_1, R0_2, R1_0, R1_1, R1_2, ...]` here `R0_*` is the first record
+and `R1_*` is the second record and so on.
+
 ## Features and bugs
 
 Please file feature requests and bugs at the [issue tracker][tracker].
diff --git a/pkg/vm_snapshot_analysis/bin/analyse.dart b/pkg/vm_snapshot_analysis/bin/analyse.dart
index b8d6a2c..a79bebd 100755
--- a/pkg/vm_snapshot_analysis/bin/analyse.dart
+++ b/pkg/vm_snapshot_analysis/bin/analyse.dart
@@ -8,6 +8,7 @@
 import 'package:args/command_runner.dart';
 
 import 'package:vm_snapshot_analysis/src/commands/compare.dart';
+import 'package:vm_snapshot_analysis/src/commands/explain.dart';
 import 'package:vm_snapshot_analysis/src/commands/summary.dart';
 import 'package:vm_snapshot_analysis/src/commands/treemap.dart';
 
@@ -34,7 +35,8 @@
     _executableName, 'Tools for binary size analysis of Dart VM AOT snapshots.')
   ..addCommand(TreemapCommand())
   ..addCommand(CompareCommand())
-  ..addCommand(SummaryCommand());
+  ..addCommand(SummaryCommand())
+  ..addCommand(ExplainCommand());
 
 void main(List<String> args) async {
   try {
diff --git a/pkg/vm_snapshot_analysis/lib/name.dart b/pkg/vm_snapshot_analysis/lib/name.dart
index 09b7893..3b17bd1 100644
--- a/pkg/vm_snapshot_analysis/lib/name.dart
+++ b/pkg/vm_snapshot_analysis/lib/name.dart
@@ -55,6 +55,23 @@
     return result;
   }
 
+  /// Split raw name into individual '.' separated components (e.g. names of
+  /// its parent functions).
+  List<String> get rawComponents {
+    // Break the rest of the name into components.
+    final result = raw.split('.');
+
+    // Constructor names look like this 'new <ClassName>.<CtorName>' so
+    // we need to concatenate the first two components back to form
+    // the constructor name.
+    if (result.first.startsWith('new ')) {
+      result[0] = '${result[0]}.${result[1]}';
+      result.removeAt(1);
+    }
+
+    return result;
+  }
+
   static String collapse(String name) =>
       name.replaceAll(_collapseRe, '<anonymous closure>');
 }
diff --git a/pkg/vm_snapshot_analysis/lib/precompiler_trace.dart b/pkg/vm_snapshot_analysis/lib/precompiler_trace.dart
new file mode 100644
index 0000000..af86713
--- /dev/null
+++ b/pkg/vm_snapshot_analysis/lib/precompiler_trace.dart
@@ -0,0 +1,524 @@
+// Copyright (c) 2020, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+/// Helpers for working with the output of `--trace-precompiler-to` VM flag.
+library vm_snapshot_analysis.precompiler_trace;
+
+import 'dart:io';
+import 'dart:math' as math;
+
+import 'package:vm_snapshot_analysis/name.dart';
+import 'package:vm_snapshot_analysis/program_info.dart';
+import 'package:vm_snapshot_analysis/utils.dart';
+
+/// Build [CallGraph] based on the trace written by `--trace-precompiler-to`
+/// flag.
+Future<CallGraph> loadTrace(File input) async =>
+    _TraceReader(await loadJson(input)).readTrace();
+
+/// [CallGraphNode] represents a node of the call-graph. It can either be:
+///
+///   - a function, in which case [data] will be [ProgramInfoNode] of type
+///     [NodeType.functionNode];
+///   - a dynamic call node, in which case [data] will be a [String] selector;
+///   - a dispatch table call node, in which case [data] will be an [int]
+///     selector id.
+///
+class CallGraphNode {
+  /// An index of this node in [CallGraph.nodes].
+  final int id;
+
+  /// Successors of this node.
+  final List<CallGraphNode> succ = [];
+
+  /// Predecessors of this node.
+  final List<CallGraphNode> pred = [];
+
+  /// Datum associated with this node: a [ProgramInfoNode] (function),
+  /// a [String] (dynamic call selector) or an [int] (dispatch table
+  /// selector id).
+  final data;
+
+  /// Preorder number of this node.
+  ///
+  /// Computed by [CallGraph.computeDominators].
+  int _preorderNumber;
+
+  /// Dominator of this node.
+  ///
+  /// Computed by [CallGraph.computeDominators].
+  CallGraphNode dominator;
+
+  /// Nodes dominated by this node.
+  ///
+  /// Computed by [CallGraph.computeDominators].
+  List<CallGraphNode> dominated = _emptyNodeList;
+
+  CallGraphNode(this.id, {this.data});
+
+  bool get isFunctionNode =>
+      data is ProgramInfoNode && data.type == NodeType.functionNode;
+
+  bool get isClassNode =>
+      data is ProgramInfoNode && data.type == NodeType.classNode;
+
+  bool get isDynamicCallNode => data is String;
+
+  /// Create outgoing edge from this node to the given node [n].
+  void connectTo(CallGraphNode n) {
+    if (n == this) {
+      return;
+    }
+
+    if (!succ.contains(n)) {
+      n.pred.add(this);
+      succ.add(n);
+    }
+  }
+
+  void _addDominatedBlock(CallGraphNode n) {
+    if (identical(dominated, _emptyNodeList)) {
+      dominated = [];
+    }
+    dominated.add(n);
+    n.dominator = this;
+  }
+
+  void visitDominatorTree(bool Function(CallGraphNode n, int depth) callback,
+      [int depth = 0]) {
+    if (callback(this, depth)) {
+      for (var n in dominated) {
+        n.visitDominatorTree(callback, depth + 1);
+      }
+    }
+  }
+
+  @override
+  String toString() {
+    return 'CallGraphNode(${data is ProgramInfoNode ? data.qualifiedName : data})';
+  }
+}
+
+const _emptyNodeList = <CallGraphNode>[];
+
+class CallGraph {
+  final ProgramInfo program;
+  final List<CallGraphNode> nodes;
+
+  // Mapping from [ProgramInfoNode] to a corresponding [CallGraphNode] (if any)
+  // via [ProgramInfoNode.id].
+  final List<CallGraphNode> _nodeByEntityId;
+
+  CallGraph._(this.program, this.nodes, this._nodeByEntityId);
+
+  CallGraphNode get root => nodes.first;
+
+  CallGraphNode lookup(ProgramInfoNode node) => _nodeByEntityId[node.id];
+
+  Iterable<CallGraphNode> get dynamicCalls =>
+      nodes.where((n) => n.isDynamicCallNode);
+
+  /// Compute a collapsed version of the call-graph, where
+  CallGraph collapse(NodeType type, {bool dropCallNodes = false}) {
+    final nodesByData = <Object, CallGraphNode>{};
+    final nodeByEntityId = <CallGraphNode>[];
+
+    ProgramInfoNode collapsed(ProgramInfoNode nn) {
+      var n = nn;
+      while (n.parent != null && n.type != type) {
+        n = n.parent;
+      }
+      return n;
+    }
+
+    CallGraphNode nodeFor(Object data) {
+      return nodesByData.putIfAbsent(data, () {
+        final n = CallGraphNode(nodesByData.length, data: data);
+        if (data is ProgramInfoNode) {
+          if (nodeByEntityId.length <= data.id) {
+            nodeByEntityId.length = data.id * 2 + 1;
+          }
+          nodeByEntityId[data.id] = n;
+        }
+        return n;
+      });
+    }
+
+    final newNodes = nodes.map((n) {
+      if (n.data is ProgramInfoNode) {
+        return nodeFor(collapsed(n.data));
+      } else if (!dropCallNodes) {
+        return nodeFor(n.data);
+      }
+    }).toList(growable: false);
+
+    for (var n in nodes) {
+      for (var succ in n.succ) {
+        final from = newNodes[n.id];
+        final to = newNodes[succ.id];
+
+        if (from != null && to != null) {
+          from.connectTo(to);
+        }
+      }
+    }
+
+    return CallGraph._(
+        program, nodesByData.values.toList(growable: false), nodeByEntityId);
+  }
+
+  /// Compute dominator tree of the call-graph.
+  ///
+  /// The code for dominator tree computation is taken verbatim from the
+  /// native compiler (see runtime/vm/compiler/backend/flow_graph.cc).
+  void computeDominators() {
+    final size = nodes.length;
+
+    // Compute preorder numbering for the graph using DFS.
+    final parent = List<int>.filled(size, -1);
+    final preorder = List<CallGraphNode>.filled(size, null);
+
+    var N = 0;
+    void dfs() {
+      final stack = [_DfsState(p: -1, n: nodes.first)];
+      while (stack.isNotEmpty) {
+        final s = stack.removeLast();
+        final p = s.p;
+        final n = s.n;
+        if (n._preorderNumber == null) {
+          n._preorderNumber = N;
+          preorder[n._preorderNumber] = n;
+          parent[n._preorderNumber] = p;
+
+          for (var w in n.succ) {
+            stack.add(_DfsState(p: n._preorderNumber, n: w));
+          }
+
+          N++;
+        }
+      }
+    }
+
+    dfs();
+
+    for (var node in nodes) {
+      if (node._preorderNumber == null) {
+        print('${node} is unreachable');
+      }
+    }
+
+    // Use the SEMI-NCA algorithm to compute dominators.  This is a two-pass
+    // version of the Lengauer-Tarjan algorithm (LT is normally three passes)
+    // that eliminates a pass by using nearest-common ancestor (NCA) to
+    // compute immediate dominators from semidominators.  It also removes a
+    // level of indirection in the link-eval forest data structure.
+    //
+    // The algorithm is described in Georgiadis, Tarjan, and Werneck's
+    // "Finding Dominators in Practice".
+    // See http://www.cs.princeton.edu/~rwerneck/dominators/ .
+
+    // All arrays are maps between preorder basic-block numbers.
+    final idom = parent.toList(); // Immediate dominator.
+    final semi = List<int>.generate(size, (i) => i); // Semidominator.
+    final label =
+        List<int>.generate(size, (i) => i); // Label for link-eval forest.
+
+    void compressPath(int start, int current) {
+      final next = parent[current];
+      if (next > start) {
+        compressPath(start, next);
+        label[current] = math.min(label[current], label[next]);
+        parent[current] = parent[next];
+      }
+    }
+
+    // 1. First pass: compute semidominators as in Lengauer-Tarjan.
+    // Semidominators are computed from a depth-first spanning tree and are an
+    // approximation of immediate dominators.
+
+    // Use a link-eval data structure with path compression.  Implement path
+    // compression in place by mutating the parent array.  Each block has a
+    // label, which is the minimum block number on the compressed path.
+
+    // Loop over the blocks in reverse preorder (not including the graph
+    // entry).
+    for (var block_index = size - 1; block_index >= 1; --block_index) {
+      // Loop over the predecessors.
+      final block = preorder[block_index];
+      // Clear the immediately dominated blocks in case ComputeDominators is
+      // used to recompute them.
+      for (final pred in block.pred) {
+        // Look for the semidominator by ascending the semidominator path
+        // starting from pred.
+        final pred_index = pred._preorderNumber;
+        var best = pred_index;
+        if (pred_index > block_index) {
+          compressPath(block_index, pred_index);
+          best = label[pred_index];
+        }
+
+        // Update the semidominator if we've found a better one.
+        semi[block_index] = math.min(semi[block_index], semi[best]);
+      }
+
+      // Now use label for the semidominator.
+      label[block_index] = semi[block_index];
+    }
+
+    // 2. Compute the immediate dominators as the nearest common ancestor of
+    // spanning tree parent and semidominator, for all blocks except the entry.
+    for (var block_index = 1; block_index < size; ++block_index) {
+      var dom_index = idom[block_index];
+      while (dom_index > semi[block_index]) {
+        dom_index = idom[dom_index];
+      }
+      idom[block_index] = dom_index;
+      preorder[dom_index]._addDominatedBlock(preorder[block_index]);
+    }
+  }
+}
+
+class _DfsState {
+  final int p;
+  final CallGraphNode n;
+  _DfsState({this.p, this.n});
+}
+
+/// Helper class for reading `--trace-precompiler-to` output.
+///
+/// See README.md for description of the format.
+class _TraceReader {
+  final List<Object> trace;
+  final List<Object> strings;
+  final List<Object> entities;
+
+  final program = ProgramInfo();
+
+  /// Mapping between entity ids and corresponding [ProgramInfoNode] nodes.
+  final entityById = List<ProgramInfoNode>.filled(1024, null, growable: true);
+
+  /// Mapping between functions (represented as [ProgramInfoNode]s) and
+  /// their selector ids.
+  final selectorIdMap = <ProgramInfoNode, int>{};
+
+  /// Set of functions which can be reached through dynamic dispatch.
+  final dynamicFunctions = Set<ProgramInfoNode>();
+
+  _TraceReader(Map<String, dynamic> data)
+      : strings = data['strings'],
+        entities = data['entities'],
+        trace = data['trace'];
+
+  /// Read all trace events and construct the call graph based on them.
+  CallGraph readTrace() {
+    var pos = 0; // Position in the [trace] array.
+    CallGraphNode currentNode;
+
+    final nodes = <CallGraphNode>[];
+    final nodeByEntityId = <CallGraphNode>[];
+    final callNodesBySelector = <dynamic, CallGraphNode>{};
+    final allocated = Set<ProgramInfoNode>();
+
+    Object next() => trace[pos++];
+
+    CallGraphNode makeNode({dynamic data}) {
+      final n = CallGraphNode(nodes.length, data: data);
+      nodes.add(n);
+      return n;
+    }
+
+    CallGraphNode makeCallNode(dynamic selector) => callNodesBySelector
+        .putIfAbsent(selector, () => makeNode(data: selector));
+
+    CallGraphNode nodeFor(ProgramInfoNode n) {
+      if (nodeByEntityId.length <= n.id) {
+        nodeByEntityId.length = n.id * 2 + 1;
+      }
+      return nodeByEntityId[n.id] ??= makeNode(data: n);
+    }
+
+    void recordDynamicCall(String selector) {
+      currentNode.connectTo(makeCallNode(selector));
+    }
+
+    void recordInterfaceCall(int selector) {
+      currentNode.connectTo(makeCallNode(selector));
+    }
+
+    void recordStaticCall(ProgramInfoNode to) {
+      currentNode.connectTo(nodeFor(to));
+    }
+
+    void recordFieldRef(ProgramInfoNode field) {
+      currentNode.connectTo(nodeFor(field));
+    }
+
+    void recordAllocation(ProgramInfoNode cls) {
+      currentNode.connectTo(nodeFor(cls));
+      allocated.add(cls);
+    }
+
+    bool readRef() {
+      final ref = next();
+      if (ref is int) {
+        final entity = getEntityAt(ref);
+        if (entity.type == NodeType.classNode) {
+          recordAllocation(entity);
+        } else if (entity.type == NodeType.functionNode) {
+          recordStaticCall(entity);
+        } else if (entity.type == NodeType.other) {
+          recordFieldRef(entity);
+        }
+      } else if (ref == 'S') {
+        final String selector = strings[next()];
+        recordDynamicCall(selector);
+      } else if (ref == 'T') {
+        recordInterfaceCall(next());
+      } else if (ref == 'C' || ref == 'E') {
+        pos--;
+        return false;
+      } else {
+        throw FormatException('unexpected ref: ${ref}');
+      }
+      return true;
+    }
+
+    void readRefs() {
+      while (readRef()) {}
+    }
+
+    void readEvents() {
+      while (true) {
+        final op = next();
+        switch (op) {
+          case 'E': // End.
+            return;
+          case 'R': // Roots.
+            currentNode = nodeFor(program.root);
+            readRefs();
+            break;
+          case 'C': // Function compilation.
+            currentNode = nodeFor(getEntityAt(next()));
+            readRefs();
+            break;
+          default:
+            throw FormatException('Unknown event: ${op} at ${pos - 1}');
+        }
+      }
+    }
+
+    readEvents();
+
+    // Finally connect nodes representing dynamic and dispatch table calls
+    // to their potential targets.
+    for (var cls in allocated) {
+      for (var fun in cls.children.values.where(dynamicFunctions.contains)) {
+        final funNode = nodeFor(fun);
+
+        callNodesBySelector[selectorIdMap[fun]]?.connectTo(funNode);
+
+        final name = fun.name;
+        callNodesBySelector[name]?.connectTo(funNode);
+
+        const dynPrefix = 'dyn:';
+        const getterPrefix = 'get:';
+        const extractorPrefix = '[tear-off-extractor] ';
+
+        if (!name.startsWith(dynPrefix)) {
+          // Normal methods can be hit by dyn: selectors if the class
+          // does not contain a dedicated dyn: forwarder for this name.
+          if (!cls.children.containsKey('$dynPrefix$name')) {
+            callNodesBySelector['$dynPrefix$name']?.connectTo(funNode);
+          }
+
+          if (name.startsWith(getterPrefix)) {
+            // Handle potential calls through getters: getter get:foo can be
+            // hit by dyn:foo and foo selectors.
+            final targetName = name.substring(getterPrefix.length);
+            callNodesBySelector[targetName]?.connectTo(funNode);
+            callNodesBySelector['$dynPrefix$targetName']?.connectTo(funNode);
+          } else if (name.startsWith(extractorPrefix)) {
+            // Handle method tear-off: [tear-off-extractor] get:foo is hit
+            // by get:foo.
+            callNodesBySelector[name.substring(extractorPrefix.length)]
+                ?.connectTo(funNode);
+          }
+        }
+      }
+    }
+
+    return CallGraph._(program, nodes, nodeByEntityId);
+  }
+
+  /// Return [ProgramInfoNode] representing the entity with the given [id].
+  ProgramInfoNode getEntityAt(int id) {
+    if (entityById.length <= id) {
+      entityById.length = id * 2;
+    }
+
+    // Entity records have fixed size which allows us to perform random access.
+    const elementsPerEntity = 4;
+    return entityById[id] ??= readEntityAt(id * elementsPerEntity);
+  }
+
+  /// Read the entity at the given [index] in [entities].
+  ProgramInfoNode readEntityAt(int index) {
+    final type = entities[index];
+    switch (type) {
+      case 'C': // Class: 'C', <library-uri-idx>, <name-idx>, 0
+        final libraryUri = strings[entities[index + 1]];
+        final className = strings[entities[index + 2]];
+
+        return program.makeNode(
+            name: className,
+            parent: getLibraryNode(libraryUri),
+            type: NodeType.classNode);
+
+      case 'S':
+      case 'F': // Function: 'F'|'S', <class-idx>, <name-idx>, <selector-id>
+        final classNode = getEntityAt(entities[index + 1]);
+        final functionName = strings[entities[index + 2]];
+        final int selectorId = entities[index + 3];
+
+        final path = Name(functionName).rawComponents;
+        if (path.last == 'FfiTrampoline') {
+          path[path.length - 1] = '${path.last}@$index';
+        }
+        var node = program.makeNode(
+            name: path.first, parent: classNode, type: NodeType.functionNode);
+        for (var name in path.skip(1)) {
+          node = program.makeNode(
+              name: name, parent: node, type: NodeType.functionNode);
+        }
+        if (selectorId >= 0) {
+          selectorIdMap[node] = selectorId;
+        }
+        if (type == 'F') {
+          dynamicFunctions.add(node);
+        }
+        return node;
+
+      case 'V': // Field: 'V', <class-idx>, <name-idx>, 0
+        final classNode = getEntityAt(entities[index + 1]);
+        final fieldName = strings[entities[index + 2]];
+
+        return program.makeNode(
+            name: fieldName, parent: classNode, type: NodeType.other);
+
+      default:
+        throw FormatException('unrecognized entity type ${type}');
+    }
+  }
+
+  ProgramInfoNode getLibraryNode(String libraryUri) {
+    final package = packageOf(libraryUri);
+    var node = program.root;
+    if (package != libraryUri) {
+      node = program.makeNode(
+          name: package, parent: node, type: NodeType.packageNode);
+    }
+    return program.makeNode(
+        name: libraryUri, parent: node, type: NodeType.libraryNode);
+  }
+}
diff --git a/pkg/vm_snapshot_analysis/lib/program_info.dart b/pkg/vm_snapshot_analysis/lib/program_info.dart
index 78a4e87..c139f02 100644
--- a/pkg/vm_snapshot_analysis/lib/program_info.dart
+++ b/pkg/vm_snapshot_analysis/lib/program_info.dart
@@ -88,17 +88,23 @@
     recurse(root);
   }
 
-  int get totalSize {
-    var result = 0;
-    visit((pkg, lib, cls, fun, node) {
-      result += node.size ?? 0;
-    });
-    return result;
-  }
+  /// Total size of all the nodes in the program.
+  int get totalSize => root.totalSize;
 
   /// Convert this program info to a JSON map using [infoToJson] to convert
   /// data attached to nodes into its JSON representation.
   Map<String, dynamic> toJson() => root.toJson();
+
+  /// Lookup a node in the program given a path to it.
+  ProgramInfoNode lookup(List<String> path) {
+    var n = root;
+    for (var p in path) {
+      if ((n = n.children[p]) == null) {
+        break;
+      }
+    }
+    return n;
+  }
 }
 
 enum NodeType {
@@ -114,6 +120,7 @@
       NodeType.libraryNode: 'library',
       NodeType.classNode: 'class',
       NodeType.functionNode: 'function',
+      NodeType.other: 'other',
     }[type];
 
 class ProgramInfoNode {
@@ -161,6 +168,46 @@
         if (children.isNotEmpty)
           for (var clo in children.entries) clo.key: clo.value.toJson()
       };
+
+  /// Returns the name of this node prefixed by the [qualifiedName] of its
+  /// [parent].
+  String get qualifiedName {
+    var prefix = '';
+    // Do not include root name or package name (library uri already contains
+    // package name).
+    if (parent?.parent != null && parent?.type != NodeType.packageNode) {
+      prefix = parent.qualifiedName;
+      if (parent.type != NodeType.libraryNode) {
+        prefix += '.';
+      } else {
+        prefix += '::';
+      }
+    }
+    return '$prefix$name';
+  }
+
+  @override
+  String toString() {
+    return '${_typeToJson(type)} ${qualifiedName}';
+  }
+
+  /// Returns path to this node such that [ProgramInfo.lookup] would return
+  /// this node given its [path].
+  List<String> get path {
+    final result = <String>[];
+    var n = this;
+    while (n.parent != null) {
+      result.add(n.name);
+      n = n.parent;
+    }
+    return result.reversed.toList();
+  }
+
+  /// Cumulative size of this node and all of its children.
+  int get totalSize {
+    return (size ?? 0) +
+        children.values.fold<int>(0, (s, n) => s + n.totalSize);
+  }
 }
 
 /// Computes the size difference between two [ProgramInfo].
@@ -239,6 +286,14 @@
 
     return Histogram._(bucketInfo, buckets);
   }
+
+  /// Rebuckets the histogram given the new bucketing rule.
+  Histogram map(String Function(String) bucketFor) {
+    return Histogram.fromIterable(buckets.keys,
+        sizeOf: (key) => buckets[key],
+        bucketFor: bucketFor,
+        bucketInfo: bucketInfo);
+  }
 }
 
 /// Construct the histogram of specific [type] given a [ProgramInfo].
@@ -280,11 +335,10 @@
       if (node.size == null || node.size == 0) {
         return;
       }
-
-      final bucket = bucketing.bucketFor(pkg, lib, cls, fun);
       if (!matchesFilter(lib, cls, fun)) {
         return;
       }
+      final bucket = bucketing.bucketFor(pkg, lib, cls, fun);
       buckets[bucket] = (buckets[bucket] ?? 0) + node.size;
     });
 
diff --git a/pkg/vm_snapshot_analysis/lib/src/commands/explain.dart b/pkg/vm_snapshot_analysis/lib/src/commands/explain.dart
new file mode 100644
index 0000000..2688628
--- /dev/null
+++ b/pkg/vm_snapshot_analysis/lib/src/commands/explain.dart
@@ -0,0 +1,125 @@
+// Copyright (c) 2020, the Dart project authors.  Please see the AUTHORS file
+// for 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 command allows to inspect information written into the
+/// precompiler trace (`--trace-precompiler-to` output).
+library vm_snapshot_analysis.explain;
+
+import 'dart:async';
+import 'dart:io';
+import 'dart:math' as math;
+
+import 'package:args/command_runner.dart';
+
+import 'package:vm_snapshot_analysis/name.dart';
+import 'package:vm_snapshot_analysis/precompiler_trace.dart';
+import 'package:vm_snapshot_analysis/program_info.dart';
+import 'package:vm_snapshot_analysis/utils.dart';
+
+class ExplainCommand extends Command<void> {
+  @override
+  final name = 'explain';
+
+  @override
+  final description = '''
+Explain why certain methods were pulled into the binary.
+''';
+
+  ExplainCommand() {
+    addSubcommand(ExplainDynamicCallsCommand());
+  }
+}
+
+/// Generates a summary report about dynamic calls sorted by approximation
+/// of their retained size, i.e. the amount of bytes these calls are pulling
+/// into the snapshot.
+class ExplainDynamicCallsCommand extends Command<void> {
+  @override
+  final name = 'dynamic-calls';
+
+  @override
+  final description = '''
+This command explains impact of the dynamic calls on the binary size.
+
+It needs AOT snapshot size profile (an output of either
+--write-v8-snapshot-profile-to or --print-instructions-sizes-to flags) and
+precompiler trace (an output of --trace-precompiler-to flag).
+''';
+
+  ExplainCommand() {}
+
+  @override
+  Future<void> run() async {
+    final sizesJson = File(argResults.rest[0]);
+    if (!sizesJson.existsSync()) {
+      usageException('Size profile ${sizesJson.path} does not exist!');
+    }
+
+    final traceJson = File(argResults.rest[1]);
+    if (!traceJson.existsSync()) {
+      usageException('Size profile ${traceJson.path} does not exist!');
+    }
+
+    final callGraph = await loadTrace(traceJson);
+    callGraph.computeDominators();
+
+    final programInfo = await loadProgramInfo(sizesJson);
+
+    final histogram = Histogram.fromIterable<CallGraphNode>(
+        callGraph.dynamicCalls, sizeOf: (dynamicCall) {
+      // Compute approximate retained size by traversing the dominator tree
+      // and consulting snapshot profile.
+      var totalSize = 0;
+      dynamicCall.visitDominatorTree((retained, depth) {
+        if (retained.isFunctionNode) {
+          // Note that call graph keeps private library keys intact in the
+          // names (because we need to distinguish dynamic invocations
+          // through with the same private name in different libraries).
+          // So we need to scrub the path before we lookup information in the
+          // profile.
+          final path = (retained.data as ProgramInfoNode)
+              .path
+              .map((n) => Name(n).scrubbed)
+              .toList();
+          if (path.last.startsWith('[tear-off] ')) {
+            // Tear-off forwarder is placed into the function that is torn so
+            // we need to slightly tweak the path to be able to find it.
+            path.insert(
+                path.length - 1, path.last.replaceAll('[tear-off] ', ''));
+          }
+          final retainedSize = programInfo.lookup(path);
+          totalSize += (retainedSize?.totalSize ?? 0);
+        }
+        return true;
+      });
+      return totalSize;
+    }, bucketFor: (n) {
+      return (n.data as String).replaceAll('dyn:', '');
+    }, bucketInfo: BucketInfo(nameComponents: ['Selector']));
+
+    printHistogram(programInfo, histogram,
+        prefix: histogram.bySize.where((key) => histogram.buckets[key] > 0));
+
+    // For top 10 dynamic selectors print the functions which contain these
+    // dynamic calls.
+    for (var selector
+        in histogram.bySize.take(math.min(10, histogram.length))) {
+      final dynSelector = 'dyn:$selector';
+      final callNodes = callGraph.nodes
+          .where((n) => n.data == selector || n.data == dynSelector);
+
+      print('\nDynamic call to ${selector}'
+          ' (retaining ~${histogram.buckets[selector]} bytes) occurs in:');
+      for (var node in callNodes) {
+        for (var pred in node.pred) {
+          print('    ${pred.data.qualifiedName}');
+        }
+      }
+    }
+  }
+
+  @override
+  String get invocation =>
+      super.invocation.replaceAll('[arguments]', '<sizes.json> <trace.json>');
+}
diff --git a/pkg/vm_snapshot_analysis/lib/src/commands/summary.dart b/pkg/vm_snapshot_analysis/lib/src/commands/summary.dart
index 19f85a8..e7e012b 100644
--- a/pkg/vm_snapshot_analysis/lib/src/commands/summary.dart
+++ b/pkg/vm_snapshot_analysis/lib/src/commands/summary.dart
@@ -9,10 +9,13 @@
 
 import 'dart:async';
 import 'dart:io';
+import 'dart:math' as math;
 
 import 'package:args/command_runner.dart';
+import 'package:meta/meta.dart';
 
 import 'package:vm_snapshot_analysis/ascii_table.dart';
+import 'package:vm_snapshot_analysis/precompiler_trace.dart';
 import 'package:vm_snapshot_analysis/program_info.dart';
 import 'package:vm_snapshot_analysis/utils.dart';
 import 'package:vm_snapshot_analysis/v8_profile.dart';
@@ -46,6 +49,22 @@
         abbr: 'w',
         help: 'Filter output using the given glob.',
       )
+      ..addOption(
+        'precompiler-trace',
+        abbr: 't',
+        help: '''
+Precompiler trace to establish dependencies between libraries/packages.
+''',
+      )
+      ..addOption(
+        'deps-collapse-depth',
+        abbr: 'd',
+        defaultsTo: '3',
+        help: '''
+Depth at which nodes in the dependency tree are collapsed together.
+Only has affect if --precompiler-trace is also passed.
+''',
+      )
       ..addFlag('collapse-anonymous-closures', help: '''
 Collapse all anonymous closures from the same scope into a single entry.
 When comparing size of AOT snapshots for two different versions of a
@@ -74,6 +93,21 @@
       usageException('Input file ${input.path} does not exist!');
     }
 
+    final granularity = _parseHistogramType(argResults['by']);
+
+    final traceJson = argResults['precompiler-trace'];
+    if (traceJson != null) {
+      if (!File(traceJson).existsSync()) {
+        usageException('Trace ${traceJson} does not exist!');
+      }
+
+      if (granularity != HistogramType.byPackage &&
+          granularity != HistogramType.byLibrary) {
+        usageException(
+            '--precompiler-trace only has effect when summarizing by library or package');
+      }
+    }
+
     final columnWidth = argResults['column-width'];
     final maxWidth = int.tryParse(columnWidth);
     if (maxWidth == null) {
@@ -81,11 +115,20 @@
           'Specified column width (${columnWidth}) is not an integer');
     }
 
+    final depthCollapseDepthStr = argResults['deps-collapse-depth'];
+    final depsCollapseDepth = int.tryParse(depthCollapseDepthStr);
+    if (depsCollapseDepth == null) {
+      usageException('Specified depthCollapseDepth (${depthCollapseDepthStr})'
+          ' is not an integer');
+    }
+
     await outputSummary(input,
         maxWidth: maxWidth,
-        granularity: _parseHistogramType(argResults['by']),
+        granularity: granularity,
         collapseAnonymousClosures: argResults['collapse-anonymous-closures'],
-        filter: argResults['where']);
+        filter: argResults['where'],
+        traceJson: traceJson != null ? File(traceJson) : null,
+        depsCollapseDepth: depsCollapseDepth);
   }
 
   static HistogramType _parseHistogramType(String value) {
@@ -107,14 +150,107 @@
     {int maxWidth = 0,
     bool collapseAnonymousClosures = false,
     HistogramType granularity = HistogramType.bySymbol,
-    String filter}) async {
+    String filter,
+    File traceJson,
+    int depsCollapseDepth = 3,
+    int topToReport = 30}) async {
   final info = await loadProgramInfo(input);
 
   // Compute histogram.
-  final histogram = computeHistogram(info, granularity, filter: filter);
+  var histogram = computeHistogram(info, granularity, filter: filter);
+
+  // If precompiler trace is provide collapse entries based on the dependency
+  // graph (dominator tree) extracted from the trace.
+  void Function() printDependencyTrees;
+  if (traceJson != null &&
+      (granularity == HistogramType.byLibrary ||
+          granularity == HistogramType.byPackage)) {
+    var callGraph = await loadTrace(traceJson);
+
+    // Convert call graph into the approximate dependency graph, dropping any
+    // dynamic and dispatch table based dependencies from the graph and only
+    // following the static call, field access and allocation edges.
+    callGraph = callGraph.collapse(
+        granularity == HistogramType.byLibrary
+            ? NodeType.libraryNode
+            : NodeType.packageNode,
+        dropCallNodes: true);
+    callGraph.computeDominators();
+
+    // Compute name mapping from histogram buckets to new coarser buckets, by
+    // collapsing dependency tree at [depsCollapseDepth] level: node 'Foo' with
+    // k dominated children (k > 0) becomes 'Foo (+k deps)' and all its children
+    // are remapped to this bucket.
+    final mapping = <String, String>{};
+    final collapsed = <String, CallGraphNode>{};
+    callGraph.root.visitDominatorTree((n, depth) {
+      if (depth >= depsCollapseDepth) {
+        final children = <String>[];
+        n.visitDominatorTree((child, depth) {
+          if (n != child && child.data is ProgramInfoNode) {
+            children.add(child.data.name);
+          }
+          return true;
+        }, depth + 1);
+
+        if (children.isNotEmpty) {
+          final newName = '${n.data.name} (+ ${children.length} deps)';
+          mapping[n.data.name] = newName;
+          collapsed[newName] = n;
+          for (var name in children) {
+            mapping[name] = newName;
+          }
+        }
+        return false;
+      }
+      return true;
+    });
+
+    // Compute cumulative sizes and node counts for each node in the dominator
+    // tree. We are going to use this information later to display dependency
+    // trees at the end of the summary report.
+    // This needs to be done before we loose original histogram.
+    final totalSizes = <String, int>{};
+    final totalCounts = <String, int>{};
+    void computeTotalsRecursively(CallGraphNode node) {
+      var totalSize = histogram.buckets[node.data.name] ?? 0;
+      var totalCount = 1;
+      for (var n in node.dominated) {
+        computeTotalsRecursively(n);
+        totalSize += totalSizes[n.data.name];
+        totalCount += totalCounts[n.data.name];
+      }
+      totalSizes[node.data.name] = totalSize;
+      totalCounts[node.data.name] = totalCount;
+    }
+
+    computeTotalsRecursively(callGraph.root);
+
+    // Transform the histogram using the mapping which we computed.
+    histogram = histogram.map((bucket) => mapping[bucket] ?? bucket);
+
+    // Create a helper function to print dependency trees at the end of the
+    // report.
+    printDependencyTrees = () {
+      // This will be the list of collapsed entries which were among those
+      // [topToReport] printed by [printHistogram] below.
+      final collapsedEntries = histogram.bySize
+          .take(topToReport)
+          .map((k) => collapsed[k])
+          .where((n) => n != null);
+      if (collapsedEntries.isNotEmpty) {
+        print('\bDependency trees:');
+        for (var n in collapsedEntries) {
+          print(
+              '\n${n.data.qualifiedName} (total ${totalSizes[n.data.name]} bytes)');
+          _printDominatedNodes(n,
+              totalSizes: totalSizes, totalCounts: totalCounts);
+        }
+      }
+    };
+  }
 
   // Now produce the report table.
-  const topToReport = 30;
   printHistogram(info, histogram,
       prefix: histogram.bySize.take(topToReport), maxWidth: maxWidth);
 
@@ -127,4 +263,70 @@
 
     print(bucketLegend);
   }
+
+  printDependencyTrees?.call();
+}
+
+/// Helper method for printing dominator tree in the form:
+///
+/// A (total ... bytes)
+/// ├── B (total ... bytes)
+/// ├── C (total ... bytes)
+/// │   ├── D (total ... bytes)
+/// │   └── E (total ... bytes)
+/// ├── F (total ... bytes)
+/// └── G (total ... bytes)
+///
+/// Cuts the printing off at the given depth ([cutOffDepth]) and after the
+/// given amount of children at each node ([maxChildrenToPrint]).
+void _printDominatedNodes(CallGraphNode node,
+    {int cutOffDepth = 2,
+    int maxChildrenToPrint = 10,
+    List<bool> isLastPerLevel,
+    @required Map<String, int> totalSizes,
+    @required Map<String, int> totalCounts}) {
+  isLastPerLevel ??= [];
+
+  if (isLastPerLevel.length >= cutOffDepth) {
+    maxChildrenToPrint = 0;
+  }
+
+  final sizes = node.dominated.map((n) => totalSizes[n.data.name]).toList();
+  final order = List.generate(node.dominated.length, (i) => i)
+    ..sort((a, b) => sizes[b] - sizes[a]);
+  final lastIndex = order.lastIndexWhere((i) => sizes[i] > 0);
+
+  for (var j = 0, n = math.min(maxChildrenToPrint - 1, lastIndex);
+      j <= n;
+      j++) {
+    final isLast = j == lastIndex;
+    final i = order[j];
+    final n = node.dominated[i];
+    final size = sizes[i];
+    isLastPerLevel.add(isLast);
+    print(
+        '${_treeLines(isLastPerLevel)}${n.data.qualifiedName} (total ${size} bytes)');
+    _printDominatedNodes(n,
+        cutOffDepth: cutOffDepth,
+        isLastPerLevel: isLastPerLevel,
+        totalCounts: totalCounts,
+        totalSizes: totalSizes);
+    isLastPerLevel.removeLast();
+  }
+
+  if (maxChildrenToPrint < lastIndex) {
+    isLastPerLevel.add(true);
+    print(
+        '${_treeLines(isLastPerLevel)} ... (+${totalCounts[node.data.name] - 1} deps)');
+    isLastPerLevel.removeLast();
+  }
+}
+
+String _treeLines(List<bool> isLastPerLevel) {
+  final sb = StringBuffer();
+  for (var i = 0; i < isLastPerLevel.length - 1; i++) {
+    sb.write(isLastPerLevel[i] ? '    ' : '│   ');
+  }
+  sb.write(isLastPerLevel.last ? '└── ' : '├── ');
+  return sb.toString();
 }
diff --git a/pkg/vm_snapshot_analysis/lib/treemap.dart b/pkg/vm_snapshot_analysis/lib/treemap.dart
index 8ccc167..479876a 100644
--- a/pkg/vm_snapshot_analysis/lib/treemap.dart
+++ b/pkg/vm_snapshot_analysis/lib/treemap.dart
@@ -93,6 +93,57 @@
       collapseSingleChildPathNodes: collapseSingleChildPathNodes);
 }
 
+/// Convert the given [ProgramInfo] object into a treemap in either
+/// [TreemapFormat.collapsed] or [TreemapFormat.simplified] format.
+///
+/// See [treemapFromJson] for the schema of the returned map object.
+Map<String, dynamic> treemapFromInfo(ProgramInfo info,
+    {TreemapFormat format = TreemapFormat.collapsed,
+    bool collapseSingleChildPathNodes = true}) {
+  final root = {'n': '', 'children': {}, 'k': kindPath, 'maxDepth': 0};
+  _treemapFromInfo(root, info, format: format);
+  return _flatten(root,
+      collapseSingleChildPathNodes: collapseSingleChildPathNodes);
+}
+
+void _treemapFromInfo(Map<String, dynamic> root, ProgramInfo info,
+    {TreemapFormat format = TreemapFormat.simplified}) {
+  if (format != TreemapFormat.collapsed && format != TreemapFormat.simplified) {
+    throw ArgumentError(
+      'can only build simplified or collapsed formats from the program info',
+    );
+  }
+
+  int cumulativeSize(ProgramInfoNode node) {
+    return (node.size ?? 0) +
+        node.children.values
+            .fold<int>(0, (sum, child) => sum + cumulativeSize(child));
+  }
+
+  void recurse(ProgramInfoNode node, String path, Map<String, dynamic> root,
+      TreemapFormat format) {
+    if (node.children.isEmpty ||
+        (node.type == NodeType.functionNode &&
+            format == TreemapFormat.simplified)) {
+      // For simple format we remove information about nested functions from
+      // the output.
+      _addSymbol(root, path, node.name, cumulativeSize(node));
+      return;
+    }
+
+    path = path != '' ? '$path/${node.name}' : node.name;
+    _addSymbol(root, path, '<self>', node.size);
+    for (var child in node.children.values) {
+      recurse(child, path, root, format);
+    }
+  }
+
+  _addSymbol(root, '', info.root.name, info.root.size);
+  for (var child in info.root.children.values) {
+    recurse(child, '', root, format);
+  }
+}
+
 void _treemapFromSnapshot(Map<String, dynamic> root, v8_profile.Snapshot snap,
     {TreemapFormat format = TreemapFormat.objectType}) {
   final info = v8_profile.toProgramInfo(snap);
@@ -100,33 +151,7 @@
   // For collapsed and simple formats there is no need to traverse snapshot
   // nodes. Just recurse into [ProgramInfo] structure instead.
   if (format == TreemapFormat.collapsed || format == TreemapFormat.simplified) {
-    int cumulativeSize(ProgramInfoNode node) {
-      return (node.size ?? 0) +
-          node.children.values
-              .fold<int>(0, (sum, child) => sum + cumulativeSize(child));
-    }
-
-    void recurse(ProgramInfoNode node, String path) {
-      if (node.children.isEmpty ||
-          (node.type == NodeType.functionNode &&
-              format == TreemapFormat.simplified)) {
-        // For simple format we remove information about nested functions from
-        // the output.
-        _addSymbol(root, path, node.name, cumulativeSize(node));
-        return;
-      }
-
-      path = path != '' ? '$path/${node.name}' : node.name;
-      _addSymbol(root, path, '<self>', node.size);
-      for (var child in node.children.values) {
-        recurse(child, path);
-      }
-    }
-
-    _addSymbol(root, '', info.root.name, info.root.size);
-    for (var child in info.root.children.values) {
-      recurse(child, '');
-    }
+    _treemapFromInfo(root, info, format: format);
     return;
   }
 
diff --git a/pkg/vm_snapshot_analysis/lib/utils.dart b/pkg/vm_snapshot_analysis/lib/utils.dart
index 2f6746a..33e1d84 100644
--- a/pkg/vm_snapshot_analysis/lib/utils.dart
+++ b/pkg/vm_snapshot_analysis/lib/utils.dart
@@ -10,6 +10,7 @@
 import 'package:vm_snapshot_analysis/program_info.dart';
 import 'package:vm_snapshot_analysis/instruction_sizes.dart'
     as instruction_sizes;
+import 'package:vm_snapshot_analysis/treemap.dart';
 import 'package:vm_snapshot_analysis/v8_profile.dart' as v8_profile;
 
 Future<Object> loadJson(File input) async {
@@ -32,6 +33,20 @@
   }
 }
 
+/// Compare two size profiles and return result of the comparison as a treemap.
+Future<Map<String, dynamic>> buildComparisonTreemap(File oldJson, File newJson,
+    {TreemapFormat format = TreemapFormat.collapsed,
+    bool collapseAnonymousClosures = false}) async {
+  final oldSizes = await loadProgramInfo(oldJson,
+      collapseAnonymousClosures: collapseAnonymousClosures);
+  final newSizes = await loadProgramInfo(newJson,
+      collapseAnonymousClosures: collapseAnonymousClosures);
+
+  final diff = computeDiff(oldSizes, newSizes);
+
+  return treemapFromInfo(diff, format: format);
+}
+
 void printHistogram(ProgramInfo info, Histogram histogram,
     {Iterable<String> prefix = const [],
     Iterable<String> suffix = const [],
diff --git a/pkg/vm_snapshot_analysis/pubspec.yaml b/pkg/vm_snapshot_analysis/pubspec.yaml
index 8bdc119..4e0bf95 100644
--- a/pkg/vm_snapshot_analysis/pubspec.yaml
+++ b/pkg/vm_snapshot_analysis/pubspec.yaml
@@ -1,6 +1,6 @@
 name: vm_snapshot_analysis
-description: Utilities for working with non-symbolic stack traces.
-version: 0.3.0
+description: Utilities for analysing AOT snapshot size.
+version: 0.4.0
 
 homepage: https://github.com/dart-lang/sdk/tree/master/pkg/vm_snapshot_analysis
 
diff --git a/pkg/vm_snapshot_analysis/test/instruction_sizes_test.dart b/pkg/vm_snapshot_analysis/test/instruction_sizes_test.dart
index a2e26da..f2a7741 100644
--- a/pkg/vm_snapshot_analysis/test/instruction_sizes_test.dart
+++ b/pkg/vm_snapshot_analysis/test/instruction_sizes_test.dart
@@ -4,7 +4,6 @@
 
 import 'dart:io';
 
-import 'package:path/path.dart' as path;
 import 'package:test/test.dart';
 
 import 'package:vm_snapshot_analysis/instruction_sizes.dart'
@@ -12,17 +11,7 @@
 import 'package:vm_snapshot_analysis/program_info.dart';
 import 'package:vm_snapshot_analysis/utils.dart';
 
-final dart2native = () {
-  final sdkBin = path.dirname(Platform.executable);
-  final dart2native =
-      path.join(sdkBin, Platform.isWindows ? 'dart2native.bat' : 'dart2native');
-
-  if (!File(dart2native).existsSync()) {
-    throw 'Failed to locate dart2native in the SDK';
-  }
-
-  return path.canonicalize(dart2native);
-}();
+import 'utils.dart';
 
 final testSource = {
   'input.dart': """
@@ -651,61 +640,6 @@
         Future Function(String sizesJson) f) =>
     withFlag(prefix, source, '--write_v8_snapshot_profile_to', f);
 
-Future withFlag(String prefix, Map<String, String> source, String flag,
-    Future Function(String sizesJson) f) {
-  return withTempDir(prefix, (dir) async {
-    final outputBinary = path.join(dir, 'output.exe');
-    final sizesJson = path.join(dir, 'sizes.json');
-    final packages = path.join(dir, '.packages');
-    final mainDart = path.join(dir, 'main.dart');
-
-    // Create test input.
-    for (var file in source.entries) {
-      await File(path.join(dir, file.key)).writeAsString(file.value);
-    }
-    await File(packages).writeAsString('''
-input:./
-''');
-    await File(mainDart).writeAsString('''
-import 'package:input/input.dart' as input;
-
-void main(List<String> args) => input.main(args);
-''');
-
-    // Compile input.dart to native and output instruction sizes.
-    final result = await Process.run(dart2native, [
-      '-o',
-      outputBinary,
-      '--packages=$packages',
-      '--extra-gen-snapshot-options=$flag=$sizesJson',
-      mainDart,
-    ]);
-
-    expect(result.exitCode, equals(0), reason: '''
-Compilation completed successfully.
-
-stdout: ${result.stdout}
-stderr: ${result.stderr}
-''');
-    expect(File(outputBinary).existsSync(), isTrue,
-        reason: 'Output binary exists');
-    expect(File(sizesJson).existsSync(), isTrue,
-        reason: 'Instruction sizes output exists');
-
-    await f(sizesJson);
-  });
-}
-
-Future withTempDir(String prefix, Future Function(String dir) f) async {
-  final tempDir =
-      Directory.systemTemp.createTempSync('instruction-sizes-test-${prefix}');
-  try {
-    await f(tempDir.path);
-  } finally {
-    tempDir.deleteSync(recursive: true);
-  }
-}
-
 // On Windows there is some issue with interpreting entry point URI as a package URI
 // it instead gets interpreted as a file URI - which breaks comparison. So we
 // simply ignore entry point library (main.dart).
diff --git a/pkg/vm_snapshot_analysis/test/precompiler_trace_test.dart b/pkg/vm_snapshot_analysis/test/precompiler_trace_test.dart
new file mode 100644
index 0000000..f12fdc5
--- /dev/null
+++ b/pkg/vm_snapshot_analysis/test/precompiler_trace_test.dart
@@ -0,0 +1,102 @@
+// Copyright (c) 2020, the Dart project authors.  Please see the AUTHORS file
+// for 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:test/test.dart';
+import 'package:vm_snapshot_analysis/precompiler_trace.dart';
+
+import 'utils.dart';
+
+final testSource = {
+  'input.dart': """
+class K {
+  final value;
+  const K(this.value);
+}
+
+@pragma('vm:never-inline')
+dynamic makeSomeClosures() {
+  return [
+    () => const K(0),
+    () => const K(1),
+    () => 11,
+  ];
+}
+
+class A {
+  @pragma('vm:never-inline')
+  dynamic tornOff() {
+    return const K(2);
+  }
+}
+
+class B {
+  @pragma('vm:never-inline')
+  dynamic tornOff() {
+    return const K(3);
+  }
+}
+
+class C {
+  static dynamic tornOff() async {
+    return const K(4);
+  }
+}
+
+@pragma('vm:never-inline')
+Function tearOff(dynamic o) {
+  return o.tornOff;
+}
+
+void main(List<String> args) {
+  for (var cl in makeSomeClosures()) {
+    print(cl());
+  }
+  print(tearOff(args.isEmpty ? A() : B()));
+  print(C.tornOff);
+}
+"""
+};
+
+void main() async {
+  if (!Platform.executable.contains('dart-sdk')) {
+    // If we are not running from the prebuilt SDK then this test does nothing.
+    return;
+  }
+
+  group('precompiler-trace', () {
+    test('basic-parsing', () async {
+      await withFlag('basic-parsing', testSource, '--trace_precompiler_to',
+          (json) async {
+        final callGraph = await loadTrace(File(json));
+        callGraph.computeDominators();
+
+        final main = callGraph.program
+            .lookup(['package:input', 'package:input/input.dart', '', 'main']);
+        final mainNode = callGraph.lookup(main);
+
+        final retainedClasses = mainNode.dominated
+            .where((n) => n.isClassNode)
+            .map((n) => n.data.name)
+            .toList();
+        final retainedFunctions = mainNode.dominated
+            .where((n) => n.isFunctionNode)
+            .map((n) => n.data.name)
+            .toList();
+        expect(retainedClasses, containsAll(['A', 'B', 'K']));
+        expect(retainedFunctions, containsAll(['print', 'tearOff']));
+
+        final getTearOffCall =
+            callGraph.dynamicCalls.firstWhere((n) => n.data == 'get:tornOff');
+        expect(
+            getTearOffCall.dominated.map((n) => n.data.qualifiedName),
+            equals([
+              'package:input/input.dart::B.[tear-off-extractor] get:tornOff',
+              'package:input/input.dart::A.[tear-off-extractor] get:tornOff',
+            ]));
+      });
+    });
+  });
+}
diff --git a/pkg/vm_snapshot_analysis/test/utils.dart b/pkg/vm_snapshot_analysis/test/utils.dart
new file mode 100644
index 0000000..375a904
--- /dev/null
+++ b/pkg/vm_snapshot_analysis/test/utils.dart
@@ -0,0 +1,75 @@
+// Copyright (c) 2020, the Dart project authors.  Please see the AUTHORS file
+// for 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:path/path.dart' as path;
+import 'package:test/test.dart';
+
+final dart2native = () {
+  final sdkBin = path.dirname(Platform.executable);
+  final dart2native =
+      path.join(sdkBin, Platform.isWindows ? 'dart2native.bat' : 'dart2native');
+
+  if (!File(dart2native).existsSync()) {
+    throw 'Failed to locate dart2native in the SDK';
+  }
+
+  return path.canonicalize(dart2native);
+}();
+
+Future withFlag(String prefix, Map<String, String> source, String flag,
+    Future Function(String sizesJson) f) {
+  return withTempDir(prefix, (dir) async {
+    final outputBinary = path.join(dir, 'output.exe');
+    final sizesJson = path.join(dir, 'sizes.json');
+    final packages = path.join(dir, '.packages');
+    final mainDart = path.join(dir, 'main.dart');
+
+    // Create test input.
+    for (var file in source.entries) {
+      await File(path.join(dir, file.key)).writeAsString(file.value);
+    }
+    await File(packages).writeAsString('''
+input:./
+''');
+    await File(mainDart).writeAsString('''
+import 'package:input/input.dart' as input;
+
+void main(List<String> args) => input.main(args);
+''');
+
+    // Compile input.dart to native and output instruction sizes.
+    final result = await Process.run(dart2native, [
+      '-o',
+      outputBinary,
+      '--packages=$packages',
+      '--extra-gen-snapshot-options=$flag=$sizesJson',
+      mainDart,
+    ]);
+
+    expect(result.exitCode, equals(0), reason: '''
+Compilation completed successfully.
+
+stdout: ${result.stdout}
+stderr: ${result.stderr}
+''');
+    expect(File(outputBinary).existsSync(), isTrue,
+        reason: 'Output binary exists');
+    expect(File(sizesJson).existsSync(), isTrue,
+        reason: 'Instruction sizes output exists');
+
+    await f(sizesJson);
+  });
+}
+
+Future withTempDir(String prefix, Future Function(String dir) f) async {
+  final tempDir =
+      Directory.systemTemp.createTempSync('instruction-sizes-test-${prefix}');
+  try {
+    await f(tempDir.path);
+  } finally {
+    tempDir.deleteSync(recursive: true);
+  }
+}
diff --git a/runtime/BUILD.gn b/runtime/BUILD.gn
index 14e0b17..6da22fb 100644
--- a/runtime/BUILD.gn
+++ b/runtime/BUILD.gn
@@ -101,9 +101,6 @@
 
   if (dart_target_arch == "arm") {
     defines += [ "TARGET_ARCH_ARM" ]
-  } else if (dart_target_arch == "armv6") {
-    defines += [ "TARGET_ARCH_ARM" ]
-    defines += [ "TARGET_ARCH_ARM_6" ]
   } else if (dart_target_arch == "arm64") {
     defines += [ "TARGET_ARCH_ARM64" ]
   } else if (dart_target_arch == "x64") {
diff --git a/runtime/bin/BUILD.gn b/runtime/bin/BUILD.gn
index 0fd5acd..7431b64 100644
--- a/runtime/bin/BUILD.gn
+++ b/runtime/bin/BUILD.gn
@@ -47,7 +47,7 @@
       } else if (using_fuchsia_sdk) {
         public_deps = [ "$fuchsia_sdk_root/pkg:fdio" ]
       } else {
-        public_deps = [ "//zircon/public/lib/fdio" ]
+        public_deps = [ "//sdk/lib/fdio" ]
       }
     }
     include_dirs = [ ".." ]
@@ -333,7 +333,7 @@
           "//sdk/fidl/fuchsia.netstack",
           "//sdk/lib/sys/cpp",
         ]
-        public_deps = [ "//zircon/public/lib/fdio" ]
+        public_deps = [ "//sdk/lib/fdio" ]
       }
     }
 
@@ -475,7 +475,7 @@
           "//sdk/fidl/fuchsia.netstack",
           "//sdk/lib/sys/cpp",
         ]
-        public_deps = [ "//zircon/public/lib/fdio" ]
+        public_deps = [ "//sdk/lib/fdio" ]
       }
     }
 
@@ -964,9 +964,11 @@
 
   abs_depfile = rebase_path(depfile)
   rebased_output = rebase_path(output, root_build_dir)
+
   vm_args = [
     "--depfile=$abs_depfile",
     "--depfile_output_filename=$rebased_output",
+    "-Dsdk_hash=$sdk_hash",
   ]
 
   args = [
diff --git a/runtime/bin/ffi_test/ffi_test_functions_vmspecific.cc b/runtime/bin/ffi_test/ffi_test_functions_vmspecific.cc
index 05b8952..e5762770 100644
--- a/runtime/bin/ffi_test/ffi_test_functions_vmspecific.cc
+++ b/runtime/bin/ffi_test/ffi_test_functions_vmspecific.cc
@@ -889,6 +889,18 @@
   return value;
 }
 
+// Does not have a handle in it's own signature, so does not enter and exit
+// scope in the trampoline.
+DART_EXPORT int64_t PropagateErrorWithoutHandle(Dart_Handle (*callback)()) {
+  Dart_EnterScope();
+  Dart_Handle result = callback();
+  if (Dart_IsError(result)) {
+    Dart_PropagateError(result);
+  }
+  Dart_ExitScope();
+  return 0;
+}
+
 DART_EXPORT Dart_Handle TrueHandle() {
   return Dart_True();
 }
diff --git a/runtime/bin/gen_snapshot.cc b/runtime/bin/gen_snapshot.cc
index afbc896..f49defc 100644
--- a/runtime/bin/gen_snapshot.cc
+++ b/runtime/bin/gen_snapshot.cc
@@ -157,7 +157,7 @@
 "--help                                                                      \n"
 "  Display this message (add --verbose for information about all VM options).\n"
 "--version                                                                   \n"
-"  Print the VM version.                                                     \n"
+"  Print the SDK version.                                                    \n"
 "                                                                            \n"
 "To create a core snapshot:                                                  \n"
 "--snapshot_kind=core                                                        \n"
@@ -235,7 +235,7 @@
     PrintUsage();
     Platform::Exit(0);
   } else if (version) {
-    Syslog::PrintErr("Dart VM version: %s\n", Dart_VersionString());
+    Syslog::PrintErr("Dart SDK version: %s\n", Dart_VersionString());
     Platform::Exit(0);
   }
 
diff --git a/runtime/bin/main.cc b/runtime/bin/main.cc
index d241e69..25e7c2b 100644
--- a/runtime/bin/main.cc
+++ b/runtime/bin/main.cc
@@ -515,16 +515,20 @@
                                                  char** error,
                                                  int* exit_code) {
 #if !defined(PRODUCT)
-  ASSERT(script_uri != NULL);
-  Dart_Isolate isolate = NULL;
+  ASSERT(script_uri != nullptr);
+  Dart_Isolate isolate = nullptr;
   auto isolate_group_data =
       new IsolateGroupData(script_uri, packages_config, nullptr, false);
+  ASSERT(flags != nullptr);
 
 #if defined(DART_PRECOMPILED_RUNTIME)
   // AOT: All isolates start from the app snapshot.
   const uint8_t* isolate_snapshot_data = app_isolate_snapshot_data;
   const uint8_t* isolate_snapshot_instructions =
       app_isolate_snapshot_instructions;
+  flags->null_safety =
+      Dart_DetectNullSafety(nullptr, nullptr, nullptr, isolate_snapshot_data,
+                            isolate_snapshot_instructions, nullptr, -1);
   isolate = Dart_CreateIsolateGroup(
       script_uri, DART_VM_SERVICE_ISOLATE_NAME, isolate_snapshot_data,
       isolate_snapshot_instructions, flags, isolate_group_data,
@@ -533,7 +537,6 @@
   // JIT: Service isolate uses the core libraries snapshot.
 
   // Set flag to load and retain the vmservice library.
-  ASSERT(flags != NULL);
   flags->load_vmservice_library = true;
   const uint8_t* isolate_snapshot_data = core_isolate_snapshot_data;
   const uint8_t* isolate_snapshot_instructions =
diff --git a/runtime/bin/main_options.cc b/runtime/bin/main_options.cc
index 9352393..e3f195b 100644
--- a/runtime/bin/main_options.cc
+++ b/runtime/bin/main_options.cc
@@ -126,7 +126,7 @@
                       hot_reload_rollback_test_mode_callback);
 
 void Options::PrintVersion() {
-  Syslog::PrintErr("Dart VM version: %s\n", Dart_VersionString());
+  Syslog::PrintErr("Dart SDK version: %s\n", Dart_VersionString());
 }
 
 // clang-format off
@@ -169,7 +169,7 @@
 "                    kernel(default) or app-jit\n"
 "    <file_name> specifies the file into which the snapshot is written\n"
 "--version\n"
-"  Print the VM version.\n");
+"  Print the SDK version.\n");
   } else {
     Syslog::PrintErr(
 "Supported options:\n"
diff --git a/runtime/bin/snapshot_utils.cc b/runtime/bin/snapshot_utils.cc
index 7e8369a..4390d24 100644
--- a/runtime/bin/snapshot_utils.cc
+++ b/runtime/bin/snapshot_utils.cc
@@ -22,7 +22,7 @@
 namespace bin {
 
 static const int64_t kAppSnapshotHeaderSize = 5 * kInt64Size;
-static const int64_t kAppSnapshotPageSize = 4 * KB;
+static const int64_t kAppSnapshotPageSize = 16 * KB;
 
 class MappedAppSnapshot : public AppSnapshot {
  public:
diff --git a/runtime/include/dart_api.h b/runtime/include/dart_api.h
index a58095c..db78c76 100644
--- a/runtime/include/dart_api.h
+++ b/runtime/include/dart_api.h
@@ -1984,6 +1984,10 @@
 /**
  * Gets a UTF-8 encoded representation of a String.
  *
+ * Any unpaired surrogate code points in the string will be converted as
+ * replacement characters (U+FFFD, 0xEF 0xBF 0xBD in UTF-8). If you need
+ * to preserve unpaired surrogates, use the Dart_StringToUTF16 function.
+ *
  * \param str A string.
  * \param utf8_array Returns the String represented as UTF-8 code
  *   units.  This UTF-8 array is scope allocated and is only valid
diff --git a/runtime/platform/unicode.h b/runtime/platform/unicode.h
index 58338ed..64d8952 100644
--- a/runtime/platform/unicode.h
+++ b/runtime/platform/unicode.h
@@ -18,6 +18,8 @@
   static const int32_t kMaxCodePoint = 0x10FFFF;
   static const int32_t kInvalidChar = 0xFFFFFFFF;
 
+  static const int32_t kReplacementChar = 0xFFFD;
+
   static bool IsLatin1(int32_t code_point) {
     return (code_point >= 0) && (code_point <= 0xFF);
   }
diff --git a/runtime/tests/vm/dart/sdk_hash_test.dart b/runtime/tests/vm/dart/sdk_hash_test.dart
new file mode 100644
index 0000000..6b05e96
--- /dev/null
+++ b/runtime/tests/vm/dart/sdk_hash_test.dart
@@ -0,0 +1,88 @@
+// Copyright (c) 2020, the Dart project authors.  Please see the AUTHORS file
+// for 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:convert';
+import 'dart:io';
+import 'dart:typed_data';
+
+import 'package:path/path.dart' as path;
+import 'package:expect/expect.dart';
+
+import 'snapshot_test_helper.dart';
+
+// Keep in sync with pkg/kernel/lib/binary/tag.dart:
+const tagComponentFile = [0x90, 0xAB, 0xCD, 0xEF];
+const tagBinaryFormatVersion = [0x00, 0x00, 0x00, 43];
+
+Future<void> main(List<String> args) async {
+  if (args.length == 1 && args[0] == '--child') {
+    print('Hello, SDK Hash!');
+    return;
+  }
+
+  final String sourcePath =
+      path.join('runtime', 'tests', 'vm', 'dart_2', 'sdk_hash_test.dart');
+
+  await withTempDir((String tmp) async {
+    final String dillPath = path.join(tmp, 'test.dill');
+
+    {
+      final result = await Process.run(dart, [
+        genKernel,
+        '--platform',
+        platformDill,
+        '-o',
+        dillPath,
+        sourcePath,
+      ]);
+      Expect.equals('', result.stderr);
+      Expect.equals(0, result.exitCode);
+      Expect.equals('', result.stdout);
+    }
+
+    {
+      final result = await Process.run(dart, [dillPath, '--child']);
+      Expect.equals('', result.stderr);
+      Expect.equals(0, result.exitCode);
+      Expect.equals('Hello, SDK Hash!', result.stdout.trim());
+    }
+
+    // Invalidate the SDK hash in the kernel dill:
+    {
+      final myFile = File(dillPath);
+      Uint8List bytes = myFile.readAsBytesSync();
+      // The SDK Hash is located after the ComponentFile and BinaryFormatVersion
+      // tags (both UInt32).
+      Expect.listEquals(tagComponentFile, bytes.sublist(0, 4));
+      Expect.listEquals(tagBinaryFormatVersion, bytes.sublist(4, 8));
+      // Flip the first byte in the hash:
+      bytes[8] ^= bytes[8];
+      myFile.writeAsBytesSync(bytes);
+    }
+
+    {
+      final result = await Process.run(dart, [dillPath, '--child']);
+      Expect.equals(
+          'Can\'t load Kernel binary: Invalid SDK hash.', result.stderr.trim());
+      Expect.equals(253, result.exitCode);
+      Expect.equals('', result.stdout);
+    }
+
+    // Zero out the SDK hash in the kernel dill to disable the check:
+    {
+      final myFile = File(dillPath);
+      Uint8List bytes = myFile.readAsBytesSync();
+      bytes.setRange(8, 18, ascii.encode('0000000000'));
+      myFile.writeAsBytesSync(bytes);
+    }
+
+    {
+      final result = await Process.run(dart, [dillPath, '--child']);
+      Expect.equals('', result.stderr);
+      Expect.equals(0, result.exitCode);
+      Expect.equals('Hello, SDK Hash!', result.stdout.trim());
+    }
+  });
+}
diff --git a/runtime/tests/vm/dart/snapshot_test_helper.dart b/runtime/tests/vm/dart/snapshot_test_helper.dart
index 853fc33..974050e 100644
--- a/runtime/tests/vm/dart/snapshot_test_helper.dart
+++ b/runtime/tests/vm/dart/snapshot_test_helper.dart
@@ -48,6 +48,7 @@
 final String buildDir = p.dirname(Platform.executable);
 final String platformDill = p.join(buildDir, "vm_platform_strong.dill");
 final String genSnapshot = p.join(buildDir, "gen_snapshot${executableSuffix}");
+final String dart = p.join(buildDir, "dart${executableSuffix}");
 final String dartPrecompiledRuntime =
     p.join(buildDir, "dart_precompiled_runtime${executableSuffix}");
 final String genKernel = p.join("pkg", "vm", "bin", "gen_kernel.dart");
diff --git a/runtime/tests/vm/dart/switchable_call_monomorphic_regression_42517_test.dart b/runtime/tests/vm/dart/switchable_call_monomorphic_regression_42517_test.dart
new file mode 100644
index 0000000..20d4b32
--- /dev/null
+++ b/runtime/tests/vm/dart/switchable_call_monomorphic_regression_42517_test.dart
@@ -0,0 +1,31 @@
+// Copyright (c) 2020, the Dart project authors.  Please see the AUTHORS file
+// for 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';
+
+final dynamic l = <dynamic>[A(), B()];
+
+main() {
+  // Switchable call site goes from UnlinkedCall -> Monomorphic.
+  Expect.equals('C(42)', bar(0, 42));
+  // Switchable call site goes from Monomorphic -> Polymorphic.
+  // It has to retain the fact that call site is dyn:*.
+  Expect.throwsTypeError(() => bar(1, 'a'));
+  Expect.equals('B(43)', bar(1, 42));
+}
+
+@pragma('vm:never-inline')
+bar(int j, dynamic arg) => l[j].foo(arg);
+
+class A {
+  // This will not get a dyn:* forwarder because it's parameter type is
+  // top-type.
+  String foo(Object? a) => 'C($a)';
+}
+
+class B {
+  // This will get a dyn:* forwarder because it's parameter type is not
+  // top-type (and neither covariant)
+  String foo(int a) => 'B(${a + 1})';
+}
diff --git a/runtime/tests/vm/dart/switchable_call_single_target_regression_42517_test.dart b/runtime/tests/vm/dart/switchable_call_single_target_regression_42517_test.dart
new file mode 100644
index 0000000..b879c49
--- /dev/null
+++ b/runtime/tests/vm/dart/switchable_call_single_target_regression_42517_test.dart
@@ -0,0 +1,37 @@
+// Copyright (c) 2020, the Dart project authors.  Please see the AUTHORS file
+// for 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';
+
+final dynamic l = <dynamic>[A(), A1(), B()];
+
+main() {
+  // Switchable call site goes from UnlinkedCall -> Monomorphic.
+  Expect.equals('C(42)', bar(0, 42));
+  // Switchable call site goes from Monomorphic -> SingleTarget.
+  Expect.equals('C(42)', bar(1, 42));
+  // Switchable call site goes from SingleTarget -> Polymorphic.
+  // It has to retain the fact that call site is dyn:*.
+  Expect.throwsTypeError(() => bar(2, 'a'));
+  Expect.equals('B(43)', bar(2, 42));
+}
+
+@pragma('vm:never-inline')
+bar(int j, dynamic arg) => l[j].foo(arg);
+
+class A {
+  // This will not get a dyn:* forwarder because it's parameter type is
+  // top-type.
+  String foo(Object? a) => 'C($a)';
+}
+
+class A1 extends A {
+  // A different receiver cid but with same target (i.e. we do not override A).
+}
+
+class B {
+  // This will get a dyn:* forwarder because it's parameter type is not
+  // top-type (and neither covariant)
+  String foo(int a) => 'B(${a + 1})';
+}
diff --git a/runtime/tests/vm/dart_2/sdk_hash_test.dart b/runtime/tests/vm/dart_2/sdk_hash_test.dart
new file mode 100644
index 0000000..6b05e96
--- /dev/null
+++ b/runtime/tests/vm/dart_2/sdk_hash_test.dart
@@ -0,0 +1,88 @@
+// Copyright (c) 2020, the Dart project authors.  Please see the AUTHORS file
+// for 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:convert';
+import 'dart:io';
+import 'dart:typed_data';
+
+import 'package:path/path.dart' as path;
+import 'package:expect/expect.dart';
+
+import 'snapshot_test_helper.dart';
+
+// Keep in sync with pkg/kernel/lib/binary/tag.dart:
+const tagComponentFile = [0x90, 0xAB, 0xCD, 0xEF];
+const tagBinaryFormatVersion = [0x00, 0x00, 0x00, 43];
+
+Future<void> main(List<String> args) async {
+  if (args.length == 1 && args[0] == '--child') {
+    print('Hello, SDK Hash!');
+    return;
+  }
+
+  final String sourcePath =
+      path.join('runtime', 'tests', 'vm', 'dart_2', 'sdk_hash_test.dart');
+
+  await withTempDir((String tmp) async {
+    final String dillPath = path.join(tmp, 'test.dill');
+
+    {
+      final result = await Process.run(dart, [
+        genKernel,
+        '--platform',
+        platformDill,
+        '-o',
+        dillPath,
+        sourcePath,
+      ]);
+      Expect.equals('', result.stderr);
+      Expect.equals(0, result.exitCode);
+      Expect.equals('', result.stdout);
+    }
+
+    {
+      final result = await Process.run(dart, [dillPath, '--child']);
+      Expect.equals('', result.stderr);
+      Expect.equals(0, result.exitCode);
+      Expect.equals('Hello, SDK Hash!', result.stdout.trim());
+    }
+
+    // Invalidate the SDK hash in the kernel dill:
+    {
+      final myFile = File(dillPath);
+      Uint8List bytes = myFile.readAsBytesSync();
+      // The SDK Hash is located after the ComponentFile and BinaryFormatVersion
+      // tags (both UInt32).
+      Expect.listEquals(tagComponentFile, bytes.sublist(0, 4));
+      Expect.listEquals(tagBinaryFormatVersion, bytes.sublist(4, 8));
+      // Flip the first byte in the hash:
+      bytes[8] ^= bytes[8];
+      myFile.writeAsBytesSync(bytes);
+    }
+
+    {
+      final result = await Process.run(dart, [dillPath, '--child']);
+      Expect.equals(
+          'Can\'t load Kernel binary: Invalid SDK hash.', result.stderr.trim());
+      Expect.equals(253, result.exitCode);
+      Expect.equals('', result.stdout);
+    }
+
+    // Zero out the SDK hash in the kernel dill to disable the check:
+    {
+      final myFile = File(dillPath);
+      Uint8List bytes = myFile.readAsBytesSync();
+      bytes.setRange(8, 18, ascii.encode('0000000000'));
+      myFile.writeAsBytesSync(bytes);
+    }
+
+    {
+      final result = await Process.run(dart, [dillPath, '--child']);
+      Expect.equals('', result.stderr);
+      Expect.equals(0, result.exitCode);
+      Expect.equals('Hello, SDK Hash!', result.stdout.trim());
+    }
+  });
+}
diff --git a/runtime/tests/vm/dart_2/snapshot_test_helper.dart b/runtime/tests/vm/dart_2/snapshot_test_helper.dart
index 9be810a..b2754d0 100644
--- a/runtime/tests/vm/dart_2/snapshot_test_helper.dart
+++ b/runtime/tests/vm/dart_2/snapshot_test_helper.dart
@@ -48,6 +48,7 @@
 final String buildDir = p.dirname(Platform.executable);
 final String platformDill = p.join(buildDir, "vm_platform_strong.dill");
 final String genSnapshot = p.join(buildDir, "gen_snapshot${executableSuffix}");
+final String dart = p.join(buildDir, "dart${executableSuffix}");
 final String dartPrecompiledRuntime =
     p.join(buildDir, "dart_precompiled_runtime${executableSuffix}");
 final String genKernel = p.join("pkg", "vm", "bin", "gen_kernel.dart");
diff --git a/runtime/tests/vm/dart_2/switchable_call_monomorphic_regression_42517_test.dart b/runtime/tests/vm/dart_2/switchable_call_monomorphic_regression_42517_test.dart
new file mode 100644
index 0000000..a3c8ffa
--- /dev/null
+++ b/runtime/tests/vm/dart_2/switchable_call_monomorphic_regression_42517_test.dart
@@ -0,0 +1,31 @@
+// Copyright (c) 2020, the Dart project authors.  Please see the AUTHORS file
+// for 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';
+
+final dynamic l = <dynamic>[A(), B()];
+
+main() {
+  // Switchable call site goes from UnlinkedCall -> Monomorphic.
+  Expect.equals('C(42)', bar(0, 42));
+  // Switchable call site goes from Monomorphic -> Polymorphic.
+  // It has to retain the fact that call site is dyn:*.
+  Expect.throwsTypeError(() => bar(1, 'a'));
+  Expect.equals('B(43)', bar(1, 42));
+}
+
+@pragma('vm:never-inline')
+bar(int j, dynamic arg) => l[j].foo(arg);
+
+class A {
+  // This will not get a dyn:* forwarder because it's parameter type is
+  // top-type.
+  String foo(Object a) => 'C($a)';
+}
+
+class B {
+  // This will get a dyn:* forwarder because it's parameter type is not
+  // top-type (and neither covariant)
+  String foo(int a) => 'B(${a + 1})';
+}
diff --git a/runtime/tests/vm/dart_2/switchable_call_single_target_regression_42517_test.dart b/runtime/tests/vm/dart_2/switchable_call_single_target_regression_42517_test.dart
new file mode 100644
index 0000000..868ab75
--- /dev/null
+++ b/runtime/tests/vm/dart_2/switchable_call_single_target_regression_42517_test.dart
@@ -0,0 +1,37 @@
+// Copyright (c) 2020, the Dart project authors.  Please see the AUTHORS file
+// for 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';
+
+final dynamic l = <dynamic>[A(), A1(), B()];
+
+main() {
+  // Switchable call site goes from UnlinkedCall -> Monomorphic.
+  Expect.equals('C(42)', bar(0, 42));
+  // Switchable call site goes from Monomorphic -> SingleTarget.
+  Expect.equals('C(42)', bar(1, 42));
+  // Switchable call site goes from SingleTarget -> Polymorphic.
+  // It has to retain the fact that call site is dyn:*.
+  Expect.throwsTypeError(() => bar(2, 'a'));
+  Expect.equals('B(43)', bar(2, 42));
+}
+
+@pragma('vm:never-inline')
+bar(int j, dynamic arg) => l[j].foo(arg);
+
+class A {
+  // This will not get a dyn:* forwarder because it's parameter type is
+  // top-type.
+  String foo(Object a) => 'C($a)';
+}
+
+class A1 extends A {
+  // A different receiver cid but with same target (i.e. we do not override A).
+}
+
+class B {
+  // This will get a dyn:* forwarder because it's parameter type is not
+  // top-type (and neither covariant)
+  String foo(int a) => 'B(${a + 1})';
+}
diff --git a/runtime/tests/vm/vm.status b/runtime/tests/vm/vm.status
index 72ce9c8..0ab4172 100644
--- a/runtime/tests/vm/vm.status
+++ b/runtime/tests/vm/vm.status
@@ -2,9 +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.
 
-dart/isolates/*: Pass, Slow # Tests use many isolates and take a longer time.
-dart_2/isolates/*: Pass, Slow # Tests use many isolates and take a longer time.
-
 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.
@@ -16,6 +13,7 @@
 cc/IsolateReload_PendingUnqualifiedCall_StaticToInstance: Fail # Issue 32981
 dart/data_uri_import_test/none: SkipByDesign
 dart/emit_aot_size_info_flag_test: Pass, Slow # Spawns several subprocesses
+dart/isolates/*: Pass, Slow # Tests use many isolates and take a longer time.
 dart/minimal_kernel_bytecode_test: Pass, Slow # Spawns several subprocesses
 dart/minimal_kernel_test: Pass, Slow # Spawns several subprocesses
 dart/null_safety_autodetection_in_kernel_compiler_test: Pass, Slow # Spawns several subprocesses
@@ -25,6 +23,7 @@
 dart/use_bare_instructions_flag_test: Pass, Slow # Spawns several subprocesses
 dart_2/data_uri_import_test/none: SkipByDesign
 dart_2/emit_aot_size_info_flag_test: Pass, Slow # Spawns several subprocesses
+dart_2/isolates/*: Pass, Slow # Tests use many isolates and take a longer time.
 dart_2/minimal_kernel_bytecode_test: Pass, Slow # Spawns several subprocesses
 dart_2/minimal_kernel_test: Pass, Slow # Spawns several subprocesses
 dart_2/null_safety_autodetection_in_kernel_compiler_test: Pass, Slow # Spawns several subprocesses
@@ -33,68 +32,10 @@
 dart_2/stack_overflow_shared_test: Pass, Slow # Uses --shared-slow-path-triggers-gc flag.
 dart_2/use_bare_instructions_flag_test: Pass, Slow # Spawns several subprocesses
 
-[ $system != macos || $arch == simarm || $arch == simarm64 ]
-dart/thread_priority_macos_test: SkipByDesign
-dart_2/thread_priority_macos_test: SkipByDesign
-
-[ ($system != linux && $system != android) || $arch == simarm || $arch == simarm64 ]
-dart/thread_priority_linux_test: SkipByDesign
-dart_2/thread_priority_linux_test: SkipByDesign
-
-[ $system != windows || $arch == simarm || $arch == simarm64 ]
-dart/thread_priority_windows_test: SkipByDesign
-dart_2/thread_priority_windows_test: SkipByDesign
-
-[ $runtime != dart_precompiled || $system == android ]
-dart/isolates/fibonacci_call_ig_test: Skip # Only AOT has lightweight enough isolates to run those tests, JIT work is pending.
-dart/isolates/fibonacci_call_test: Skip # Only AOT has lightweight enough isolates to run those tests.
-dart/isolates/internal: Skip # Only AOT has lightweight enough isolates to run those tests.
-dart/isolates/limited_active_mutator_test:  Skip # Only AOT has lightweight enough isolates to run those tests.
-dart/isolates/ring_gc_sendAndExit_test: Skip # Only AOT has lightweight enough isolates to run those tests.
-dart/isolates/ring_gc_test: Skip # Only AOT has lightweight enough isolates to run those tests.
-dart/isolates/sum_recursive_call_ig_test: Skip # Only AOT has lightweight enough isolates to run those tests.
-dart/isolates/sum_recursive_call_test: Skip # Only AOT has lightweight enough isolates to run those tests.
-dart/isolates/sum_recursive_tail_call_ig_test: Skip # Only AOT has lightweight enough isolates to run those tests.
-dart/isolates/sum_recursive_tail_call_test: Skip # Only AOT has lightweight enough isolates to run those tests.
-dart/isolates/thread_pool_test: Skip # Only AOT has lightweight enough isolates to run those tests.
-dart_2/isolates/fibonacci_call_ig_test: Skip # Only AOT has lightweight enough isolates to run those tests, JIT work is pending.
-dart_2/isolates/fibonacci_call_test: Skip # Only AOT has lightweight enough isolates to run those tests.
-dart_2/isolates/internal: Skip # Only AOT has lightweight enough isolates to run those tests.
-dart_2/isolates/limited_active_mutator_test:  Skip # Only AOT has lightweight enough isolates to run those tests.
-dart_2/isolates/ring_gc_sendAndExit_test: Skip # Only AOT has lightweight enough isolates to run those tests.
-dart_2/isolates/ring_gc_test: Skip # Only AOT has lightweight enough isolates to run those tests.
-dart_2/isolates/sum_recursive_call_ig_test: Skip # Only AOT has lightweight enough isolates to run those tests.
-dart_2/isolates/sum_recursive_call_test: Skip # Only AOT has lightweight enough isolates to run those tests.
-dart_2/isolates/sum_recursive_tail_call_ig_test: Skip # Only AOT has lightweight enough isolates to run those tests.
-dart_2/isolates/sum_recursive_tail_call_test: Skip # Only AOT has lightweight enough isolates to run those tests.
-dart_2/isolates/thread_pool_test: Skip # Only AOT has lightweight enough isolates to run those tests.
-
-[ $arch == simarm || $arch == simarm64 ]
-dart/isolates/thread_pool_test: SkipByDesign # Test uses dart:ffi which is not supported on simulators.
-dart/unboxed_param_args_descriptor_test: SkipByDesign # FFI helper not supported on simulator
-dart/unboxed_param_tear_off_test: SkipByDesign # FFI helper not supported on simulator
-dart/unboxed_param_test: SkipByDesign # FFI helper not supported on simulator
-dart/regress_41971_test: SkipByDesign # dart:ffi is not supported on simulator
-dart_2/isolates/thread_pool_test: SkipByDesign # Test uses dart:ffi which is not supported on simulators.
-dart_2/unboxed_param_args_descriptor_test: SkipByDesign # FFI helper not supported on simulator
-dart_2/unboxed_param_tear_off_test: SkipByDesign # FFI helper not supported on simulator
-dart_2/unboxed_param_test: SkipByDesign # FFI helper not supported on simulator
-dart_2/regress_41971_test: SkipByDesign # dart:ffi is not supported on simulator
-
 [ $builder_tag == asan ]
 dart/transferable_throws_oom_test: SkipByDesign # This test tries to allocate too much memory on purpose. Still dartbug.com/37188
 dart_2/transferable_throws_oom_test: SkipByDesign # This test tries to allocate too much memory on purpose. Still dartbug.com/37188
 
-[ $builder_tag == crossword || $builder_tag == crossword_ast ]
-dart/emit_aot_size_info_flag_test: SkipByDesign # The test itself cannot determine the location of gen_snapshot (only tools/test.py knows where it is).
-dart/bytecode_with_ast_in_aot_test: SkipByDesign # The test doesn't know location of cross-platform gen_snapshot
-dart/split_aot_kernel_generation_test: SkipByDesign # The test doesn't know location of cross-platform gen_snapshot
-dart/split_aot_kernel_generation2_test: SkipByDesign # The test doesn't know location of cross-platform gen_snapshot
-dart_2/emit_aot_size_info_flag_test: SkipByDesign # The test itself cannot determine the location of gen_snapshot (only tools/test.py knows where it is).
-dart_2/bytecode_with_ast_in_aot_test: SkipByDesign # The test doesn't know location of cross-platform gen_snapshot
-dart_2/split_aot_kernel_generation_test: SkipByDesign # The test doesn't know location of cross-platform gen_snapshot
-dart_2/split_aot_kernel_generation2_test: SkipByDesign # The test doesn't know location of cross-platform gen_snapshot
-
 [ $builder_tag == obfuscated ]
 dart/causal_stacks/async_throws_stack_lazy_test: SkipByDesign # Asserts exact stacktrace output.
 dart/causal_stacks/async_throws_stack_no_causal_test: SkipByDesign # Asserts exact stacktrace output.
@@ -138,8 +79,20 @@
 dart_2/redirection_type_shuffling_test/none: RuntimeError
 dart_2/snapshot_version_test: RuntimeError
 
+[ $compiler == dartkb ]
+dart/generic_field_invocation_test: SkipByDesign # KBC interpreters do not support --no_lazy_dispatchers
+dart_2/generic_field_invocation_test: SkipByDesign # KBC interpreters do not support --no_lazy_dispatchers
+
 [ $compiler == dartkp ]
+dart/causal_stacks/async_throws_stack_no_causal_non_symbolic_test: SkipByDesign # --no-lazy... does nothing on precompiler.
+dart/causal_stacks/async_throws_stack_no_causal_test: SkipByDesign # --no-lazy... does nothing on precompiler.
+dart/causal_stacks/async_throws_stack_non_symbolic_test: SkipByDesign # --no-lazy... does nothing on precompiler.
+dart/causal_stacks/async_throws_stack_test: SkipByDesign # --no-lazy... does nothing on precompiler.
 dart/v8_snapshot_profile_writer_test: Pass, Slow # Can be slow due to re-invoking the precompiler.
+dart_2/causal_stacks/async_throws_stack_no_causal_non_symbolic_test: SkipByDesign # --no-lazy... does nothing on precompiler.
+dart_2/causal_stacks/async_throws_stack_no_causal_test: SkipByDesign # --no-lazy... does nothing on precompiler.
+dart_2/causal_stacks/async_throws_stack_non_symbolic_test: SkipByDesign # --no-lazy... does nothing on precompiler.
+dart_2/causal_stacks/async_throws_stack_test: SkipByDesign # --no-lazy... does nothing on precompiler.
 dart_2/v8_snapshot_profile_writer_test: Pass, Slow # Can be slow due to re-invoking the precompiler.
 
 [ $compiler != dartkp ]
@@ -310,6 +263,9 @@
 dart/spawn_shutdown_test: SkipSlow
 dart_2/spawn_shutdown_test: SkipSlow
 
+[ $system != fuchsia && ($arch != x64 || $system != linux) ]
+cc/CodeExecutability: SkipByDesign # --dual-map-code not supported on non-Linux/Fuchsia
+
 [ $system == linux && ($compiler == dartk || $compiler == dartkb) ]
 cc/IsolateReload_LibraryLookup: Fail, Crash
 
@@ -334,10 +290,6 @@
 dart_2/null_safety_autodetection_in_kernel_compiler_test: SkipSlow # gen_kernel is too slow on simulated architectures
 dart_2/snapshot_version_test: RuntimeError # Please triage.
 
-[ $hot_reload || $hot_reload_rollback ]
-dart/isolates/spawn_function_test: Skip # This test explicitly enables isolate groups (off-by-default atm). It will be enabled once full IG reloading is implemented.
-dart_2/isolates/spawn_function_test: Skip # This test explicitly enables isolate groups (off-by-default atm). It will be enabled once full IG reloading is implemented.
-
 [ ($compiler == dartk || $compiler == dartkb) && ($hot_reload || $hot_reload_rollback) ]
 dart/data_uri_spawn_test: Skip # Timeout
 dart/kernel_determinism_test: SkipSlow
@@ -357,7 +309,7 @@
 # On the simluator stack traces produced by the Profiler do not match
 # up with the real Dart stack trace and hence we don't get correct
 # symbol names.
-[ $arch == simarm || $arch == simarm64 || $arch == simarmv6 ]
+[ $arch == simarm || $arch == simarm64 ]
 cc/LargeMap: SkipByDesign
 cc/Profiler_AllocationSampleTest: SkipByDesign
 cc/Profiler_ArrayAllocation: SkipByDesign
@@ -384,15 +336,47 @@
 cc/Profiler_TrivialRecordAllocation: SkipByDesign
 cc/Profiler_TypedArrayAllocation: SkipByDesign
 cc/Service_Profile: SkipByDesign
+dart/isolates/thread_pool_test: SkipByDesign # Test uses dart:ffi which is not supported on simulators.
+dart/regress_41971_test: SkipByDesign # dart:ffi is not supported on simulator
+dart/sdk_hash_test: SkipSlow # gen_kernel is slow to run on simarm
+dart/unboxed_param_args_descriptor_test: SkipByDesign # FFI helper not supported on simulator
+dart/unboxed_param_tear_off_test: SkipByDesign # FFI helper not supported on simulator
+dart/unboxed_param_test: SkipByDesign # FFI helper not supported on simulator
+dart_2/isolates/thread_pool_test: SkipByDesign # Test uses dart:ffi which is not supported on simulators.
+dart_2/regress_41971_test: SkipByDesign # dart:ffi is not supported on simulator
+dart_2/sdk_hash_test: SkipSlow # gen_kernel is slow to run on simarm
+dart_2/unboxed_param_args_descriptor_test: SkipByDesign # FFI helper not supported on simulator
+dart_2/unboxed_param_tear_off_test: SkipByDesign # FFI helper not supported on simulator
+dart_2/unboxed_param_test: SkipByDesign # FFI helper not supported on simulator
 
-[ $compiler == dartkb ]
-dart/generic_field_invocation_test: SkipByDesign # KBC interpreters do not support --no_lazy_dispatchers
-dart_2/generic_field_invocation_test: SkipByDesign # KBC interpreters do not support --no_lazy_dispatchers
+[ $arch == simarm || $arch == simarm64 || $system != macos ]
+dart/thread_priority_macos_test: SkipByDesign
+dart_2/thread_priority_macos_test: SkipByDesign
 
-[ $builder_tag == bytecode_interpreter || $hot_reload || $hot_reload_rollback || $compiler != dartk && $compiler != dartkp && $compiler != dartkb ]
+[ $arch == simarm || $arch == simarm64 || $system != windows ]
+dart/thread_priority_windows_test: SkipByDesign
+dart_2/thread_priority_windows_test: SkipByDesign
+
+[ $arch == simarm || $arch == simarm64 || $system != android && $system != linux ]
+dart/thread_priority_linux_test: SkipByDesign
+dart_2/thread_priority_linux_test: SkipByDesign
+
+[ $builder_tag == bytecode_interpreter || $hot_reload || $hot_reload_rollback || $compiler != dartk && $compiler != dartkb && $compiler != dartkp ]
 dart/entrypoints/*: SkipByDesign # These tests are for compiler optimizations and very sensitive to when functions are optimized, so they are disabled on hotreload and optcounter bots.
 dart_2/entrypoints/*: SkipByDesign # These tests are for compiler optimizations and very sensitive to when functions are optimized, so they are disabled on hotreload and optcounter bots.
 
+[ $builder_tag == crossword || $builder_tag == crossword_ast ]
+dart/bytecode_with_ast_in_aot_test: SkipByDesign # The test doesn't know location of cross-platform gen_snapshot
+dart/emit_aot_size_info_flag_test: SkipByDesign # The test itself cannot determine the location of gen_snapshot (only tools/test.py knows where it is).
+dart/sdk_hash_test: SkipByDesign # The test doesn't know location of cross-platform gen_snapshot
+dart/split_aot_kernel_generation2_test: SkipByDesign # The test doesn't know location of cross-platform gen_snapshot
+dart/split_aot_kernel_generation_test: SkipByDesign # The test doesn't know location of cross-platform gen_snapshot
+dart_2/bytecode_with_ast_in_aot_test: SkipByDesign # The test doesn't know location of cross-platform gen_snapshot
+dart_2/emit_aot_size_info_flag_test: SkipByDesign # The test itself cannot determine the location of gen_snapshot (only tools/test.py knows where it is).
+dart_2/sdk_hash_test: SkipByDesign # The test doesn't know location of cross-platform gen_snapshot
+dart_2/split_aot_kernel_generation2_test: SkipByDesign # The test doesn't know location of cross-platform gen_snapshot
+dart_2/split_aot_kernel_generation_test: SkipByDesign # The test doesn't know location of cross-platform gen_snapshot
+
 [ $builder_tag == crossword || $builder_tag == crossword_ast || $compiler != dartkp || $system != linux && $system != macos && $system != windows ]
 dart/run_appended_aot_snapshot_test: SkipByDesign # Tests the precompiled runtime.
 dart_2/run_appended_aot_snapshot_test: SkipByDesign # Tests the precompiled runtime.
@@ -410,16 +394,19 @@
 dart_2/redirection_type_shuffling_test/none: RuntimeError
 
 [ $mode == debug || $runtime != dart_precompiled || $system == android ]
-dart/emit_aot_size_info_flag_test: SkipByDesign # This test is for VM AOT only and is quite slow (so we don't run it in debug mode).
-dart/use_bare_instructions_flag_test: SkipByDesign # This test is for VM AOT only and is quite slow (so we don't run it in debug mode).
 dart/bytecode_with_ast_in_aot_test: SkipByDesign # This test is for VM AOT only and is quite slow (so we don't run it in debug mode).
-dart/split_aot_kernel_generation_test: SkipByDesign # This test is for VM AOT only and is quite slow (so we don't run it in debug mode).
+dart/emit_aot_size_info_flag_test: SkipByDesign # This test is for VM AOT only and is quite slow (so we don't run it in debug mode).
 dart/split_aot_kernel_generation2_test: SkipByDesign # This test is for VM AOT only and is quite slow (so we don't run it in debug mode).
-dart_2/emit_aot_size_info_flag_test: SkipByDesign # This test is for VM AOT only and is quite slow (so we don't run it in debug mode).
-dart_2/use_bare_instructions_flag_test: SkipByDesign # This test is for VM AOT only and is quite slow (so we don't run it in debug mode).
+dart/split_aot_kernel_generation_test: SkipByDesign # This test is for VM AOT only and is quite slow (so we don't run it in debug mode).
+dart/use_bare_instructions_flag_test: SkipByDesign # This test is for VM AOT only and is quite slow (so we don't run it in debug mode).
 dart_2/bytecode_with_ast_in_aot_test: SkipByDesign # This test is for VM AOT only and is quite slow (so we don't run it in debug mode).
-dart_2/split_aot_kernel_generation_test: SkipByDesign # This test is for VM AOT only and is quite slow (so we don't run it in debug mode).
+dart_2/emit_aot_size_info_flag_test: SkipByDesign # This test is for VM AOT only and is quite slow (so we don't run it in debug mode).
 dart_2/split_aot_kernel_generation2_test: SkipByDesign # This test is for VM AOT only and is quite slow (so we don't run it in debug mode).
+dart_2/split_aot_kernel_generation_test: SkipByDesign # This test is for VM AOT only and is quite slow (so we don't run it in debug mode).
+dart_2/use_bare_instructions_flag_test: SkipByDesign # This test is for VM AOT only and is quite slow (so we don't run it in debug mode).
+
+[ $mode != debug || $runtime != dart_precompiled ]
+in_memory_elf_test: Skip # Tests a debug-mode flag to dart_precompiled_runtime.
 
 # It makes no sense to run any test that uses spawnURI under the simulator
 # as that would involve running CFE (the front end) in simulator mode
@@ -433,12 +420,35 @@
 
 [ $runtime != dart_precompiled || $system == android ]
 dart/bare_instructions_trampolines_test: SkipByDesign # This test is for VM AOT only (android fails due to listing interfaces).
+dart/isolates/fibonacci_call_ig_test: Skip # Only AOT has lightweight enough isolates to run those tests, JIT work is pending.
+dart/isolates/fibonacci_call_test: Skip # Only AOT has lightweight enough isolates to run those tests.
+dart/isolates/internal: Skip # Only AOT has lightweight enough isolates to run those tests.
+dart/isolates/limited_active_mutator_test: Skip # Only AOT has lightweight enough isolates to run those tests.
+dart/isolates/ring_gc_sendAndExit_test: Skip # Only AOT has lightweight enough isolates to run those tests.
+dart/isolates/ring_gc_test: Skip # Only AOT has lightweight enough isolates to run those tests.
+dart/isolates/sum_recursive_call_ig_test: Skip # Only AOT has lightweight enough isolates to run those tests.
+dart/isolates/sum_recursive_call_test: Skip # Only AOT has lightweight enough isolates to run those tests.
+dart/isolates/sum_recursive_tail_call_ig_test: Skip # Only AOT has lightweight enough isolates to run those tests.
+dart/isolates/sum_recursive_tail_call_test: Skip # Only AOT has lightweight enough isolates to run those tests.
+dart/isolates/thread_pool_test: Skip # Only AOT has lightweight enough isolates to run those tests.
 dart_2/bare_instructions_trampolines_test: SkipByDesign # This test is for VM AOT only (android fails due to listing interfaces).
+dart_2/isolates/fibonacci_call_ig_test: Skip # Only AOT has lightweight enough isolates to run those tests, JIT work is pending.
+dart_2/isolates/fibonacci_call_test: Skip # Only AOT has lightweight enough isolates to run those tests.
+dart_2/isolates/internal: Skip # Only AOT has lightweight enough isolates to run those tests.
+dart_2/isolates/limited_active_mutator_test: Skip # Only AOT has lightweight enough isolates to run those tests.
+dart_2/isolates/ring_gc_sendAndExit_test: Skip # Only AOT has lightweight enough isolates to run those tests.
+dart_2/isolates/ring_gc_test: Skip # Only AOT has lightweight enough isolates to run those tests.
+dart_2/isolates/sum_recursive_call_ig_test: Skip # Only AOT has lightweight enough isolates to run those tests.
+dart_2/isolates/sum_recursive_call_test: Skip # Only AOT has lightweight enough isolates to run those tests.
+dart_2/isolates/sum_recursive_tail_call_ig_test: Skip # Only AOT has lightweight enough isolates to run those tests.
+dart_2/isolates/sum_recursive_tail_call_test: Skip # Only AOT has lightweight enough isolates to run those tests.
+dart_2/isolates/thread_pool_test: Skip # Only AOT has lightweight enough isolates to run those tests.
 
 [ $hot_reload || $hot_reload_rollback ]
 dart/appjit*: SkipByDesign # Cannot reload with URI pointing to app snapshot.
 dart/compilation_trace_test: Pass, Slow
 dart/disassemble_determinism_test: SkipSlow # Runs expensive fibonacci(32) computation in 2 subprocesses
+dart/isolates/spawn_function_test: Skip # This test explicitly enables isolate groups (off-by-default atm). It will be enabled once full IG reloading is implemented.
 dart/issue_31959_31960_test: SkipSlow
 dart/minimal_kernel_bytecode_test: SkipSlow # gen_kernel is too slow in hot reload testing mode
 dart/minimal_kernel_test: SkipSlow # gen_kernel is too slow in hot reload testing mode
@@ -453,6 +463,7 @@
 dart_2/appjit*: SkipByDesign # Cannot reload with URI pointing to app snapshot.
 dart_2/compilation_trace_test: Pass, Slow
 dart_2/disassemble_determinism_test: SkipSlow # Runs expensive fibonacci(32) computation in 2 subprocesses
+dart_2/isolates/spawn_function_test: Skip # This test explicitly enables isolate groups (off-by-default atm). It will be enabled once full IG reloading is implemented.
 dart_2/issue_31959_31960_test: SkipSlow
 dart_2/minimal_kernel_bytecode_test: SkipSlow # gen_kernel is too slow in hot reload testing mode
 dart_2/minimal_kernel_test: SkipSlow # gen_kernel is too slow in hot reload testing mode
@@ -464,6 +475,3 @@
 dart_2/splay_test: SkipSlow
 dart_2/stack_overflow_shared_test: SkipSlow # Too slow with --shared-slow-path-triggers-gc flag and not relevant outside precompiled.
 dart_2/type_feedback_test: Pass, Slow
-
-[ $mode != debug || $runtime != dart_precompiled ]
-in_memory_elf_test: Skip  # Tests a debug-mode flag to dart_precompiled_runtime.
diff --git a/runtime/vm/clustered_snapshot.cc b/runtime/vm/clustered_snapshot.cc
index c626115..c9e1319 100644
--- a/runtime/vm/clustered_snapshot.cc
+++ b/runtime/vm/clustered_snapshot.cc
@@ -5333,7 +5333,7 @@
 
   intptr_t code_order_length = 0;
 #if defined(DART_PRECOMPILER) && !defined(TARGET_ARCH_IA32)
-  if (kind_ == Snapshot::kFullAOT) {
+  if ((kind_ == Snapshot::kFullAOT) && FLAG_use_bare_instructions) {
     auto code_objects =
         static_cast<CodeSerializationCluster*>(clusters_by_cid_[kCodeCid])
             ->discovered_objects();
diff --git a/runtime/vm/compiler/aot/dispatch_table_generator.h b/runtime/vm/compiler/aot/dispatch_table_generator.h
index 20b6ca3..e916a3c 100644
--- a/runtime/vm/compiler/aot/dispatch_table_generator.h
+++ b/runtime/vm/compiler/aot/dispatch_table_generator.h
@@ -16,6 +16,7 @@
 
 class ClassTable;
 class Precompiler;
+class PrecompilerTracer;
 
 namespace compiler {
 
@@ -75,6 +76,7 @@
   int32_t NumIds() const { return selectors_.length(); }
 
   friend class dart::Precompiler;
+  friend class dart::PrecompilerTracer;
   friend class DispatchTableGenerator;
   friend class SelectorRow;
 
diff --git a/runtime/vm/compiler/aot/precompiler.cc b/runtime/vm/compiler/aot/precompiler.cc
index 52bf344..e4af5d3 100644
--- a/runtime/vm/compiler/aot/precompiler.cc
+++ b/runtime/vm/compiler/aot/precompiler.cc
@@ -8,6 +8,7 @@
 #include "vm/class_finalizer.h"
 #include "vm/code_patcher.h"
 #include "vm/compiler/aot/aot_call_specializer.h"
+#include "vm/compiler/aot/precompiler_tracer.h"
 #include "vm/compiler/assembler/assembler.h"
 #include "vm/compiler/assembler/disassembler.h"
 #include "vm/compiler/backend/branch_optimizer.h"
@@ -50,6 +51,7 @@
 #include "vm/type_table.h"
 #include "vm/type_testing_stubs.h"
 #include "vm/version.h"
+#include "vm/zone_text_buffer.h"
 
 namespace dart {
 
@@ -268,6 +270,8 @@
         }
       }
 
+      tracer_ = PrecompilerTracer::StartTracingIfRequested(this);
+
       // All stubs have already been generated, all of them share the same pool.
       // We use that pool to initialize our global object pool, to guarantee
       // stubs as well as code compiled from here on will have the same pool.
@@ -298,8 +302,11 @@
       CollectDynamicFunctionNames();
 
       // Start with the allocations and invocations that happen from C++.
-      AddRoots();
-      AddAnnotatedRoots();
+      {
+        TracingScope scope(this);
+        AddRoots();
+        AddAnnotatedRoots();
+      }
 
       // With the nnbd experiment enabled, these non-nullable type arguments may
       // not be retained, although they will be used and expected to be
@@ -377,6 +384,11 @@
         }
       }
 
+      if (tracer_ != nullptr) {
+        tracer_->Finalize();
+        tracer_ = nullptr;
+      }
+
       TraceForRetainedFunctions();
       FinalizeDispatchTable();
       ReplaceFunctionPCRelativeCallEntries();
@@ -611,38 +623,27 @@
   const intptr_t gop_offset =
       FLAG_use_bare_instructions ? global_object_pool_builder()->CurrentLength()
                                  : 0;
+  RELEASE_ASSERT(!function.HasCode());
 
-  if (!function.HasCode()) {
-    function_count_++;
+  TracingScope tracing_scope(this);
+  function_count_++;
 
-    if (FLAG_trace_precompiler) {
-      THR_Print("Precompiling %" Pd " %s (%s, %s)\n", function_count_,
-                function.ToLibNamePrefixedQualifiedCString(),
-                function.token_pos().ToCString(),
-                Function::KindToCString(function.kind()));
-    }
-
-    ASSERT(!function.is_abstract());
-    ASSERT(!function.IsRedirectingFactory());
-
-    error_ = CompileFunction(this, thread_, zone_, function);
-    if (!error_.IsNull()) {
-      Jump(error_);
-    }
-    // Used in the JIT to save type-feedback across compilations.
-    function.ClearICDataArray();
-  } else {
-    if (FLAG_trace_precompiler) {
-      // This function was compiled from somewhere other than Precompiler,
-      // such as const constructors compiled by the parser.
-      THR_Print("Already has code: %s (%s, %s)\n",
-                function.ToLibNamePrefixedQualifiedCString(),
-                function.token_pos().ToCString(),
-                Function::KindToCString(function.kind()));
-    }
+  if (FLAG_trace_precompiler) {
+    THR_Print("Precompiling %" Pd " %s (%s, %s)\n", function_count_,
+              function.ToLibNamePrefixedQualifiedCString(),
+              function.token_pos().ToCString(),
+              Function::KindToCString(function.kind()));
   }
 
-  ASSERT(function.HasCode());
+  ASSERT(!function.is_abstract());
+  ASSERT(!function.IsRedirectingFactory());
+
+  error_ = CompileFunction(this, thread_, zone_, function);
+  if (!error_.IsNull()) {
+    Jump(error_);
+  }
+  // Used in the JIT to save type-feedback across compilations.
+  function.ClearICDataArray();
   AddCalleesOf(function, gop_offset);
 }
 
@@ -676,7 +677,11 @@
 #endif
 
   String& selector = String::Handle(Z);
-  if (FLAG_use_bare_instructions) {
+  // When tracing we want to scan the object pool attached to the code object
+  // rather than scanning global object pool - because we want to include
+  // *all* outgoing references into the trace. Scanning GOP would exclude
+  // references that have been deduplicated.
+  if (FLAG_use_bare_instructions && !is_tracing()) {
     for (intptr_t i = gop_offset;
          i < global_object_pool_builder()->CurrentLength(); i++) {
       const auto& wrapper_entry = global_object_pool_builder()->EntryAt(i);
@@ -705,6 +710,11 @@
   }
 }
 
+static bool IsPotentialClosureCall(const String& selector) {
+  return selector.raw() == Symbols::Call().raw() ||
+         selector.raw() == Symbols::DynamicCall().raw();
+}
+
 void Precompiler::AddCalleesOfHelper(const Object& entry,
                                      String* temp_selector,
                                      Class* temp_cls) {
@@ -713,22 +723,20 @@
     // A dynamic call.
     *temp_selector = call_site.target_name();
     AddSelector(*temp_selector);
-    if (temp_selector->raw() == Symbols::Call().raw()) {
-      // Potential closure call.
+    if (IsPotentialClosureCall(*temp_selector)) {
       const Array& arguments_descriptor =
-          Array::Handle(Z, call_site.args_descriptor());
-      AddClosureCall(arguments_descriptor);
+          Array::Handle(Z, call_site.arguments_descriptor());
+      AddClosureCall(*temp_selector, arguments_descriptor);
     }
   } else if (entry.IsMegamorphicCache()) {
     // A dynamic call.
     const auto& cache = MegamorphicCache::Cast(entry);
     *temp_selector = cache.target_name();
     AddSelector(*temp_selector);
-    if (temp_selector->raw() == Symbols::Call().raw()) {
-      // Potential closure call.
+    if (IsPotentialClosureCall(*temp_selector)) {
       const Array& arguments_descriptor =
           Array::Handle(Z, cache.arguments_descriptor());
-      AddClosureCall(arguments_descriptor);
+      AddClosureCall(*temp_selector, arguments_descriptor);
     }
   } else if (entry.IsField()) {
     // Potential need for field initializer.
@@ -952,18 +960,23 @@
   instance.raw()->ptr()->VisitPointers(&visitor);
 }
 
-void Precompiler::AddClosureCall(const Array& arguments_descriptor) {
+void Precompiler::AddClosureCall(const String& call_selector,
+                                 const Array& arguments_descriptor) {
   const Class& cache_class =
       Class::Handle(Z, I->object_store()->closure_class());
   const Function& dispatcher =
       Function::Handle(Z, cache_class.GetInvocationDispatcher(
-                              Symbols::Call(), arguments_descriptor,
+                              call_selector, arguments_descriptor,
                               FunctionLayout::kInvokeFieldDispatcher,
                               true /* create_if_absent */));
   AddFunction(dispatcher);
 }
 
 void Precompiler::AddField(const Field& field) {
+  if (is_tracing()) {
+    tracer_->WriteFieldRef(field);
+  }
+
   if (fields_to_retain_.HasKey(&field)) return;
 
   fields_to_retain_.Insert(&Field::ZoneHandle(Z, field.raw()));
@@ -1019,6 +1032,10 @@
 }
 
 void Precompiler::AddFunction(const Function& function, bool retain) {
+  if (is_tracing()) {
+    tracer_->WriteFunctionRef(function);
+  }
+
   if (possibly_retained_functions_.ContainsKey(function)) return;
   if (retain || MustRetainFunction(function)) {
     possibly_retained_functions_.Insert(function);
@@ -1038,8 +1055,11 @@
 }
 
 void Precompiler::AddSelector(const String& selector) {
-  ASSERT(!selector.IsNull());
+  if (is_tracing()) {
+    tracer_->WriteSelectorRef(selector);
+  }
 
+  ASSERT(!selector.IsNull());
   if (!IsSent(selector)) {
     sent_selectors_.Insert(&String::ZoneHandle(Z, selector.raw()));
     selector_count_++;
@@ -1055,6 +1075,10 @@
 void Precompiler::AddTableSelector(const compiler::TableSelector* selector) {
   ASSERT(FLAG_use_bare_instructions && FLAG_use_table_dispatch);
 
+  if (is_tracing()) {
+    tracer_->WriteTableSelectorRef(selector->id);
+  }
+
   if (seen_table_selectors_.HasKey(selector->id)) return;
 
   seen_table_selectors_.Insert(selector->id);
@@ -1072,6 +1096,10 @@
 }
 
 void Precompiler::AddInstantiatedClass(const Class& cls) {
+  if (is_tracing()) {
+    tracer_->WriteClassInstantiationRef(cls);
+  }
+
   if (cls.is_allocated()) return;
 
   class_count_++;
@@ -1262,9 +1290,14 @@
         kernel::ProcedureAttributesMetadata metadata;
 
         // Handle the implicit call type conversions.
-        if (Field::IsGetterName(selector)) {
+        if (Field::IsGetterName(selector) &&
+            (function.kind() != FunctionLayout::kMethodExtractor)) {
           // Call-through-getter.
           // Function is get:foo and somewhere foo (or dyn:foo) is called.
+          // Note that we need to skip method extractors (which were potentially
+          // created by DispatchTableGenerator): call of foo will never
+          // hit method extractor get:foo, because it will hit an existing
+          // method foo first.
           selector2 = Field::NameFromGetter(selector);
           selector3 = Symbols::Lookup(thread(), selector2);
           if (IsSent(selector3)) {
@@ -2689,6 +2722,10 @@
   ASSERT(CompilerState::Current().is_aot());
   const bool optimized = function.IsOptimizable();  // False for natives.
   DartCompilationPipeline pipeline;
+  if (precompiler->is_tracing()) {
+    precompiler->tracer_->WriteCompileFunctionEvent(function);
+  }
+
   return PrecompileFunctionHelper(precompiler, &pipeline, function, optimized);
 }
 
@@ -2967,83 +3004,6 @@
   }
 }
 
-void Obfuscator::ObfuscateSymbolInstance(Thread* thread,
-                                         const Instance& symbol) {
-  // Note: this must match dart:internal.Symbol declaration.
-  const intptr_t kSymbolNameOffset = kWordSize;
-
-  Object& name_value = String::Handle();
-  name_value = symbol.RawGetFieldAtOffset(kSymbolNameOffset);
-  if (!name_value.IsString()) {
-    // dart:internal.Symbol constructor does not validate its input.
-    return;
-  }
-
-  String& name = String::Handle();
-  name ^= name_value.raw();
-
-  // TODO(vegorov) it is quite wasteful to create an obfuscator per-symbol.
-  Obfuscator obfuscator(thread, /*private_key=*/String::Handle());
-
-  // Symbol can be a sequence of identifiers separated by dots.
-  // We split such symbols into components and obfuscate individual identifiers
-  // separately.
-  String& component = String::Handle();
-  GrowableHandlePtrArray<const String> renamed(thread->zone(), 2);
-
-  const intptr_t length = name.Length();
-  intptr_t i = 0, start = 0;
-  while (i < length) {
-    // First look for a '.' in the symbol.
-    start = i;
-    while (i < length && name.CharAt(i) != '.') {
-      i++;
-    }
-    const intptr_t end = i;
-    if (end == length) {
-      break;
-    }
-
-    if (start != end) {
-      component = Symbols::New(thread, name, start, end - start);
-      component = obfuscator.Rename(component, /*atomic=*/true);
-      renamed.Add(component);
-    }
-
-    renamed.Add(Symbols::Dot());
-    i++;  // Skip '.'
-  }
-
-  // Handle the last component [start, length).
-  // If symbol ends up at = and it is not one of '[]=', '==', '<=' or
-  // '>=' then we treat it as a setter symbol and follow the rule:
-  //
-  //              Rename('ident=') = Rename('ident') '='
-  //
-  const bool is_setter = (length - start) > 1 &&
-                         name.CharAt(length - 1) == '=' &&
-                         !(name.Equals(Symbols::AssignIndexToken()) ||
-                           name.Equals(Symbols::EqualOperator()) ||
-                           name.Equals(Symbols::GreaterEqualOperator()) ||
-                           name.Equals(Symbols::LessEqualOperator()));
-  const intptr_t end = length - (is_setter ? 1 : 0);
-
-  if ((start == 0) && (end == length) && name.IsSymbol()) {
-    component = name.raw();
-  } else {
-    component = Symbols::New(thread, name, start, end - start);
-  }
-  component = obfuscator.Rename(component, /*atomic=*/true);
-  renamed.Add(component);
-
-  if (is_setter) {
-    renamed.Add(Symbols::Equals());
-  }
-
-  name = Symbols::FromConcatAll(thread, renamed);
-  symbol.RawSetFieldAtOffset(kSymbolNameOffset, name);
-}
-
 void Obfuscator::Deobfuscate(Thread* thread,
                              const GrowableObjectArray& pieces) {
   const Array& obfuscation_state = Array::Handle(
diff --git a/runtime/vm/compiler/aot/precompiler.h b/runtime/vm/compiler/aot/precompiler.h
index d6cc219..5fdbc37 100644
--- a/runtime/vm/compiler/aot/precompiler.h
+++ b/runtime/vm/compiler/aot/precompiler.h
@@ -25,13 +25,10 @@
 class Field;
 class Function;
 class GrowableObjectArray;
-class SequenceNode;
 class String;
-class ParsedJSONObject;
-class ParsedJSONArray;
 class Precompiler;
 class FlowGraph;
-class PrecompilerEntryPointsPrinter;
+class PrecompilerTracer;
 
 class TableSelectorKeyValueTrait {
  public:
@@ -249,9 +246,27 @@
 
   Phase phase() const { return phase_; }
 
+  bool is_tracing() const { return is_tracing_; }
+
  private:
   static Precompiler* singleton_;
 
+  // Scope which activates machine readable precompiler tracing if tracer
+  // is available.
+  class TracingScope : public ValueObject {
+   public:
+    explicit TracingScope(Precompiler* precompiler)
+        : precompiler_(precompiler), was_tracing_(precompiler->is_tracing_) {
+      precompiler->is_tracing_ = (precompiler->tracer_ != nullptr);
+    }
+
+    ~TracingScope() { precompiler_->is_tracing_ = was_tracing_; }
+
+   private:
+    Precompiler* const precompiler_;
+    const bool was_tracing_;
+  };
+
   explicit Precompiler(Thread* thread);
   ~Precompiler();
 
@@ -269,7 +284,8 @@
                           String* temp_selector,
                           Class* temp_cls);
   void AddConstObject(const class Instance& instance);
-  void AddClosureCall(const Array& arguments_descriptor);
+  void AddClosureCall(const String& selector,
+                      const Array& arguments_descriptor);
   void AddFunction(const Function& function, bool retain = true);
   void AddInstantiatedClass(const Class& cls);
   void AddSelector(const String& selector);
@@ -355,6 +371,8 @@
   void* il_serialization_stream_;
 
   Phase phase_ = Phase::kPreparation;
+  PrecompilerTracer* tracer_ = nullptr;
+  bool is_tracing_ = false;
 };
 
 class FunctionsTraits {
@@ -445,10 +463,6 @@
     return state_->RenameImpl(name, atomic);
   }
 
-  // Given a constant |instance| of dart:internal.Symbol rename it by updating
-  // its |name| field.
-  static void ObfuscateSymbolInstance(Thread* thread, const Instance& instance);
-
   // Given a sequence of obfuscated identifiers deobfuscate it.
   //
   // This method is only used by parser when resolving conditional imports
@@ -585,8 +599,6 @@
   }
 
   void PreventRenaming(const String& name) {}
-  static void ObfuscateSymbolInstance(Thread* thread,
-                                      const Instance& instance) {}
 
   static void Deobfuscate(Thread* thread, const GrowableObjectArray& pieces) {}
 };
diff --git a/runtime/vm/compiler/aot/precompiler_tracer.cc b/runtime/vm/compiler/aot/precompiler_tracer.cc
new file mode 100644
index 0000000..fcb56b2
--- /dev/null
+++ b/runtime/vm/compiler/aot/precompiler_tracer.cc
@@ -0,0 +1,168 @@
+// Copyright (c) 2020, the Dart project authors.  Please see the AUTHORS file
+// for 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/aot/precompiler_tracer.h"
+
+#include "vm/compiler/aot/precompiler.h"
+#include "vm/zone_text_buffer.h"
+
+namespace dart {
+
+#if defined(DART_PRECOMPILER)
+
+DEFINE_FLAG(charp,
+            trace_precompiler_to,
+            nullptr,
+            "Output machine readable precompilation trace into the given file");
+
+PrecompilerTracer* PrecompilerTracer::StartTracingIfRequested(
+    Precompiler* precompiler) {
+  if (FLAG_trace_precompiler_to != nullptr &&
+      Dart::file_write_callback() != nullptr &&
+      Dart::file_open_callback() != nullptr &&
+      Dart::file_close_callback() != nullptr) {
+    return new PrecompilerTracer(
+        precompiler, Dart::file_open_callback()(FLAG_trace_precompiler_to,
+                                                /*write=*/true));
+  }
+  return nullptr;
+}
+
+PrecompilerTracer::PrecompilerTracer(Precompiler* precompiler, void* stream)
+    : zone_(Thread::Current()->zone()),
+      precompiler_(precompiler),
+      stream_(stream),
+      strings_(HashTables::New<StringTable>(1024)),
+      entities_(HashTables::New<EntityTable>(1024)),
+      object_(Object::Handle()),
+      cls_(Class::Handle()) {
+  Write("{\"trace\":[\"R\",");
+}
+
+void PrecompilerTracer::Finalize() {
+  Write("\"E\"],");
+  WriteEntityTable();
+  Write(",");
+  WriteStringTable();
+  Write("}\n");
+  Dart::file_close_callback()(stream_);
+
+  strings_.Release();
+  entities_.Release();
+}
+
+void PrecompilerTracer::WriteEntityTable() {
+  Write("\"entities\":[");
+  const auto& entities_by_id =
+      Array::Handle(zone_, Array::New(entities_.NumOccupied()));
+
+  EntityTable::Iterator it(&entities_);
+  while (it.MoveNext()) {
+    object_ = entities_.GetPayload(it.Current(), 0);
+    const intptr_t index = Smi::Cast(object_).Value();
+    object_ = entities_.GetKey(it.Current());
+    entities_by_id.SetAt(index, object_);
+  }
+
+  auto& obj = Object::Handle(zone_);
+  auto& lib = Library::Handle(zone_);
+  auto& str = String::Handle(zone_);
+  for (intptr_t i = 0; i < entities_by_id.Length(); i++) {
+    if (i > 0) {
+      Write(",");
+    }
+    obj = entities_by_id.At(i);
+    if (obj.IsFunction()) {
+      const auto& fun = Function::Cast(obj);
+      cls_ = fun.Owner();
+      const intptr_t selector_id =
+          FLAG_use_bare_instructions && FLAG_use_table_dispatch
+              ? precompiler_->selector_map()->SelectorId(fun)
+              : -1;
+      Write("\"%c\",%" Pd ",%" Pd ",%" Pd "",
+            fun.IsDynamicFunction() ? 'F' : 'S', InternEntity(cls_),
+            InternString(NameForTrace(fun)), selector_id);
+    } else if (obj.IsField()) {
+      const auto& field = Field::Cast(obj);
+      cls_ = field.Owner();
+      str = field.name();
+      Write("\"V\",%" Pd ",%" Pd ",0", InternEntity(cls_), InternString(str));
+    } else if (obj.IsClass()) {
+      const auto& cls = Class::Cast(obj);
+      lib = cls.library();
+      str = lib.url();
+      const auto url_id = InternString(str);
+      str = cls.ScrubbedName();
+      const auto name_id = InternString(str);
+      Write("\"C\",%" Pd ",%" Pd ",0", url_id, name_id);
+    } else {
+      UNREACHABLE();
+    }
+  }
+  Write("]");
+}
+
+void PrecompilerTracer::WriteStringTable() {
+  Write("\"strings\":[");
+  GrowableArray<const char*> strings_by_id(strings_.NumOccupied());
+  strings_by_id.EnsureLength(strings_.NumOccupied(), nullptr);
+  StringTable::Iterator it(&strings_);
+  while (it.MoveNext()) {
+    object_ = strings_.GetPayload(it.Current(), 0);
+    const auto index = Smi::Cast(object_).Value();
+    object_ = strings_.GetKey(it.Current());
+    strings_by_id[index] = String::Cast(object_).ToCString();
+  }
+  auto comma = false;
+  for (auto str : strings_by_id) {
+    Write("%s\"%s\"", comma ? "," : "", str);
+    comma = true;
+  }
+  Write("]");
+}
+
+intptr_t PrecompilerTracer::InternString(const CString& cstr) {
+  object_ = Smi::New(strings_.NumOccupied());
+  object_ = strings_.InsertNewOrGetValue(cstr, object_);
+  return Smi::Cast(object_).Value();
+}
+
+intptr_t PrecompilerTracer::InternString(const String& str) {
+  object_ = Smi::New(strings_.NumOccupied());
+  object_ = strings_.InsertOrGetValue(str, object_);
+  return Smi::Cast(object_).Value();
+}
+
+intptr_t PrecompilerTracer::InternEntity(const Object& obj) {
+  ASSERT(obj.IsFunction() || obj.IsClass() || obj.IsField());
+  const auto num_occupied = entities_.NumOccupied();
+  object_ = Smi::New(num_occupied);
+  object_ = entities_.InsertOrGetValue(obj, object_);
+  const auto id = Smi::Cast(object_).Value();
+  if (id == num_occupied) {
+    cls_ = Class::null();
+    if (obj.IsFunction()) {
+      cls_ = Function::Cast(obj).Owner();
+    } else if (obj.IsField()) {
+      cls_ = Field::Cast(obj).Owner();
+    }
+    if (cls_.raw() != Class::null()) {
+      InternEntity(cls_);
+    }
+  }
+  return id;
+}
+
+PrecompilerTracer::CString PrecompilerTracer::NameForTrace(const Function& f) {
+  ZoneTextBuffer buffer(zone_);
+  f.PrintName(NameFormattingParams::DisambiguatedWithoutClassName(
+                  Object::NameVisibility::kInternalName),
+              &buffer);
+  return {buffer.buffer(), buffer.length(),
+          String::Hash(buffer.buffer(), buffer.length())};
+}
+
+#endif  // defined(DART_PRECOMPILER)
+
+}  // namespace dart
diff --git a/runtime/vm/compiler/aot/precompiler_tracer.h b/runtime/vm/compiler/aot/precompiler_tracer.h
new file mode 100644
index 0000000..b654457
--- /dev/null
+++ b/runtime/vm/compiler/aot/precompiler_tracer.h
@@ -0,0 +1,145 @@
+// Copyright (c) 2020, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+#ifndef RUNTIME_VM_COMPILER_AOT_PRECOMPILER_TRACER_H_
+#define RUNTIME_VM_COMPILER_AOT_PRECOMPILER_TRACER_H_
+
+#if defined(DART_PRECOMPILED_RUNTIME)
+#error "AOT runtime should not use compiler sources (including header files)"
+#endif  // defined(DART_PRECOMPILED_RUNTIME)
+
+#include "vm/allocation.h"
+#include "vm/hash_table.h"
+#include "vm/symbols.h"
+
+namespace dart {
+
+// Forward declarations.
+class Precompiler;
+
+#if defined(DART_PRECOMPILER)
+// Tracer which produces machine readable precompiler tracer, which captures
+// information about all compiled functions and dependencies between them.
+// See pkg/vm_snapshot_analysis/README.md for the definition of the
+// format.
+class PrecompilerTracer : public ZoneAllocated {
+ public:
+  static PrecompilerTracer* StartTracingIfRequested(Precompiler* precompiler);
+
+  void Finalize();
+
+  void WriteEntityRef(const Object& field) {
+    Write("%" Pd ",", InternEntity(field));
+  }
+
+  void WriteFieldRef(const Field& field) { WriteEntityRef(field); }
+
+  void WriteFunctionRef(const Function& function) { WriteEntityRef(function); }
+
+  void WriteSelectorRef(const String& selector) {
+    Write("\"S\",%" Pd ",", InternString(selector));
+  }
+
+  void WriteTableSelectorRef(intptr_t id) { Write("\"T\",%" Pd ",", id); }
+
+  void WriteClassInstantiationRef(const Class& cls) { WriteEntityRef(cls); }
+
+  void WriteCompileFunctionEvent(const Function& function) {
+    Write("\"C\",");
+    WriteEntityRef(function);
+  }
+
+ private:
+  struct CString {
+    const char* str;
+    const intptr_t length;
+    intptr_t hash;
+  };
+
+  struct StringTableTraits {
+    static bool ReportStats() { return false; }
+    static const char* Name() { return "StringTableTraits"; }
+
+    static bool IsMatch(const Object& a, const Object& b) {
+      return String::Cast(a).Equals(String::Cast(b));
+    }
+
+    static bool IsMatch(const CString& cstr, const Object& other) {
+      const String& other_str = String::Cast(other);
+      if (other_str.Hash() != cstr.hash) {
+        return false;
+      }
+
+      if (other_str.Length() != cstr.length) {
+        return false;
+      }
+
+      return other_str.Equals(cstr.str);
+    }
+
+    static uword Hash(const CString& cstr) { return cstr.hash; }
+
+    static uword Hash(const Object& obj) { return String::Cast(obj).Hash(); }
+
+    static ObjectPtr NewKey(const CString& cstr) {
+      return Symbols::New(Thread::Current(), cstr.str);
+    }
+  };
+
+  struct EntityTableTraits {
+    static bool ReportStats() { return false; }
+    static const char* Name() { return "EntityTableTraits"; }
+
+    static bool IsMatch(const Object& a, const Object& b) {
+      return a.raw() == b.raw();
+    }
+
+    static uword Hash(const Object& obj) {
+      if (obj.IsFunction()) {
+        return Function::Cast(obj).Hash();
+      } else if (obj.IsClass()) {
+        return String::HashRawSymbol(Class::Cast(obj).Name());
+      } else if (obj.IsField()) {
+        return String::HashRawSymbol(Field::Cast(obj).name());
+      }
+      return obj.GetClassId();
+    }
+  };
+
+  using StringTable = UnorderedHashMap<StringTableTraits>;
+  using EntityTable = UnorderedHashMap<EntityTableTraits>;
+
+  PrecompilerTracer(Precompiler* precompiler, void* stream);
+
+  intptr_t InternString(const CString& cstr);
+  intptr_t InternString(const String& str);
+  intptr_t InternEntity(const Object& obj);
+
+  void Write(const char* format, ...) PRINTF_ATTRIBUTE(2, 3) {
+    va_list va;
+    va_start(va, format);
+    const char* line = OS::VSCreate(zone_, format, va);
+    Dart::file_write_callback()(line, strlen(line), stream_);
+    va_end(va);
+  }
+
+  CString NameForTrace(const Function& f);
+
+  void WriteEntityTable();
+  void WriteStringTable();
+
+  Zone* zone_;
+  Precompiler* precompiler_;
+  void* stream_;
+  StringTable strings_;
+  EntityTable entities_;
+
+  Object& object_;
+  Class& cls_;
+};
+#endif  // defined(DART_PRECOMPILER)
+
+}  // namespace dart
+
+#endif  // RUNTIME_VM_COMPILER_AOT_PRECOMPILER_TRACER_H_
diff --git a/runtime/vm/compiler/assembler/assembler_arm.cc b/runtime/vm/compiler/assembler/assembler_arm.cc
index 5c71f94..1973790 100644
--- a/runtime/vm/compiler/assembler/assembler_arm.cc
+++ b/runtime/vm/compiler/assembler/assembler_arm.cc
@@ -364,13 +364,8 @@
                     Register ra,
                     Condition cond) {
   // rd <- ra - rn * rm.
-  if (TargetCPUFeatures::arm_version() == ARMv7) {
-    // Assembler registers rd, rn, rm, ra are encoded as rn, rm, rs, rd.
-    EmitMulOp(cond, B22 | B21, ra, rd, rn, rm);
-  } else {
-    mul(IP, rn, rm, cond);
-    sub(rd, ra, Operand(IP), cond);
-  }
+  // Assembler registers rd, rn, rm, ra are encoded as rn, rm, rs, rd.
+  EmitMulOp(cond, B22 | B21, ra, rd, rn, rm);
 }
 
 void Assembler::smull(Register rd_lo,
@@ -978,9 +973,6 @@
 }
 
 bool Assembler::vmovs(SRegister sd, float s_imm, Condition cond) {
-  if (TargetCPUFeatures::arm_version() != ARMv7) {
-    return false;
-  }
   uint32_t imm32 = bit_cast<uint32_t, float>(s_imm);
   if (((imm32 & ((1 << 19) - 1)) == 0) &&
       ((((imm32 >> 25) & ((1 << 6) - 1)) == (1 << 5)) ||
@@ -995,9 +987,6 @@
 }
 
 bool Assembler::vmovd(DRegister dd, double d_imm, Condition cond) {
-  if (TargetCPUFeatures::arm_version() != ARMv7) {
-    return false;
-  }
   uint64_t imm64 = bit_cast<uint64_t, double>(d_imm);
   if (((imm64 & ((1LL << 48) - 1)) == 0) &&
       ((((imm64 >> 54) & ((1 << 9) - 1)) == (1 << 8)) ||
@@ -2074,69 +2063,15 @@
   return offset;
 }
 
-static int32_t DecodeARMv6LoadImmediate(int32_t mov,
-                                        int32_t or1,
-                                        int32_t or2,
-                                        int32_t or3) {
-  int32_t offset = 0;
-  offset |= (mov & 0xff) << 24;
-  offset |= (or1 & 0xff) << 16;
-  offset |= (or2 & 0xff) << 8;
-  offset |= (or3 & 0xff);
-  return offset;
-}
-
 class PatchFarBranch : public AssemblerFixup {
  public:
   PatchFarBranch() {}
 
   void Process(const MemoryRegion& region, intptr_t position) {
-    const ARMVersion version = TargetCPUFeatures::arm_version();
-    if (version == ARMv6) {
-      ProcessARMv6(region, position);
-    } else {
-      ASSERT(version == ARMv7);
-      ProcessARMv7(region, position);
-    }
+    ProcessARMv7(region, position);
   }
 
  private:
-  void ProcessARMv6(const MemoryRegion& region, intptr_t position) {
-    const int32_t mov = region.Load<int32_t>(position);
-    const int32_t or1 = region.Load<int32_t>(position + 1 * Instr::kInstrSize);
-    const int32_t or2 = region.Load<int32_t>(position + 2 * Instr::kInstrSize);
-    const int32_t or3 = region.Load<int32_t>(position + 3 * Instr::kInstrSize);
-    const int32_t bx = region.Load<int32_t>(position + 4 * Instr::kInstrSize);
-
-    if (((mov & 0xffffff00) == 0xe3a0c400) &&  // mov IP, (byte3 rot 4)
-        ((or1 & 0xffffff00) == 0xe38cc800) &&  // orr IP, IP, (byte2 rot 8)
-        ((or2 & 0xffffff00) == 0xe38ccc00) &&  // orr IP, IP, (byte1 rot 12)
-        ((or3 & 0xffffff00) == 0xe38cc000)) {  // orr IP, IP, byte0
-      const int32_t offset = DecodeARMv6LoadImmediate(mov, or1, or2, or3);
-      const int32_t dest = region.start() + offset;
-      const int32_t dest0 = (dest & 0x000000ff);
-      const int32_t dest1 = (dest & 0x0000ff00) >> 8;
-      const int32_t dest2 = (dest & 0x00ff0000) >> 16;
-      const int32_t dest3 = (dest & 0xff000000) >> 24;
-      const int32_t patched_mov = 0xe3a0c400 | dest3;
-      const int32_t patched_or1 = 0xe38cc800 | dest2;
-      const int32_t patched_or2 = 0xe38ccc00 | dest1;
-      const int32_t patched_or3 = 0xe38cc000 | dest0;
-
-      region.Store<int32_t>(position + 0 * Instr::kInstrSize, patched_mov);
-      region.Store<int32_t>(position + 1 * Instr::kInstrSize, patched_or1);
-      region.Store<int32_t>(position + 2 * Instr::kInstrSize, patched_or2);
-      region.Store<int32_t>(position + 3 * Instr::kInstrSize, patched_or3);
-      return;
-    }
-
-    // If the offset loading instructions aren't there, we must have replaced
-    // the far branch with a near one, and so these instructions
-    // should be NOPs.
-    ASSERT((or1 == Instr::kNopInstruction) && (or2 == Instr::kNopInstruction) &&
-           (or3 == Instr::kNopInstruction) && (bx == Instr::kNopInstruction));
-  }
-
   void ProcessARMv7(const MemoryRegion& region, intptr_t position) {
     const int32_t movw = region.Load<int32_t>(position);
     const int32_t movt = region.Load<int32_t>(position + Instr::kInstrSize);
@@ -2198,85 +2133,6 @@
   }
 }
 
-void Assembler::BindARMv6(Label* label) {
-  ASSERT(!label->IsBound());
-  intptr_t bound_pc = buffer_.Size();
-  while (label->IsLinked()) {
-    const int32_t position = label->Position();
-    int32_t dest = bound_pc - position;
-    if (use_far_branches() && !CanEncodeBranchDistance(dest)) {
-      // Far branches are enabled and we can't encode the branch offset.
-
-      // Grab instructions that load the offset.
-      const int32_t mov = buffer_.Load<int32_t>(position);
-      const int32_t or1 =
-          buffer_.Load<int32_t>(position + 1 * Instr::kInstrSize);
-      const int32_t or2 =
-          buffer_.Load<int32_t>(position + 2 * Instr::kInstrSize);
-      const int32_t or3 =
-          buffer_.Load<int32_t>(position + 3 * Instr::kInstrSize);
-
-      // Change from relative to the branch to relative to the assembler
-      // buffer.
-      dest = buffer_.Size();
-      const int32_t dest0 = (dest & 0x000000ff);
-      const int32_t dest1 = (dest & 0x0000ff00) >> 8;
-      const int32_t dest2 = (dest & 0x00ff0000) >> 16;
-      const int32_t dest3 = (dest & 0xff000000) >> 24;
-      const int32_t patched_mov = 0xe3a0c400 | dest3;
-      const int32_t patched_or1 = 0xe38cc800 | dest2;
-      const int32_t patched_or2 = 0xe38ccc00 | dest1;
-      const int32_t patched_or3 = 0xe38cc000 | dest0;
-
-      // Rewrite the instructions.
-      buffer_.Store<int32_t>(position + 0 * Instr::kInstrSize, patched_mov);
-      buffer_.Store<int32_t>(position + 1 * Instr::kInstrSize, patched_or1);
-      buffer_.Store<int32_t>(position + 2 * Instr::kInstrSize, patched_or2);
-      buffer_.Store<int32_t>(position + 3 * Instr::kInstrSize, patched_or3);
-      label->position_ = DecodeARMv6LoadImmediate(mov, or1, or2, or3);
-    } else if (use_far_branches() && CanEncodeBranchDistance(dest)) {
-      // Grab instructions that load the offset, and the branch.
-      const int32_t mov = buffer_.Load<int32_t>(position);
-      const int32_t or1 =
-          buffer_.Load<int32_t>(position + 1 * Instr::kInstrSize);
-      const int32_t or2 =
-          buffer_.Load<int32_t>(position + 2 * Instr::kInstrSize);
-      const int32_t or3 =
-          buffer_.Load<int32_t>(position + 3 * Instr::kInstrSize);
-      const int32_t branch =
-          buffer_.Load<int32_t>(position + 4 * Instr::kInstrSize);
-
-      // Grab the branch condition, and encode the link bit.
-      const int32_t cond = branch & 0xf0000000;
-      const int32_t link = (branch & 0x20) << 19;
-
-      // Encode the branch and the offset.
-      const int32_t new_branch = cond | link | 0x0a000000;
-      const int32_t encoded = EncodeBranchOffset(dest, new_branch);
-
-      // Write the encoded branch instruction followed by two nops.
-      buffer_.Store<int32_t>(position, encoded);
-      buffer_.Store<int32_t>(position + 1 * Instr::kInstrSize,
-                             Instr::kNopInstruction);
-      buffer_.Store<int32_t>(position + 2 * Instr::kInstrSize,
-                             Instr::kNopInstruction);
-      buffer_.Store<int32_t>(position + 3 * Instr::kInstrSize,
-                             Instr::kNopInstruction);
-      buffer_.Store<int32_t>(position + 4 * Instr::kInstrSize,
-                             Instr::kNopInstruction);
-
-      label->position_ = DecodeARMv6LoadImmediate(mov, or1, or2, or3);
-    } else {
-      BailoutIfInvalidBranchOffset(dest);
-      int32_t next = buffer_.Load<int32_t>(position);
-      int32_t encoded = Assembler::EncodeBranchOffset(dest, next);
-      buffer_.Store<int32_t>(position, encoded);
-      label->position_ = Assembler::DecodeBranchOffset(next);
-    }
-  }
-  label->BindTo(bound_pc);
-}
-
 void Assembler::BindARMv7(Label* label) {
   ASSERT(!label->IsBound());
   intptr_t bound_pc = buffer_.Size();
@@ -2345,13 +2201,7 @@
 }
 
 void Assembler::Bind(Label* label) {
-  const ARMVersion version = TargetCPUFeatures::arm_version();
-  if (version == ARMv6) {
-    BindARMv6(label);
-  } else {
-    ASSERT(version == ARMv7);
-    BindARMv7(label);
-  }
+  BindARMv7(label);
 }
 
 OperandSize Address::OperandSizeFor(intptr_t cid) {
@@ -2794,45 +2644,19 @@
 void Assembler::LoadPatchableImmediate(Register rd,
                                        int32_t value,
                                        Condition cond) {
-  const ARMVersion version = TargetCPUFeatures::arm_version();
-  if (version == ARMv6) {
-    // This sequence is patched in a few places, and should remain fixed.
-    const uint32_t byte0 = (value & 0x000000ff);
-    const uint32_t byte1 = (value & 0x0000ff00) >> 8;
-    const uint32_t byte2 = (value & 0x00ff0000) >> 16;
-    const uint32_t byte3 = (value & 0xff000000) >> 24;
-    mov(rd, Operand(4, byte3), cond);
-    orr(rd, rd, Operand(8, byte2), cond);
-    orr(rd, rd, Operand(12, byte1), cond);
-    orr(rd, rd, Operand(byte0), cond);
-  } else {
-    ASSERT(version == ARMv7);
-    const uint16_t value_low = Utils::Low16Bits(value);
-    const uint16_t value_high = Utils::High16Bits(value);
-    movw(rd, value_low, cond);
-    movt(rd, value_high, cond);
-  }
+  const uint16_t value_low = Utils::Low16Bits(value);
+  const uint16_t value_high = Utils::High16Bits(value);
+  movw(rd, value_low, cond);
+  movt(rd, value_high, cond);
 }
 
 void Assembler::LoadDecodableImmediate(Register rd,
                                        int32_t value,
                                        Condition cond) {
-  const ARMVersion version = TargetCPUFeatures::arm_version();
-  if (version == ARMv6) {
-    if (constant_pool_allowed()) {
-      const int32_t offset =
-          target::ObjectPool::element_offset(FindImmediate(value));
-      LoadWordFromPoolOffset(rd, offset - kHeapObjectTag, PP, cond);
-    } else {
-      LoadPatchableImmediate(rd, value, cond);
-    }
-  } else {
-    ASSERT(version == ARMv7);
-    movw(rd, Utils::Low16Bits(value), cond);
-    const uint16_t value_high = Utils::High16Bits(value);
-    if (value_high != 0) {
-      movt(rd, value_high, cond);
-    }
+  movw(rd, Utils::Low16Bits(value), cond);
+  const uint16_t value_high = Utils::High16Bits(value);
+  if (value_high != 0) {
+    movt(rd, value_high, cond);
   }
 }
 
diff --git a/runtime/vm/compiler/assembler/assembler_arm.h b/runtime/vm/compiler/assembler/assembler_arm.h
index 5d36e51..9707e07 100644
--- a/runtime/vm/compiler/assembler/assembler_arm.h
+++ b/runtime/vm/compiler/assembler/assembler_arm.h
@@ -1283,7 +1283,6 @@
   void movw(Register rd, uint16_t imm16, Condition cond = AL);
   void movt(Register rd, uint16_t imm16, Condition cond = AL);
 
-  void BindARMv6(Label* label);
   void BindARMv7(Label* label);
 
   void BranchLink(const ExternalLabel* label);
diff --git a/runtime/vm/compiler/assembler/assembler_arm_test.cc b/runtime/vm/compiler/assembler/assembler_arm_test.cc
index 7f5f85d..558895e 100644
--- a/runtime/vm/compiler/assembler/assembler_arm_test.cc
+++ b/runtime/vm/compiler/assembler/assembler_arm_test.cc
@@ -101,18 +101,8 @@
 }
 
 ASSEMBLER_TEST_GENERATE(MovImm16, assembler) {
-#if defined(USING_SIMULATOR)
-  // ARMv7 is the default.
-  HostCPUFeatures::set_arm_version(ARMv6);
-  __ LoadPatchableImmediate(R0, 0x12345678 << 1);
-  HostCPUFeatures::set_arm_version(ARMv7);
-  __ LoadPatchableImmediate(R1, 0x12345678);
-  __ sub(R0, R0, Operand(R1));
-  __ bx(LR);
-#else
   __ LoadPatchableImmediate(R0, 0x12345678);
   __ bx(LR);
-#endif
 }
 
 ASSEMBLER_TEST_RUN(MovImm16, test) {
diff --git a/runtime/vm/compiler/assembler/disassembler_arm.cc b/runtime/vm/compiler/assembler/disassembler_arm.cc
index db51d1e..2195070 100644
--- a/runtime/vm/compiler/assembler/disassembler_arm.cc
+++ b/runtime/vm/compiler/assembler/disassembler_arm.cc
@@ -693,10 +693,6 @@
             break;
           }
           case 3: {
-            if (TargetCPUFeatures::arm_version() != ARMv7) {
-              Unknown(instr);
-              return;
-            }
             // Assembler registers rd, rn, rm, ra are encoded as rn, rm, rs, rd.
             Format(instr, "mls'cond's 'rn, 'rm, 'rs, 'rd");
             break;
@@ -742,11 +738,7 @@
       // 16-bit immediate loads, msr (immediate), and hints
       switch (instr->Bits(20, 5)) {
         case 16: {
-          if (TargetCPUFeatures::arm_version() == ARMv7) {
-            Format(instr, "movw'cond 'rd, #'imm4_12");
-          } else {
-            Unknown(instr);
-          }
+          Format(instr, "movw'cond 'rd, #'imm4_12");
           break;
         }
         case 18: {
@@ -758,11 +750,7 @@
           break;
         }
         case 20: {
-          if (TargetCPUFeatures::arm_version() == ARMv7) {
-            Format(instr, "movt'cond 'rd, #'imm4_12");
-          } else {
-            Unknown(instr);
-          }
+          Format(instr, "movt'cond 'rd, #'imm4_12");
           break;
         }
         default: {
diff --git a/runtime/vm/compiler/backend/flow_graph_compiler.cc b/runtime/vm/compiler/backend/flow_graph_compiler.cc
index f67f924..3b4ac917 100644
--- a/runtime/vm/compiler/backend/flow_graph_compiler.cc
+++ b/runtime/vm/compiler/backend/flow_graph_compiler.cc
@@ -2576,6 +2576,64 @@
   }
 }
 
+const char* NullErrorSlowPath::name() {
+  switch (exception_type()) {
+    case CheckNullInstr::kNoSuchMethod:
+      return "check null (nsm)";
+    case CheckNullInstr::kArgumentError:
+      return "check null (arg)";
+    case CheckNullInstr::kCastError:
+      return "check null (cast)";
+  }
+  UNREACHABLE();
+}
+
+const RuntimeEntry& NullErrorSlowPath::GetRuntimeEntry(
+    CheckNullInstr::ExceptionType exception_type) {
+  switch (exception_type) {
+    case CheckNullInstr::kNoSuchMethod:
+      return kNullErrorRuntimeEntry;
+    case CheckNullInstr::kArgumentError:
+      return kArgumentNullErrorRuntimeEntry;
+    case CheckNullInstr::kCastError:
+      return kNullCastErrorRuntimeEntry;
+  }
+  UNREACHABLE();
+}
+
+CodePtr NullErrorSlowPath::GetStub(FlowGraphCompiler* compiler,
+                                   CheckNullInstr::ExceptionType exception_type,
+                                   bool save_fpu_registers) {
+  auto object_store = compiler->isolate()->object_store();
+  switch (exception_type) {
+    case CheckNullInstr::kNoSuchMethod:
+      return save_fpu_registers
+                 ? object_store->null_error_stub_with_fpu_regs_stub()
+                 : object_store->null_error_stub_without_fpu_regs_stub();
+    case CheckNullInstr::kArgumentError:
+      return save_fpu_registers
+                 ? object_store->null_arg_error_stub_with_fpu_regs_stub()
+                 : object_store->null_arg_error_stub_without_fpu_regs_stub();
+    case CheckNullInstr::kCastError:
+      return save_fpu_registers
+                 ? object_store->null_cast_error_stub_with_fpu_regs_stub()
+                 : object_store->null_cast_error_stub_without_fpu_regs_stub();
+  }
+  UNREACHABLE();
+}
+
+void NullErrorSlowPath::EmitSharedStubCall(FlowGraphCompiler* compiler,
+                                           bool save_fpu_registers) {
+#if defined(TARGET_ARCH_IA32)
+  UNREACHABLE();
+#else
+  const auto& stub =
+      Code::ZoneHandle(compiler->zone(),
+                       GetStub(compiler, exception_type(), save_fpu_registers));
+  compiler->EmitCallToStub(stub);
+#endif
+}
+
 void FlowGraphCompiler::EmitNativeMove(
     const compiler::ffi::NativeLocation& destination,
     const compiler::ffi::NativeLocation& source,
diff --git a/runtime/vm/compiler/backend/flow_graph_compiler.h b/runtime/vm/compiler/backend/flow_graph_compiler.h
index ba064b7..2706648 100644
--- a/runtime/vm/compiler/backend/flow_graph_compiler.h
+++ b/runtime/vm/compiler/backend/flow_graph_compiler.h
@@ -316,11 +316,15 @@
 
   NullErrorSlowPath(CheckNullInstr* instruction, intptr_t try_index)
       : ThrowErrorSlowPathCode(instruction,
-                               kNullErrorRuntimeEntry,
+                               GetRuntimeEntry(instruction->exception_type()),
                                kNumberOfArguments,
                                try_index) {}
 
-  const char* name() override { return "check null (nsm)"; }
+  CheckNullInstr::ExceptionType exception_type() const {
+    return instruction()->AsCheckNull()->exception_type();
+  }
+
+  const char* name() override;
 
   void EmitSharedStubCall(FlowGraphCompiler* compiler,
                           bool save_fpu_registers) override;
@@ -329,27 +333,14 @@
     CheckNullInstr::AddMetadataForRuntimeCall(instruction()->AsCheckNull(),
                                               compiler);
   }
-};
 
-class NullArgErrorSlowPath : public ThrowErrorSlowPathCode {
- public:
-  static const intptr_t kNumberOfArguments = 0;
+  static CodePtr GetStub(FlowGraphCompiler* compiler,
+                         CheckNullInstr::ExceptionType exception_type,
+                         bool save_fpu_registers);
 
-  NullArgErrorSlowPath(CheckNullInstr* instruction, intptr_t try_index)
-      : ThrowErrorSlowPathCode(instruction,
-                               kArgumentNullErrorRuntimeEntry,
-                               kNumberOfArguments,
-                               try_index) {}
-
-  const char* name() override { return "check null (arg)"; }
-
-  void EmitSharedStubCall(FlowGraphCompiler* compiler,
-                          bool save_fpu_registers) override;
-
-  void AddMetadataForRuntimeCall(FlowGraphCompiler* compiler) override {
-    CheckNullInstr::AddMetadataForRuntimeCall(instruction()->AsCheckNull(),
-                                              compiler);
-  }
+ private:
+  static const RuntimeEntry& GetRuntimeEntry(
+      CheckNullInstr::ExceptionType exception_type);
 };
 
 class RangeErrorSlowPath : public ThrowErrorSlowPathCode {
@@ -960,7 +951,6 @@
   friend class BoxInt64Instr;            // For AddPcRelativeCallStubTarget().
   friend class CheckNullInstr;           // For AddPcRelativeCallStubTarget().
   friend class NullErrorSlowPath;        // For AddPcRelativeCallStubTarget().
-  friend class NullArgErrorSlowPath;     // For AddPcRelativeCallStubTarget().
   friend class CheckStackOverflowInstr;  // For AddPcRelativeCallStubTarget().
   friend class StoreIndexedInstr;        // For AddPcRelativeCallStubTarget().
   friend class StoreInstanceFieldInstr;  // For AddPcRelativeCallStubTarget().
diff --git a/runtime/vm/compiler/backend/il.cc b/runtime/vm/compiler/backend/il.cc
index a7565cd..8e46a8c 100644
--- a/runtime/vm/compiler/backend/il.cc
+++ b/runtime/vm/compiler/backend/il.cc
@@ -5195,36 +5195,6 @@
   compiler->AddNullCheck(check_null->token_pos(), check_null->function_name());
 }
 
-void NullErrorSlowPath::EmitSharedStubCall(FlowGraphCompiler* compiler,
-                                           bool save_fpu_registers) {
-#if defined(TARGET_ARCH_IA32)
-  UNREACHABLE();
-#else
-  auto object_store = compiler->isolate()->object_store();
-  const auto& stub = Code::ZoneHandle(
-      compiler->zone(),
-      save_fpu_registers
-          ? object_store->null_error_stub_with_fpu_regs_stub()
-          : object_store->null_error_stub_without_fpu_regs_stub());
-  compiler->EmitCallToStub(stub);
-#endif
-}
-
-void NullArgErrorSlowPath::EmitSharedStubCall(FlowGraphCompiler* compiler,
-                                              bool save_fpu_registers) {
-#if defined(TARGET_ARCH_IA32)
-  UNREACHABLE();
-#else
-  auto object_store = compiler->isolate()->object_store();
-  const auto& stub = Code::ZoneHandle(
-      compiler->zone(),
-      save_fpu_registers
-          ? object_store->null_arg_error_stub_with_fpu_regs_stub()
-          : object_store->null_arg_error_stub_without_fpu_regs_stub());
-  compiler->EmitCallToStub(stub);
-#endif
-}
-
 void RangeErrorSlowPath::EmitSharedStubCall(FlowGraphCompiler* compiler,
                                             bool save_fpu_registers) {
 #if defined(TARGET_ARCH_IA32)
diff --git a/runtime/vm/compiler/backend/il.h b/runtime/vm/compiler/backend/il.h
index 1d28f31..f26a6ee 100644
--- a/runtime/vm/compiler/backend/il.h
+++ b/runtime/vm/compiler/backend/il.h
@@ -8538,6 +8538,7 @@
   enum ExceptionType {
     kNoSuchMethod,
     kArgumentError,
+    kCastError,
   };
 
   CheckNullInstr(Value* value,
@@ -8556,7 +8557,6 @@
   Value* value() const { return inputs_[0]; }
   virtual TokenPosition token_pos() const { return token_pos_; }
   const String& function_name() const { return function_name_; }
-  bool IsArgumentCheck() const { return exception_type_ == kArgumentError; }
   ExceptionType exception_type() const { return exception_type_; }
 
   virtual bool UseSharedSlowPathStub(bool is_optimizing) const {
diff --git a/runtime/vm/compiler/backend/il_arm.cc b/runtime/vm/compiler/backend/il_arm.cc
index de5924f..6c3f917 100644
--- a/runtime/vm/compiler/backend/il_arm.cc
+++ b/runtime/vm/compiler/backend/il_arm.cc
@@ -2677,7 +2677,7 @@
                                                          bool opt) const {
   const bool might_box = (representation() == kTagged) && !can_pack_into_smi();
   const intptr_t kNumInputs = 2;
-  const intptr_t kNumTemps = might_box ? 1 : 0;
+  const intptr_t kNumTemps = might_box ? 2 : 0;
   LocationSummary* summary = new (zone) LocationSummary(
       zone, kNumInputs, kNumTemps,
       might_box ? LocationSummary::kCallOnSlowPath : LocationSummary::kNoCall);
@@ -2686,6 +2686,7 @@
 
   if (might_box) {
     summary->set_temp(0, Location::RequiresRegister());
+    summary->set_temp(1, Location::RequiresRegister());
   }
 
   if (representation() == kUnboxedInt64) {
@@ -6559,17 +6560,10 @@
   // in order to be able to allocate it on register.
   __ CompareObject(value_reg, Object::null_object());
 
-  auto object_store = compiler->isolate()->object_store();
   const bool live_fpu_regs = locs()->live_registers()->FpuRegisterCount() > 0;
-  const Code& stub = Code::ZoneHandle(
+  Code& stub = Code::ZoneHandle(
       compiler->zone(),
-      IsArgumentCheck()
-          ? (live_fpu_regs
-                 ? object_store->null_arg_error_stub_with_fpu_regs_stub()
-                 : object_store->null_arg_error_stub_without_fpu_regs_stub())
-          : (live_fpu_regs
-                 ? object_store->null_error_stub_with_fpu_regs_stub()
-                 : object_store->null_error_stub_without_fpu_regs_stub()));
+      NullErrorSlowPath::GetStub(compiler, exception_type(), live_fpu_regs));
   const bool using_shared_stub = locs()->call_on_shared_slow_path();
 
   if (FLAG_precompiled_mode && FLAG_use_bare_instructions &&
@@ -6588,12 +6582,8 @@
     return;
   }
 
-  ThrowErrorSlowPathCode* slow_path = nullptr;
-  if (IsArgumentCheck()) {
-    slow_path = new NullArgErrorSlowPath(this, compiler->CurrentTryIndex());
-  } else {
-    slow_path = new NullErrorSlowPath(this, compiler->CurrentTryIndex());
-  }
+  ThrowErrorSlowPathCode* slow_path =
+      new NullErrorSlowPath(this, compiler->CurrentTryIndex());
   compiler->AddSlowPathCode(slow_path);
 
   __ BranchIf(EQUAL, slow_path->entry_label());
diff --git a/runtime/vm/compiler/backend/il_arm64.cc b/runtime/vm/compiler/backend/il_arm64.cc
index 158ec26..273bba0 100644
--- a/runtime/vm/compiler/backend/il_arm64.cc
+++ b/runtime/vm/compiler/backend/il_arm64.cc
@@ -5552,12 +5552,8 @@
 }
 
 void CheckNullInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
-  ThrowErrorSlowPathCode* slow_path = nullptr;
-  if (IsArgumentCheck()) {
-    slow_path = new NullArgErrorSlowPath(this, compiler->CurrentTryIndex());
-  } else {
-    slow_path = new NullErrorSlowPath(this, compiler->CurrentTryIndex());
-  }
+  ThrowErrorSlowPathCode* slow_path =
+      new NullErrorSlowPath(this, compiler->CurrentTryIndex());
   compiler->AddSlowPathCode(slow_path);
 
   Register value_reg = locs()->in(0).reg();
diff --git a/runtime/vm/compiler/backend/il_ia32.cc b/runtime/vm/compiler/backend/il_ia32.cc
index 239824f..219ec45 100644
--- a/runtime/vm/compiler/backend/il_ia32.cc
+++ b/runtime/vm/compiler/backend/il_ia32.cc
@@ -5506,12 +5506,8 @@
 }
 
 void CheckNullInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
-  ThrowErrorSlowPathCode* slow_path = nullptr;
-  if (IsArgumentCheck()) {
-    slow_path = new NullArgErrorSlowPath(this, compiler->CurrentTryIndex());
-  } else {
-    slow_path = new NullErrorSlowPath(this, compiler->CurrentTryIndex());
-  }
+  ThrowErrorSlowPathCode* slow_path =
+      new NullErrorSlowPath(this, compiler->CurrentTryIndex());
   compiler->AddSlowPathCode(slow_path);
 
   Register value_reg = locs()->in(0).reg();
diff --git a/runtime/vm/compiler/backend/il_printer.cc b/runtime/vm/compiler/backend/il_printer.cc
index cb9d2c7..a1289a9 100644
--- a/runtime/vm/compiler/backend/il_printer.cc
+++ b/runtime/vm/compiler/backend/il_printer.cc
@@ -307,7 +307,17 @@
 
 void CheckNullInstr::PrintOperandsTo(BufferFormatter* f) const {
   Definition::PrintOperandsTo(f);
-  f->Print(IsArgumentCheck() ? ", ArgumentError" : ", NoSuchMethodError");
+  switch (exception_type()) {
+    case kNoSuchMethod:
+      f->Print(", NoSuchMethodError");
+      break;
+    case kArgumentError:
+      f->Print(", ArgumentError");
+      break;
+    case kCastError:
+      f->Print(", CastError");
+      break;
+  }
 }
 
 void Definition::PrintOperandsTo(BufferFormatter* f) const {
diff --git a/runtime/vm/compiler/backend/il_x64.cc b/runtime/vm/compiler/backend/il_x64.cc
index 88915ae..d01f34f 100644
--- a/runtime/vm/compiler/backend/il_x64.cc
+++ b/runtime/vm/compiler/backend/il_x64.cc
@@ -5771,12 +5771,8 @@
 }
 
 void CheckNullInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
-  ThrowErrorSlowPathCode* slow_path = nullptr;
-  if (IsArgumentCheck()) {
-    slow_path = new NullArgErrorSlowPath(this, compiler->CurrentTryIndex());
-  } else {
-    slow_path = new NullErrorSlowPath(this, compiler->CurrentTryIndex());
-  }
+  ThrowErrorSlowPathCode* slow_path =
+      new NullErrorSlowPath(this, compiler->CurrentTryIndex());
   compiler->AddSlowPathCode(slow_path);
 
   Register value_reg = locs()->in(0).reg();
diff --git a/runtime/vm/compiler/compiler_sources.gni b/runtime/vm/compiler/compiler_sources.gni
index 9445dfb..3c72125 100644
--- a/runtime/vm/compiler/compiler_sources.gni
+++ b/runtime/vm/compiler/compiler_sources.gni
@@ -11,6 +11,8 @@
   "aot/dispatch_table_generator.h",
   "aot/precompiler.cc",
   "aot/precompiler.h",
+  "aot/precompiler_tracer.cc",
+  "aot/precompiler_tracer.h",
   "asm_intrinsifier.cc",
   "asm_intrinsifier.h",
   "asm_intrinsifier_arm.cc",
diff --git a/runtime/vm/compiler/ffi/marshaller.cc b/runtime/vm/compiler/ffi/marshaller.cc
index 21eff2c..09dd56d 100644
--- a/runtime/vm/compiler/ffi/marshaller.cc
+++ b/runtime/vm/compiler/ffi/marshaller.cc
@@ -18,15 +18,7 @@
 namespace ffi {
 
 bool BaseMarshaller::ContainsHandles() const {
-  if (IsHandle(kResultIndex)) {
-    return true;
-  }
-  for (intptr_t i = 0; i < num_args(); i++) {
-    if (IsHandle(i)) {
-      return true;
-    }
-  }
-  return false;
+  return dart_signature_.FfiCSignatureContainsHandles();
 }
 
 Location CallMarshaller::LocInFfiCall(intptr_t arg_index) const {
diff --git a/runtime/vm/compiler/ffi/native_calling_convention.cc b/runtime/vm/compiler/ffi/native_calling_convention.cc
index d753abb..47f6adc 100644
--- a/runtime/vm/compiler/ffi/native_calling_convention.cc
+++ b/runtime/vm/compiler/ffi/native_calling_convention.cc
@@ -209,7 +209,6 @@
   // > Procedure Call Standard is used. In this variant, floating-point
   // > (and vector) arguments are passed in general purpose registers
   // > (GPRs) instead of in VFP registers)
-  // https://developer.apple.com/library/archive/documentation/Xcode/Conceptual/iPhoneOSABIReference/Articles/ARMv6FunctionCallingConventions.html#//apple_ref/doc/uid/TP40009021-SW1
   // https://developer.apple.com/library/archive/documentation/Xcode/Conceptual/iPhoneOSABIReference/Articles/ARMv7FunctionCallingConventions.html#//apple_ref/doc/uid/TP40009022-SW1
   void BlockAllFpuRegisters() {
     // Set all bits to 1.
diff --git a/runtime/vm/compiler/frontend/base_flow_graph_builder.cc b/runtime/vm/compiler/frontend/base_flow_graph_builder.cc
index 262d595..f4a5ec7 100644
--- a/runtime/vm/compiler/frontend/base_flow_graph_builder.cc
+++ b/runtime/vm/compiler/frontend/base_flow_graph_builder.cc
@@ -1011,8 +1011,10 @@
                                          bool clear_the_temp /* = true */) {
   Fragment instructions = LoadLocal(receiver);
 
-  CheckNullInstr* check_null =
-      new (Z) CheckNullInstr(Pop(), function_name, GetNextDeoptId(), position);
+  CheckNullInstr* check_null = new (Z)
+      CheckNullInstr(Pop(), function_name, GetNextDeoptId(), position,
+                     function_name.IsNull() ? CheckNullInstr::kCastError
+                                            : CheckNullInstr::kNoSuchMethod);
 
   // Does not use the redefinition, no `Push(check_null)`.
   instructions <<= check_null;
diff --git a/runtime/vm/compiler/frontend/bytecode_reader.cc b/runtime/vm/compiler/frontend/bytecode_reader.cc
index 5211208..ba1f36c 100644
--- a/runtime/vm/compiler/frontend/bytecode_reader.cc
+++ b/runtime/vm/compiler/frontend/bytecode_reader.cc
@@ -911,14 +911,12 @@
       case ConstantPoolTag::kDynamicCall: {
         name ^= ReadObject();
         ASSERT(name.IsSymbol());
-        // Do not mangle == or call:
+        // Do not mangle ==:
         //   * operator == takes an Object so it is either not checked or
         //     checked at the entry because the parameter is marked covariant,
-        //     neither of those cases require a dynamic invocation forwarder;
-        //   * we assume that all closures are entered in a checked way.
+        //     neither of those cases require a dynamic invocation forwarder
         if (!Field::IsGetterName(name) &&
-            (name.raw() != Symbols::EqualOperator().raw()) &&
-            (name.raw() != Symbols::Call().raw())) {
+            (name.raw() != Symbols::EqualOperator().raw())) {
           name = Function::CreateDynamicInvocationForwarderName(name);
         }
         // DynamicCall constant occupies 2 entries: selector and arguments
diff --git a/runtime/vm/compiler/frontend/kernel_binary_flowgraph.cc b/runtime/vm/compiler/frontend/kernel_binary_flowgraph.cc
index b68233d..a7cbc05 100644
--- a/runtime/vm/compiler/frontend/kernel_binary_flowgraph.cc
+++ b/runtime/vm/compiler/frontend/kernel_binary_flowgraph.cc
@@ -2989,14 +2989,13 @@
   }
 
   const String* mangled_name = &name;
-  // Do not mangle == or call:
+  // Do not mangle ==:
   //   * operator == takes an Object so its either not checked or checked
   //     at the entry because the parameter is marked covariant, neither of
-  //     those cases require a dynamic invocation forwarder;
-  //   * we assume that all closures are entered in a checked way.
+  //     those cases require a dynamic invocation forwarder.
   const Function* direct_call_target = &direct_call.target_;
-  if ((name.raw() != Symbols::EqualOperator().raw()) &&
-      (name.raw() != Symbols::Call().raw()) && H.IsRoot(itarget_name)) {
+  if (H.IsRoot(itarget_name) &&
+      (name.raw() != Symbols::EqualOperator().raw())) {
     mangled_name = &String::ZoneHandle(
         Z, Function::CreateDynamicInvocationForwarderName(name));
     if (!direct_call_target->IsNull()) {
diff --git a/runtime/vm/compiler/frontend/kernel_to_il.cc b/runtime/vm/compiler/frontend/kernel_to_il.cc
index 1676b91..4ecc873 100644
--- a/runtime/vm/compiler/frontend/kernel_to_il.cc
+++ b/runtime/vm/compiler/frontend/kernel_to_il.cc
@@ -1933,7 +1933,15 @@
   // Find the name of the field we should dispatch to.
   const Class& owner = Class::Handle(Z, function.Owner());
   ASSERT(!owner.IsNull());
-  const String& field_name = String::Handle(Z, function.name());
+  auto& field_name = String::Handle(Z, function.name());
+  // If the field name has a dyn: tag, then remove it. We don't add dynamic
+  // invocation forwarders for field getters used for invoking, we just use
+  // the tag in the name of the invoke field dispatcher to detect dynamic calls.
+  const bool is_dynamic_call =
+      Function::IsDynamicInvocationForwarderName(field_name);
+  if (is_dynamic_call) {
+    field_name = Function::DemangleDynamicInvocationForwarderName(field_name);
+  }
   const String& getter_name = String::ZoneHandle(
       Z, Symbols::New(thread_,
                       String::Handle(Z, Field::GetterSymbol(field_name))));
@@ -1990,6 +1998,13 @@
 
     // The closure itself is the first argument.
     body += LoadLocal(closure);
+
+    if (is_dynamic_call) {
+      // TODO(dartbug.com/40813): Move checks that are currently compiled
+      // in the closure body to here, using the dynamic versions of
+      // AssertSubtype to typecheck the type arguments using the runtime types
+      // available in the closure object.
+    }
   } else {
     // Invoke the getter to get the field value.
     body += LoadLocal(parsed_function_->ParameterVariable(0));
@@ -2003,6 +2018,12 @@
   intptr_t pos = 1;
   for (; pos < descriptor.Count(); pos++) {
     body += LoadLocal(parsed_function_->ParameterVariable(pos));
+    if (is_closure_call && is_dynamic_call) {
+      // TODO(dartbug.com/40813): Move checks that are currently compiled
+      // in the closure body to here, using the dynamic versions of
+      // AssertAssignable to typecheck the parameters using the runtime types
+      // available in the closure object.
+    }
   }
 
   if (is_closure_call) {
@@ -2953,6 +2974,8 @@
 
   const auto& marshaller = *new (Z) compiler::ffi::CallMarshaller(Z, function);
 
+  const bool signature_contains_handles = marshaller.ContainsHandles();
+
   BuildArgumentTypeChecks(TypeChecksToBuild::kCheckAllTypeParameterBounds,
                           &function_body, &function_body, &function_body);
 
@@ -2976,14 +2999,16 @@
     function_body += Drop();
   }
 
-  // Wrap in Try catch to transition from Native to Generated on a throw from
-  // the dart_api.
-  const intptr_t try_handler_index = AllocateTryIndex();
-  Fragment body = TryCatch(try_handler_index);
-  ++try_depth_;
-
+  Fragment body;
+  intptr_t try_handler_index = -1;
   LocalVariable* api_local_scope = nullptr;
-  if (marshaller.ContainsHandles()) {
+  if (signature_contains_handles) {
+    // Wrap in Try catch to transition from Native to Generated on a throw from
+    // the dart_api.
+    try_handler_index = AllocateTryIndex();
+    body += TryCatch(try_handler_index);
+    ++try_depth_;
+
     body += EnterHandleScope();
     api_local_scope = MakeTemporary();
   }
@@ -3020,29 +3045,34 @@
 
   body += FfiConvertArgumentToDart(marshaller, compiler::ffi::kResultIndex);
 
-  if (marshaller.ContainsHandles()) {
+  if (signature_contains_handles) {
     body += DropTempsPreserveTop(1);  // Drop api_local_scope.
     body += ExitHandleScope();
   }
 
   body += Return(TokenPosition::kNoSource);
 
-  --try_depth_;
+  if (signature_contains_handles) {
+    --try_depth_;
+  }
+
   function_body += body;
 
-  ++catch_depth_;
-  Fragment catch_body =
-      CatchBlockEntry(Array::empty_array(), try_handler_index,
-                      /*needs_stacktrace=*/true, /*is_synthesized=*/true);
-  if (marshaller.ContainsHandles()) {
+  if (signature_contains_handles) {
+    ++catch_depth_;
+    Fragment catch_body =
+        CatchBlockEntry(Array::empty_array(), try_handler_index,
+                        /*needs_stacktrace=*/true, /*is_synthesized=*/true);
+
     // TODO(41984): If we want to pass in the handle scope, move it out
     // of the try catch.
     catch_body += ExitHandleScope();
+
+    catch_body += LoadLocal(CurrentException());
+    catch_body += LoadLocal(CurrentStackTrace());
+    catch_body += RethrowException(TokenPosition::kNoSource, try_handler_index);
+    --catch_depth_;
   }
-  catch_body += LoadLocal(CurrentException());
-  catch_body += LoadLocal(CurrentStackTrace());
-  catch_body += RethrowException(TokenPosition::kNoSource, try_handler_index);
-  --catch_depth_;
 
   return new (Z) FlowGraph(*parsed_function_, graph_entry_, last_used_block_id_,
                            prologue_info);
diff --git a/runtime/vm/compiler/frontend/kernel_translation_helper.cc b/runtime/vm/compiler/frontend/kernel_translation_helper.cc
index 5840768..93a9b49 100644
--- a/runtime/vm/compiler/frontend/kernel_translation_helper.cc
+++ b/runtime/vm/compiler/frontend/kernel_translation_helper.cc
@@ -2654,18 +2654,7 @@
 }
 
 intptr_t KernelReaderHelper::SourceTableFieldCountFromFirstLibraryOffset() {
-  // translation_helper_.info() might not be initialized at this point so we
-  // can't use translation_helper_.info().kernel_binary_version().
-  SetOffset(KernelFormatVersionOffset);
-  uint32_t formatVersion = reader_.ReadUInt32();
-  intptr_t count_from_first_library_offset =
-      SourceTableFieldCountFromFirstLibraryOffsetPre41;
-  static_assert(kMinSupportedKernelFormatVersion < 41, "cleanup this code");
-  if (formatVersion >= 41) {
-    count_from_first_library_offset =
-        SourceTableFieldCountFromFirstLibraryOffset41Plus;
-  }
-  return count_from_first_library_offset;
+  return SourceTableFieldCountFromFirstLibraryOffset41Plus;
 }
 
 intptr_t KernelReaderHelper::SourceTableSize() {
diff --git a/runtime/vm/compiler/frontend/scope_builder.cc b/runtime/vm/compiler/frontend/scope_builder.cc
index 35caee9..e8b8a2c 100644
--- a/runtime/vm/compiler/frontend/scope_builder.cc
+++ b/runtime/vm/compiler/frontend/scope_builder.cc
@@ -420,14 +420,19 @@
                                             : Object::dynamic_type().raw()));
         scope_->InsertParameterAt(i, variable);
       }
-      current_function_async_marker_ = FunctionNodeHelper::kSync;
-      ++depth_.try_;
-      AddTryVariables();
-      --depth_.try_;
-      ++depth_.catch_;
-      AddCatchVariables();
-      FinalizeCatchVariables();
-      --depth_.catch_;
+      // Callbacks and calls with handles need try/catch variables.
+      if (function.IsFfiTrampoline() &&
+          (function.FfiCallbackTarget() != Function::null() ||
+           function.FfiCSignatureContainsHandles())) {
+        current_function_async_marker_ = FunctionNodeHelper::kSync;
+        ++depth_.try_;
+        AddTryVariables();
+        --depth_.try_;
+        ++depth_.catch_;
+        AddCatchVariables();
+        FinalizeCatchVariables();
+        --depth_.catch_;
+      }
       break;
     case FunctionLayout::kSignatureFunction:
     case FunctionLayout::kIrregexpFunction:
diff --git a/runtime/vm/compiler/jit/compiler.cc b/runtime/vm/compiler/jit/compiler.cc
index 70215e2..fbb7557 100644
--- a/runtime/vm/compiler/jit/compiler.cc
+++ b/runtime/vm/compiler/jit/compiler.cc
@@ -106,6 +106,8 @@
     FLAG_reorder_basic_blocks = true;
     FLAG_use_field_guards = false;
     FLAG_use_cha_deopt = false;
+    FLAG_causal_async_stacks = false;
+    FLAG_lazy_async_stacks = true;
 
 #if !defined(PRODUCT) && !defined(DART_PRECOMPILED_RUNTIME)
     // Set flags affecting runtime accordingly for gen_snapshot.
@@ -658,12 +660,11 @@
         //
         thread()->isolate_group()->RunWithStoppedMutators(
             install_code_fun, install_code_fun, /*use_force_growth=*/true);
-
-        // We notify code observers after finalizing the code in order to be
-        // outside a [SafepointOperationScope].
-        Code::NotifyCodeObservers(function, *result, optimized());
       }
       if (!result->IsNull()) {
+        // Must be called outside of safepoint.
+        Code::NotifyCodeObservers(function, *result, optimized());
+
 #if !defined(PRODUCT)
         if (!function.HasOptimizedCode()) {
           isolate()->debugger()->NotifyCompilation(function);
diff --git a/runtime/vm/compiler/recognized_methods_list.h b/runtime/vm/compiler/recognized_methods_list.h
index fc68832..849cff7 100644
--- a/runtime/vm/compiler/recognized_methods_list.h
+++ b/runtime/vm/compiler/recognized_methods_list.h
@@ -444,8 +444,11 @@
 //  result-cid, fingerprint).
 #define RECOGNIZED_LIST_FACTORY_LIST(V)                                        \
   V(_ListFactory, _List, ., kArrayCid, 0x03ddbd3a)                             \
+  V(_ListFilledFactory, _List, .filled, kArrayCid, 0x0)                        \
   V(_GrowableListWithData, _GrowableList, ._withData, kGrowableObjectArrayCid, \
     0x5cfd6a7f)                                                                \
+  V(_GrowableListFilledFactory, _GrowableList, .filled,                        \
+    kGrowableObjectArrayCid, 0x0)                                              \
   V(_GrowableListFactory, _GrowableList, ., kGrowableObjectArrayCid,           \
     0x3eed680b)                                                                \
   V(_Int8ArrayFactory, Int8List, ., kTypedDataInt8ArrayCid, 0x6ce2f102)        \
diff --git a/runtime/vm/compiler/runtime_api.h b/runtime/vm/compiler/runtime_api.h
index b5f1b74..d24e36d 100644
--- a/runtime/vm/compiler/runtime_api.h
+++ b/runtime/vm/compiler/runtime_api.h
@@ -1028,6 +1028,8 @@
   static word null_error_shared_with_fpu_regs_stub_offset();
   static word null_arg_error_shared_without_fpu_regs_stub_offset();
   static word null_arg_error_shared_with_fpu_regs_stub_offset();
+  static word null_cast_error_shared_without_fpu_regs_stub_offset();
+  static word null_cast_error_shared_with_fpu_regs_stub_offset();
   static word range_error_shared_without_fpu_regs_stub_offset();
   static word range_error_shared_with_fpu_regs_stub_offset();
   static word stack_overflow_shared_without_fpu_regs_entry_point_offset();
diff --git a/runtime/vm/compiler/runtime_offsets_extracted.h b/runtime/vm/compiler/runtime_offsets_extracted.h
index 00c0e71..918643c 100644
--- a/runtime/vm/compiler/runtime_offsets_extracted.h
+++ b/runtime/vm/compiler/runtime_offsets_extracted.h
@@ -196,151 +196,155 @@
 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 = 368;
+    Thread_AllocateArray_entry_point_offset = 376;
 static constexpr dart::compiler::target::word Thread_active_exception_offset =
-    700;
+    712;
 static constexpr dart::compiler::target::word Thread_active_stacktrace_offset =
-    704;
+    716;
 static constexpr dart::compiler::target::word
     Thread_array_write_barrier_code_offset = 128;
 static constexpr dart::compiler::target::word
-    Thread_array_write_barrier_entry_point_offset = 260;
+    Thread_array_write_barrier_entry_point_offset = 268;
 static constexpr dart::compiler::target::word
-    Thread_allocate_mint_with_fpu_regs_entry_point_offset = 268;
+    Thread_allocate_mint_with_fpu_regs_entry_point_offset = 276;
 static constexpr dart::compiler::target::word
-    Thread_allocate_mint_with_fpu_regs_stub_offset = 176;
+    Thread_allocate_mint_with_fpu_regs_stub_offset = 184;
 static constexpr dart::compiler::target::word
-    Thread_allocate_mint_without_fpu_regs_entry_point_offset = 272;
+    Thread_allocate_mint_without_fpu_regs_entry_point_offset = 280;
 static constexpr dart::compiler::target::word
-    Thread_allocate_mint_without_fpu_regs_stub_offset = 180;
+    Thread_allocate_mint_without_fpu_regs_stub_offset = 188;
 static constexpr dart::compiler::target::word
-    Thread_allocate_object_entry_point_offset = 276;
+    Thread_allocate_object_entry_point_offset = 284;
 static constexpr dart::compiler::target::word
-    Thread_allocate_object_stub_offset = 184;
+    Thread_allocate_object_stub_offset = 192;
 static constexpr dart::compiler::target::word
-    Thread_allocate_object_parameterized_entry_point_offset = 280;
+    Thread_allocate_object_parameterized_entry_point_offset = 288;
 static constexpr dart::compiler::target::word
-    Thread_allocate_object_parameterized_stub_offset = 188;
+    Thread_allocate_object_parameterized_stub_offset = 196;
 static constexpr dart::compiler::target::word
-    Thread_allocate_object_slow_entry_point_offset = 284;
+    Thread_allocate_object_slow_entry_point_offset = 292;
 static constexpr dart::compiler::target::word
-    Thread_allocate_object_slow_stub_offset = 192;
-static constexpr dart::compiler::target::word Thread_api_top_scope_offset = 736;
+    Thread_allocate_object_slow_stub_offset = 200;
+static constexpr dart::compiler::target::word Thread_api_top_scope_offset = 748;
 static constexpr dart::compiler::target::word Thread_async_stack_trace_offset =
     96;
 static constexpr dart::compiler::target::word
-    Thread_auto_scope_native_wrapper_entry_point_offset = 328;
+    Thread_auto_scope_native_wrapper_entry_point_offset = 336;
 static constexpr dart::compiler::target::word Thread_bool_false_offset = 120;
 static constexpr dart::compiler::target::word Thread_bool_true_offset = 116;
 static constexpr dart::compiler::target::word
-    Thread_bootstrap_native_wrapper_entry_point_offset = 320;
+    Thread_bootstrap_native_wrapper_entry_point_offset = 328;
 static constexpr dart::compiler::target::word
-    Thread_call_to_runtime_entry_point_offset = 264;
+    Thread_call_to_runtime_entry_point_offset = 272;
 static constexpr dart::compiler::target::word
     Thread_call_to_runtime_stub_offset = 148;
-static constexpr dart::compiler::target::word Thread_dart_stream_offset = 744;
+static constexpr dart::compiler::target::word Thread_dart_stream_offset = 756;
 static constexpr dart::compiler::target::word
     Thread_dispatch_table_array_offset = 48;
 static constexpr dart::compiler::target::word Thread_optimize_entry_offset =
-    304;
-static constexpr dart::compiler::target::word Thread_optimize_stub_offset = 220;
+    312;
+static constexpr dart::compiler::target::word Thread_optimize_stub_offset = 228;
 static constexpr dart::compiler::target::word Thread_deoptimize_entry_offset =
-    308;
+    316;
 static constexpr dart::compiler::target::word Thread_deoptimize_stub_offset =
-    224;
+    232;
 static constexpr dart::compiler::target::word Thread_double_abs_address_offset =
-    348;
+    356;
 static constexpr dart::compiler::target::word
-    Thread_double_negate_address_offset = 344;
+    Thread_double_negate_address_offset = 352;
 static constexpr dart::compiler::target::word Thread_end_offset = 56;
 static constexpr dart::compiler::target::word
-    Thread_enter_safepoint_stub_offset = 244;
+    Thread_enter_safepoint_stub_offset = 252;
 static constexpr dart::compiler::target::word Thread_execution_state_offset =
-    720;
+    732;
 static constexpr dart::compiler::target::word
-    Thread_exit_safepoint_stub_offset = 248;
+    Thread_exit_safepoint_stub_offset = 256;
 static constexpr dart::compiler::target::word
-    Thread_call_native_through_safepoint_stub_offset = 252;
+    Thread_call_native_through_safepoint_stub_offset = 260;
 static constexpr dart::compiler::target::word
-    Thread_call_native_through_safepoint_entry_point_offset = 312;
+    Thread_call_native_through_safepoint_entry_point_offset = 320;
 static constexpr dart::compiler::target::word
     Thread_fix_allocation_stub_code_offset = 136;
 static constexpr dart::compiler::target::word
     Thread_fix_callers_target_code_offset = 132;
 static constexpr dart::compiler::target::word
-    Thread_float_absolute_address_offset = 360;
+    Thread_float_absolute_address_offset = 368;
 static constexpr dart::compiler::target::word
-    Thread_float_negate_address_offset = 356;
+    Thread_float_negate_address_offset = 364;
 static constexpr dart::compiler::target::word Thread_float_not_address_offset =
-    352;
+    360;
 static constexpr dart::compiler::target::word
-    Thread_float_zerow_address_offset = 364;
+    Thread_float_zerow_address_offset = 372;
 static constexpr dart::compiler::target::word Thread_global_object_pool_offset =
-    708;
+    720;
 static constexpr dart::compiler::target::word
-    Thread_interpret_call_entry_point_offset = 332;
+    Thread_interpret_call_entry_point_offset = 340;
 static constexpr dart::compiler::target::word
     Thread_invoke_dart_code_from_bytecode_stub_offset = 144;
 static constexpr dart::compiler::target::word
     Thread_invoke_dart_code_stub_offset = 140;
 static constexpr dart::compiler::target::word Thread_exit_through_ffi_offset =
-    732;
+    744;
 static constexpr dart::compiler::target::word Thread_isolate_offset = 44;
 static constexpr dart::compiler::target::word Thread_field_table_values_offset =
     68;
 static constexpr dart::compiler::target::word
-    Thread_lazy_deopt_from_return_stub_offset = 228;
+    Thread_lazy_deopt_from_return_stub_offset = 236;
 static constexpr dart::compiler::target::word
-    Thread_lazy_deopt_from_throw_stub_offset = 232;
+    Thread_lazy_deopt_from_throw_stub_offset = 240;
 static constexpr dart::compiler::target::word
-    Thread_lazy_specialize_type_test_stub_offset = 240;
+    Thread_lazy_specialize_type_test_stub_offset = 248;
 static constexpr dart::compiler::target::word
     Thread_marking_stack_block_offset = 84;
 static constexpr dart::compiler::target::word
-    Thread_megamorphic_call_checked_entry_offset = 296;
+    Thread_megamorphic_call_checked_entry_offset = 304;
 static constexpr dart::compiler::target::word
-    Thread_switchable_call_miss_entry_offset = 300;
+    Thread_switchable_call_miss_entry_offset = 308;
 static constexpr dart::compiler::target::word
-    Thread_switchable_call_miss_stub_offset = 204;
+    Thread_switchable_call_miss_stub_offset = 212;
 static constexpr dart::compiler::target::word
-    Thread_no_scope_native_wrapper_entry_point_offset = 324;
+    Thread_no_scope_native_wrapper_entry_point_offset = 332;
 static constexpr dart::compiler::target::word
     Thread_null_error_shared_with_fpu_regs_stub_offset = 156;
 static constexpr dart::compiler::target::word
-    Thread_null_arg_error_shared_with_fpu_regs_stub_offset = 164;
-static constexpr dart::compiler::target::word
-    Thread_range_error_shared_with_fpu_regs_stub_offset = 172;
-static constexpr dart::compiler::target::word
     Thread_null_error_shared_without_fpu_regs_stub_offset = 152;
 static constexpr dart::compiler::target::word
+    Thread_null_arg_error_shared_with_fpu_regs_stub_offset = 164;
+static constexpr dart::compiler::target::word
     Thread_null_arg_error_shared_without_fpu_regs_stub_offset = 160;
 static constexpr dart::compiler::target::word
-    Thread_range_error_shared_without_fpu_regs_stub_offset = 168;
+    Thread_null_cast_error_shared_with_fpu_regs_stub_offset = 172;
+static constexpr dart::compiler::target::word
+    Thread_null_cast_error_shared_without_fpu_regs_stub_offset = 168;
+static constexpr dart::compiler::target::word
+    Thread_range_error_shared_with_fpu_regs_stub_offset = 180;
+static constexpr dart::compiler::target::word
+    Thread_range_error_shared_without_fpu_regs_stub_offset = 176;
 static constexpr dart::compiler::target::word Thread_object_null_offset = 112;
 static constexpr dart::compiler::target::word
-    Thread_predefined_symbols_address_offset = 336;
-static constexpr dart::compiler::target::word Thread_resume_pc_offset = 712;
+    Thread_predefined_symbols_address_offset = 344;
+static constexpr dart::compiler::target::word Thread_resume_pc_offset = 724;
 static constexpr dart::compiler::target::word
-    Thread_saved_shadow_call_stack_offset = 716;
+    Thread_saved_shadow_call_stack_offset = 728;
 static constexpr dart::compiler::target::word Thread_safepoint_state_offset =
-    724;
+    736;
 static constexpr dart::compiler::target::word
-    Thread_slow_type_test_stub_offset = 236;
+    Thread_slow_type_test_stub_offset = 244;
 static constexpr dart::compiler::target::word
-    Thread_slow_type_test_entry_point_offset = 316;
+    Thread_slow_type_test_entry_point_offset = 324;
 static constexpr dart::compiler::target::word Thread_stack_limit_offset = 36;
 static constexpr dart::compiler::target::word Thread_saved_stack_limit_offset =
     60;
 static constexpr dart::compiler::target::word
     Thread_stack_overflow_flags_offset = 64;
 static constexpr dart::compiler::target::word
-    Thread_stack_overflow_shared_with_fpu_regs_entry_point_offset = 292;
+    Thread_stack_overflow_shared_with_fpu_regs_entry_point_offset = 300;
 static constexpr dart::compiler::target::word
-    Thread_stack_overflow_shared_with_fpu_regs_stub_offset = 200;
+    Thread_stack_overflow_shared_with_fpu_regs_stub_offset = 208;
 static constexpr dart::compiler::target::word
-    Thread_stack_overflow_shared_without_fpu_regs_entry_point_offset = 288;
+    Thread_stack_overflow_shared_without_fpu_regs_entry_point_offset = 296;
 static constexpr dart::compiler::target::word
-    Thread_stack_overflow_shared_without_fpu_regs_stub_offset = 196;
+    Thread_stack_overflow_shared_without_fpu_regs_stub_offset = 204;
 static constexpr dart::compiler::target::word Thread_store_buffer_block_offset =
     80;
 static constexpr dart::compiler::target::word
@@ -353,10 +357,10 @@
 static constexpr dart::compiler::target::word Thread_write_barrier_code_offset =
     124;
 static constexpr dart::compiler::target::word
-    Thread_write_barrier_entry_point_offset = 256;
+    Thread_write_barrier_entry_point_offset = 264;
 static constexpr dart::compiler::target::word Thread_write_barrier_mask_offset =
     40;
-static constexpr dart::compiler::target::word Thread_callback_code_offset = 728;
+static constexpr dart::compiler::target::word Thread_callback_code_offset = 740;
 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;
@@ -398,7 +402,7 @@
     4, 12, 8, 16};
 static constexpr dart::compiler::target::word
     Thread_write_barrier_wrappers_thread_offset[] = {
-        668, 672, 676, 680, 684, -1, 688, -1, 692, 696, -1, -1, -1, -1, -1, -1};
+        680, 684, 688, 692, 696, -1, 700, -1, 704, 708, -1, -1, -1, -1, -1, -1};
 static constexpr dart::compiler::target::word ApiError_InstanceSize = 8;
 static constexpr dart::compiler::target::word Array_InstanceSize = 12;
 static constexpr dart::compiler::target::word Array_header_size = 12;
@@ -686,152 +690,156 @@
 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 = 720;
+    Thread_AllocateArray_entry_point_offset = 736;
 static constexpr dart::compiler::target::word Thread_active_exception_offset =
-    1408;
+    1432;
 static constexpr dart::compiler::target::word Thread_active_stacktrace_offset =
-    1416;
+    1440;
 static constexpr dart::compiler::target::word
     Thread_array_write_barrier_code_offset = 240;
 static constexpr dart::compiler::target::word
-    Thread_array_write_barrier_entry_point_offset = 504;
+    Thread_array_write_barrier_entry_point_offset = 520;
 static constexpr dart::compiler::target::word
-    Thread_allocate_mint_with_fpu_regs_entry_point_offset = 520;
+    Thread_allocate_mint_with_fpu_regs_entry_point_offset = 536;
 static constexpr dart::compiler::target::word
-    Thread_allocate_mint_with_fpu_regs_stub_offset = 336;
+    Thread_allocate_mint_with_fpu_regs_stub_offset = 352;
 static constexpr dart::compiler::target::word
-    Thread_allocate_mint_without_fpu_regs_entry_point_offset = 528;
+    Thread_allocate_mint_without_fpu_regs_entry_point_offset = 544;
 static constexpr dart::compiler::target::word
-    Thread_allocate_mint_without_fpu_regs_stub_offset = 344;
+    Thread_allocate_mint_without_fpu_regs_stub_offset = 360;
 static constexpr dart::compiler::target::word
-    Thread_allocate_object_entry_point_offset = 536;
+    Thread_allocate_object_entry_point_offset = 552;
 static constexpr dart::compiler::target::word
-    Thread_allocate_object_stub_offset = 352;
+    Thread_allocate_object_stub_offset = 368;
 static constexpr dart::compiler::target::word
-    Thread_allocate_object_parameterized_entry_point_offset = 544;
+    Thread_allocate_object_parameterized_entry_point_offset = 560;
 static constexpr dart::compiler::target::word
-    Thread_allocate_object_parameterized_stub_offset = 360;
+    Thread_allocate_object_parameterized_stub_offset = 376;
 static constexpr dart::compiler::target::word
-    Thread_allocate_object_slow_entry_point_offset = 552;
+    Thread_allocate_object_slow_entry_point_offset = 568;
 static constexpr dart::compiler::target::word
-    Thread_allocate_object_slow_stub_offset = 368;
+    Thread_allocate_object_slow_stub_offset = 384;
 static constexpr dart::compiler::target::word Thread_api_top_scope_offset =
-    1480;
+    1504;
 static constexpr dart::compiler::target::word Thread_async_stack_trace_offset =
     192;
 static constexpr dart::compiler::target::word
-    Thread_auto_scope_native_wrapper_entry_point_offset = 640;
+    Thread_auto_scope_native_wrapper_entry_point_offset = 656;
 static constexpr dart::compiler::target::word Thread_bool_false_offset = 224;
 static constexpr dart::compiler::target::word Thread_bool_true_offset = 216;
 static constexpr dart::compiler::target::word
-    Thread_bootstrap_native_wrapper_entry_point_offset = 624;
+    Thread_bootstrap_native_wrapper_entry_point_offset = 640;
 static constexpr dart::compiler::target::word
-    Thread_call_to_runtime_entry_point_offset = 512;
+    Thread_call_to_runtime_entry_point_offset = 528;
 static constexpr dart::compiler::target::word
     Thread_call_to_runtime_stub_offset = 280;
-static constexpr dart::compiler::target::word Thread_dart_stream_offset = 1496;
+static constexpr dart::compiler::target::word Thread_dart_stream_offset = 1520;
 static constexpr dart::compiler::target::word
     Thread_dispatch_table_array_offset = 96;
 static constexpr dart::compiler::target::word Thread_optimize_entry_offset =
-    592;
-static constexpr dart::compiler::target::word Thread_optimize_stub_offset = 424;
+    608;
+static constexpr dart::compiler::target::word Thread_optimize_stub_offset = 440;
 static constexpr dart::compiler::target::word Thread_deoptimize_entry_offset =
-    600;
+    616;
 static constexpr dart::compiler::target::word Thread_deoptimize_stub_offset =
-    432;
+    448;
 static constexpr dart::compiler::target::word Thread_double_abs_address_offset =
-    680;
+    696;
 static constexpr dart::compiler::target::word
-    Thread_double_negate_address_offset = 672;
+    Thread_double_negate_address_offset = 688;
 static constexpr dart::compiler::target::word Thread_end_offset = 112;
 static constexpr dart::compiler::target::word
-    Thread_enter_safepoint_stub_offset = 472;
+    Thread_enter_safepoint_stub_offset = 488;
 static constexpr dart::compiler::target::word Thread_execution_state_offset =
-    1448;
+    1472;
 static constexpr dart::compiler::target::word
-    Thread_exit_safepoint_stub_offset = 480;
+    Thread_exit_safepoint_stub_offset = 496;
 static constexpr dart::compiler::target::word
-    Thread_call_native_through_safepoint_stub_offset = 488;
+    Thread_call_native_through_safepoint_stub_offset = 504;
 static constexpr dart::compiler::target::word
-    Thread_call_native_through_safepoint_entry_point_offset = 608;
+    Thread_call_native_through_safepoint_entry_point_offset = 624;
 static constexpr dart::compiler::target::word
     Thread_fix_allocation_stub_code_offset = 256;
 static constexpr dart::compiler::target::word
     Thread_fix_callers_target_code_offset = 248;
 static constexpr dart::compiler::target::word
-    Thread_float_absolute_address_offset = 704;
+    Thread_float_absolute_address_offset = 720;
 static constexpr dart::compiler::target::word
-    Thread_float_negate_address_offset = 696;
+    Thread_float_negate_address_offset = 712;
 static constexpr dart::compiler::target::word Thread_float_not_address_offset =
-    688;
+    704;
 static constexpr dart::compiler::target::word
-    Thread_float_zerow_address_offset = 712;
+    Thread_float_zerow_address_offset = 728;
 static constexpr dart::compiler::target::word Thread_global_object_pool_offset =
-    1424;
+    1448;
 static constexpr dart::compiler::target::word
-    Thread_interpret_call_entry_point_offset = 648;
+    Thread_interpret_call_entry_point_offset = 664;
 static constexpr dart::compiler::target::word
     Thread_invoke_dart_code_from_bytecode_stub_offset = 272;
 static constexpr dart::compiler::target::word
     Thread_invoke_dart_code_stub_offset = 264;
 static constexpr dart::compiler::target::word Thread_exit_through_ffi_offset =
-    1472;
+    1496;
 static constexpr dart::compiler::target::word Thread_isolate_offset = 88;
 static constexpr dart::compiler::target::word Thread_field_table_values_offset =
     136;
 static constexpr dart::compiler::target::word
-    Thread_lazy_deopt_from_return_stub_offset = 440;
+    Thread_lazy_deopt_from_return_stub_offset = 456;
 static constexpr dart::compiler::target::word
-    Thread_lazy_deopt_from_throw_stub_offset = 448;
+    Thread_lazy_deopt_from_throw_stub_offset = 464;
 static constexpr dart::compiler::target::word
-    Thread_lazy_specialize_type_test_stub_offset = 464;
+    Thread_lazy_specialize_type_test_stub_offset = 480;
 static constexpr dart::compiler::target::word
     Thread_marking_stack_block_offset = 168;
 static constexpr dart::compiler::target::word
-    Thread_megamorphic_call_checked_entry_offset = 576;
+    Thread_megamorphic_call_checked_entry_offset = 592;
 static constexpr dart::compiler::target::word
-    Thread_switchable_call_miss_entry_offset = 584;
+    Thread_switchable_call_miss_entry_offset = 600;
 static constexpr dart::compiler::target::word
-    Thread_switchable_call_miss_stub_offset = 392;
+    Thread_switchable_call_miss_stub_offset = 408;
 static constexpr dart::compiler::target::word
-    Thread_no_scope_native_wrapper_entry_point_offset = 632;
+    Thread_no_scope_native_wrapper_entry_point_offset = 648;
 static constexpr dart::compiler::target::word
     Thread_null_error_shared_with_fpu_regs_stub_offset = 296;
 static constexpr dart::compiler::target::word
-    Thread_null_arg_error_shared_with_fpu_regs_stub_offset = 312;
-static constexpr dart::compiler::target::word
-    Thread_range_error_shared_with_fpu_regs_stub_offset = 328;
-static constexpr dart::compiler::target::word
     Thread_null_error_shared_without_fpu_regs_stub_offset = 288;
 static constexpr dart::compiler::target::word
+    Thread_null_arg_error_shared_with_fpu_regs_stub_offset = 312;
+static constexpr dart::compiler::target::word
     Thread_null_arg_error_shared_without_fpu_regs_stub_offset = 304;
 static constexpr dart::compiler::target::word
-    Thread_range_error_shared_without_fpu_regs_stub_offset = 320;
+    Thread_null_cast_error_shared_with_fpu_regs_stub_offset = 328;
+static constexpr dart::compiler::target::word
+    Thread_null_cast_error_shared_without_fpu_regs_stub_offset = 320;
+static constexpr dart::compiler::target::word
+    Thread_range_error_shared_with_fpu_regs_stub_offset = 344;
+static constexpr dart::compiler::target::word
+    Thread_range_error_shared_without_fpu_regs_stub_offset = 336;
 static constexpr dart::compiler::target::word Thread_object_null_offset = 208;
 static constexpr dart::compiler::target::word
-    Thread_predefined_symbols_address_offset = 656;
-static constexpr dart::compiler::target::word Thread_resume_pc_offset = 1432;
+    Thread_predefined_symbols_address_offset = 672;
+static constexpr dart::compiler::target::word Thread_resume_pc_offset = 1456;
 static constexpr dart::compiler::target::word
-    Thread_saved_shadow_call_stack_offset = 1440;
+    Thread_saved_shadow_call_stack_offset = 1464;
 static constexpr dart::compiler::target::word Thread_safepoint_state_offset =
-    1456;
+    1480;
 static constexpr dart::compiler::target::word
-    Thread_slow_type_test_stub_offset = 456;
+    Thread_slow_type_test_stub_offset = 472;
 static constexpr dart::compiler::target::word
-    Thread_slow_type_test_entry_point_offset = 616;
+    Thread_slow_type_test_entry_point_offset = 632;
 static constexpr dart::compiler::target::word Thread_stack_limit_offset = 72;
 static constexpr dart::compiler::target::word Thread_saved_stack_limit_offset =
     120;
 static constexpr dart::compiler::target::word
     Thread_stack_overflow_flags_offset = 128;
 static constexpr dart::compiler::target::word
-    Thread_stack_overflow_shared_with_fpu_regs_entry_point_offset = 568;
+    Thread_stack_overflow_shared_with_fpu_regs_entry_point_offset = 584;
 static constexpr dart::compiler::target::word
-    Thread_stack_overflow_shared_with_fpu_regs_stub_offset = 384;
+    Thread_stack_overflow_shared_with_fpu_regs_stub_offset = 400;
 static constexpr dart::compiler::target::word
-    Thread_stack_overflow_shared_without_fpu_regs_entry_point_offset = 560;
+    Thread_stack_overflow_shared_without_fpu_regs_entry_point_offset = 576;
 static constexpr dart::compiler::target::word
-    Thread_stack_overflow_shared_without_fpu_regs_stub_offset = 376;
+    Thread_stack_overflow_shared_without_fpu_regs_stub_offset = 392;
 static constexpr dart::compiler::target::word Thread_store_buffer_block_offset =
     160;
 static constexpr dart::compiler::target::word
@@ -844,11 +852,11 @@
 static constexpr dart::compiler::target::word Thread_write_barrier_code_offset =
     232;
 static constexpr dart::compiler::target::word
-    Thread_write_barrier_entry_point_offset = 496;
+    Thread_write_barrier_entry_point_offset = 512;
 static constexpr dart::compiler::target::word Thread_write_barrier_mask_offset =
     80;
 static constexpr dart::compiler::target::word Thread_callback_code_offset =
-    1464;
+    1488;
 static constexpr dart::compiler::target::word TimelineStream_enabled_offset =
     16;
 static constexpr dart::compiler::target::word TwoByteString_data_offset = 16;
@@ -891,8 +899,8 @@
     8, 24, 16, 32};
 static constexpr dart::compiler::target::word
     Thread_write_barrier_wrappers_thread_offset[] = {
-        1320, 1328, 1336, 1344, -1,   -1,   1352, 1360,
-        1368, 1376, 1384, -1,   1392, 1400, -1,   -1};
+        1344, 1352, 1360, 1368, -1,   -1,   1376, 1384,
+        1392, 1400, 1408, -1,   1416, 1424, -1,   -1};
 static constexpr dart::compiler::target::word ApiError_InstanceSize = 16;
 static constexpr dart::compiler::target::word Array_InstanceSize = 24;
 static constexpr dart::compiler::target::word Array_header_size = 24;
@@ -1178,151 +1186,155 @@
 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 = 368;
+    Thread_AllocateArray_entry_point_offset = 376;
 static constexpr dart::compiler::target::word Thread_active_exception_offset =
-    668;
+    680;
 static constexpr dart::compiler::target::word Thread_active_stacktrace_offset =
-    672;
+    684;
 static constexpr dart::compiler::target::word
     Thread_array_write_barrier_code_offset = 128;
 static constexpr dart::compiler::target::word
-    Thread_array_write_barrier_entry_point_offset = 260;
+    Thread_array_write_barrier_entry_point_offset = 268;
 static constexpr dart::compiler::target::word
-    Thread_allocate_mint_with_fpu_regs_entry_point_offset = 268;
+    Thread_allocate_mint_with_fpu_regs_entry_point_offset = 276;
 static constexpr dart::compiler::target::word
-    Thread_allocate_mint_with_fpu_regs_stub_offset = 176;
+    Thread_allocate_mint_with_fpu_regs_stub_offset = 184;
 static constexpr dart::compiler::target::word
-    Thread_allocate_mint_without_fpu_regs_entry_point_offset = 272;
+    Thread_allocate_mint_without_fpu_regs_entry_point_offset = 280;
 static constexpr dart::compiler::target::word
-    Thread_allocate_mint_without_fpu_regs_stub_offset = 180;
+    Thread_allocate_mint_without_fpu_regs_stub_offset = 188;
 static constexpr dart::compiler::target::word
-    Thread_allocate_object_entry_point_offset = 276;
+    Thread_allocate_object_entry_point_offset = 284;
 static constexpr dart::compiler::target::word
-    Thread_allocate_object_stub_offset = 184;
+    Thread_allocate_object_stub_offset = 192;
 static constexpr dart::compiler::target::word
-    Thread_allocate_object_parameterized_entry_point_offset = 280;
+    Thread_allocate_object_parameterized_entry_point_offset = 288;
 static constexpr dart::compiler::target::word
-    Thread_allocate_object_parameterized_stub_offset = 188;
+    Thread_allocate_object_parameterized_stub_offset = 196;
 static constexpr dart::compiler::target::word
-    Thread_allocate_object_slow_entry_point_offset = 284;
+    Thread_allocate_object_slow_entry_point_offset = 292;
 static constexpr dart::compiler::target::word
-    Thread_allocate_object_slow_stub_offset = 192;
-static constexpr dart::compiler::target::word Thread_api_top_scope_offset = 704;
+    Thread_allocate_object_slow_stub_offset = 200;
+static constexpr dart::compiler::target::word Thread_api_top_scope_offset = 716;
 static constexpr dart::compiler::target::word Thread_async_stack_trace_offset =
     96;
 static constexpr dart::compiler::target::word
-    Thread_auto_scope_native_wrapper_entry_point_offset = 328;
+    Thread_auto_scope_native_wrapper_entry_point_offset = 336;
 static constexpr dart::compiler::target::word Thread_bool_false_offset = 120;
 static constexpr dart::compiler::target::word Thread_bool_true_offset = 116;
 static constexpr dart::compiler::target::word
-    Thread_bootstrap_native_wrapper_entry_point_offset = 320;
+    Thread_bootstrap_native_wrapper_entry_point_offset = 328;
 static constexpr dart::compiler::target::word
-    Thread_call_to_runtime_entry_point_offset = 264;
+    Thread_call_to_runtime_entry_point_offset = 272;
 static constexpr dart::compiler::target::word
     Thread_call_to_runtime_stub_offset = 148;
-static constexpr dart::compiler::target::word Thread_dart_stream_offset = 712;
+static constexpr dart::compiler::target::word Thread_dart_stream_offset = 724;
 static constexpr dart::compiler::target::word
     Thread_dispatch_table_array_offset = 48;
 static constexpr dart::compiler::target::word Thread_optimize_entry_offset =
-    304;
-static constexpr dart::compiler::target::word Thread_optimize_stub_offset = 220;
+    312;
+static constexpr dart::compiler::target::word Thread_optimize_stub_offset = 228;
 static constexpr dart::compiler::target::word Thread_deoptimize_entry_offset =
-    308;
+    316;
 static constexpr dart::compiler::target::word Thread_deoptimize_stub_offset =
-    224;
+    232;
 static constexpr dart::compiler::target::word Thread_double_abs_address_offset =
-    348;
+    356;
 static constexpr dart::compiler::target::word
-    Thread_double_negate_address_offset = 344;
+    Thread_double_negate_address_offset = 352;
 static constexpr dart::compiler::target::word Thread_end_offset = 56;
 static constexpr dart::compiler::target::word
-    Thread_enter_safepoint_stub_offset = 244;
+    Thread_enter_safepoint_stub_offset = 252;
 static constexpr dart::compiler::target::word Thread_execution_state_offset =
-    688;
+    700;
 static constexpr dart::compiler::target::word
-    Thread_exit_safepoint_stub_offset = 248;
+    Thread_exit_safepoint_stub_offset = 256;
 static constexpr dart::compiler::target::word
-    Thread_call_native_through_safepoint_stub_offset = 252;
+    Thread_call_native_through_safepoint_stub_offset = 260;
 static constexpr dart::compiler::target::word
-    Thread_call_native_through_safepoint_entry_point_offset = 312;
+    Thread_call_native_through_safepoint_entry_point_offset = 320;
 static constexpr dart::compiler::target::word
     Thread_fix_allocation_stub_code_offset = 136;
 static constexpr dart::compiler::target::word
     Thread_fix_callers_target_code_offset = 132;
 static constexpr dart::compiler::target::word
-    Thread_float_absolute_address_offset = 360;
+    Thread_float_absolute_address_offset = 368;
 static constexpr dart::compiler::target::word
-    Thread_float_negate_address_offset = 356;
+    Thread_float_negate_address_offset = 364;
 static constexpr dart::compiler::target::word Thread_float_not_address_offset =
-    352;
+    360;
 static constexpr dart::compiler::target::word
-    Thread_float_zerow_address_offset = 364;
+    Thread_float_zerow_address_offset = 372;
 static constexpr dart::compiler::target::word Thread_global_object_pool_offset =
-    676;
+    688;
 static constexpr dart::compiler::target::word
-    Thread_interpret_call_entry_point_offset = 332;
+    Thread_interpret_call_entry_point_offset = 340;
 static constexpr dart::compiler::target::word
     Thread_invoke_dart_code_from_bytecode_stub_offset = 144;
 static constexpr dart::compiler::target::word
     Thread_invoke_dart_code_stub_offset = 140;
 static constexpr dart::compiler::target::word Thread_exit_through_ffi_offset =
-    700;
+    712;
 static constexpr dart::compiler::target::word Thread_isolate_offset = 44;
 static constexpr dart::compiler::target::word Thread_field_table_values_offset =
     68;
 static constexpr dart::compiler::target::word
-    Thread_lazy_deopt_from_return_stub_offset = 228;
+    Thread_lazy_deopt_from_return_stub_offset = 236;
 static constexpr dart::compiler::target::word
-    Thread_lazy_deopt_from_throw_stub_offset = 232;
+    Thread_lazy_deopt_from_throw_stub_offset = 240;
 static constexpr dart::compiler::target::word
-    Thread_lazy_specialize_type_test_stub_offset = 240;
+    Thread_lazy_specialize_type_test_stub_offset = 248;
 static constexpr dart::compiler::target::word
     Thread_marking_stack_block_offset = 84;
 static constexpr dart::compiler::target::word
-    Thread_megamorphic_call_checked_entry_offset = 296;
+    Thread_megamorphic_call_checked_entry_offset = 304;
 static constexpr dart::compiler::target::word
-    Thread_switchable_call_miss_entry_offset = 300;
+    Thread_switchable_call_miss_entry_offset = 308;
 static constexpr dart::compiler::target::word
-    Thread_switchable_call_miss_stub_offset = 204;
+    Thread_switchable_call_miss_stub_offset = 212;
 static constexpr dart::compiler::target::word
-    Thread_no_scope_native_wrapper_entry_point_offset = 324;
+    Thread_no_scope_native_wrapper_entry_point_offset = 332;
 static constexpr dart::compiler::target::word
     Thread_null_error_shared_with_fpu_regs_stub_offset = 156;
 static constexpr dart::compiler::target::word
-    Thread_null_arg_error_shared_with_fpu_regs_stub_offset = 164;
-static constexpr dart::compiler::target::word
-    Thread_range_error_shared_with_fpu_regs_stub_offset = 172;
-static constexpr dart::compiler::target::word
     Thread_null_error_shared_without_fpu_regs_stub_offset = 152;
 static constexpr dart::compiler::target::word
+    Thread_null_arg_error_shared_with_fpu_regs_stub_offset = 164;
+static constexpr dart::compiler::target::word
     Thread_null_arg_error_shared_without_fpu_regs_stub_offset = 160;
 static constexpr dart::compiler::target::word
-    Thread_range_error_shared_without_fpu_regs_stub_offset = 168;
+    Thread_null_cast_error_shared_with_fpu_regs_stub_offset = 172;
+static constexpr dart::compiler::target::word
+    Thread_null_cast_error_shared_without_fpu_regs_stub_offset = 168;
+static constexpr dart::compiler::target::word
+    Thread_range_error_shared_with_fpu_regs_stub_offset = 180;
+static constexpr dart::compiler::target::word
+    Thread_range_error_shared_without_fpu_regs_stub_offset = 176;
 static constexpr dart::compiler::target::word Thread_object_null_offset = 112;
 static constexpr dart::compiler::target::word
-    Thread_predefined_symbols_address_offset = 336;
-static constexpr dart::compiler::target::word Thread_resume_pc_offset = 680;
+    Thread_predefined_symbols_address_offset = 344;
+static constexpr dart::compiler::target::word Thread_resume_pc_offset = 692;
 static constexpr dart::compiler::target::word
-    Thread_saved_shadow_call_stack_offset = 684;
+    Thread_saved_shadow_call_stack_offset = 696;
 static constexpr dart::compiler::target::word Thread_safepoint_state_offset =
-    692;
+    704;
 static constexpr dart::compiler::target::word
-    Thread_slow_type_test_stub_offset = 236;
+    Thread_slow_type_test_stub_offset = 244;
 static constexpr dart::compiler::target::word
-    Thread_slow_type_test_entry_point_offset = 316;
+    Thread_slow_type_test_entry_point_offset = 324;
 static constexpr dart::compiler::target::word Thread_stack_limit_offset = 36;
 static constexpr dart::compiler::target::word Thread_saved_stack_limit_offset =
     60;
 static constexpr dart::compiler::target::word
     Thread_stack_overflow_flags_offset = 64;
 static constexpr dart::compiler::target::word
-    Thread_stack_overflow_shared_with_fpu_regs_entry_point_offset = 292;
+    Thread_stack_overflow_shared_with_fpu_regs_entry_point_offset = 300;
 static constexpr dart::compiler::target::word
-    Thread_stack_overflow_shared_with_fpu_regs_stub_offset = 200;
+    Thread_stack_overflow_shared_with_fpu_regs_stub_offset = 208;
 static constexpr dart::compiler::target::word
-    Thread_stack_overflow_shared_without_fpu_regs_entry_point_offset = 288;
+    Thread_stack_overflow_shared_without_fpu_regs_entry_point_offset = 296;
 static constexpr dart::compiler::target::word
-    Thread_stack_overflow_shared_without_fpu_regs_stub_offset = 196;
+    Thread_stack_overflow_shared_without_fpu_regs_stub_offset = 204;
 static constexpr dart::compiler::target::word Thread_store_buffer_block_offset =
     80;
 static constexpr dart::compiler::target::word
@@ -1335,10 +1347,10 @@
 static constexpr dart::compiler::target::word Thread_write_barrier_code_offset =
     124;
 static constexpr dart::compiler::target::word
-    Thread_write_barrier_entry_point_offset = 256;
+    Thread_write_barrier_entry_point_offset = 264;
 static constexpr dart::compiler::target::word Thread_write_barrier_mask_offset =
     40;
-static constexpr dart::compiler::target::word Thread_callback_code_offset = 696;
+static constexpr dart::compiler::target::word Thread_callback_code_offset = 708;
 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;
@@ -1665,152 +1677,156 @@
 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 = 720;
+    Thread_AllocateArray_entry_point_offset = 736;
 static constexpr dart::compiler::target::word Thread_active_exception_offset =
-    1480;
+    1504;
 static constexpr dart::compiler::target::word Thread_active_stacktrace_offset =
-    1488;
+    1512;
 static constexpr dart::compiler::target::word
     Thread_array_write_barrier_code_offset = 240;
 static constexpr dart::compiler::target::word
-    Thread_array_write_barrier_entry_point_offset = 504;
+    Thread_array_write_barrier_entry_point_offset = 520;
 static constexpr dart::compiler::target::word
-    Thread_allocate_mint_with_fpu_regs_entry_point_offset = 520;
+    Thread_allocate_mint_with_fpu_regs_entry_point_offset = 536;
 static constexpr dart::compiler::target::word
-    Thread_allocate_mint_with_fpu_regs_stub_offset = 336;
+    Thread_allocate_mint_with_fpu_regs_stub_offset = 352;
 static constexpr dart::compiler::target::word
-    Thread_allocate_mint_without_fpu_regs_entry_point_offset = 528;
+    Thread_allocate_mint_without_fpu_regs_entry_point_offset = 544;
 static constexpr dart::compiler::target::word
-    Thread_allocate_mint_without_fpu_regs_stub_offset = 344;
+    Thread_allocate_mint_without_fpu_regs_stub_offset = 360;
 static constexpr dart::compiler::target::word
-    Thread_allocate_object_entry_point_offset = 536;
+    Thread_allocate_object_entry_point_offset = 552;
 static constexpr dart::compiler::target::word
-    Thread_allocate_object_stub_offset = 352;
+    Thread_allocate_object_stub_offset = 368;
 static constexpr dart::compiler::target::word
-    Thread_allocate_object_parameterized_entry_point_offset = 544;
+    Thread_allocate_object_parameterized_entry_point_offset = 560;
 static constexpr dart::compiler::target::word
-    Thread_allocate_object_parameterized_stub_offset = 360;
+    Thread_allocate_object_parameterized_stub_offset = 376;
 static constexpr dart::compiler::target::word
-    Thread_allocate_object_slow_entry_point_offset = 552;
+    Thread_allocate_object_slow_entry_point_offset = 568;
 static constexpr dart::compiler::target::word
-    Thread_allocate_object_slow_stub_offset = 368;
+    Thread_allocate_object_slow_stub_offset = 384;
 static constexpr dart::compiler::target::word Thread_api_top_scope_offset =
-    1552;
+    1576;
 static constexpr dart::compiler::target::word Thread_async_stack_trace_offset =
     192;
 static constexpr dart::compiler::target::word
-    Thread_auto_scope_native_wrapper_entry_point_offset = 640;
+    Thread_auto_scope_native_wrapper_entry_point_offset = 656;
 static constexpr dart::compiler::target::word Thread_bool_false_offset = 224;
 static constexpr dart::compiler::target::word Thread_bool_true_offset = 216;
 static constexpr dart::compiler::target::word
-    Thread_bootstrap_native_wrapper_entry_point_offset = 624;
+    Thread_bootstrap_native_wrapper_entry_point_offset = 640;
 static constexpr dart::compiler::target::word
-    Thread_call_to_runtime_entry_point_offset = 512;
+    Thread_call_to_runtime_entry_point_offset = 528;
 static constexpr dart::compiler::target::word
     Thread_call_to_runtime_stub_offset = 280;
-static constexpr dart::compiler::target::word Thread_dart_stream_offset = 1568;
+static constexpr dart::compiler::target::word Thread_dart_stream_offset = 1592;
 static constexpr dart::compiler::target::word
     Thread_dispatch_table_array_offset = 96;
 static constexpr dart::compiler::target::word Thread_optimize_entry_offset =
-    592;
-static constexpr dart::compiler::target::word Thread_optimize_stub_offset = 424;
+    608;
+static constexpr dart::compiler::target::word Thread_optimize_stub_offset = 440;
 static constexpr dart::compiler::target::word Thread_deoptimize_entry_offset =
-    600;
+    616;
 static constexpr dart::compiler::target::word Thread_deoptimize_stub_offset =
-    432;
+    448;
 static constexpr dart::compiler::target::word Thread_double_abs_address_offset =
-    680;
+    696;
 static constexpr dart::compiler::target::word
-    Thread_double_negate_address_offset = 672;
+    Thread_double_negate_address_offset = 688;
 static constexpr dart::compiler::target::word Thread_end_offset = 112;
 static constexpr dart::compiler::target::word
-    Thread_enter_safepoint_stub_offset = 472;
+    Thread_enter_safepoint_stub_offset = 488;
 static constexpr dart::compiler::target::word Thread_execution_state_offset =
-    1520;
+    1544;
 static constexpr dart::compiler::target::word
-    Thread_exit_safepoint_stub_offset = 480;
+    Thread_exit_safepoint_stub_offset = 496;
 static constexpr dart::compiler::target::word
-    Thread_call_native_through_safepoint_stub_offset = 488;
+    Thread_call_native_through_safepoint_stub_offset = 504;
 static constexpr dart::compiler::target::word
-    Thread_call_native_through_safepoint_entry_point_offset = 608;
+    Thread_call_native_through_safepoint_entry_point_offset = 624;
 static constexpr dart::compiler::target::word
     Thread_fix_allocation_stub_code_offset = 256;
 static constexpr dart::compiler::target::word
     Thread_fix_callers_target_code_offset = 248;
 static constexpr dart::compiler::target::word
-    Thread_float_absolute_address_offset = 704;
+    Thread_float_absolute_address_offset = 720;
 static constexpr dart::compiler::target::word
-    Thread_float_negate_address_offset = 696;
+    Thread_float_negate_address_offset = 712;
 static constexpr dart::compiler::target::word Thread_float_not_address_offset =
-    688;
+    704;
 static constexpr dart::compiler::target::word
-    Thread_float_zerow_address_offset = 712;
+    Thread_float_zerow_address_offset = 728;
 static constexpr dart::compiler::target::word Thread_global_object_pool_offset =
-    1496;
+    1520;
 static constexpr dart::compiler::target::word
-    Thread_interpret_call_entry_point_offset = 648;
+    Thread_interpret_call_entry_point_offset = 664;
 static constexpr dart::compiler::target::word
     Thread_invoke_dart_code_from_bytecode_stub_offset = 272;
 static constexpr dart::compiler::target::word
     Thread_invoke_dart_code_stub_offset = 264;
 static constexpr dart::compiler::target::word Thread_exit_through_ffi_offset =
-    1544;
+    1568;
 static constexpr dart::compiler::target::word Thread_isolate_offset = 88;
 static constexpr dart::compiler::target::word Thread_field_table_values_offset =
     136;
 static constexpr dart::compiler::target::word
-    Thread_lazy_deopt_from_return_stub_offset = 440;
+    Thread_lazy_deopt_from_return_stub_offset = 456;
 static constexpr dart::compiler::target::word
-    Thread_lazy_deopt_from_throw_stub_offset = 448;
+    Thread_lazy_deopt_from_throw_stub_offset = 464;
 static constexpr dart::compiler::target::word
-    Thread_lazy_specialize_type_test_stub_offset = 464;
+    Thread_lazy_specialize_type_test_stub_offset = 480;
 static constexpr dart::compiler::target::word
     Thread_marking_stack_block_offset = 168;
 static constexpr dart::compiler::target::word
-    Thread_megamorphic_call_checked_entry_offset = 576;
+    Thread_megamorphic_call_checked_entry_offset = 592;
 static constexpr dart::compiler::target::word
-    Thread_switchable_call_miss_entry_offset = 584;
+    Thread_switchable_call_miss_entry_offset = 600;
 static constexpr dart::compiler::target::word
-    Thread_switchable_call_miss_stub_offset = 392;
+    Thread_switchable_call_miss_stub_offset = 408;
 static constexpr dart::compiler::target::word
-    Thread_no_scope_native_wrapper_entry_point_offset = 632;
+    Thread_no_scope_native_wrapper_entry_point_offset = 648;
 static constexpr dart::compiler::target::word
     Thread_null_error_shared_with_fpu_regs_stub_offset = 296;
 static constexpr dart::compiler::target::word
-    Thread_null_arg_error_shared_with_fpu_regs_stub_offset = 312;
-static constexpr dart::compiler::target::word
-    Thread_range_error_shared_with_fpu_regs_stub_offset = 328;
-static constexpr dart::compiler::target::word
     Thread_null_error_shared_without_fpu_regs_stub_offset = 288;
 static constexpr dart::compiler::target::word
+    Thread_null_arg_error_shared_with_fpu_regs_stub_offset = 312;
+static constexpr dart::compiler::target::word
     Thread_null_arg_error_shared_without_fpu_regs_stub_offset = 304;
 static constexpr dart::compiler::target::word
-    Thread_range_error_shared_without_fpu_regs_stub_offset = 320;
+    Thread_null_cast_error_shared_with_fpu_regs_stub_offset = 328;
+static constexpr dart::compiler::target::word
+    Thread_null_cast_error_shared_without_fpu_regs_stub_offset = 320;
+static constexpr dart::compiler::target::word
+    Thread_range_error_shared_with_fpu_regs_stub_offset = 344;
+static constexpr dart::compiler::target::word
+    Thread_range_error_shared_without_fpu_regs_stub_offset = 336;
 static constexpr dart::compiler::target::word Thread_object_null_offset = 208;
 static constexpr dart::compiler::target::word
-    Thread_predefined_symbols_address_offset = 656;
-static constexpr dart::compiler::target::word Thread_resume_pc_offset = 1504;
+    Thread_predefined_symbols_address_offset = 672;
+static constexpr dart::compiler::target::word Thread_resume_pc_offset = 1528;
 static constexpr dart::compiler::target::word
-    Thread_saved_shadow_call_stack_offset = 1512;
+    Thread_saved_shadow_call_stack_offset = 1536;
 static constexpr dart::compiler::target::word Thread_safepoint_state_offset =
-    1528;
+    1552;
 static constexpr dart::compiler::target::word
-    Thread_slow_type_test_stub_offset = 456;
+    Thread_slow_type_test_stub_offset = 472;
 static constexpr dart::compiler::target::word
-    Thread_slow_type_test_entry_point_offset = 616;
+    Thread_slow_type_test_entry_point_offset = 632;
 static constexpr dart::compiler::target::word Thread_stack_limit_offset = 72;
 static constexpr dart::compiler::target::word Thread_saved_stack_limit_offset =
     120;
 static constexpr dart::compiler::target::word
     Thread_stack_overflow_flags_offset = 128;
 static constexpr dart::compiler::target::word
-    Thread_stack_overflow_shared_with_fpu_regs_entry_point_offset = 568;
+    Thread_stack_overflow_shared_with_fpu_regs_entry_point_offset = 584;
 static constexpr dart::compiler::target::word
-    Thread_stack_overflow_shared_with_fpu_regs_stub_offset = 384;
+    Thread_stack_overflow_shared_with_fpu_regs_stub_offset = 400;
 static constexpr dart::compiler::target::word
-    Thread_stack_overflow_shared_without_fpu_regs_entry_point_offset = 560;
+    Thread_stack_overflow_shared_without_fpu_regs_entry_point_offset = 576;
 static constexpr dart::compiler::target::word
-    Thread_stack_overflow_shared_without_fpu_regs_stub_offset = 376;
+    Thread_stack_overflow_shared_without_fpu_regs_stub_offset = 392;
 static constexpr dart::compiler::target::word Thread_store_buffer_block_offset =
     160;
 static constexpr dart::compiler::target::word
@@ -1823,11 +1839,11 @@
 static constexpr dart::compiler::target::word Thread_write_barrier_code_offset =
     232;
 static constexpr dart::compiler::target::word
-    Thread_write_barrier_entry_point_offset = 496;
+    Thread_write_barrier_entry_point_offset = 512;
 static constexpr dart::compiler::target::word Thread_write_barrier_mask_offset =
     80;
 static constexpr dart::compiler::target::word Thread_callback_code_offset =
-    1536;
+    1560;
 static constexpr dart::compiler::target::word TimelineStream_enabled_offset =
     16;
 static constexpr dart::compiler::target::word TwoByteString_data_offset = 16;
@@ -1870,9 +1886,9 @@
     8, 24, 16, 32};
 static constexpr dart::compiler::target::word
     Thread_write_barrier_wrappers_thread_offset[] = {
-        1320, 1328, 1336, 1344, 1352, 1360, 1368, 1376, 1384, 1392, 1400,
-        1408, 1416, 1424, 1432, -1,   -1,   -1,   -1,   1440, 1448, -1,
-        -1,   1456, 1464, 1472, -1,   -1,   -1,   -1,   -1,   -1};
+        1344, 1352, 1360, 1368, 1376, 1384, 1392, 1400, 1408, 1416, 1424,
+        1432, 1440, 1448, 1456, -1,   -1,   -1,   -1,   1464, 1472, -1,
+        -1,   1480, 1488, 1496, -1,   -1,   -1,   -1,   -1,   -1};
 static constexpr dart::compiler::target::word ApiError_InstanceSize = 16;
 static constexpr dart::compiler::target::word Array_InstanceSize = 24;
 static constexpr dart::compiler::target::word Array_header_size = 24;
@@ -2157,151 +2173,155 @@
 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 = 368;
+    Thread_AllocateArray_entry_point_offset = 376;
 static constexpr dart::compiler::target::word Thread_active_exception_offset =
-    700;
+    712;
 static constexpr dart::compiler::target::word Thread_active_stacktrace_offset =
-    704;
+    716;
 static constexpr dart::compiler::target::word
     Thread_array_write_barrier_code_offset = 128;
 static constexpr dart::compiler::target::word
-    Thread_array_write_barrier_entry_point_offset = 260;
+    Thread_array_write_barrier_entry_point_offset = 268;
 static constexpr dart::compiler::target::word
-    Thread_allocate_mint_with_fpu_regs_entry_point_offset = 268;
+    Thread_allocate_mint_with_fpu_regs_entry_point_offset = 276;
 static constexpr dart::compiler::target::word
-    Thread_allocate_mint_with_fpu_regs_stub_offset = 176;
+    Thread_allocate_mint_with_fpu_regs_stub_offset = 184;
 static constexpr dart::compiler::target::word
-    Thread_allocate_mint_without_fpu_regs_entry_point_offset = 272;
+    Thread_allocate_mint_without_fpu_regs_entry_point_offset = 280;
 static constexpr dart::compiler::target::word
-    Thread_allocate_mint_without_fpu_regs_stub_offset = 180;
+    Thread_allocate_mint_without_fpu_regs_stub_offset = 188;
 static constexpr dart::compiler::target::word
-    Thread_allocate_object_entry_point_offset = 276;
+    Thread_allocate_object_entry_point_offset = 284;
 static constexpr dart::compiler::target::word
-    Thread_allocate_object_stub_offset = 184;
+    Thread_allocate_object_stub_offset = 192;
 static constexpr dart::compiler::target::word
-    Thread_allocate_object_parameterized_entry_point_offset = 280;
+    Thread_allocate_object_parameterized_entry_point_offset = 288;
 static constexpr dart::compiler::target::word
-    Thread_allocate_object_parameterized_stub_offset = 188;
+    Thread_allocate_object_parameterized_stub_offset = 196;
 static constexpr dart::compiler::target::word
-    Thread_allocate_object_slow_entry_point_offset = 284;
+    Thread_allocate_object_slow_entry_point_offset = 292;
 static constexpr dart::compiler::target::word
-    Thread_allocate_object_slow_stub_offset = 192;
-static constexpr dart::compiler::target::word Thread_api_top_scope_offset = 736;
+    Thread_allocate_object_slow_stub_offset = 200;
+static constexpr dart::compiler::target::word Thread_api_top_scope_offset = 748;
 static constexpr dart::compiler::target::word Thread_async_stack_trace_offset =
     96;
 static constexpr dart::compiler::target::word
-    Thread_auto_scope_native_wrapper_entry_point_offset = 328;
+    Thread_auto_scope_native_wrapper_entry_point_offset = 336;
 static constexpr dart::compiler::target::word Thread_bool_false_offset = 120;
 static constexpr dart::compiler::target::word Thread_bool_true_offset = 116;
 static constexpr dart::compiler::target::word
-    Thread_bootstrap_native_wrapper_entry_point_offset = 320;
+    Thread_bootstrap_native_wrapper_entry_point_offset = 328;
 static constexpr dart::compiler::target::word
-    Thread_call_to_runtime_entry_point_offset = 264;
+    Thread_call_to_runtime_entry_point_offset = 272;
 static constexpr dart::compiler::target::word
     Thread_call_to_runtime_stub_offset = 148;
-static constexpr dart::compiler::target::word Thread_dart_stream_offset = 744;
+static constexpr dart::compiler::target::word Thread_dart_stream_offset = 756;
 static constexpr dart::compiler::target::word
     Thread_dispatch_table_array_offset = 48;
 static constexpr dart::compiler::target::word Thread_optimize_entry_offset =
-    304;
-static constexpr dart::compiler::target::word Thread_optimize_stub_offset = 220;
+    312;
+static constexpr dart::compiler::target::word Thread_optimize_stub_offset = 228;
 static constexpr dart::compiler::target::word Thread_deoptimize_entry_offset =
-    308;
+    316;
 static constexpr dart::compiler::target::word Thread_deoptimize_stub_offset =
-    224;
+    232;
 static constexpr dart::compiler::target::word Thread_double_abs_address_offset =
-    348;
+    356;
 static constexpr dart::compiler::target::word
-    Thread_double_negate_address_offset = 344;
+    Thread_double_negate_address_offset = 352;
 static constexpr dart::compiler::target::word Thread_end_offset = 56;
 static constexpr dart::compiler::target::word
-    Thread_enter_safepoint_stub_offset = 244;
+    Thread_enter_safepoint_stub_offset = 252;
 static constexpr dart::compiler::target::word Thread_execution_state_offset =
-    720;
+    732;
 static constexpr dart::compiler::target::word
-    Thread_exit_safepoint_stub_offset = 248;
+    Thread_exit_safepoint_stub_offset = 256;
 static constexpr dart::compiler::target::word
-    Thread_call_native_through_safepoint_stub_offset = 252;
+    Thread_call_native_through_safepoint_stub_offset = 260;
 static constexpr dart::compiler::target::word
-    Thread_call_native_through_safepoint_entry_point_offset = 312;
+    Thread_call_native_through_safepoint_entry_point_offset = 320;
 static constexpr dart::compiler::target::word
     Thread_fix_allocation_stub_code_offset = 136;
 static constexpr dart::compiler::target::word
     Thread_fix_callers_target_code_offset = 132;
 static constexpr dart::compiler::target::word
-    Thread_float_absolute_address_offset = 360;
+    Thread_float_absolute_address_offset = 368;
 static constexpr dart::compiler::target::word
-    Thread_float_negate_address_offset = 356;
+    Thread_float_negate_address_offset = 364;
 static constexpr dart::compiler::target::word Thread_float_not_address_offset =
-    352;
+    360;
 static constexpr dart::compiler::target::word
-    Thread_float_zerow_address_offset = 364;
+    Thread_float_zerow_address_offset = 372;
 static constexpr dart::compiler::target::word Thread_global_object_pool_offset =
-    708;
+    720;
 static constexpr dart::compiler::target::word
-    Thread_interpret_call_entry_point_offset = 332;
+    Thread_interpret_call_entry_point_offset = 340;
 static constexpr dart::compiler::target::word
     Thread_invoke_dart_code_from_bytecode_stub_offset = 144;
 static constexpr dart::compiler::target::word
     Thread_invoke_dart_code_stub_offset = 140;
 static constexpr dart::compiler::target::word Thread_exit_through_ffi_offset =
-    732;
+    744;
 static constexpr dart::compiler::target::word Thread_isolate_offset = 44;
 static constexpr dart::compiler::target::word Thread_field_table_values_offset =
     68;
 static constexpr dart::compiler::target::word
-    Thread_lazy_deopt_from_return_stub_offset = 228;
+    Thread_lazy_deopt_from_return_stub_offset = 236;
 static constexpr dart::compiler::target::word
-    Thread_lazy_deopt_from_throw_stub_offset = 232;
+    Thread_lazy_deopt_from_throw_stub_offset = 240;
 static constexpr dart::compiler::target::word
-    Thread_lazy_specialize_type_test_stub_offset = 240;
+    Thread_lazy_specialize_type_test_stub_offset = 248;
 static constexpr dart::compiler::target::word
     Thread_marking_stack_block_offset = 84;
 static constexpr dart::compiler::target::word
-    Thread_megamorphic_call_checked_entry_offset = 296;
+    Thread_megamorphic_call_checked_entry_offset = 304;
 static constexpr dart::compiler::target::word
-    Thread_switchable_call_miss_entry_offset = 300;
+    Thread_switchable_call_miss_entry_offset = 308;
 static constexpr dart::compiler::target::word
-    Thread_switchable_call_miss_stub_offset = 204;
+    Thread_switchable_call_miss_stub_offset = 212;
 static constexpr dart::compiler::target::word
-    Thread_no_scope_native_wrapper_entry_point_offset = 324;
+    Thread_no_scope_native_wrapper_entry_point_offset = 332;
 static constexpr dart::compiler::target::word
     Thread_null_error_shared_with_fpu_regs_stub_offset = 156;
 static constexpr dart::compiler::target::word
-    Thread_null_arg_error_shared_with_fpu_regs_stub_offset = 164;
-static constexpr dart::compiler::target::word
-    Thread_range_error_shared_with_fpu_regs_stub_offset = 172;
-static constexpr dart::compiler::target::word
     Thread_null_error_shared_without_fpu_regs_stub_offset = 152;
 static constexpr dart::compiler::target::word
+    Thread_null_arg_error_shared_with_fpu_regs_stub_offset = 164;
+static constexpr dart::compiler::target::word
     Thread_null_arg_error_shared_without_fpu_regs_stub_offset = 160;
 static constexpr dart::compiler::target::word
-    Thread_range_error_shared_without_fpu_regs_stub_offset = 168;
+    Thread_null_cast_error_shared_with_fpu_regs_stub_offset = 172;
+static constexpr dart::compiler::target::word
+    Thread_null_cast_error_shared_without_fpu_regs_stub_offset = 168;
+static constexpr dart::compiler::target::word
+    Thread_range_error_shared_with_fpu_regs_stub_offset = 180;
+static constexpr dart::compiler::target::word
+    Thread_range_error_shared_without_fpu_regs_stub_offset = 176;
 static constexpr dart::compiler::target::word Thread_object_null_offset = 112;
 static constexpr dart::compiler::target::word
-    Thread_predefined_symbols_address_offset = 336;
-static constexpr dart::compiler::target::word Thread_resume_pc_offset = 712;
+    Thread_predefined_symbols_address_offset = 344;
+static constexpr dart::compiler::target::word Thread_resume_pc_offset = 724;
 static constexpr dart::compiler::target::word
-    Thread_saved_shadow_call_stack_offset = 716;
+    Thread_saved_shadow_call_stack_offset = 728;
 static constexpr dart::compiler::target::word Thread_safepoint_state_offset =
-    724;
+    736;
 static constexpr dart::compiler::target::word
-    Thread_slow_type_test_stub_offset = 236;
+    Thread_slow_type_test_stub_offset = 244;
 static constexpr dart::compiler::target::word
-    Thread_slow_type_test_entry_point_offset = 316;
+    Thread_slow_type_test_entry_point_offset = 324;
 static constexpr dart::compiler::target::word Thread_stack_limit_offset = 36;
 static constexpr dart::compiler::target::word Thread_saved_stack_limit_offset =
     60;
 static constexpr dart::compiler::target::word
     Thread_stack_overflow_flags_offset = 64;
 static constexpr dart::compiler::target::word
-    Thread_stack_overflow_shared_with_fpu_regs_entry_point_offset = 292;
+    Thread_stack_overflow_shared_with_fpu_regs_entry_point_offset = 300;
 static constexpr dart::compiler::target::word
-    Thread_stack_overflow_shared_with_fpu_regs_stub_offset = 200;
+    Thread_stack_overflow_shared_with_fpu_regs_stub_offset = 208;
 static constexpr dart::compiler::target::word
-    Thread_stack_overflow_shared_without_fpu_regs_entry_point_offset = 288;
+    Thread_stack_overflow_shared_without_fpu_regs_entry_point_offset = 296;
 static constexpr dart::compiler::target::word
-    Thread_stack_overflow_shared_without_fpu_regs_stub_offset = 196;
+    Thread_stack_overflow_shared_without_fpu_regs_stub_offset = 204;
 static constexpr dart::compiler::target::word Thread_store_buffer_block_offset =
     80;
 static constexpr dart::compiler::target::word
@@ -2314,10 +2334,10 @@
 static constexpr dart::compiler::target::word Thread_write_barrier_code_offset =
     124;
 static constexpr dart::compiler::target::word
-    Thread_write_barrier_entry_point_offset = 256;
+    Thread_write_barrier_entry_point_offset = 264;
 static constexpr dart::compiler::target::word Thread_write_barrier_mask_offset =
     40;
-static constexpr dart::compiler::target::word Thread_callback_code_offset = 728;
+static constexpr dart::compiler::target::word Thread_callback_code_offset = 740;
 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;
@@ -2356,7 +2376,7 @@
     4, 12, 8, 16};
 static constexpr dart::compiler::target::word
     Thread_write_barrier_wrappers_thread_offset[] = {
-        668, 672, 676, 680, 684, -1, 688, -1, 692, 696, -1, -1, -1, -1, -1, -1};
+        680, 684, 688, 692, 696, -1, 700, -1, 704, 708, -1, -1, -1, -1, -1, -1};
 static constexpr dart::compiler::target::word ApiError_InstanceSize = 8;
 static constexpr dart::compiler::target::word Array_InstanceSize = 12;
 static constexpr dart::compiler::target::word Array_header_size = 12;
@@ -2641,152 +2661,156 @@
 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 = 720;
+    Thread_AllocateArray_entry_point_offset = 736;
 static constexpr dart::compiler::target::word Thread_active_exception_offset =
-    1408;
+    1432;
 static constexpr dart::compiler::target::word Thread_active_stacktrace_offset =
-    1416;
+    1440;
 static constexpr dart::compiler::target::word
     Thread_array_write_barrier_code_offset = 240;
 static constexpr dart::compiler::target::word
-    Thread_array_write_barrier_entry_point_offset = 504;
+    Thread_array_write_barrier_entry_point_offset = 520;
 static constexpr dart::compiler::target::word
-    Thread_allocate_mint_with_fpu_regs_entry_point_offset = 520;
+    Thread_allocate_mint_with_fpu_regs_entry_point_offset = 536;
 static constexpr dart::compiler::target::word
-    Thread_allocate_mint_with_fpu_regs_stub_offset = 336;
+    Thread_allocate_mint_with_fpu_regs_stub_offset = 352;
 static constexpr dart::compiler::target::word
-    Thread_allocate_mint_without_fpu_regs_entry_point_offset = 528;
+    Thread_allocate_mint_without_fpu_regs_entry_point_offset = 544;
 static constexpr dart::compiler::target::word
-    Thread_allocate_mint_without_fpu_regs_stub_offset = 344;
+    Thread_allocate_mint_without_fpu_regs_stub_offset = 360;
 static constexpr dart::compiler::target::word
-    Thread_allocate_object_entry_point_offset = 536;
+    Thread_allocate_object_entry_point_offset = 552;
 static constexpr dart::compiler::target::word
-    Thread_allocate_object_stub_offset = 352;
+    Thread_allocate_object_stub_offset = 368;
 static constexpr dart::compiler::target::word
-    Thread_allocate_object_parameterized_entry_point_offset = 544;
+    Thread_allocate_object_parameterized_entry_point_offset = 560;
 static constexpr dart::compiler::target::word
-    Thread_allocate_object_parameterized_stub_offset = 360;
+    Thread_allocate_object_parameterized_stub_offset = 376;
 static constexpr dart::compiler::target::word
-    Thread_allocate_object_slow_entry_point_offset = 552;
+    Thread_allocate_object_slow_entry_point_offset = 568;
 static constexpr dart::compiler::target::word
-    Thread_allocate_object_slow_stub_offset = 368;
+    Thread_allocate_object_slow_stub_offset = 384;
 static constexpr dart::compiler::target::word Thread_api_top_scope_offset =
-    1480;
+    1504;
 static constexpr dart::compiler::target::word Thread_async_stack_trace_offset =
     192;
 static constexpr dart::compiler::target::word
-    Thread_auto_scope_native_wrapper_entry_point_offset = 640;
+    Thread_auto_scope_native_wrapper_entry_point_offset = 656;
 static constexpr dart::compiler::target::word Thread_bool_false_offset = 224;
 static constexpr dart::compiler::target::word Thread_bool_true_offset = 216;
 static constexpr dart::compiler::target::word
-    Thread_bootstrap_native_wrapper_entry_point_offset = 624;
+    Thread_bootstrap_native_wrapper_entry_point_offset = 640;
 static constexpr dart::compiler::target::word
-    Thread_call_to_runtime_entry_point_offset = 512;
+    Thread_call_to_runtime_entry_point_offset = 528;
 static constexpr dart::compiler::target::word
     Thread_call_to_runtime_stub_offset = 280;
-static constexpr dart::compiler::target::word Thread_dart_stream_offset = 1496;
+static constexpr dart::compiler::target::word Thread_dart_stream_offset = 1520;
 static constexpr dart::compiler::target::word
     Thread_dispatch_table_array_offset = 96;
 static constexpr dart::compiler::target::word Thread_optimize_entry_offset =
-    592;
-static constexpr dart::compiler::target::word Thread_optimize_stub_offset = 424;
+    608;
+static constexpr dart::compiler::target::word Thread_optimize_stub_offset = 440;
 static constexpr dart::compiler::target::word Thread_deoptimize_entry_offset =
-    600;
+    616;
 static constexpr dart::compiler::target::word Thread_deoptimize_stub_offset =
-    432;
+    448;
 static constexpr dart::compiler::target::word Thread_double_abs_address_offset =
-    680;
+    696;
 static constexpr dart::compiler::target::word
-    Thread_double_negate_address_offset = 672;
+    Thread_double_negate_address_offset = 688;
 static constexpr dart::compiler::target::word Thread_end_offset = 112;
 static constexpr dart::compiler::target::word
-    Thread_enter_safepoint_stub_offset = 472;
+    Thread_enter_safepoint_stub_offset = 488;
 static constexpr dart::compiler::target::word Thread_execution_state_offset =
-    1448;
+    1472;
 static constexpr dart::compiler::target::word
-    Thread_exit_safepoint_stub_offset = 480;
+    Thread_exit_safepoint_stub_offset = 496;
 static constexpr dart::compiler::target::word
-    Thread_call_native_through_safepoint_stub_offset = 488;
+    Thread_call_native_through_safepoint_stub_offset = 504;
 static constexpr dart::compiler::target::word
-    Thread_call_native_through_safepoint_entry_point_offset = 608;
+    Thread_call_native_through_safepoint_entry_point_offset = 624;
 static constexpr dart::compiler::target::word
     Thread_fix_allocation_stub_code_offset = 256;
 static constexpr dart::compiler::target::word
     Thread_fix_callers_target_code_offset = 248;
 static constexpr dart::compiler::target::word
-    Thread_float_absolute_address_offset = 704;
+    Thread_float_absolute_address_offset = 720;
 static constexpr dart::compiler::target::word
-    Thread_float_negate_address_offset = 696;
+    Thread_float_negate_address_offset = 712;
 static constexpr dart::compiler::target::word Thread_float_not_address_offset =
-    688;
+    704;
 static constexpr dart::compiler::target::word
-    Thread_float_zerow_address_offset = 712;
+    Thread_float_zerow_address_offset = 728;
 static constexpr dart::compiler::target::word Thread_global_object_pool_offset =
-    1424;
+    1448;
 static constexpr dart::compiler::target::word
-    Thread_interpret_call_entry_point_offset = 648;
+    Thread_interpret_call_entry_point_offset = 664;
 static constexpr dart::compiler::target::word
     Thread_invoke_dart_code_from_bytecode_stub_offset = 272;
 static constexpr dart::compiler::target::word
     Thread_invoke_dart_code_stub_offset = 264;
 static constexpr dart::compiler::target::word Thread_exit_through_ffi_offset =
-    1472;
+    1496;
 static constexpr dart::compiler::target::word Thread_isolate_offset = 88;
 static constexpr dart::compiler::target::word Thread_field_table_values_offset =
     136;
 static constexpr dart::compiler::target::word
-    Thread_lazy_deopt_from_return_stub_offset = 440;
+    Thread_lazy_deopt_from_return_stub_offset = 456;
 static constexpr dart::compiler::target::word
-    Thread_lazy_deopt_from_throw_stub_offset = 448;
+    Thread_lazy_deopt_from_throw_stub_offset = 464;
 static constexpr dart::compiler::target::word
-    Thread_lazy_specialize_type_test_stub_offset = 464;
+    Thread_lazy_specialize_type_test_stub_offset = 480;
 static constexpr dart::compiler::target::word
     Thread_marking_stack_block_offset = 168;
 static constexpr dart::compiler::target::word
-    Thread_megamorphic_call_checked_entry_offset = 576;
+    Thread_megamorphic_call_checked_entry_offset = 592;
 static constexpr dart::compiler::target::word
-    Thread_switchable_call_miss_entry_offset = 584;
+    Thread_switchable_call_miss_entry_offset = 600;
 static constexpr dart::compiler::target::word
-    Thread_switchable_call_miss_stub_offset = 392;
+    Thread_switchable_call_miss_stub_offset = 408;
 static constexpr dart::compiler::target::word
-    Thread_no_scope_native_wrapper_entry_point_offset = 632;
+    Thread_no_scope_native_wrapper_entry_point_offset = 648;
 static constexpr dart::compiler::target::word
     Thread_null_error_shared_with_fpu_regs_stub_offset = 296;
 static constexpr dart::compiler::target::word
-    Thread_null_arg_error_shared_with_fpu_regs_stub_offset = 312;
-static constexpr dart::compiler::target::word
-    Thread_range_error_shared_with_fpu_regs_stub_offset = 328;
-static constexpr dart::compiler::target::word
     Thread_null_error_shared_without_fpu_regs_stub_offset = 288;
 static constexpr dart::compiler::target::word
+    Thread_null_arg_error_shared_with_fpu_regs_stub_offset = 312;
+static constexpr dart::compiler::target::word
     Thread_null_arg_error_shared_without_fpu_regs_stub_offset = 304;
 static constexpr dart::compiler::target::word
-    Thread_range_error_shared_without_fpu_regs_stub_offset = 320;
+    Thread_null_cast_error_shared_with_fpu_regs_stub_offset = 328;
+static constexpr dart::compiler::target::word
+    Thread_null_cast_error_shared_without_fpu_regs_stub_offset = 320;
+static constexpr dart::compiler::target::word
+    Thread_range_error_shared_with_fpu_regs_stub_offset = 344;
+static constexpr dart::compiler::target::word
+    Thread_range_error_shared_without_fpu_regs_stub_offset = 336;
 static constexpr dart::compiler::target::word Thread_object_null_offset = 208;
 static constexpr dart::compiler::target::word
-    Thread_predefined_symbols_address_offset = 656;
-static constexpr dart::compiler::target::word Thread_resume_pc_offset = 1432;
+    Thread_predefined_symbols_address_offset = 672;
+static constexpr dart::compiler::target::word Thread_resume_pc_offset = 1456;
 static constexpr dart::compiler::target::word
-    Thread_saved_shadow_call_stack_offset = 1440;
+    Thread_saved_shadow_call_stack_offset = 1464;
 static constexpr dart::compiler::target::word Thread_safepoint_state_offset =
-    1456;
+    1480;
 static constexpr dart::compiler::target::word
-    Thread_slow_type_test_stub_offset = 456;
+    Thread_slow_type_test_stub_offset = 472;
 static constexpr dart::compiler::target::word
-    Thread_slow_type_test_entry_point_offset = 616;
+    Thread_slow_type_test_entry_point_offset = 632;
 static constexpr dart::compiler::target::word Thread_stack_limit_offset = 72;
 static constexpr dart::compiler::target::word Thread_saved_stack_limit_offset =
     120;
 static constexpr dart::compiler::target::word
     Thread_stack_overflow_flags_offset = 128;
 static constexpr dart::compiler::target::word
-    Thread_stack_overflow_shared_with_fpu_regs_entry_point_offset = 568;
+    Thread_stack_overflow_shared_with_fpu_regs_entry_point_offset = 584;
 static constexpr dart::compiler::target::word
-    Thread_stack_overflow_shared_with_fpu_regs_stub_offset = 384;
+    Thread_stack_overflow_shared_with_fpu_regs_stub_offset = 400;
 static constexpr dart::compiler::target::word
-    Thread_stack_overflow_shared_without_fpu_regs_entry_point_offset = 560;
+    Thread_stack_overflow_shared_without_fpu_regs_entry_point_offset = 576;
 static constexpr dart::compiler::target::word
-    Thread_stack_overflow_shared_without_fpu_regs_stub_offset = 376;
+    Thread_stack_overflow_shared_without_fpu_regs_stub_offset = 392;
 static constexpr dart::compiler::target::word Thread_store_buffer_block_offset =
     160;
 static constexpr dart::compiler::target::word
@@ -2799,11 +2823,11 @@
 static constexpr dart::compiler::target::word Thread_write_barrier_code_offset =
     232;
 static constexpr dart::compiler::target::word
-    Thread_write_barrier_entry_point_offset = 496;
+    Thread_write_barrier_entry_point_offset = 512;
 static constexpr dart::compiler::target::word Thread_write_barrier_mask_offset =
     80;
 static constexpr dart::compiler::target::word Thread_callback_code_offset =
-    1464;
+    1488;
 static constexpr dart::compiler::target::word TimelineStream_enabled_offset =
     16;
 static constexpr dart::compiler::target::word TwoByteString_data_offset = 16;
@@ -2843,8 +2867,8 @@
     8, 24, 16, 32};
 static constexpr dart::compiler::target::word
     Thread_write_barrier_wrappers_thread_offset[] = {
-        1320, 1328, 1336, 1344, -1,   -1,   1352, 1360,
-        1368, 1376, 1384, -1,   1392, 1400, -1,   -1};
+        1344, 1352, 1360, 1368, -1,   -1,   1376, 1384,
+        1392, 1400, 1408, -1,   1416, 1424, -1,   -1};
 static constexpr dart::compiler::target::word ApiError_InstanceSize = 16;
 static constexpr dart::compiler::target::word Array_InstanceSize = 24;
 static constexpr dart::compiler::target::word Array_header_size = 24;
@@ -3127,151 +3151,155 @@
 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 = 368;
+    Thread_AllocateArray_entry_point_offset = 376;
 static constexpr dart::compiler::target::word Thread_active_exception_offset =
-    668;
+    680;
 static constexpr dart::compiler::target::word Thread_active_stacktrace_offset =
-    672;
+    684;
 static constexpr dart::compiler::target::word
     Thread_array_write_barrier_code_offset = 128;
 static constexpr dart::compiler::target::word
-    Thread_array_write_barrier_entry_point_offset = 260;
+    Thread_array_write_barrier_entry_point_offset = 268;
 static constexpr dart::compiler::target::word
-    Thread_allocate_mint_with_fpu_regs_entry_point_offset = 268;
+    Thread_allocate_mint_with_fpu_regs_entry_point_offset = 276;
 static constexpr dart::compiler::target::word
-    Thread_allocate_mint_with_fpu_regs_stub_offset = 176;
+    Thread_allocate_mint_with_fpu_regs_stub_offset = 184;
 static constexpr dart::compiler::target::word
-    Thread_allocate_mint_without_fpu_regs_entry_point_offset = 272;
+    Thread_allocate_mint_without_fpu_regs_entry_point_offset = 280;
 static constexpr dart::compiler::target::word
-    Thread_allocate_mint_without_fpu_regs_stub_offset = 180;
+    Thread_allocate_mint_without_fpu_regs_stub_offset = 188;
 static constexpr dart::compiler::target::word
-    Thread_allocate_object_entry_point_offset = 276;
+    Thread_allocate_object_entry_point_offset = 284;
 static constexpr dart::compiler::target::word
-    Thread_allocate_object_stub_offset = 184;
+    Thread_allocate_object_stub_offset = 192;
 static constexpr dart::compiler::target::word
-    Thread_allocate_object_parameterized_entry_point_offset = 280;
+    Thread_allocate_object_parameterized_entry_point_offset = 288;
 static constexpr dart::compiler::target::word
-    Thread_allocate_object_parameterized_stub_offset = 188;
+    Thread_allocate_object_parameterized_stub_offset = 196;
 static constexpr dart::compiler::target::word
-    Thread_allocate_object_slow_entry_point_offset = 284;
+    Thread_allocate_object_slow_entry_point_offset = 292;
 static constexpr dart::compiler::target::word
-    Thread_allocate_object_slow_stub_offset = 192;
-static constexpr dart::compiler::target::word Thread_api_top_scope_offset = 704;
+    Thread_allocate_object_slow_stub_offset = 200;
+static constexpr dart::compiler::target::word Thread_api_top_scope_offset = 716;
 static constexpr dart::compiler::target::word Thread_async_stack_trace_offset =
     96;
 static constexpr dart::compiler::target::word
-    Thread_auto_scope_native_wrapper_entry_point_offset = 328;
+    Thread_auto_scope_native_wrapper_entry_point_offset = 336;
 static constexpr dart::compiler::target::word Thread_bool_false_offset = 120;
 static constexpr dart::compiler::target::word Thread_bool_true_offset = 116;
 static constexpr dart::compiler::target::word
-    Thread_bootstrap_native_wrapper_entry_point_offset = 320;
+    Thread_bootstrap_native_wrapper_entry_point_offset = 328;
 static constexpr dart::compiler::target::word
-    Thread_call_to_runtime_entry_point_offset = 264;
+    Thread_call_to_runtime_entry_point_offset = 272;
 static constexpr dart::compiler::target::word
     Thread_call_to_runtime_stub_offset = 148;
-static constexpr dart::compiler::target::word Thread_dart_stream_offset = 712;
+static constexpr dart::compiler::target::word Thread_dart_stream_offset = 724;
 static constexpr dart::compiler::target::word
     Thread_dispatch_table_array_offset = 48;
 static constexpr dart::compiler::target::word Thread_optimize_entry_offset =
-    304;
-static constexpr dart::compiler::target::word Thread_optimize_stub_offset = 220;
+    312;
+static constexpr dart::compiler::target::word Thread_optimize_stub_offset = 228;
 static constexpr dart::compiler::target::word Thread_deoptimize_entry_offset =
-    308;
+    316;
 static constexpr dart::compiler::target::word Thread_deoptimize_stub_offset =
-    224;
+    232;
 static constexpr dart::compiler::target::word Thread_double_abs_address_offset =
-    348;
+    356;
 static constexpr dart::compiler::target::word
-    Thread_double_negate_address_offset = 344;
+    Thread_double_negate_address_offset = 352;
 static constexpr dart::compiler::target::word Thread_end_offset = 56;
 static constexpr dart::compiler::target::word
-    Thread_enter_safepoint_stub_offset = 244;
+    Thread_enter_safepoint_stub_offset = 252;
 static constexpr dart::compiler::target::word Thread_execution_state_offset =
-    688;
+    700;
 static constexpr dart::compiler::target::word
-    Thread_exit_safepoint_stub_offset = 248;
+    Thread_exit_safepoint_stub_offset = 256;
 static constexpr dart::compiler::target::word
-    Thread_call_native_through_safepoint_stub_offset = 252;
+    Thread_call_native_through_safepoint_stub_offset = 260;
 static constexpr dart::compiler::target::word
-    Thread_call_native_through_safepoint_entry_point_offset = 312;
+    Thread_call_native_through_safepoint_entry_point_offset = 320;
 static constexpr dart::compiler::target::word
     Thread_fix_allocation_stub_code_offset = 136;
 static constexpr dart::compiler::target::word
     Thread_fix_callers_target_code_offset = 132;
 static constexpr dart::compiler::target::word
-    Thread_float_absolute_address_offset = 360;
+    Thread_float_absolute_address_offset = 368;
 static constexpr dart::compiler::target::word
-    Thread_float_negate_address_offset = 356;
+    Thread_float_negate_address_offset = 364;
 static constexpr dart::compiler::target::word Thread_float_not_address_offset =
-    352;
+    360;
 static constexpr dart::compiler::target::word
-    Thread_float_zerow_address_offset = 364;
+    Thread_float_zerow_address_offset = 372;
 static constexpr dart::compiler::target::word Thread_global_object_pool_offset =
-    676;
+    688;
 static constexpr dart::compiler::target::word
-    Thread_interpret_call_entry_point_offset = 332;
+    Thread_interpret_call_entry_point_offset = 340;
 static constexpr dart::compiler::target::word
     Thread_invoke_dart_code_from_bytecode_stub_offset = 144;
 static constexpr dart::compiler::target::word
     Thread_invoke_dart_code_stub_offset = 140;
 static constexpr dart::compiler::target::word Thread_exit_through_ffi_offset =
-    700;
+    712;
 static constexpr dart::compiler::target::word Thread_isolate_offset = 44;
 static constexpr dart::compiler::target::word Thread_field_table_values_offset =
     68;
 static constexpr dart::compiler::target::word
-    Thread_lazy_deopt_from_return_stub_offset = 228;
+    Thread_lazy_deopt_from_return_stub_offset = 236;
 static constexpr dart::compiler::target::word
-    Thread_lazy_deopt_from_throw_stub_offset = 232;
+    Thread_lazy_deopt_from_throw_stub_offset = 240;
 static constexpr dart::compiler::target::word
-    Thread_lazy_specialize_type_test_stub_offset = 240;
+    Thread_lazy_specialize_type_test_stub_offset = 248;
 static constexpr dart::compiler::target::word
     Thread_marking_stack_block_offset = 84;
 static constexpr dart::compiler::target::word
-    Thread_megamorphic_call_checked_entry_offset = 296;
+    Thread_megamorphic_call_checked_entry_offset = 304;
 static constexpr dart::compiler::target::word
-    Thread_switchable_call_miss_entry_offset = 300;
+    Thread_switchable_call_miss_entry_offset = 308;
 static constexpr dart::compiler::target::word
-    Thread_switchable_call_miss_stub_offset = 204;
+    Thread_switchable_call_miss_stub_offset = 212;
 static constexpr dart::compiler::target::word
-    Thread_no_scope_native_wrapper_entry_point_offset = 324;
+    Thread_no_scope_native_wrapper_entry_point_offset = 332;
 static constexpr dart::compiler::target::word
     Thread_null_error_shared_with_fpu_regs_stub_offset = 156;
 static constexpr dart::compiler::target::word
-    Thread_null_arg_error_shared_with_fpu_regs_stub_offset = 164;
-static constexpr dart::compiler::target::word
-    Thread_range_error_shared_with_fpu_regs_stub_offset = 172;
-static constexpr dart::compiler::target::word
     Thread_null_error_shared_without_fpu_regs_stub_offset = 152;
 static constexpr dart::compiler::target::word
+    Thread_null_arg_error_shared_with_fpu_regs_stub_offset = 164;
+static constexpr dart::compiler::target::word
     Thread_null_arg_error_shared_without_fpu_regs_stub_offset = 160;
 static constexpr dart::compiler::target::word
-    Thread_range_error_shared_without_fpu_regs_stub_offset = 168;
+    Thread_null_cast_error_shared_with_fpu_regs_stub_offset = 172;
+static constexpr dart::compiler::target::word
+    Thread_null_cast_error_shared_without_fpu_regs_stub_offset = 168;
+static constexpr dart::compiler::target::word
+    Thread_range_error_shared_with_fpu_regs_stub_offset = 180;
+static constexpr dart::compiler::target::word
+    Thread_range_error_shared_without_fpu_regs_stub_offset = 176;
 static constexpr dart::compiler::target::word Thread_object_null_offset = 112;
 static constexpr dart::compiler::target::word
-    Thread_predefined_symbols_address_offset = 336;
-static constexpr dart::compiler::target::word Thread_resume_pc_offset = 680;
+    Thread_predefined_symbols_address_offset = 344;
+static constexpr dart::compiler::target::word Thread_resume_pc_offset = 692;
 static constexpr dart::compiler::target::word
-    Thread_saved_shadow_call_stack_offset = 684;
+    Thread_saved_shadow_call_stack_offset = 696;
 static constexpr dart::compiler::target::word Thread_safepoint_state_offset =
-    692;
+    704;
 static constexpr dart::compiler::target::word
-    Thread_slow_type_test_stub_offset = 236;
+    Thread_slow_type_test_stub_offset = 244;
 static constexpr dart::compiler::target::word
-    Thread_slow_type_test_entry_point_offset = 316;
+    Thread_slow_type_test_entry_point_offset = 324;
 static constexpr dart::compiler::target::word Thread_stack_limit_offset = 36;
 static constexpr dart::compiler::target::word Thread_saved_stack_limit_offset =
     60;
 static constexpr dart::compiler::target::word
     Thread_stack_overflow_flags_offset = 64;
 static constexpr dart::compiler::target::word
-    Thread_stack_overflow_shared_with_fpu_regs_entry_point_offset = 292;
+    Thread_stack_overflow_shared_with_fpu_regs_entry_point_offset = 300;
 static constexpr dart::compiler::target::word
-    Thread_stack_overflow_shared_with_fpu_regs_stub_offset = 200;
+    Thread_stack_overflow_shared_with_fpu_regs_stub_offset = 208;
 static constexpr dart::compiler::target::word
-    Thread_stack_overflow_shared_without_fpu_regs_entry_point_offset = 288;
+    Thread_stack_overflow_shared_without_fpu_regs_entry_point_offset = 296;
 static constexpr dart::compiler::target::word
-    Thread_stack_overflow_shared_without_fpu_regs_stub_offset = 196;
+    Thread_stack_overflow_shared_without_fpu_regs_stub_offset = 204;
 static constexpr dart::compiler::target::word Thread_store_buffer_block_offset =
     80;
 static constexpr dart::compiler::target::word
@@ -3284,10 +3312,10 @@
 static constexpr dart::compiler::target::word Thread_write_barrier_code_offset =
     124;
 static constexpr dart::compiler::target::word
-    Thread_write_barrier_entry_point_offset = 256;
+    Thread_write_barrier_entry_point_offset = 264;
 static constexpr dart::compiler::target::word Thread_write_barrier_mask_offset =
     40;
-static constexpr dart::compiler::target::word Thread_callback_code_offset = 696;
+static constexpr dart::compiler::target::word Thread_callback_code_offset = 708;
 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;
@@ -3608,152 +3636,156 @@
 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 = 720;
+    Thread_AllocateArray_entry_point_offset = 736;
 static constexpr dart::compiler::target::word Thread_active_exception_offset =
-    1480;
+    1504;
 static constexpr dart::compiler::target::word Thread_active_stacktrace_offset =
-    1488;
+    1512;
 static constexpr dart::compiler::target::word
     Thread_array_write_barrier_code_offset = 240;
 static constexpr dart::compiler::target::word
-    Thread_array_write_barrier_entry_point_offset = 504;
+    Thread_array_write_barrier_entry_point_offset = 520;
 static constexpr dart::compiler::target::word
-    Thread_allocate_mint_with_fpu_regs_entry_point_offset = 520;
+    Thread_allocate_mint_with_fpu_regs_entry_point_offset = 536;
 static constexpr dart::compiler::target::word
-    Thread_allocate_mint_with_fpu_regs_stub_offset = 336;
+    Thread_allocate_mint_with_fpu_regs_stub_offset = 352;
 static constexpr dart::compiler::target::word
-    Thread_allocate_mint_without_fpu_regs_entry_point_offset = 528;
+    Thread_allocate_mint_without_fpu_regs_entry_point_offset = 544;
 static constexpr dart::compiler::target::word
-    Thread_allocate_mint_without_fpu_regs_stub_offset = 344;
+    Thread_allocate_mint_without_fpu_regs_stub_offset = 360;
 static constexpr dart::compiler::target::word
-    Thread_allocate_object_entry_point_offset = 536;
+    Thread_allocate_object_entry_point_offset = 552;
 static constexpr dart::compiler::target::word
-    Thread_allocate_object_stub_offset = 352;
+    Thread_allocate_object_stub_offset = 368;
 static constexpr dart::compiler::target::word
-    Thread_allocate_object_parameterized_entry_point_offset = 544;
+    Thread_allocate_object_parameterized_entry_point_offset = 560;
 static constexpr dart::compiler::target::word
-    Thread_allocate_object_parameterized_stub_offset = 360;
+    Thread_allocate_object_parameterized_stub_offset = 376;
 static constexpr dart::compiler::target::word
-    Thread_allocate_object_slow_entry_point_offset = 552;
+    Thread_allocate_object_slow_entry_point_offset = 568;
 static constexpr dart::compiler::target::word
-    Thread_allocate_object_slow_stub_offset = 368;
+    Thread_allocate_object_slow_stub_offset = 384;
 static constexpr dart::compiler::target::word Thread_api_top_scope_offset =
-    1552;
+    1576;
 static constexpr dart::compiler::target::word Thread_async_stack_trace_offset =
     192;
 static constexpr dart::compiler::target::word
-    Thread_auto_scope_native_wrapper_entry_point_offset = 640;
+    Thread_auto_scope_native_wrapper_entry_point_offset = 656;
 static constexpr dart::compiler::target::word Thread_bool_false_offset = 224;
 static constexpr dart::compiler::target::word Thread_bool_true_offset = 216;
 static constexpr dart::compiler::target::word
-    Thread_bootstrap_native_wrapper_entry_point_offset = 624;
+    Thread_bootstrap_native_wrapper_entry_point_offset = 640;
 static constexpr dart::compiler::target::word
-    Thread_call_to_runtime_entry_point_offset = 512;
+    Thread_call_to_runtime_entry_point_offset = 528;
 static constexpr dart::compiler::target::word
     Thread_call_to_runtime_stub_offset = 280;
-static constexpr dart::compiler::target::word Thread_dart_stream_offset = 1568;
+static constexpr dart::compiler::target::word Thread_dart_stream_offset = 1592;
 static constexpr dart::compiler::target::word
     Thread_dispatch_table_array_offset = 96;
 static constexpr dart::compiler::target::word Thread_optimize_entry_offset =
-    592;
-static constexpr dart::compiler::target::word Thread_optimize_stub_offset = 424;
+    608;
+static constexpr dart::compiler::target::word Thread_optimize_stub_offset = 440;
 static constexpr dart::compiler::target::word Thread_deoptimize_entry_offset =
-    600;
+    616;
 static constexpr dart::compiler::target::word Thread_deoptimize_stub_offset =
-    432;
+    448;
 static constexpr dart::compiler::target::word Thread_double_abs_address_offset =
-    680;
+    696;
 static constexpr dart::compiler::target::word
-    Thread_double_negate_address_offset = 672;
+    Thread_double_negate_address_offset = 688;
 static constexpr dart::compiler::target::word Thread_end_offset = 112;
 static constexpr dart::compiler::target::word
-    Thread_enter_safepoint_stub_offset = 472;
+    Thread_enter_safepoint_stub_offset = 488;
 static constexpr dart::compiler::target::word Thread_execution_state_offset =
-    1520;
+    1544;
 static constexpr dart::compiler::target::word
-    Thread_exit_safepoint_stub_offset = 480;
+    Thread_exit_safepoint_stub_offset = 496;
 static constexpr dart::compiler::target::word
-    Thread_call_native_through_safepoint_stub_offset = 488;
+    Thread_call_native_through_safepoint_stub_offset = 504;
 static constexpr dart::compiler::target::word
-    Thread_call_native_through_safepoint_entry_point_offset = 608;
+    Thread_call_native_through_safepoint_entry_point_offset = 624;
 static constexpr dart::compiler::target::word
     Thread_fix_allocation_stub_code_offset = 256;
 static constexpr dart::compiler::target::word
     Thread_fix_callers_target_code_offset = 248;
 static constexpr dart::compiler::target::word
-    Thread_float_absolute_address_offset = 704;
+    Thread_float_absolute_address_offset = 720;
 static constexpr dart::compiler::target::word
-    Thread_float_negate_address_offset = 696;
+    Thread_float_negate_address_offset = 712;
 static constexpr dart::compiler::target::word Thread_float_not_address_offset =
-    688;
+    704;
 static constexpr dart::compiler::target::word
-    Thread_float_zerow_address_offset = 712;
+    Thread_float_zerow_address_offset = 728;
 static constexpr dart::compiler::target::word Thread_global_object_pool_offset =
-    1496;
+    1520;
 static constexpr dart::compiler::target::word
-    Thread_interpret_call_entry_point_offset = 648;
+    Thread_interpret_call_entry_point_offset = 664;
 static constexpr dart::compiler::target::word
     Thread_invoke_dart_code_from_bytecode_stub_offset = 272;
 static constexpr dart::compiler::target::word
     Thread_invoke_dart_code_stub_offset = 264;
 static constexpr dart::compiler::target::word Thread_exit_through_ffi_offset =
-    1544;
+    1568;
 static constexpr dart::compiler::target::word Thread_isolate_offset = 88;
 static constexpr dart::compiler::target::word Thread_field_table_values_offset =
     136;
 static constexpr dart::compiler::target::word
-    Thread_lazy_deopt_from_return_stub_offset = 440;
+    Thread_lazy_deopt_from_return_stub_offset = 456;
 static constexpr dart::compiler::target::word
-    Thread_lazy_deopt_from_throw_stub_offset = 448;
+    Thread_lazy_deopt_from_throw_stub_offset = 464;
 static constexpr dart::compiler::target::word
-    Thread_lazy_specialize_type_test_stub_offset = 464;
+    Thread_lazy_specialize_type_test_stub_offset = 480;
 static constexpr dart::compiler::target::word
     Thread_marking_stack_block_offset = 168;
 static constexpr dart::compiler::target::word
-    Thread_megamorphic_call_checked_entry_offset = 576;
+    Thread_megamorphic_call_checked_entry_offset = 592;
 static constexpr dart::compiler::target::word
-    Thread_switchable_call_miss_entry_offset = 584;
+    Thread_switchable_call_miss_entry_offset = 600;
 static constexpr dart::compiler::target::word
-    Thread_switchable_call_miss_stub_offset = 392;
+    Thread_switchable_call_miss_stub_offset = 408;
 static constexpr dart::compiler::target::word
-    Thread_no_scope_native_wrapper_entry_point_offset = 632;
+    Thread_no_scope_native_wrapper_entry_point_offset = 648;
 static constexpr dart::compiler::target::word
     Thread_null_error_shared_with_fpu_regs_stub_offset = 296;
 static constexpr dart::compiler::target::word
-    Thread_null_arg_error_shared_with_fpu_regs_stub_offset = 312;
-static constexpr dart::compiler::target::word
-    Thread_range_error_shared_with_fpu_regs_stub_offset = 328;
-static constexpr dart::compiler::target::word
     Thread_null_error_shared_without_fpu_regs_stub_offset = 288;
 static constexpr dart::compiler::target::word
+    Thread_null_arg_error_shared_with_fpu_regs_stub_offset = 312;
+static constexpr dart::compiler::target::word
     Thread_null_arg_error_shared_without_fpu_regs_stub_offset = 304;
 static constexpr dart::compiler::target::word
-    Thread_range_error_shared_without_fpu_regs_stub_offset = 320;
+    Thread_null_cast_error_shared_with_fpu_regs_stub_offset = 328;
+static constexpr dart::compiler::target::word
+    Thread_null_cast_error_shared_without_fpu_regs_stub_offset = 320;
+static constexpr dart::compiler::target::word
+    Thread_range_error_shared_with_fpu_regs_stub_offset = 344;
+static constexpr dart::compiler::target::word
+    Thread_range_error_shared_without_fpu_regs_stub_offset = 336;
 static constexpr dart::compiler::target::word Thread_object_null_offset = 208;
 static constexpr dart::compiler::target::word
-    Thread_predefined_symbols_address_offset = 656;
-static constexpr dart::compiler::target::word Thread_resume_pc_offset = 1504;
+    Thread_predefined_symbols_address_offset = 672;
+static constexpr dart::compiler::target::word Thread_resume_pc_offset = 1528;
 static constexpr dart::compiler::target::word
-    Thread_saved_shadow_call_stack_offset = 1512;
+    Thread_saved_shadow_call_stack_offset = 1536;
 static constexpr dart::compiler::target::word Thread_safepoint_state_offset =
-    1528;
+    1552;
 static constexpr dart::compiler::target::word
-    Thread_slow_type_test_stub_offset = 456;
+    Thread_slow_type_test_stub_offset = 472;
 static constexpr dart::compiler::target::word
-    Thread_slow_type_test_entry_point_offset = 616;
+    Thread_slow_type_test_entry_point_offset = 632;
 static constexpr dart::compiler::target::word Thread_stack_limit_offset = 72;
 static constexpr dart::compiler::target::word Thread_saved_stack_limit_offset =
     120;
 static constexpr dart::compiler::target::word
     Thread_stack_overflow_flags_offset = 128;
 static constexpr dart::compiler::target::word
-    Thread_stack_overflow_shared_with_fpu_regs_entry_point_offset = 568;
+    Thread_stack_overflow_shared_with_fpu_regs_entry_point_offset = 584;
 static constexpr dart::compiler::target::word
-    Thread_stack_overflow_shared_with_fpu_regs_stub_offset = 384;
+    Thread_stack_overflow_shared_with_fpu_regs_stub_offset = 400;
 static constexpr dart::compiler::target::word
-    Thread_stack_overflow_shared_without_fpu_regs_entry_point_offset = 560;
+    Thread_stack_overflow_shared_without_fpu_regs_entry_point_offset = 576;
 static constexpr dart::compiler::target::word
-    Thread_stack_overflow_shared_without_fpu_regs_stub_offset = 376;
+    Thread_stack_overflow_shared_without_fpu_regs_stub_offset = 392;
 static constexpr dart::compiler::target::word Thread_store_buffer_block_offset =
     160;
 static constexpr dart::compiler::target::word
@@ -3766,11 +3798,11 @@
 static constexpr dart::compiler::target::word Thread_write_barrier_code_offset =
     232;
 static constexpr dart::compiler::target::word
-    Thread_write_barrier_entry_point_offset = 496;
+    Thread_write_barrier_entry_point_offset = 512;
 static constexpr dart::compiler::target::word Thread_write_barrier_mask_offset =
     80;
 static constexpr dart::compiler::target::word Thread_callback_code_offset =
-    1536;
+    1560;
 static constexpr dart::compiler::target::word TimelineStream_enabled_offset =
     16;
 static constexpr dart::compiler::target::word TwoByteString_data_offset = 16;
@@ -3810,9 +3842,9 @@
     8, 24, 16, 32};
 static constexpr dart::compiler::target::word
     Thread_write_barrier_wrappers_thread_offset[] = {
-        1320, 1328, 1336, 1344, 1352, 1360, 1368, 1376, 1384, 1392, 1400,
-        1408, 1416, 1424, 1432, -1,   -1,   -1,   -1,   1440, 1448, -1,
-        -1,   1456, 1464, 1472, -1,   -1,   -1,   -1,   -1,   -1};
+        1344, 1352, 1360, 1368, 1376, 1384, 1392, 1400, 1408, 1416, 1424,
+        1432, 1440, 1448, 1456, -1,   -1,   -1,   -1,   1464, 1472, -1,
+        -1,   1480, 1488, 1496, -1,   -1,   -1,   -1,   -1,   -1};
 static constexpr dart::compiler::target::word ApiError_InstanceSize = 16;
 static constexpr dart::compiler::target::word Array_InstanceSize = 24;
 static constexpr dart::compiler::target::word Array_header_size = 24;
@@ -4111,143 +4143,147 @@
 static constexpr dart::compiler::target::word
     AOT_SubtypeTestCache_cache_offset = 4;
 static constexpr dart::compiler::target::word
-    AOT_Thread_AllocateArray_entry_point_offset = 368;
+    AOT_Thread_AllocateArray_entry_point_offset = 376;
 static constexpr dart::compiler::target::word
-    AOT_Thread_active_exception_offset = 700;
+    AOT_Thread_active_exception_offset = 712;
 static constexpr dart::compiler::target::word
-    AOT_Thread_active_stacktrace_offset = 704;
+    AOT_Thread_active_stacktrace_offset = 716;
 static constexpr dart::compiler::target::word
     AOT_Thread_array_write_barrier_code_offset = 128;
 static constexpr dart::compiler::target::word
-    AOT_Thread_array_write_barrier_entry_point_offset = 260;
+    AOT_Thread_array_write_barrier_entry_point_offset = 268;
 static constexpr dart::compiler::target::word
-    AOT_Thread_allocate_mint_with_fpu_regs_entry_point_offset = 268;
+    AOT_Thread_allocate_mint_with_fpu_regs_entry_point_offset = 276;
 static constexpr dart::compiler::target::word
-    AOT_Thread_allocate_mint_with_fpu_regs_stub_offset = 176;
+    AOT_Thread_allocate_mint_with_fpu_regs_stub_offset = 184;
 static constexpr dart::compiler::target::word
-    AOT_Thread_allocate_mint_without_fpu_regs_entry_point_offset = 272;
+    AOT_Thread_allocate_mint_without_fpu_regs_entry_point_offset = 280;
 static constexpr dart::compiler::target::word
-    AOT_Thread_allocate_mint_without_fpu_regs_stub_offset = 180;
+    AOT_Thread_allocate_mint_without_fpu_regs_stub_offset = 188;
 static constexpr dart::compiler::target::word
-    AOT_Thread_allocate_object_entry_point_offset = 276;
+    AOT_Thread_allocate_object_entry_point_offset = 284;
 static constexpr dart::compiler::target::word
-    AOT_Thread_allocate_object_stub_offset = 184;
+    AOT_Thread_allocate_object_stub_offset = 192;
 static constexpr dart::compiler::target::word
-    AOT_Thread_allocate_object_parameterized_entry_point_offset = 280;
+    AOT_Thread_allocate_object_parameterized_entry_point_offset = 288;
 static constexpr dart::compiler::target::word
-    AOT_Thread_allocate_object_parameterized_stub_offset = 188;
+    AOT_Thread_allocate_object_parameterized_stub_offset = 196;
 static constexpr dart::compiler::target::word
-    AOT_Thread_allocate_object_slow_entry_point_offset = 284;
+    AOT_Thread_allocate_object_slow_entry_point_offset = 292;
 static constexpr dart::compiler::target::word
-    AOT_Thread_allocate_object_slow_stub_offset = 192;
+    AOT_Thread_allocate_object_slow_stub_offset = 200;
 static constexpr dart::compiler::target::word AOT_Thread_api_top_scope_offset =
-    736;
+    748;
 static constexpr dart::compiler::target::word
     AOT_Thread_async_stack_trace_offset = 96;
 static constexpr dart::compiler::target::word
-    AOT_Thread_auto_scope_native_wrapper_entry_point_offset = 328;
+    AOT_Thread_auto_scope_native_wrapper_entry_point_offset = 336;
 static constexpr dart::compiler::target::word AOT_Thread_bool_false_offset =
     120;
 static constexpr dart::compiler::target::word AOT_Thread_bool_true_offset = 116;
 static constexpr dart::compiler::target::word
-    AOT_Thread_bootstrap_native_wrapper_entry_point_offset = 320;
+    AOT_Thread_bootstrap_native_wrapper_entry_point_offset = 328;
 static constexpr dart::compiler::target::word
-    AOT_Thread_call_to_runtime_entry_point_offset = 264;
+    AOT_Thread_call_to_runtime_entry_point_offset = 272;
 static constexpr dart::compiler::target::word
     AOT_Thread_call_to_runtime_stub_offset = 148;
 static constexpr dart::compiler::target::word AOT_Thread_dart_stream_offset =
-    744;
+    756;
 static constexpr dart::compiler::target::word
     AOT_Thread_dispatch_table_array_offset = 48;
 static constexpr dart::compiler::target::word AOT_Thread_optimize_entry_offset =
-    304;
+    312;
 static constexpr dart::compiler::target::word AOT_Thread_optimize_stub_offset =
-    220;
+    228;
 static constexpr dart::compiler::target::word
-    AOT_Thread_deoptimize_entry_offset = 308;
+    AOT_Thread_deoptimize_entry_offset = 316;
 static constexpr dart::compiler::target::word
-    AOT_Thread_deoptimize_stub_offset = 224;
+    AOT_Thread_deoptimize_stub_offset = 232;
 static constexpr dart::compiler::target::word
-    AOT_Thread_double_abs_address_offset = 348;
+    AOT_Thread_double_abs_address_offset = 356;
 static constexpr dart::compiler::target::word
-    AOT_Thread_double_negate_address_offset = 344;
+    AOT_Thread_double_negate_address_offset = 352;
 static constexpr dart::compiler::target::word AOT_Thread_end_offset = 56;
 static constexpr dart::compiler::target::word
-    AOT_Thread_enter_safepoint_stub_offset = 244;
+    AOT_Thread_enter_safepoint_stub_offset = 252;
 static constexpr dart::compiler::target::word
-    AOT_Thread_execution_state_offset = 720;
+    AOT_Thread_execution_state_offset = 732;
 static constexpr dart::compiler::target::word
-    AOT_Thread_exit_safepoint_stub_offset = 248;
+    AOT_Thread_exit_safepoint_stub_offset = 256;
 static constexpr dart::compiler::target::word
-    AOT_Thread_call_native_through_safepoint_stub_offset = 252;
+    AOT_Thread_call_native_through_safepoint_stub_offset = 260;
 static constexpr dart::compiler::target::word
-    AOT_Thread_call_native_through_safepoint_entry_point_offset = 312;
+    AOT_Thread_call_native_through_safepoint_entry_point_offset = 320;
 static constexpr dart::compiler::target::word
     AOT_Thread_fix_allocation_stub_code_offset = 136;
 static constexpr dart::compiler::target::word
     AOT_Thread_fix_callers_target_code_offset = 132;
 static constexpr dart::compiler::target::word
-    AOT_Thread_float_absolute_address_offset = 360;
+    AOT_Thread_float_absolute_address_offset = 368;
 static constexpr dart::compiler::target::word
-    AOT_Thread_float_negate_address_offset = 356;
+    AOT_Thread_float_negate_address_offset = 364;
 static constexpr dart::compiler::target::word
-    AOT_Thread_float_not_address_offset = 352;
+    AOT_Thread_float_not_address_offset = 360;
 static constexpr dart::compiler::target::word
-    AOT_Thread_float_zerow_address_offset = 364;
+    AOT_Thread_float_zerow_address_offset = 372;
 static constexpr dart::compiler::target::word
-    AOT_Thread_global_object_pool_offset = 708;
+    AOT_Thread_global_object_pool_offset = 720;
 static constexpr dart::compiler::target::word
-    AOT_Thread_interpret_call_entry_point_offset = 332;
+    AOT_Thread_interpret_call_entry_point_offset = 340;
 static constexpr dart::compiler::target::word
     AOT_Thread_invoke_dart_code_from_bytecode_stub_offset = 144;
 static constexpr dart::compiler::target::word
     AOT_Thread_invoke_dart_code_stub_offset = 140;
 static constexpr dart::compiler::target::word
-    AOT_Thread_exit_through_ffi_offset = 732;
+    AOT_Thread_exit_through_ffi_offset = 744;
 static constexpr dart::compiler::target::word AOT_Thread_isolate_offset = 44;
 static constexpr dart::compiler::target::word
     AOT_Thread_field_table_values_offset = 68;
 static constexpr dart::compiler::target::word
-    AOT_Thread_lazy_deopt_from_return_stub_offset = 228;
+    AOT_Thread_lazy_deopt_from_return_stub_offset = 236;
 static constexpr dart::compiler::target::word
-    AOT_Thread_lazy_deopt_from_throw_stub_offset = 232;
+    AOT_Thread_lazy_deopt_from_throw_stub_offset = 240;
 static constexpr dart::compiler::target::word
-    AOT_Thread_lazy_specialize_type_test_stub_offset = 240;
+    AOT_Thread_lazy_specialize_type_test_stub_offset = 248;
 static constexpr dart::compiler::target::word
     AOT_Thread_marking_stack_block_offset = 84;
 static constexpr dart::compiler::target::word
-    AOT_Thread_megamorphic_call_checked_entry_offset = 296;
+    AOT_Thread_megamorphic_call_checked_entry_offset = 304;
 static constexpr dart::compiler::target::word
-    AOT_Thread_switchable_call_miss_entry_offset = 300;
+    AOT_Thread_switchable_call_miss_entry_offset = 308;
 static constexpr dart::compiler::target::word
-    AOT_Thread_switchable_call_miss_stub_offset = 204;
+    AOT_Thread_switchable_call_miss_stub_offset = 212;
 static constexpr dart::compiler::target::word
-    AOT_Thread_no_scope_native_wrapper_entry_point_offset = 324;
+    AOT_Thread_no_scope_native_wrapper_entry_point_offset = 332;
 static constexpr dart::compiler::target::word
     AOT_Thread_null_error_shared_with_fpu_regs_stub_offset = 156;
 static constexpr dart::compiler::target::word
-    AOT_Thread_null_arg_error_shared_with_fpu_regs_stub_offset = 164;
-static constexpr dart::compiler::target::word
-    AOT_Thread_range_error_shared_with_fpu_regs_stub_offset = 172;
-static constexpr dart::compiler::target::word
     AOT_Thread_null_error_shared_without_fpu_regs_stub_offset = 152;
 static constexpr dart::compiler::target::word
+    AOT_Thread_null_arg_error_shared_with_fpu_regs_stub_offset = 164;
+static constexpr dart::compiler::target::word
     AOT_Thread_null_arg_error_shared_without_fpu_regs_stub_offset = 160;
 static constexpr dart::compiler::target::word
-    AOT_Thread_range_error_shared_without_fpu_regs_stub_offset = 168;
+    AOT_Thread_null_cast_error_shared_with_fpu_regs_stub_offset = 172;
+static constexpr dart::compiler::target::word
+    AOT_Thread_null_cast_error_shared_without_fpu_regs_stub_offset = 168;
+static constexpr dart::compiler::target::word
+    AOT_Thread_range_error_shared_with_fpu_regs_stub_offset = 180;
+static constexpr dart::compiler::target::word
+    AOT_Thread_range_error_shared_without_fpu_regs_stub_offset = 176;
 static constexpr dart::compiler::target::word AOT_Thread_object_null_offset =
     112;
 static constexpr dart::compiler::target::word
-    AOT_Thread_predefined_symbols_address_offset = 336;
-static constexpr dart::compiler::target::word AOT_Thread_resume_pc_offset = 712;
+    AOT_Thread_predefined_symbols_address_offset = 344;
+static constexpr dart::compiler::target::word AOT_Thread_resume_pc_offset = 724;
 static constexpr dart::compiler::target::word
-    AOT_Thread_saved_shadow_call_stack_offset = 716;
+    AOT_Thread_saved_shadow_call_stack_offset = 728;
 static constexpr dart::compiler::target::word
-    AOT_Thread_safepoint_state_offset = 724;
+    AOT_Thread_safepoint_state_offset = 736;
 static constexpr dart::compiler::target::word
-    AOT_Thread_slow_type_test_stub_offset = 236;
+    AOT_Thread_slow_type_test_stub_offset = 244;
 static constexpr dart::compiler::target::word
-    AOT_Thread_slow_type_test_entry_point_offset = 316;
+    AOT_Thread_slow_type_test_entry_point_offset = 324;
 static constexpr dart::compiler::target::word AOT_Thread_stack_limit_offset =
     36;
 static constexpr dart::compiler::target::word
@@ -4255,13 +4291,13 @@
 static constexpr dart::compiler::target::word
     AOT_Thread_stack_overflow_flags_offset = 64;
 static constexpr dart::compiler::target::word
-    AOT_Thread_stack_overflow_shared_with_fpu_regs_entry_point_offset = 292;
+    AOT_Thread_stack_overflow_shared_with_fpu_regs_entry_point_offset = 300;
 static constexpr dart::compiler::target::word
-    AOT_Thread_stack_overflow_shared_with_fpu_regs_stub_offset = 200;
+    AOT_Thread_stack_overflow_shared_with_fpu_regs_stub_offset = 208;
 static constexpr dart::compiler::target::word
-    AOT_Thread_stack_overflow_shared_without_fpu_regs_entry_point_offset = 288;
+    AOT_Thread_stack_overflow_shared_without_fpu_regs_entry_point_offset = 296;
 static constexpr dart::compiler::target::word
-    AOT_Thread_stack_overflow_shared_without_fpu_regs_stub_offset = 196;
+    AOT_Thread_stack_overflow_shared_without_fpu_regs_stub_offset = 204;
 static constexpr dart::compiler::target::word
     AOT_Thread_store_buffer_block_offset = 80;
 static constexpr dart::compiler::target::word
@@ -4275,11 +4311,11 @@
 static constexpr dart::compiler::target::word
     AOT_Thread_write_barrier_code_offset = 124;
 static constexpr dart::compiler::target::word
-    AOT_Thread_write_barrier_entry_point_offset = 256;
+    AOT_Thread_write_barrier_entry_point_offset = 264;
 static constexpr dart::compiler::target::word
     AOT_Thread_write_barrier_mask_offset = 40;
 static constexpr dart::compiler::target::word AOT_Thread_callback_code_offset =
-    728;
+    740;
 static constexpr dart::compiler::target::word
     AOT_TimelineStream_enabled_offset = 8;
 static constexpr dart::compiler::target::word AOT_TwoByteString_data_offset =
@@ -4328,7 +4364,7 @@
     4, 12, 8, 16};
 static constexpr dart::compiler::target::word
     AOT_Thread_write_barrier_wrappers_thread_offset[] = {
-        668, 672, 676, 680, 684, -1, 688, -1, 692, 696, -1, -1, -1, -1, -1, -1};
+        680, 684, 688, 692, 696, -1, 700, -1, 704, 708, -1, -1, -1, -1, -1, -1};
 static constexpr dart::compiler::target::word AOT_ApiError_InstanceSize = 8;
 static constexpr dart::compiler::target::word AOT_Array_InstanceSize = 12;
 static constexpr dart::compiler::target::word AOT_Array_header_size = 12;
@@ -4643,144 +4679,148 @@
 static constexpr dart::compiler::target::word
     AOT_SubtypeTestCache_cache_offset = 8;
 static constexpr dart::compiler::target::word
-    AOT_Thread_AllocateArray_entry_point_offset = 720;
+    AOT_Thread_AllocateArray_entry_point_offset = 736;
 static constexpr dart::compiler::target::word
-    AOT_Thread_active_exception_offset = 1408;
+    AOT_Thread_active_exception_offset = 1432;
 static constexpr dart::compiler::target::word
-    AOT_Thread_active_stacktrace_offset = 1416;
+    AOT_Thread_active_stacktrace_offset = 1440;
 static constexpr dart::compiler::target::word
     AOT_Thread_array_write_barrier_code_offset = 240;
 static constexpr dart::compiler::target::word
-    AOT_Thread_array_write_barrier_entry_point_offset = 504;
+    AOT_Thread_array_write_barrier_entry_point_offset = 520;
 static constexpr dart::compiler::target::word
-    AOT_Thread_allocate_mint_with_fpu_regs_entry_point_offset = 520;
+    AOT_Thread_allocate_mint_with_fpu_regs_entry_point_offset = 536;
 static constexpr dart::compiler::target::word
-    AOT_Thread_allocate_mint_with_fpu_regs_stub_offset = 336;
+    AOT_Thread_allocate_mint_with_fpu_regs_stub_offset = 352;
 static constexpr dart::compiler::target::word
-    AOT_Thread_allocate_mint_without_fpu_regs_entry_point_offset = 528;
+    AOT_Thread_allocate_mint_without_fpu_regs_entry_point_offset = 544;
 static constexpr dart::compiler::target::word
-    AOT_Thread_allocate_mint_without_fpu_regs_stub_offset = 344;
+    AOT_Thread_allocate_mint_without_fpu_regs_stub_offset = 360;
 static constexpr dart::compiler::target::word
-    AOT_Thread_allocate_object_entry_point_offset = 536;
+    AOT_Thread_allocate_object_entry_point_offset = 552;
 static constexpr dart::compiler::target::word
-    AOT_Thread_allocate_object_stub_offset = 352;
+    AOT_Thread_allocate_object_stub_offset = 368;
 static constexpr dart::compiler::target::word
-    AOT_Thread_allocate_object_parameterized_entry_point_offset = 544;
+    AOT_Thread_allocate_object_parameterized_entry_point_offset = 560;
 static constexpr dart::compiler::target::word
-    AOT_Thread_allocate_object_parameterized_stub_offset = 360;
+    AOT_Thread_allocate_object_parameterized_stub_offset = 376;
 static constexpr dart::compiler::target::word
-    AOT_Thread_allocate_object_slow_entry_point_offset = 552;
+    AOT_Thread_allocate_object_slow_entry_point_offset = 568;
 static constexpr dart::compiler::target::word
-    AOT_Thread_allocate_object_slow_stub_offset = 368;
+    AOT_Thread_allocate_object_slow_stub_offset = 384;
 static constexpr dart::compiler::target::word AOT_Thread_api_top_scope_offset =
-    1480;
+    1504;
 static constexpr dart::compiler::target::word
     AOT_Thread_async_stack_trace_offset = 192;
 static constexpr dart::compiler::target::word
-    AOT_Thread_auto_scope_native_wrapper_entry_point_offset = 640;
+    AOT_Thread_auto_scope_native_wrapper_entry_point_offset = 656;
 static constexpr dart::compiler::target::word AOT_Thread_bool_false_offset =
     224;
 static constexpr dart::compiler::target::word AOT_Thread_bool_true_offset = 216;
 static constexpr dart::compiler::target::word
-    AOT_Thread_bootstrap_native_wrapper_entry_point_offset = 624;
+    AOT_Thread_bootstrap_native_wrapper_entry_point_offset = 640;
 static constexpr dart::compiler::target::word
-    AOT_Thread_call_to_runtime_entry_point_offset = 512;
+    AOT_Thread_call_to_runtime_entry_point_offset = 528;
 static constexpr dart::compiler::target::word
     AOT_Thread_call_to_runtime_stub_offset = 280;
 static constexpr dart::compiler::target::word AOT_Thread_dart_stream_offset =
-    1496;
+    1520;
 static constexpr dart::compiler::target::word
     AOT_Thread_dispatch_table_array_offset = 96;
 static constexpr dart::compiler::target::word AOT_Thread_optimize_entry_offset =
-    592;
+    608;
 static constexpr dart::compiler::target::word AOT_Thread_optimize_stub_offset =
-    424;
+    440;
 static constexpr dart::compiler::target::word
-    AOT_Thread_deoptimize_entry_offset = 600;
+    AOT_Thread_deoptimize_entry_offset = 616;
 static constexpr dart::compiler::target::word
-    AOT_Thread_deoptimize_stub_offset = 432;
+    AOT_Thread_deoptimize_stub_offset = 448;
 static constexpr dart::compiler::target::word
-    AOT_Thread_double_abs_address_offset = 680;
+    AOT_Thread_double_abs_address_offset = 696;
 static constexpr dart::compiler::target::word
-    AOT_Thread_double_negate_address_offset = 672;
+    AOT_Thread_double_negate_address_offset = 688;
 static constexpr dart::compiler::target::word AOT_Thread_end_offset = 112;
 static constexpr dart::compiler::target::word
-    AOT_Thread_enter_safepoint_stub_offset = 472;
+    AOT_Thread_enter_safepoint_stub_offset = 488;
 static constexpr dart::compiler::target::word
-    AOT_Thread_execution_state_offset = 1448;
+    AOT_Thread_execution_state_offset = 1472;
 static constexpr dart::compiler::target::word
-    AOT_Thread_exit_safepoint_stub_offset = 480;
+    AOT_Thread_exit_safepoint_stub_offset = 496;
 static constexpr dart::compiler::target::word
-    AOT_Thread_call_native_through_safepoint_stub_offset = 488;
+    AOT_Thread_call_native_through_safepoint_stub_offset = 504;
 static constexpr dart::compiler::target::word
-    AOT_Thread_call_native_through_safepoint_entry_point_offset = 608;
+    AOT_Thread_call_native_through_safepoint_entry_point_offset = 624;
 static constexpr dart::compiler::target::word
     AOT_Thread_fix_allocation_stub_code_offset = 256;
 static constexpr dart::compiler::target::word
     AOT_Thread_fix_callers_target_code_offset = 248;
 static constexpr dart::compiler::target::word
-    AOT_Thread_float_absolute_address_offset = 704;
+    AOT_Thread_float_absolute_address_offset = 720;
 static constexpr dart::compiler::target::word
-    AOT_Thread_float_negate_address_offset = 696;
+    AOT_Thread_float_negate_address_offset = 712;
 static constexpr dart::compiler::target::word
-    AOT_Thread_float_not_address_offset = 688;
+    AOT_Thread_float_not_address_offset = 704;
 static constexpr dart::compiler::target::word
-    AOT_Thread_float_zerow_address_offset = 712;
+    AOT_Thread_float_zerow_address_offset = 728;
 static constexpr dart::compiler::target::word
-    AOT_Thread_global_object_pool_offset = 1424;
+    AOT_Thread_global_object_pool_offset = 1448;
 static constexpr dart::compiler::target::word
-    AOT_Thread_interpret_call_entry_point_offset = 648;
+    AOT_Thread_interpret_call_entry_point_offset = 664;
 static constexpr dart::compiler::target::word
     AOT_Thread_invoke_dart_code_from_bytecode_stub_offset = 272;
 static constexpr dart::compiler::target::word
     AOT_Thread_invoke_dart_code_stub_offset = 264;
 static constexpr dart::compiler::target::word
-    AOT_Thread_exit_through_ffi_offset = 1472;
+    AOT_Thread_exit_through_ffi_offset = 1496;
 static constexpr dart::compiler::target::word AOT_Thread_isolate_offset = 88;
 static constexpr dart::compiler::target::word
     AOT_Thread_field_table_values_offset = 136;
 static constexpr dart::compiler::target::word
-    AOT_Thread_lazy_deopt_from_return_stub_offset = 440;
+    AOT_Thread_lazy_deopt_from_return_stub_offset = 456;
 static constexpr dart::compiler::target::word
-    AOT_Thread_lazy_deopt_from_throw_stub_offset = 448;
+    AOT_Thread_lazy_deopt_from_throw_stub_offset = 464;
 static constexpr dart::compiler::target::word
-    AOT_Thread_lazy_specialize_type_test_stub_offset = 464;
+    AOT_Thread_lazy_specialize_type_test_stub_offset = 480;
 static constexpr dart::compiler::target::word
     AOT_Thread_marking_stack_block_offset = 168;
 static constexpr dart::compiler::target::word
-    AOT_Thread_megamorphic_call_checked_entry_offset = 576;
+    AOT_Thread_megamorphic_call_checked_entry_offset = 592;
 static constexpr dart::compiler::target::word
-    AOT_Thread_switchable_call_miss_entry_offset = 584;
+    AOT_Thread_switchable_call_miss_entry_offset = 600;
 static constexpr dart::compiler::target::word
-    AOT_Thread_switchable_call_miss_stub_offset = 392;
+    AOT_Thread_switchable_call_miss_stub_offset = 408;
 static constexpr dart::compiler::target::word
-    AOT_Thread_no_scope_native_wrapper_entry_point_offset = 632;
+    AOT_Thread_no_scope_native_wrapper_entry_point_offset = 648;
 static constexpr dart::compiler::target::word
     AOT_Thread_null_error_shared_with_fpu_regs_stub_offset = 296;
 static constexpr dart::compiler::target::word
-    AOT_Thread_null_arg_error_shared_with_fpu_regs_stub_offset = 312;
-static constexpr dart::compiler::target::word
-    AOT_Thread_range_error_shared_with_fpu_regs_stub_offset = 328;
-static constexpr dart::compiler::target::word
     AOT_Thread_null_error_shared_without_fpu_regs_stub_offset = 288;
 static constexpr dart::compiler::target::word
+    AOT_Thread_null_arg_error_shared_with_fpu_regs_stub_offset = 312;
+static constexpr dart::compiler::target::word
     AOT_Thread_null_arg_error_shared_without_fpu_regs_stub_offset = 304;
 static constexpr dart::compiler::target::word
-    AOT_Thread_range_error_shared_without_fpu_regs_stub_offset = 320;
+    AOT_Thread_null_cast_error_shared_with_fpu_regs_stub_offset = 328;
+static constexpr dart::compiler::target::word
+    AOT_Thread_null_cast_error_shared_without_fpu_regs_stub_offset = 320;
+static constexpr dart::compiler::target::word
+    AOT_Thread_range_error_shared_with_fpu_regs_stub_offset = 344;
+static constexpr dart::compiler::target::word
+    AOT_Thread_range_error_shared_without_fpu_regs_stub_offset = 336;
 static constexpr dart::compiler::target::word AOT_Thread_object_null_offset =
     208;
 static constexpr dart::compiler::target::word
-    AOT_Thread_predefined_symbols_address_offset = 656;
+    AOT_Thread_predefined_symbols_address_offset = 672;
 static constexpr dart::compiler::target::word AOT_Thread_resume_pc_offset =
-    1432;
+    1456;
 static constexpr dart::compiler::target::word
-    AOT_Thread_saved_shadow_call_stack_offset = 1440;
+    AOT_Thread_saved_shadow_call_stack_offset = 1464;
 static constexpr dart::compiler::target::word
-    AOT_Thread_safepoint_state_offset = 1456;
+    AOT_Thread_safepoint_state_offset = 1480;
 static constexpr dart::compiler::target::word
-    AOT_Thread_slow_type_test_stub_offset = 456;
+    AOT_Thread_slow_type_test_stub_offset = 472;
 static constexpr dart::compiler::target::word
-    AOT_Thread_slow_type_test_entry_point_offset = 616;
+    AOT_Thread_slow_type_test_entry_point_offset = 632;
 static constexpr dart::compiler::target::word AOT_Thread_stack_limit_offset =
     72;
 static constexpr dart::compiler::target::word
@@ -4788,13 +4828,13 @@
 static constexpr dart::compiler::target::word
     AOT_Thread_stack_overflow_flags_offset = 128;
 static constexpr dart::compiler::target::word
-    AOT_Thread_stack_overflow_shared_with_fpu_regs_entry_point_offset = 568;
+    AOT_Thread_stack_overflow_shared_with_fpu_regs_entry_point_offset = 584;
 static constexpr dart::compiler::target::word
-    AOT_Thread_stack_overflow_shared_with_fpu_regs_stub_offset = 384;
+    AOT_Thread_stack_overflow_shared_with_fpu_regs_stub_offset = 400;
 static constexpr dart::compiler::target::word
-    AOT_Thread_stack_overflow_shared_without_fpu_regs_entry_point_offset = 560;
+    AOT_Thread_stack_overflow_shared_without_fpu_regs_entry_point_offset = 576;
 static constexpr dart::compiler::target::word
-    AOT_Thread_stack_overflow_shared_without_fpu_regs_stub_offset = 376;
+    AOT_Thread_stack_overflow_shared_without_fpu_regs_stub_offset = 392;
 static constexpr dart::compiler::target::word
     AOT_Thread_store_buffer_block_offset = 160;
 static constexpr dart::compiler::target::word
@@ -4808,11 +4848,11 @@
 static constexpr dart::compiler::target::word
     AOT_Thread_write_barrier_code_offset = 232;
 static constexpr dart::compiler::target::word
-    AOT_Thread_write_barrier_entry_point_offset = 496;
+    AOT_Thread_write_barrier_entry_point_offset = 512;
 static constexpr dart::compiler::target::word
     AOT_Thread_write_barrier_mask_offset = 80;
 static constexpr dart::compiler::target::word AOT_Thread_callback_code_offset =
-    1464;
+    1488;
 static constexpr dart::compiler::target::word
     AOT_TimelineStream_enabled_offset = 16;
 static constexpr dart::compiler::target::word AOT_TwoByteString_data_offset =
@@ -4861,8 +4901,8 @@
     8, 24, 16, 32};
 static constexpr dart::compiler::target::word
     AOT_Thread_write_barrier_wrappers_thread_offset[] = {
-        1320, 1328, 1336, 1344, -1,   -1,   1352, 1360,
-        1368, 1376, 1384, -1,   1392, 1400, -1,   -1};
+        1344, 1352, 1360, 1368, -1,   -1,   1376, 1384,
+        1392, 1400, 1408, -1,   1416, 1424, -1,   -1};
 static constexpr dart::compiler::target::word AOT_ApiError_InstanceSize = 16;
 static constexpr dart::compiler::target::word AOT_Array_InstanceSize = 24;
 static constexpr dart::compiler::target::word AOT_Array_header_size = 24;
@@ -5181,144 +5221,148 @@
 static constexpr dart::compiler::target::word
     AOT_SubtypeTestCache_cache_offset = 8;
 static constexpr dart::compiler::target::word
-    AOT_Thread_AllocateArray_entry_point_offset = 720;
+    AOT_Thread_AllocateArray_entry_point_offset = 736;
 static constexpr dart::compiler::target::word
-    AOT_Thread_active_exception_offset = 1480;
+    AOT_Thread_active_exception_offset = 1504;
 static constexpr dart::compiler::target::word
-    AOT_Thread_active_stacktrace_offset = 1488;
+    AOT_Thread_active_stacktrace_offset = 1512;
 static constexpr dart::compiler::target::word
     AOT_Thread_array_write_barrier_code_offset = 240;
 static constexpr dart::compiler::target::word
-    AOT_Thread_array_write_barrier_entry_point_offset = 504;
+    AOT_Thread_array_write_barrier_entry_point_offset = 520;
 static constexpr dart::compiler::target::word
-    AOT_Thread_allocate_mint_with_fpu_regs_entry_point_offset = 520;
+    AOT_Thread_allocate_mint_with_fpu_regs_entry_point_offset = 536;
 static constexpr dart::compiler::target::word
-    AOT_Thread_allocate_mint_with_fpu_regs_stub_offset = 336;
+    AOT_Thread_allocate_mint_with_fpu_regs_stub_offset = 352;
 static constexpr dart::compiler::target::word
-    AOT_Thread_allocate_mint_without_fpu_regs_entry_point_offset = 528;
+    AOT_Thread_allocate_mint_without_fpu_regs_entry_point_offset = 544;
 static constexpr dart::compiler::target::word
-    AOT_Thread_allocate_mint_without_fpu_regs_stub_offset = 344;
+    AOT_Thread_allocate_mint_without_fpu_regs_stub_offset = 360;
 static constexpr dart::compiler::target::word
-    AOT_Thread_allocate_object_entry_point_offset = 536;
+    AOT_Thread_allocate_object_entry_point_offset = 552;
 static constexpr dart::compiler::target::word
-    AOT_Thread_allocate_object_stub_offset = 352;
+    AOT_Thread_allocate_object_stub_offset = 368;
 static constexpr dart::compiler::target::word
-    AOT_Thread_allocate_object_parameterized_entry_point_offset = 544;
+    AOT_Thread_allocate_object_parameterized_entry_point_offset = 560;
 static constexpr dart::compiler::target::word
-    AOT_Thread_allocate_object_parameterized_stub_offset = 360;
+    AOT_Thread_allocate_object_parameterized_stub_offset = 376;
 static constexpr dart::compiler::target::word
-    AOT_Thread_allocate_object_slow_entry_point_offset = 552;
+    AOT_Thread_allocate_object_slow_entry_point_offset = 568;
 static constexpr dart::compiler::target::word
-    AOT_Thread_allocate_object_slow_stub_offset = 368;
+    AOT_Thread_allocate_object_slow_stub_offset = 384;
 static constexpr dart::compiler::target::word AOT_Thread_api_top_scope_offset =
-    1552;
+    1576;
 static constexpr dart::compiler::target::word
     AOT_Thread_async_stack_trace_offset = 192;
 static constexpr dart::compiler::target::word
-    AOT_Thread_auto_scope_native_wrapper_entry_point_offset = 640;
+    AOT_Thread_auto_scope_native_wrapper_entry_point_offset = 656;
 static constexpr dart::compiler::target::word AOT_Thread_bool_false_offset =
     224;
 static constexpr dart::compiler::target::word AOT_Thread_bool_true_offset = 216;
 static constexpr dart::compiler::target::word
-    AOT_Thread_bootstrap_native_wrapper_entry_point_offset = 624;
+    AOT_Thread_bootstrap_native_wrapper_entry_point_offset = 640;
 static constexpr dart::compiler::target::word
-    AOT_Thread_call_to_runtime_entry_point_offset = 512;
+    AOT_Thread_call_to_runtime_entry_point_offset = 528;
 static constexpr dart::compiler::target::word
     AOT_Thread_call_to_runtime_stub_offset = 280;
 static constexpr dart::compiler::target::word AOT_Thread_dart_stream_offset =
-    1568;
+    1592;
 static constexpr dart::compiler::target::word
     AOT_Thread_dispatch_table_array_offset = 96;
 static constexpr dart::compiler::target::word AOT_Thread_optimize_entry_offset =
-    592;
+    608;
 static constexpr dart::compiler::target::word AOT_Thread_optimize_stub_offset =
-    424;
+    440;
 static constexpr dart::compiler::target::word
-    AOT_Thread_deoptimize_entry_offset = 600;
+    AOT_Thread_deoptimize_entry_offset = 616;
 static constexpr dart::compiler::target::word
-    AOT_Thread_deoptimize_stub_offset = 432;
+    AOT_Thread_deoptimize_stub_offset = 448;
 static constexpr dart::compiler::target::word
-    AOT_Thread_double_abs_address_offset = 680;
+    AOT_Thread_double_abs_address_offset = 696;
 static constexpr dart::compiler::target::word
-    AOT_Thread_double_negate_address_offset = 672;
+    AOT_Thread_double_negate_address_offset = 688;
 static constexpr dart::compiler::target::word AOT_Thread_end_offset = 112;
 static constexpr dart::compiler::target::word
-    AOT_Thread_enter_safepoint_stub_offset = 472;
+    AOT_Thread_enter_safepoint_stub_offset = 488;
 static constexpr dart::compiler::target::word
-    AOT_Thread_execution_state_offset = 1520;
+    AOT_Thread_execution_state_offset = 1544;
 static constexpr dart::compiler::target::word
-    AOT_Thread_exit_safepoint_stub_offset = 480;
+    AOT_Thread_exit_safepoint_stub_offset = 496;
 static constexpr dart::compiler::target::word
-    AOT_Thread_call_native_through_safepoint_stub_offset = 488;
+    AOT_Thread_call_native_through_safepoint_stub_offset = 504;
 static constexpr dart::compiler::target::word
-    AOT_Thread_call_native_through_safepoint_entry_point_offset = 608;
+    AOT_Thread_call_native_through_safepoint_entry_point_offset = 624;
 static constexpr dart::compiler::target::word
     AOT_Thread_fix_allocation_stub_code_offset = 256;
 static constexpr dart::compiler::target::word
     AOT_Thread_fix_callers_target_code_offset = 248;
 static constexpr dart::compiler::target::word
-    AOT_Thread_float_absolute_address_offset = 704;
+    AOT_Thread_float_absolute_address_offset = 720;
 static constexpr dart::compiler::target::word
-    AOT_Thread_float_negate_address_offset = 696;
+    AOT_Thread_float_negate_address_offset = 712;
 static constexpr dart::compiler::target::word
-    AOT_Thread_float_not_address_offset = 688;
+    AOT_Thread_float_not_address_offset = 704;
 static constexpr dart::compiler::target::word
-    AOT_Thread_float_zerow_address_offset = 712;
+    AOT_Thread_float_zerow_address_offset = 728;
 static constexpr dart::compiler::target::word
-    AOT_Thread_global_object_pool_offset = 1496;
+    AOT_Thread_global_object_pool_offset = 1520;
 static constexpr dart::compiler::target::word
-    AOT_Thread_interpret_call_entry_point_offset = 648;
+    AOT_Thread_interpret_call_entry_point_offset = 664;
 static constexpr dart::compiler::target::word
     AOT_Thread_invoke_dart_code_from_bytecode_stub_offset = 272;
 static constexpr dart::compiler::target::word
     AOT_Thread_invoke_dart_code_stub_offset = 264;
 static constexpr dart::compiler::target::word
-    AOT_Thread_exit_through_ffi_offset = 1544;
+    AOT_Thread_exit_through_ffi_offset = 1568;
 static constexpr dart::compiler::target::word AOT_Thread_isolate_offset = 88;
 static constexpr dart::compiler::target::word
     AOT_Thread_field_table_values_offset = 136;
 static constexpr dart::compiler::target::word
-    AOT_Thread_lazy_deopt_from_return_stub_offset = 440;
+    AOT_Thread_lazy_deopt_from_return_stub_offset = 456;
 static constexpr dart::compiler::target::word
-    AOT_Thread_lazy_deopt_from_throw_stub_offset = 448;
+    AOT_Thread_lazy_deopt_from_throw_stub_offset = 464;
 static constexpr dart::compiler::target::word
-    AOT_Thread_lazy_specialize_type_test_stub_offset = 464;
+    AOT_Thread_lazy_specialize_type_test_stub_offset = 480;
 static constexpr dart::compiler::target::word
     AOT_Thread_marking_stack_block_offset = 168;
 static constexpr dart::compiler::target::word
-    AOT_Thread_megamorphic_call_checked_entry_offset = 576;
+    AOT_Thread_megamorphic_call_checked_entry_offset = 592;
 static constexpr dart::compiler::target::word
-    AOT_Thread_switchable_call_miss_entry_offset = 584;
+    AOT_Thread_switchable_call_miss_entry_offset = 600;
 static constexpr dart::compiler::target::word
-    AOT_Thread_switchable_call_miss_stub_offset = 392;
+    AOT_Thread_switchable_call_miss_stub_offset = 408;
 static constexpr dart::compiler::target::word
-    AOT_Thread_no_scope_native_wrapper_entry_point_offset = 632;
+    AOT_Thread_no_scope_native_wrapper_entry_point_offset = 648;
 static constexpr dart::compiler::target::word
     AOT_Thread_null_error_shared_with_fpu_regs_stub_offset = 296;
 static constexpr dart::compiler::target::word
-    AOT_Thread_null_arg_error_shared_with_fpu_regs_stub_offset = 312;
-static constexpr dart::compiler::target::word
-    AOT_Thread_range_error_shared_with_fpu_regs_stub_offset = 328;
-static constexpr dart::compiler::target::word
     AOT_Thread_null_error_shared_without_fpu_regs_stub_offset = 288;
 static constexpr dart::compiler::target::word
+    AOT_Thread_null_arg_error_shared_with_fpu_regs_stub_offset = 312;
+static constexpr dart::compiler::target::word
     AOT_Thread_null_arg_error_shared_without_fpu_regs_stub_offset = 304;
 static constexpr dart::compiler::target::word
-    AOT_Thread_range_error_shared_without_fpu_regs_stub_offset = 320;
+    AOT_Thread_null_cast_error_shared_with_fpu_regs_stub_offset = 328;
+static constexpr dart::compiler::target::word
+    AOT_Thread_null_cast_error_shared_without_fpu_regs_stub_offset = 320;
+static constexpr dart::compiler::target::word
+    AOT_Thread_range_error_shared_with_fpu_regs_stub_offset = 344;
+static constexpr dart::compiler::target::word
+    AOT_Thread_range_error_shared_without_fpu_regs_stub_offset = 336;
 static constexpr dart::compiler::target::word AOT_Thread_object_null_offset =
     208;
 static constexpr dart::compiler::target::word
-    AOT_Thread_predefined_symbols_address_offset = 656;
+    AOT_Thread_predefined_symbols_address_offset = 672;
 static constexpr dart::compiler::target::word AOT_Thread_resume_pc_offset =
-    1504;
+    1528;
 static constexpr dart::compiler::target::word
-    AOT_Thread_saved_shadow_call_stack_offset = 1512;
+    AOT_Thread_saved_shadow_call_stack_offset = 1536;
 static constexpr dart::compiler::target::word
-    AOT_Thread_safepoint_state_offset = 1528;
+    AOT_Thread_safepoint_state_offset = 1552;
 static constexpr dart::compiler::target::word
-    AOT_Thread_slow_type_test_stub_offset = 456;
+    AOT_Thread_slow_type_test_stub_offset = 472;
 static constexpr dart::compiler::target::word
-    AOT_Thread_slow_type_test_entry_point_offset = 616;
+    AOT_Thread_slow_type_test_entry_point_offset = 632;
 static constexpr dart::compiler::target::word AOT_Thread_stack_limit_offset =
     72;
 static constexpr dart::compiler::target::word
@@ -5326,13 +5370,13 @@
 static constexpr dart::compiler::target::word
     AOT_Thread_stack_overflow_flags_offset = 128;
 static constexpr dart::compiler::target::word
-    AOT_Thread_stack_overflow_shared_with_fpu_regs_entry_point_offset = 568;
+    AOT_Thread_stack_overflow_shared_with_fpu_regs_entry_point_offset = 584;
 static constexpr dart::compiler::target::word
-    AOT_Thread_stack_overflow_shared_with_fpu_regs_stub_offset = 384;
+    AOT_Thread_stack_overflow_shared_with_fpu_regs_stub_offset = 400;
 static constexpr dart::compiler::target::word
-    AOT_Thread_stack_overflow_shared_without_fpu_regs_entry_point_offset = 560;
+    AOT_Thread_stack_overflow_shared_without_fpu_regs_entry_point_offset = 576;
 static constexpr dart::compiler::target::word
-    AOT_Thread_stack_overflow_shared_without_fpu_regs_stub_offset = 376;
+    AOT_Thread_stack_overflow_shared_without_fpu_regs_stub_offset = 392;
 static constexpr dart::compiler::target::word
     AOT_Thread_store_buffer_block_offset = 160;
 static constexpr dart::compiler::target::word
@@ -5346,11 +5390,11 @@
 static constexpr dart::compiler::target::word
     AOT_Thread_write_barrier_code_offset = 232;
 static constexpr dart::compiler::target::word
-    AOT_Thread_write_barrier_entry_point_offset = 496;
+    AOT_Thread_write_barrier_entry_point_offset = 512;
 static constexpr dart::compiler::target::word
     AOT_Thread_write_barrier_mask_offset = 80;
 static constexpr dart::compiler::target::word AOT_Thread_callback_code_offset =
-    1536;
+    1560;
 static constexpr dart::compiler::target::word
     AOT_TimelineStream_enabled_offset = 16;
 static constexpr dart::compiler::target::word AOT_TwoByteString_data_offset =
@@ -5399,9 +5443,9 @@
     8, 24, 16, 32};
 static constexpr dart::compiler::target::word
     AOT_Thread_write_barrier_wrappers_thread_offset[] = {
-        1320, 1328, 1336, 1344, 1352, 1360, 1368, 1376, 1384, 1392, 1400,
-        1408, 1416, 1424, 1432, -1,   -1,   -1,   -1,   1440, 1448, -1,
-        -1,   1456, 1464, 1472, -1,   -1,   -1,   -1,   -1,   -1};
+        1344, 1352, 1360, 1368, 1376, 1384, 1392, 1400, 1408, 1416, 1424,
+        1432, 1440, 1448, 1456, -1,   -1,   -1,   -1,   1464, 1472, -1,
+        -1,   1480, 1488, 1496, -1,   -1,   -1,   -1,   -1,   -1};
 static constexpr dart::compiler::target::word AOT_ApiError_InstanceSize = 16;
 static constexpr dart::compiler::target::word AOT_Array_InstanceSize = 24;
 static constexpr dart::compiler::target::word AOT_Array_header_size = 24;
@@ -5714,143 +5758,147 @@
 static constexpr dart::compiler::target::word
     AOT_SubtypeTestCache_cache_offset = 4;
 static constexpr dart::compiler::target::word
-    AOT_Thread_AllocateArray_entry_point_offset = 368;
+    AOT_Thread_AllocateArray_entry_point_offset = 376;
 static constexpr dart::compiler::target::word
-    AOT_Thread_active_exception_offset = 700;
+    AOT_Thread_active_exception_offset = 712;
 static constexpr dart::compiler::target::word
-    AOT_Thread_active_stacktrace_offset = 704;
+    AOT_Thread_active_stacktrace_offset = 716;
 static constexpr dart::compiler::target::word
     AOT_Thread_array_write_barrier_code_offset = 128;
 static constexpr dart::compiler::target::word
-    AOT_Thread_array_write_barrier_entry_point_offset = 260;
+    AOT_Thread_array_write_barrier_entry_point_offset = 268;
 static constexpr dart::compiler::target::word
-    AOT_Thread_allocate_mint_with_fpu_regs_entry_point_offset = 268;
+    AOT_Thread_allocate_mint_with_fpu_regs_entry_point_offset = 276;
 static constexpr dart::compiler::target::word
-    AOT_Thread_allocate_mint_with_fpu_regs_stub_offset = 176;
+    AOT_Thread_allocate_mint_with_fpu_regs_stub_offset = 184;
 static constexpr dart::compiler::target::word
-    AOT_Thread_allocate_mint_without_fpu_regs_entry_point_offset = 272;
+    AOT_Thread_allocate_mint_without_fpu_regs_entry_point_offset = 280;
 static constexpr dart::compiler::target::word
-    AOT_Thread_allocate_mint_without_fpu_regs_stub_offset = 180;
+    AOT_Thread_allocate_mint_without_fpu_regs_stub_offset = 188;
 static constexpr dart::compiler::target::word
-    AOT_Thread_allocate_object_entry_point_offset = 276;
+    AOT_Thread_allocate_object_entry_point_offset = 284;
 static constexpr dart::compiler::target::word
-    AOT_Thread_allocate_object_stub_offset = 184;
+    AOT_Thread_allocate_object_stub_offset = 192;
 static constexpr dart::compiler::target::word
-    AOT_Thread_allocate_object_parameterized_entry_point_offset = 280;
+    AOT_Thread_allocate_object_parameterized_entry_point_offset = 288;
 static constexpr dart::compiler::target::word
-    AOT_Thread_allocate_object_parameterized_stub_offset = 188;
+    AOT_Thread_allocate_object_parameterized_stub_offset = 196;
 static constexpr dart::compiler::target::word
-    AOT_Thread_allocate_object_slow_entry_point_offset = 284;
+    AOT_Thread_allocate_object_slow_entry_point_offset = 292;
 static constexpr dart::compiler::target::word
-    AOT_Thread_allocate_object_slow_stub_offset = 192;
+    AOT_Thread_allocate_object_slow_stub_offset = 200;
 static constexpr dart::compiler::target::word AOT_Thread_api_top_scope_offset =
-    736;
+    748;
 static constexpr dart::compiler::target::word
     AOT_Thread_async_stack_trace_offset = 96;
 static constexpr dart::compiler::target::word
-    AOT_Thread_auto_scope_native_wrapper_entry_point_offset = 328;
+    AOT_Thread_auto_scope_native_wrapper_entry_point_offset = 336;
 static constexpr dart::compiler::target::word AOT_Thread_bool_false_offset =
     120;
 static constexpr dart::compiler::target::word AOT_Thread_bool_true_offset = 116;
 static constexpr dart::compiler::target::word
-    AOT_Thread_bootstrap_native_wrapper_entry_point_offset = 320;
+    AOT_Thread_bootstrap_native_wrapper_entry_point_offset = 328;
 static constexpr dart::compiler::target::word
-    AOT_Thread_call_to_runtime_entry_point_offset = 264;
+    AOT_Thread_call_to_runtime_entry_point_offset = 272;
 static constexpr dart::compiler::target::word
     AOT_Thread_call_to_runtime_stub_offset = 148;
 static constexpr dart::compiler::target::word AOT_Thread_dart_stream_offset =
-    744;
+    756;
 static constexpr dart::compiler::target::word
     AOT_Thread_dispatch_table_array_offset = 48;
 static constexpr dart::compiler::target::word AOT_Thread_optimize_entry_offset =
-    304;
+    312;
 static constexpr dart::compiler::target::word AOT_Thread_optimize_stub_offset =
-    220;
+    228;
 static constexpr dart::compiler::target::word
-    AOT_Thread_deoptimize_entry_offset = 308;
+    AOT_Thread_deoptimize_entry_offset = 316;
 static constexpr dart::compiler::target::word
-    AOT_Thread_deoptimize_stub_offset = 224;
+    AOT_Thread_deoptimize_stub_offset = 232;
 static constexpr dart::compiler::target::word
-    AOT_Thread_double_abs_address_offset = 348;
+    AOT_Thread_double_abs_address_offset = 356;
 static constexpr dart::compiler::target::word
-    AOT_Thread_double_negate_address_offset = 344;
+    AOT_Thread_double_negate_address_offset = 352;
 static constexpr dart::compiler::target::word AOT_Thread_end_offset = 56;
 static constexpr dart::compiler::target::word
-    AOT_Thread_enter_safepoint_stub_offset = 244;
+    AOT_Thread_enter_safepoint_stub_offset = 252;
 static constexpr dart::compiler::target::word
-    AOT_Thread_execution_state_offset = 720;
+    AOT_Thread_execution_state_offset = 732;
 static constexpr dart::compiler::target::word
-    AOT_Thread_exit_safepoint_stub_offset = 248;
+    AOT_Thread_exit_safepoint_stub_offset = 256;
 static constexpr dart::compiler::target::word
-    AOT_Thread_call_native_through_safepoint_stub_offset = 252;
+    AOT_Thread_call_native_through_safepoint_stub_offset = 260;
 static constexpr dart::compiler::target::word
-    AOT_Thread_call_native_through_safepoint_entry_point_offset = 312;
+    AOT_Thread_call_native_through_safepoint_entry_point_offset = 320;
 static constexpr dart::compiler::target::word
     AOT_Thread_fix_allocation_stub_code_offset = 136;
 static constexpr dart::compiler::target::word
     AOT_Thread_fix_callers_target_code_offset = 132;
 static constexpr dart::compiler::target::word
-    AOT_Thread_float_absolute_address_offset = 360;
+    AOT_Thread_float_absolute_address_offset = 368;
 static constexpr dart::compiler::target::word
-    AOT_Thread_float_negate_address_offset = 356;
+    AOT_Thread_float_negate_address_offset = 364;
 static constexpr dart::compiler::target::word
-    AOT_Thread_float_not_address_offset = 352;
+    AOT_Thread_float_not_address_offset = 360;
 static constexpr dart::compiler::target::word
-    AOT_Thread_float_zerow_address_offset = 364;
+    AOT_Thread_float_zerow_address_offset = 372;
 static constexpr dart::compiler::target::word
-    AOT_Thread_global_object_pool_offset = 708;
+    AOT_Thread_global_object_pool_offset = 720;
 static constexpr dart::compiler::target::word
-    AOT_Thread_interpret_call_entry_point_offset = 332;
+    AOT_Thread_interpret_call_entry_point_offset = 340;
 static constexpr dart::compiler::target::word
     AOT_Thread_invoke_dart_code_from_bytecode_stub_offset = 144;
 static constexpr dart::compiler::target::word
     AOT_Thread_invoke_dart_code_stub_offset = 140;
 static constexpr dart::compiler::target::word
-    AOT_Thread_exit_through_ffi_offset = 732;
+    AOT_Thread_exit_through_ffi_offset = 744;
 static constexpr dart::compiler::target::word AOT_Thread_isolate_offset = 44;
 static constexpr dart::compiler::target::word
     AOT_Thread_field_table_values_offset = 68;
 static constexpr dart::compiler::target::word
-    AOT_Thread_lazy_deopt_from_return_stub_offset = 228;
+    AOT_Thread_lazy_deopt_from_return_stub_offset = 236;
 static constexpr dart::compiler::target::word
-    AOT_Thread_lazy_deopt_from_throw_stub_offset = 232;
+    AOT_Thread_lazy_deopt_from_throw_stub_offset = 240;
 static constexpr dart::compiler::target::word
-    AOT_Thread_lazy_specialize_type_test_stub_offset = 240;
+    AOT_Thread_lazy_specialize_type_test_stub_offset = 248;
 static constexpr dart::compiler::target::word
     AOT_Thread_marking_stack_block_offset = 84;
 static constexpr dart::compiler::target::word
-    AOT_Thread_megamorphic_call_checked_entry_offset = 296;
+    AOT_Thread_megamorphic_call_checked_entry_offset = 304;
 static constexpr dart::compiler::target::word
-    AOT_Thread_switchable_call_miss_entry_offset = 300;
+    AOT_Thread_switchable_call_miss_entry_offset = 308;
 static constexpr dart::compiler::target::word
-    AOT_Thread_switchable_call_miss_stub_offset = 204;
+    AOT_Thread_switchable_call_miss_stub_offset = 212;
 static constexpr dart::compiler::target::word
-    AOT_Thread_no_scope_native_wrapper_entry_point_offset = 324;
+    AOT_Thread_no_scope_native_wrapper_entry_point_offset = 332;
 static constexpr dart::compiler::target::word
     AOT_Thread_null_error_shared_with_fpu_regs_stub_offset = 156;
 static constexpr dart::compiler::target::word
-    AOT_Thread_null_arg_error_shared_with_fpu_regs_stub_offset = 164;
-static constexpr dart::compiler::target::word
-    AOT_Thread_range_error_shared_with_fpu_regs_stub_offset = 172;
-static constexpr dart::compiler::target::word
     AOT_Thread_null_error_shared_without_fpu_regs_stub_offset = 152;
 static constexpr dart::compiler::target::word
+    AOT_Thread_null_arg_error_shared_with_fpu_regs_stub_offset = 164;
+static constexpr dart::compiler::target::word
     AOT_Thread_null_arg_error_shared_without_fpu_regs_stub_offset = 160;
 static constexpr dart::compiler::target::word
-    AOT_Thread_range_error_shared_without_fpu_regs_stub_offset = 168;
+    AOT_Thread_null_cast_error_shared_with_fpu_regs_stub_offset = 172;
+static constexpr dart::compiler::target::word
+    AOT_Thread_null_cast_error_shared_without_fpu_regs_stub_offset = 168;
+static constexpr dart::compiler::target::word
+    AOT_Thread_range_error_shared_with_fpu_regs_stub_offset = 180;
+static constexpr dart::compiler::target::word
+    AOT_Thread_range_error_shared_without_fpu_regs_stub_offset = 176;
 static constexpr dart::compiler::target::word AOT_Thread_object_null_offset =
     112;
 static constexpr dart::compiler::target::word
-    AOT_Thread_predefined_symbols_address_offset = 336;
-static constexpr dart::compiler::target::word AOT_Thread_resume_pc_offset = 712;
+    AOT_Thread_predefined_symbols_address_offset = 344;
+static constexpr dart::compiler::target::word AOT_Thread_resume_pc_offset = 724;
 static constexpr dart::compiler::target::word
-    AOT_Thread_saved_shadow_call_stack_offset = 716;
+    AOT_Thread_saved_shadow_call_stack_offset = 728;
 static constexpr dart::compiler::target::word
-    AOT_Thread_safepoint_state_offset = 724;
+    AOT_Thread_safepoint_state_offset = 736;
 static constexpr dart::compiler::target::word
-    AOT_Thread_slow_type_test_stub_offset = 236;
+    AOT_Thread_slow_type_test_stub_offset = 244;
 static constexpr dart::compiler::target::word
-    AOT_Thread_slow_type_test_entry_point_offset = 316;
+    AOT_Thread_slow_type_test_entry_point_offset = 324;
 static constexpr dart::compiler::target::word AOT_Thread_stack_limit_offset =
     36;
 static constexpr dart::compiler::target::word
@@ -5858,13 +5906,13 @@
 static constexpr dart::compiler::target::word
     AOT_Thread_stack_overflow_flags_offset = 64;
 static constexpr dart::compiler::target::word
-    AOT_Thread_stack_overflow_shared_with_fpu_regs_entry_point_offset = 292;
+    AOT_Thread_stack_overflow_shared_with_fpu_regs_entry_point_offset = 300;
 static constexpr dart::compiler::target::word
-    AOT_Thread_stack_overflow_shared_with_fpu_regs_stub_offset = 200;
+    AOT_Thread_stack_overflow_shared_with_fpu_regs_stub_offset = 208;
 static constexpr dart::compiler::target::word
-    AOT_Thread_stack_overflow_shared_without_fpu_regs_entry_point_offset = 288;
+    AOT_Thread_stack_overflow_shared_without_fpu_regs_entry_point_offset = 296;
 static constexpr dart::compiler::target::word
-    AOT_Thread_stack_overflow_shared_without_fpu_regs_stub_offset = 196;
+    AOT_Thread_stack_overflow_shared_without_fpu_regs_stub_offset = 204;
 static constexpr dart::compiler::target::word
     AOT_Thread_store_buffer_block_offset = 80;
 static constexpr dart::compiler::target::word
@@ -5878,11 +5926,11 @@
 static constexpr dart::compiler::target::word
     AOT_Thread_write_barrier_code_offset = 124;
 static constexpr dart::compiler::target::word
-    AOT_Thread_write_barrier_entry_point_offset = 256;
+    AOT_Thread_write_barrier_entry_point_offset = 264;
 static constexpr dart::compiler::target::word
     AOT_Thread_write_barrier_mask_offset = 40;
 static constexpr dart::compiler::target::word AOT_Thread_callback_code_offset =
-    728;
+    740;
 static constexpr dart::compiler::target::word
     AOT_TimelineStream_enabled_offset = 8;
 static constexpr dart::compiler::target::word AOT_TwoByteString_data_offset =
@@ -5928,7 +5976,7 @@
     4, 12, 8, 16};
 static constexpr dart::compiler::target::word
     AOT_Thread_write_barrier_wrappers_thread_offset[] = {
-        668, 672, 676, 680, 684, -1, 688, -1, 692, 696, -1, -1, -1, -1, -1, -1};
+        680, 684, 688, 692, 696, -1, 700, -1, 704, 708, -1, -1, -1, -1, -1, -1};
 static constexpr dart::compiler::target::word AOT_ApiError_InstanceSize = 8;
 static constexpr dart::compiler::target::word AOT_Array_InstanceSize = 12;
 static constexpr dart::compiler::target::word AOT_Array_header_size = 12;
@@ -6239,144 +6287,148 @@
 static constexpr dart::compiler::target::word
     AOT_SubtypeTestCache_cache_offset = 8;
 static constexpr dart::compiler::target::word
-    AOT_Thread_AllocateArray_entry_point_offset = 720;
+    AOT_Thread_AllocateArray_entry_point_offset = 736;
 static constexpr dart::compiler::target::word
-    AOT_Thread_active_exception_offset = 1408;
+    AOT_Thread_active_exception_offset = 1432;
 static constexpr dart::compiler::target::word
-    AOT_Thread_active_stacktrace_offset = 1416;
+    AOT_Thread_active_stacktrace_offset = 1440;
 static constexpr dart::compiler::target::word
     AOT_Thread_array_write_barrier_code_offset = 240;
 static constexpr dart::compiler::target::word
-    AOT_Thread_array_write_barrier_entry_point_offset = 504;
+    AOT_Thread_array_write_barrier_entry_point_offset = 520;
 static constexpr dart::compiler::target::word
-    AOT_Thread_allocate_mint_with_fpu_regs_entry_point_offset = 520;
+    AOT_Thread_allocate_mint_with_fpu_regs_entry_point_offset = 536;
 static constexpr dart::compiler::target::word
-    AOT_Thread_allocate_mint_with_fpu_regs_stub_offset = 336;
+    AOT_Thread_allocate_mint_with_fpu_regs_stub_offset = 352;
 static constexpr dart::compiler::target::word
-    AOT_Thread_allocate_mint_without_fpu_regs_entry_point_offset = 528;
+    AOT_Thread_allocate_mint_without_fpu_regs_entry_point_offset = 544;
 static constexpr dart::compiler::target::word
-    AOT_Thread_allocate_mint_without_fpu_regs_stub_offset = 344;
+    AOT_Thread_allocate_mint_without_fpu_regs_stub_offset = 360;
 static constexpr dart::compiler::target::word
-    AOT_Thread_allocate_object_entry_point_offset = 536;
+    AOT_Thread_allocate_object_entry_point_offset = 552;
 static constexpr dart::compiler::target::word
-    AOT_Thread_allocate_object_stub_offset = 352;
+    AOT_Thread_allocate_object_stub_offset = 368;
 static constexpr dart::compiler::target::word
-    AOT_Thread_allocate_object_parameterized_entry_point_offset = 544;
+    AOT_Thread_allocate_object_parameterized_entry_point_offset = 560;
 static constexpr dart::compiler::target::word
-    AOT_Thread_allocate_object_parameterized_stub_offset = 360;
+    AOT_Thread_allocate_object_parameterized_stub_offset = 376;
 static constexpr dart::compiler::target::word
-    AOT_Thread_allocate_object_slow_entry_point_offset = 552;
+    AOT_Thread_allocate_object_slow_entry_point_offset = 568;
 static constexpr dart::compiler::target::word
-    AOT_Thread_allocate_object_slow_stub_offset = 368;
+    AOT_Thread_allocate_object_slow_stub_offset = 384;
 static constexpr dart::compiler::target::word AOT_Thread_api_top_scope_offset =
-    1480;
+    1504;
 static constexpr dart::compiler::target::word
     AOT_Thread_async_stack_trace_offset = 192;
 static constexpr dart::compiler::target::word
-    AOT_Thread_auto_scope_native_wrapper_entry_point_offset = 640;
+    AOT_Thread_auto_scope_native_wrapper_entry_point_offset = 656;
 static constexpr dart::compiler::target::word AOT_Thread_bool_false_offset =
     224;
 static constexpr dart::compiler::target::word AOT_Thread_bool_true_offset = 216;
 static constexpr dart::compiler::target::word
-    AOT_Thread_bootstrap_native_wrapper_entry_point_offset = 624;
+    AOT_Thread_bootstrap_native_wrapper_entry_point_offset = 640;
 static constexpr dart::compiler::target::word
-    AOT_Thread_call_to_runtime_entry_point_offset = 512;
+    AOT_Thread_call_to_runtime_entry_point_offset = 528;
 static constexpr dart::compiler::target::word
     AOT_Thread_call_to_runtime_stub_offset = 280;
 static constexpr dart::compiler::target::word AOT_Thread_dart_stream_offset =
-    1496;
+    1520;
 static constexpr dart::compiler::target::word
     AOT_Thread_dispatch_table_array_offset = 96;
 static constexpr dart::compiler::target::word AOT_Thread_optimize_entry_offset =
-    592;
+    608;
 static constexpr dart::compiler::target::word AOT_Thread_optimize_stub_offset =
-    424;
+    440;
 static constexpr dart::compiler::target::word
-    AOT_Thread_deoptimize_entry_offset = 600;
+    AOT_Thread_deoptimize_entry_offset = 616;
 static constexpr dart::compiler::target::word
-    AOT_Thread_deoptimize_stub_offset = 432;
+    AOT_Thread_deoptimize_stub_offset = 448;
 static constexpr dart::compiler::target::word
-    AOT_Thread_double_abs_address_offset = 680;
+    AOT_Thread_double_abs_address_offset = 696;
 static constexpr dart::compiler::target::word
-    AOT_Thread_double_negate_address_offset = 672;
+    AOT_Thread_double_negate_address_offset = 688;
 static constexpr dart::compiler::target::word AOT_Thread_end_offset = 112;
 static constexpr dart::compiler::target::word
-    AOT_Thread_enter_safepoint_stub_offset = 472;
+    AOT_Thread_enter_safepoint_stub_offset = 488;
 static constexpr dart::compiler::target::word
-    AOT_Thread_execution_state_offset = 1448;
+    AOT_Thread_execution_state_offset = 1472;
 static constexpr dart::compiler::target::word
-    AOT_Thread_exit_safepoint_stub_offset = 480;
+    AOT_Thread_exit_safepoint_stub_offset = 496;
 static constexpr dart::compiler::target::word
-    AOT_Thread_call_native_through_safepoint_stub_offset = 488;
+    AOT_Thread_call_native_through_safepoint_stub_offset = 504;
 static constexpr dart::compiler::target::word
-    AOT_Thread_call_native_through_safepoint_entry_point_offset = 608;
+    AOT_Thread_call_native_through_safepoint_entry_point_offset = 624;
 static constexpr dart::compiler::target::word
     AOT_Thread_fix_allocation_stub_code_offset = 256;
 static constexpr dart::compiler::target::word
     AOT_Thread_fix_callers_target_code_offset = 248;
 static constexpr dart::compiler::target::word
-    AOT_Thread_float_absolute_address_offset = 704;
+    AOT_Thread_float_absolute_address_offset = 720;
 static constexpr dart::compiler::target::word
-    AOT_Thread_float_negate_address_offset = 696;
+    AOT_Thread_float_negate_address_offset = 712;
 static constexpr dart::compiler::target::word
-    AOT_Thread_float_not_address_offset = 688;
+    AOT_Thread_float_not_address_offset = 704;
 static constexpr dart::compiler::target::word
-    AOT_Thread_float_zerow_address_offset = 712;
+    AOT_Thread_float_zerow_address_offset = 728;
 static constexpr dart::compiler::target::word
-    AOT_Thread_global_object_pool_offset = 1424;
+    AOT_Thread_global_object_pool_offset = 1448;
 static constexpr dart::compiler::target::word
-    AOT_Thread_interpret_call_entry_point_offset = 648;
+    AOT_Thread_interpret_call_entry_point_offset = 664;
 static constexpr dart::compiler::target::word
     AOT_Thread_invoke_dart_code_from_bytecode_stub_offset = 272;
 static constexpr dart::compiler::target::word
     AOT_Thread_invoke_dart_code_stub_offset = 264;
 static constexpr dart::compiler::target::word
-    AOT_Thread_exit_through_ffi_offset = 1472;
+    AOT_Thread_exit_through_ffi_offset = 1496;
 static constexpr dart::compiler::target::word AOT_Thread_isolate_offset = 88;
 static constexpr dart::compiler::target::word
     AOT_Thread_field_table_values_offset = 136;
 static constexpr dart::compiler::target::word
-    AOT_Thread_lazy_deopt_from_return_stub_offset = 440;
+    AOT_Thread_lazy_deopt_from_return_stub_offset = 456;
 static constexpr dart::compiler::target::word
-    AOT_Thread_lazy_deopt_from_throw_stub_offset = 448;
+    AOT_Thread_lazy_deopt_from_throw_stub_offset = 464;
 static constexpr dart::compiler::target::word
-    AOT_Thread_lazy_specialize_type_test_stub_offset = 464;
+    AOT_Thread_lazy_specialize_type_test_stub_offset = 480;
 static constexpr dart::compiler::target::word
     AOT_Thread_marking_stack_block_offset = 168;
 static constexpr dart::compiler::target::word
-    AOT_Thread_megamorphic_call_checked_entry_offset = 576;
+    AOT_Thread_megamorphic_call_checked_entry_offset = 592;
 static constexpr dart::compiler::target::word
-    AOT_Thread_switchable_call_miss_entry_offset = 584;
+    AOT_Thread_switchable_call_miss_entry_offset = 600;
 static constexpr dart::compiler::target::word
-    AOT_Thread_switchable_call_miss_stub_offset = 392;
+    AOT_Thread_switchable_call_miss_stub_offset = 408;
 static constexpr dart::compiler::target::word
-    AOT_Thread_no_scope_native_wrapper_entry_point_offset = 632;
+    AOT_Thread_no_scope_native_wrapper_entry_point_offset = 648;
 static constexpr dart::compiler::target::word
     AOT_Thread_null_error_shared_with_fpu_regs_stub_offset = 296;
 static constexpr dart::compiler::target::word
-    AOT_Thread_null_arg_error_shared_with_fpu_regs_stub_offset = 312;
-static constexpr dart::compiler::target::word
-    AOT_Thread_range_error_shared_with_fpu_regs_stub_offset = 328;
-static constexpr dart::compiler::target::word
     AOT_Thread_null_error_shared_without_fpu_regs_stub_offset = 288;
 static constexpr dart::compiler::target::word
+    AOT_Thread_null_arg_error_shared_with_fpu_regs_stub_offset = 312;
+static constexpr dart::compiler::target::word
     AOT_Thread_null_arg_error_shared_without_fpu_regs_stub_offset = 304;
 static constexpr dart::compiler::target::word
-    AOT_Thread_range_error_shared_without_fpu_regs_stub_offset = 320;
+    AOT_Thread_null_cast_error_shared_with_fpu_regs_stub_offset = 328;
+static constexpr dart::compiler::target::word
+    AOT_Thread_null_cast_error_shared_without_fpu_regs_stub_offset = 320;
+static constexpr dart::compiler::target::word
+    AOT_Thread_range_error_shared_with_fpu_regs_stub_offset = 344;
+static constexpr dart::compiler::target::word
+    AOT_Thread_range_error_shared_without_fpu_regs_stub_offset = 336;
 static constexpr dart::compiler::target::word AOT_Thread_object_null_offset =
     208;
 static constexpr dart::compiler::target::word
-    AOT_Thread_predefined_symbols_address_offset = 656;
+    AOT_Thread_predefined_symbols_address_offset = 672;
 static constexpr dart::compiler::target::word AOT_Thread_resume_pc_offset =
-    1432;
+    1456;
 static constexpr dart::compiler::target::word
-    AOT_Thread_saved_shadow_call_stack_offset = 1440;
+    AOT_Thread_saved_shadow_call_stack_offset = 1464;
 static constexpr dart::compiler::target::word
-    AOT_Thread_safepoint_state_offset = 1456;
+    AOT_Thread_safepoint_state_offset = 1480;
 static constexpr dart::compiler::target::word
-    AOT_Thread_slow_type_test_stub_offset = 456;
+    AOT_Thread_slow_type_test_stub_offset = 472;
 static constexpr dart::compiler::target::word
-    AOT_Thread_slow_type_test_entry_point_offset = 616;
+    AOT_Thread_slow_type_test_entry_point_offset = 632;
 static constexpr dart::compiler::target::word AOT_Thread_stack_limit_offset =
     72;
 static constexpr dart::compiler::target::word
@@ -6384,13 +6436,13 @@
 static constexpr dart::compiler::target::word
     AOT_Thread_stack_overflow_flags_offset = 128;
 static constexpr dart::compiler::target::word
-    AOT_Thread_stack_overflow_shared_with_fpu_regs_entry_point_offset = 568;
+    AOT_Thread_stack_overflow_shared_with_fpu_regs_entry_point_offset = 584;
 static constexpr dart::compiler::target::word
-    AOT_Thread_stack_overflow_shared_with_fpu_regs_stub_offset = 384;
+    AOT_Thread_stack_overflow_shared_with_fpu_regs_stub_offset = 400;
 static constexpr dart::compiler::target::word
-    AOT_Thread_stack_overflow_shared_without_fpu_regs_entry_point_offset = 560;
+    AOT_Thread_stack_overflow_shared_without_fpu_regs_entry_point_offset = 576;
 static constexpr dart::compiler::target::word
-    AOT_Thread_stack_overflow_shared_without_fpu_regs_stub_offset = 376;
+    AOT_Thread_stack_overflow_shared_without_fpu_regs_stub_offset = 392;
 static constexpr dart::compiler::target::word
     AOT_Thread_store_buffer_block_offset = 160;
 static constexpr dart::compiler::target::word
@@ -6404,11 +6456,11 @@
 static constexpr dart::compiler::target::word
     AOT_Thread_write_barrier_code_offset = 232;
 static constexpr dart::compiler::target::word
-    AOT_Thread_write_barrier_entry_point_offset = 496;
+    AOT_Thread_write_barrier_entry_point_offset = 512;
 static constexpr dart::compiler::target::word
     AOT_Thread_write_barrier_mask_offset = 80;
 static constexpr dart::compiler::target::word AOT_Thread_callback_code_offset =
-    1464;
+    1488;
 static constexpr dart::compiler::target::word
     AOT_TimelineStream_enabled_offset = 16;
 static constexpr dart::compiler::target::word AOT_TwoByteString_data_offset =
@@ -6454,8 +6506,8 @@
     8, 24, 16, 32};
 static constexpr dart::compiler::target::word
     AOT_Thread_write_barrier_wrappers_thread_offset[] = {
-        1320, 1328, 1336, 1344, -1,   -1,   1352, 1360,
-        1368, 1376, 1384, -1,   1392, 1400, -1,   -1};
+        1344, 1352, 1360, 1368, -1,   -1,   1376, 1384,
+        1392, 1400, 1408, -1,   1416, 1424, -1,   -1};
 static constexpr dart::compiler::target::word AOT_ApiError_InstanceSize = 16;
 static constexpr dart::compiler::target::word AOT_Array_InstanceSize = 24;
 static constexpr dart::compiler::target::word AOT_Array_header_size = 24;
@@ -6770,144 +6822,148 @@
 static constexpr dart::compiler::target::word
     AOT_SubtypeTestCache_cache_offset = 8;
 static constexpr dart::compiler::target::word
-    AOT_Thread_AllocateArray_entry_point_offset = 720;
+    AOT_Thread_AllocateArray_entry_point_offset = 736;
 static constexpr dart::compiler::target::word
-    AOT_Thread_active_exception_offset = 1480;
+    AOT_Thread_active_exception_offset = 1504;
 static constexpr dart::compiler::target::word
-    AOT_Thread_active_stacktrace_offset = 1488;
+    AOT_Thread_active_stacktrace_offset = 1512;
 static constexpr dart::compiler::target::word
     AOT_Thread_array_write_barrier_code_offset = 240;
 static constexpr dart::compiler::target::word
-    AOT_Thread_array_write_barrier_entry_point_offset = 504;
+    AOT_Thread_array_write_barrier_entry_point_offset = 520;
 static constexpr dart::compiler::target::word
-    AOT_Thread_allocate_mint_with_fpu_regs_entry_point_offset = 520;
+    AOT_Thread_allocate_mint_with_fpu_regs_entry_point_offset = 536;
 static constexpr dart::compiler::target::word
-    AOT_Thread_allocate_mint_with_fpu_regs_stub_offset = 336;
+    AOT_Thread_allocate_mint_with_fpu_regs_stub_offset = 352;
 static constexpr dart::compiler::target::word
-    AOT_Thread_allocate_mint_without_fpu_regs_entry_point_offset = 528;
+    AOT_Thread_allocate_mint_without_fpu_regs_entry_point_offset = 544;
 static constexpr dart::compiler::target::word
-    AOT_Thread_allocate_mint_without_fpu_regs_stub_offset = 344;
+    AOT_Thread_allocate_mint_without_fpu_regs_stub_offset = 360;
 static constexpr dart::compiler::target::word
-    AOT_Thread_allocate_object_entry_point_offset = 536;
+    AOT_Thread_allocate_object_entry_point_offset = 552;
 static constexpr dart::compiler::target::word
-    AOT_Thread_allocate_object_stub_offset = 352;
+    AOT_Thread_allocate_object_stub_offset = 368;
 static constexpr dart::compiler::target::word
-    AOT_Thread_allocate_object_parameterized_entry_point_offset = 544;
+    AOT_Thread_allocate_object_parameterized_entry_point_offset = 560;
 static constexpr dart::compiler::target::word
-    AOT_Thread_allocate_object_parameterized_stub_offset = 360;
+    AOT_Thread_allocate_object_parameterized_stub_offset = 376;
 static constexpr dart::compiler::target::word
-    AOT_Thread_allocate_object_slow_entry_point_offset = 552;
+    AOT_Thread_allocate_object_slow_entry_point_offset = 568;
 static constexpr dart::compiler::target::word
-    AOT_Thread_allocate_object_slow_stub_offset = 368;
+    AOT_Thread_allocate_object_slow_stub_offset = 384;
 static constexpr dart::compiler::target::word AOT_Thread_api_top_scope_offset =
-    1552;
+    1576;
 static constexpr dart::compiler::target::word
     AOT_Thread_async_stack_trace_offset = 192;
 static constexpr dart::compiler::target::word
-    AOT_Thread_auto_scope_native_wrapper_entry_point_offset = 640;
+    AOT_Thread_auto_scope_native_wrapper_entry_point_offset = 656;
 static constexpr dart::compiler::target::word AOT_Thread_bool_false_offset =
     224;
 static constexpr dart::compiler::target::word AOT_Thread_bool_true_offset = 216;
 static constexpr dart::compiler::target::word
-    AOT_Thread_bootstrap_native_wrapper_entry_point_offset = 624;
+    AOT_Thread_bootstrap_native_wrapper_entry_point_offset = 640;
 static constexpr dart::compiler::target::word
-    AOT_Thread_call_to_runtime_entry_point_offset = 512;
+    AOT_Thread_call_to_runtime_entry_point_offset = 528;
 static constexpr dart::compiler::target::word
     AOT_Thread_call_to_runtime_stub_offset = 280;
 static constexpr dart::compiler::target::word AOT_Thread_dart_stream_offset =
-    1568;
+    1592;
 static constexpr dart::compiler::target::word
     AOT_Thread_dispatch_table_array_offset = 96;
 static constexpr dart::compiler::target::word AOT_Thread_optimize_entry_offset =
-    592;
+    608;
 static constexpr dart::compiler::target::word AOT_Thread_optimize_stub_offset =
-    424;
+    440;
 static constexpr dart::compiler::target::word
-    AOT_Thread_deoptimize_entry_offset = 600;
+    AOT_Thread_deoptimize_entry_offset = 616;
 static constexpr dart::compiler::target::word
-    AOT_Thread_deoptimize_stub_offset = 432;
+    AOT_Thread_deoptimize_stub_offset = 448;
 static constexpr dart::compiler::target::word
-    AOT_Thread_double_abs_address_offset = 680;
+    AOT_Thread_double_abs_address_offset = 696;
 static constexpr dart::compiler::target::word
-    AOT_Thread_double_negate_address_offset = 672;
+    AOT_Thread_double_negate_address_offset = 688;
 static constexpr dart::compiler::target::word AOT_Thread_end_offset = 112;
 static constexpr dart::compiler::target::word
-    AOT_Thread_enter_safepoint_stub_offset = 472;
+    AOT_Thread_enter_safepoint_stub_offset = 488;
 static constexpr dart::compiler::target::word
-    AOT_Thread_execution_state_offset = 1520;
+    AOT_Thread_execution_state_offset = 1544;
 static constexpr dart::compiler::target::word
-    AOT_Thread_exit_safepoint_stub_offset = 480;
+    AOT_Thread_exit_safepoint_stub_offset = 496;
 static constexpr dart::compiler::target::word
-    AOT_Thread_call_native_through_safepoint_stub_offset = 488;
+    AOT_Thread_call_native_through_safepoint_stub_offset = 504;
 static constexpr dart::compiler::target::word
-    AOT_Thread_call_native_through_safepoint_entry_point_offset = 608;
+    AOT_Thread_call_native_through_safepoint_entry_point_offset = 624;
 static constexpr dart::compiler::target::word
     AOT_Thread_fix_allocation_stub_code_offset = 256;
 static constexpr dart::compiler::target::word
     AOT_Thread_fix_callers_target_code_offset = 248;
 static constexpr dart::compiler::target::word
-    AOT_Thread_float_absolute_address_offset = 704;
+    AOT_Thread_float_absolute_address_offset = 720;
 static constexpr dart::compiler::target::word
-    AOT_Thread_float_negate_address_offset = 696;
+    AOT_Thread_float_negate_address_offset = 712;
 static constexpr dart::compiler::target::word
-    AOT_Thread_float_not_address_offset = 688;
+    AOT_Thread_float_not_address_offset = 704;
 static constexpr dart::compiler::target::word
-    AOT_Thread_float_zerow_address_offset = 712;
+    AOT_Thread_float_zerow_address_offset = 728;
 static constexpr dart::compiler::target::word
-    AOT_Thread_global_object_pool_offset = 1496;
+    AOT_Thread_global_object_pool_offset = 1520;
 static constexpr dart::compiler::target::word
-    AOT_Thread_interpret_call_entry_point_offset = 648;
+    AOT_Thread_interpret_call_entry_point_offset = 664;
 static constexpr dart::compiler::target::word
     AOT_Thread_invoke_dart_code_from_bytecode_stub_offset = 272;
 static constexpr dart::compiler::target::word
     AOT_Thread_invoke_dart_code_stub_offset = 264;
 static constexpr dart::compiler::target::word
-    AOT_Thread_exit_through_ffi_offset = 1544;
+    AOT_Thread_exit_through_ffi_offset = 1568;
 static constexpr dart::compiler::target::word AOT_Thread_isolate_offset = 88;
 static constexpr dart::compiler::target::word
     AOT_Thread_field_table_values_offset = 136;
 static constexpr dart::compiler::target::word
-    AOT_Thread_lazy_deopt_from_return_stub_offset = 440;
+    AOT_Thread_lazy_deopt_from_return_stub_offset = 456;
 static constexpr dart::compiler::target::word
-    AOT_Thread_lazy_deopt_from_throw_stub_offset = 448;
+    AOT_Thread_lazy_deopt_from_throw_stub_offset = 464;
 static constexpr dart::compiler::target::word
-    AOT_Thread_lazy_specialize_type_test_stub_offset = 464;
+    AOT_Thread_lazy_specialize_type_test_stub_offset = 480;
 static constexpr dart::compiler::target::word
     AOT_Thread_marking_stack_block_offset = 168;
 static constexpr dart::compiler::target::word
-    AOT_Thread_megamorphic_call_checked_entry_offset = 576;
+    AOT_Thread_megamorphic_call_checked_entry_offset = 592;
 static constexpr dart::compiler::target::word
-    AOT_Thread_switchable_call_miss_entry_offset = 584;
+    AOT_Thread_switchable_call_miss_entry_offset = 600;
 static constexpr dart::compiler::target::word
-    AOT_Thread_switchable_call_miss_stub_offset = 392;
+    AOT_Thread_switchable_call_miss_stub_offset = 408;
 static constexpr dart::compiler::target::word
-    AOT_Thread_no_scope_native_wrapper_entry_point_offset = 632;
+    AOT_Thread_no_scope_native_wrapper_entry_point_offset = 648;
 static constexpr dart::compiler::target::word
     AOT_Thread_null_error_shared_with_fpu_regs_stub_offset = 296;
 static constexpr dart::compiler::target::word
-    AOT_Thread_null_arg_error_shared_with_fpu_regs_stub_offset = 312;
-static constexpr dart::compiler::target::word
-    AOT_Thread_range_error_shared_with_fpu_regs_stub_offset = 328;
-static constexpr dart::compiler::target::word
     AOT_Thread_null_error_shared_without_fpu_regs_stub_offset = 288;
 static constexpr dart::compiler::target::word
+    AOT_Thread_null_arg_error_shared_with_fpu_regs_stub_offset = 312;
+static constexpr dart::compiler::target::word
     AOT_Thread_null_arg_error_shared_without_fpu_regs_stub_offset = 304;
 static constexpr dart::compiler::target::word
-    AOT_Thread_range_error_shared_without_fpu_regs_stub_offset = 320;
+    AOT_Thread_null_cast_error_shared_with_fpu_regs_stub_offset = 328;
+static constexpr dart::compiler::target::word
+    AOT_Thread_null_cast_error_shared_without_fpu_regs_stub_offset = 320;
+static constexpr dart::compiler::target::word
+    AOT_Thread_range_error_shared_with_fpu_regs_stub_offset = 344;
+static constexpr dart::compiler::target::word
+    AOT_Thread_range_error_shared_without_fpu_regs_stub_offset = 336;
 static constexpr dart::compiler::target::word AOT_Thread_object_null_offset =
     208;
 static constexpr dart::compiler::target::word
-    AOT_Thread_predefined_symbols_address_offset = 656;
+    AOT_Thread_predefined_symbols_address_offset = 672;
 static constexpr dart::compiler::target::word AOT_Thread_resume_pc_offset =
-    1504;
+    1528;
 static constexpr dart::compiler::target::word
-    AOT_Thread_saved_shadow_call_stack_offset = 1512;
+    AOT_Thread_saved_shadow_call_stack_offset = 1536;
 static constexpr dart::compiler::target::word
-    AOT_Thread_safepoint_state_offset = 1528;
+    AOT_Thread_safepoint_state_offset = 1552;
 static constexpr dart::compiler::target::word
-    AOT_Thread_slow_type_test_stub_offset = 456;
+    AOT_Thread_slow_type_test_stub_offset = 472;
 static constexpr dart::compiler::target::word
-    AOT_Thread_slow_type_test_entry_point_offset = 616;
+    AOT_Thread_slow_type_test_entry_point_offset = 632;
 static constexpr dart::compiler::target::word AOT_Thread_stack_limit_offset =
     72;
 static constexpr dart::compiler::target::word
@@ -6915,13 +6971,13 @@
 static constexpr dart::compiler::target::word
     AOT_Thread_stack_overflow_flags_offset = 128;
 static constexpr dart::compiler::target::word
-    AOT_Thread_stack_overflow_shared_with_fpu_regs_entry_point_offset = 568;
+    AOT_Thread_stack_overflow_shared_with_fpu_regs_entry_point_offset = 584;
 static constexpr dart::compiler::target::word
-    AOT_Thread_stack_overflow_shared_with_fpu_regs_stub_offset = 384;
+    AOT_Thread_stack_overflow_shared_with_fpu_regs_stub_offset = 400;
 static constexpr dart::compiler::target::word
-    AOT_Thread_stack_overflow_shared_without_fpu_regs_entry_point_offset = 560;
+    AOT_Thread_stack_overflow_shared_without_fpu_regs_entry_point_offset = 576;
 static constexpr dart::compiler::target::word
-    AOT_Thread_stack_overflow_shared_without_fpu_regs_stub_offset = 376;
+    AOT_Thread_stack_overflow_shared_without_fpu_regs_stub_offset = 392;
 static constexpr dart::compiler::target::word
     AOT_Thread_store_buffer_block_offset = 160;
 static constexpr dart::compiler::target::word
@@ -6935,11 +6991,11 @@
 static constexpr dart::compiler::target::word
     AOT_Thread_write_barrier_code_offset = 232;
 static constexpr dart::compiler::target::word
-    AOT_Thread_write_barrier_entry_point_offset = 496;
+    AOT_Thread_write_barrier_entry_point_offset = 512;
 static constexpr dart::compiler::target::word
     AOT_Thread_write_barrier_mask_offset = 80;
 static constexpr dart::compiler::target::word AOT_Thread_callback_code_offset =
-    1536;
+    1560;
 static constexpr dart::compiler::target::word
     AOT_TimelineStream_enabled_offset = 16;
 static constexpr dart::compiler::target::word AOT_TwoByteString_data_offset =
@@ -6985,9 +7041,9 @@
     8, 24, 16, 32};
 static constexpr dart::compiler::target::word
     AOT_Thread_write_barrier_wrappers_thread_offset[] = {
-        1320, 1328, 1336, 1344, 1352, 1360, 1368, 1376, 1384, 1392, 1400,
-        1408, 1416, 1424, 1432, -1,   -1,   -1,   -1,   1440, 1448, -1,
-        -1,   1456, 1464, 1472, -1,   -1,   -1,   -1,   -1,   -1};
+        1344, 1352, 1360, 1368, 1376, 1384, 1392, 1400, 1408, 1416, 1424,
+        1432, 1440, 1448, 1456, -1,   -1,   -1,   -1,   1464, 1472, -1,
+        -1,   1480, 1488, 1496, -1,   -1,   -1,   -1,   -1,   -1};
 static constexpr dart::compiler::target::word AOT_ApiError_InstanceSize = 16;
 static constexpr dart::compiler::target::word AOT_Array_InstanceSize = 24;
 static constexpr dart::compiler::target::word AOT_Array_header_size = 24;
diff --git a/runtime/vm/compiler/runtime_offsets_list.h b/runtime/vm/compiler/runtime_offsets_list.h
index 3cbb19d..958adc1 100644
--- a/runtime/vm/compiler/runtime_offsets_list.h
+++ b/runtime/vm/compiler/runtime_offsets_list.h
@@ -204,12 +204,14 @@
   FIELD(Thread, switchable_call_miss_stub_offset)                              \
   FIELD(Thread, no_scope_native_wrapper_entry_point_offset)                    \
   FIELD(Thread, null_error_shared_with_fpu_regs_stub_offset)                   \
-  FIELD(Thread, null_arg_error_shared_with_fpu_regs_stub_offset)               \
-  FIELD(Thread, range_error_shared_with_fpu_regs_stub_offset)                  \
-                                                                               \
   FIELD(Thread, null_error_shared_without_fpu_regs_stub_offset)                \
+  FIELD(Thread, null_arg_error_shared_with_fpu_regs_stub_offset)               \
   FIELD(Thread, null_arg_error_shared_without_fpu_regs_stub_offset)            \
+  FIELD(Thread, null_cast_error_shared_with_fpu_regs_stub_offset)              \
+  FIELD(Thread, null_cast_error_shared_without_fpu_regs_stub_offset)           \
+  FIELD(Thread, range_error_shared_with_fpu_regs_stub_offset)                  \
   FIELD(Thread, range_error_shared_without_fpu_regs_stub_offset)               \
+                                                                               \
   FIELD(Thread, object_null_offset)                                            \
   FIELD(Thread, predefined_symbols_address_offset)                             \
   FIELD(Thread, resume_pc_offset)                                              \
diff --git a/runtime/vm/compiler/stub_code_compiler_arm.cc b/runtime/vm/compiler/stub_code_compiler_arm.cc
index 675db16..e858c7d 100644
--- a/runtime/vm/compiler/stub_code_compiler_arm.cc
+++ b/runtime/vm/compiler/stub_code_compiler_arm.cc
@@ -523,6 +523,22 @@
       /*allow_return=*/false);
 }
 
+void StubCodeCompiler::GenerateNullCastErrorSharedWithoutFPURegsStub(
+    Assembler* assembler) {
+  GenerateSharedStub(
+      assembler, /*save_fpu_registers=*/false, &kNullCastErrorRuntimeEntry,
+      target::Thread::null_cast_error_shared_without_fpu_regs_stub_offset(),
+      /*allow_return=*/false);
+}
+
+void StubCodeCompiler::GenerateNullCastErrorSharedWithFPURegsStub(
+    Assembler* assembler) {
+  GenerateSharedStub(
+      assembler, /*save_fpu_registers=*/true, &kNullCastErrorRuntimeEntry,
+      target::Thread::null_cast_error_shared_with_fpu_regs_stub_offset(),
+      /*allow_return=*/false);
+}
+
 static void GenerateRangeError(Assembler* assembler, bool with_fpu_regs) {
   auto perform_runtime_call = [&]() {
     ASSERT(!GenericCheckBoundInstr::UseUnboxedRepresentation());
diff --git a/runtime/vm/compiler/stub_code_compiler_arm64.cc b/runtime/vm/compiler/stub_code_compiler_arm64.cc
index 32ec2b0..20eb970 100644
--- a/runtime/vm/compiler/stub_code_compiler_arm64.cc
+++ b/runtime/vm/compiler/stub_code_compiler_arm64.cc
@@ -580,6 +580,22 @@
       /*allow_return=*/false);
 }
 
+void StubCodeCompiler::GenerateNullCastErrorSharedWithoutFPURegsStub(
+    Assembler* assembler) {
+  GenerateSharedStub(
+      assembler, /*save_fpu_registers=*/false, &kNullCastErrorRuntimeEntry,
+      target::Thread::null_cast_error_shared_without_fpu_regs_stub_offset(),
+      /*allow_return=*/false);
+}
+
+void StubCodeCompiler::GenerateNullCastErrorSharedWithFPURegsStub(
+    Assembler* assembler) {
+  GenerateSharedStub(
+      assembler, /*save_fpu_registers=*/true, &kNullCastErrorRuntimeEntry,
+      target::Thread::null_cast_error_shared_with_fpu_regs_stub_offset(),
+      /*allow_return=*/false);
+}
+
 static void GenerateRangeError(Assembler* assembler, bool with_fpu_regs) {
   auto perform_runtime_call = [&]() {
     // If the generated code has unboxed index/length we need to box them before
diff --git a/runtime/vm/compiler/stub_code_compiler_ia32.cc b/runtime/vm/compiler/stub_code_compiler_ia32.cc
index a61f83d..6649df4 100644
--- a/runtime/vm/compiler/stub_code_compiler_ia32.cc
+++ b/runtime/vm/compiler/stub_code_compiler_ia32.cc
@@ -323,6 +323,17 @@
     Assembler* assembler) {
   __ Breakpoint();
 }
+
+void StubCodeCompiler::GenerateNullCastErrorSharedWithoutFPURegsStub(
+    Assembler* assembler) {
+  __ Breakpoint();
+}
+
+void StubCodeCompiler::GenerateNullCastErrorSharedWithFPURegsStub(
+    Assembler* assembler) {
+  __ Breakpoint();
+}
+
 void StubCodeCompiler::GenerateRangeErrorSharedWithoutFPURegsStub(
     Assembler* assembler) {
   __ Breakpoint();
diff --git a/runtime/vm/compiler/stub_code_compiler_x64.cc b/runtime/vm/compiler/stub_code_compiler_x64.cc
index e758386..23ec342 100644
--- a/runtime/vm/compiler/stub_code_compiler_x64.cc
+++ b/runtime/vm/compiler/stub_code_compiler_x64.cc
@@ -516,6 +516,22 @@
       /*allow_return=*/false);
 }
 
+void StubCodeCompiler::GenerateNullCastErrorSharedWithoutFPURegsStub(
+    Assembler* assembler) {
+  GenerateSharedStub(
+      assembler, /*save_fpu_registers=*/false, &kNullCastErrorRuntimeEntry,
+      target::Thread::null_cast_error_shared_without_fpu_regs_stub_offset(),
+      /*allow_return=*/false);
+}
+
+void StubCodeCompiler::GenerateNullCastErrorSharedWithFPURegsStub(
+    Assembler* assembler) {
+  GenerateSharedStub(
+      assembler, /*save_fpu_registers=*/true, &kNullCastErrorRuntimeEntry,
+      target::Thread::null_cast_error_shared_with_fpu_regs_stub_offset(),
+      /*allow_return=*/false);
+}
+
 static void GenerateRangeError(Assembler* assembler, bool with_fpu_regs) {
   auto perform_runtime_call = [&]() {
     // If the generated code has unboxed index/length we need to box them before
diff --git a/runtime/vm/cpu_arm.cc b/runtime/vm/cpu_arm.cc
index c9dcdc5..a541934 100644
--- a/runtime/vm/cpu_arm.cc
+++ b/runtime/vm/cpu_arm.cc
@@ -24,8 +24,7 @@
 #endif
 
 // ARM version differences.
-// We support two major 32-bit ARM ISA versions: ARMv6 and variants,
-// and ARMv7 and variants. For each of these we detect the presence of vfp,
+// We support only ARMv7 and variants. We detect the presence of vfp,
 // neon, and integer division instructions. Considering ARMv5TE as the baseline,
 // later versions add the following features/instructions that we use:
 //
@@ -41,37 +40,21 @@
 //
 // If an aarch64 CPU is detected, we generate ARMv7 code.
 //
-// If an instruction is missing on ARMv6, we emulate it, if possible.
 // Where we are missing vfp, we do not unbox doubles, or generate intrinsics for
 // floating point operations. Where we are missing neon, we do not unbox SIMD
 // values, or inline operations on SIMD values. Where we are missing integer
 // division, we do not inline division operations, and we do not generate
 // intrinsics that do division. See the feature tests in flow_graph_optimizer.cc
 // for details.
-//
-// Alignment:
-//
-// On ARMv6 and on, we assume that the kernel is set up to fixup unaligned
-// accesses. This can be verified by checking /proc/cpu/alignment on modern
-// Linux systems.
 
 namespace dart {
 
-#if defined(TARGET_ARCH_ARM_6)
-DEFINE_FLAG(bool, use_vfp, true, "Use vfp instructions if supported");
-DEFINE_FLAG(bool, use_neon, false, "Use neon instructions if supported");
-DEFINE_FLAG(bool,
-            use_integer_division,
-            false,
-            "Use integer division instruction if supported");
-#else
 DEFINE_FLAG(bool, use_vfp, true, "Use vfp instructions if supported");
 DEFINE_FLAG(bool, use_neon, true, "Use neon instructions if supported");
 DEFINE_FLAG(bool,
             use_integer_division,
             true,
             "Use integer division instruction if supported");
-#endif
 
 #if defined(TARGET_HOST_MISMATCH)
 #if defined(TARGET_OS_ANDROID) || defined(TARGET_OS_IOS)
@@ -126,7 +109,6 @@
 bool HostCPUFeatures::neon_supported_ = false;
 bool HostCPUFeatures::hardfp_supported_ = false;
 const char* HostCPUFeatures::hardware_ = NULL;
-ARMVersion HostCPUFeatures::arm_version_ = ARMvUnknown;
 intptr_t HostCPUFeatures::store_pc_read_offset_ = 8;
 #if defined(DEBUG)
 bool HostCPUFeatures::initialized_ = false;
@@ -140,9 +122,6 @@
   hardware_ = "";
   // When the VM is targetted to ARMv7, pretend that the CPU is ARMv7 even if
   // the CPU is actually AArch64.
-  arm_version_ = ARMv7;
-  // Always assume we have floating point unit since we don't support ARMv6 in
-  // this path.
   vfp_supported_ = FLAG_use_vfp;
   integer_division_supported_ = FLAG_use_integer_division;
   neon_supported_ = FLAG_use_neon;
@@ -157,27 +136,18 @@
   CpuInfo::Init();
   hardware_ = CpuInfo::GetCpuModel();
 
-  // Check for ARMv6, ARMv7, or aarch64.
+  // Check for ARMv7, or aarch64.
   // It can be in either the Processor or Model information fields.
   if (CpuInfo::FieldContains(kCpuInfoProcessor, "aarch64") ||
       CpuInfo::FieldContains(kCpuInfoModel, "aarch64") ||
       CpuInfo::FieldContains(kCpuInfoArchitecture, "8") ||
       CpuInfo::FieldContains(kCpuInfoArchitecture, "AArch64")) {
     // pretend that this arm64 cpu is really an ARMv7
-    arm_version_ = ARMv7;
     is_arm64 = true;
-  } else if (CpuInfo::FieldContains(kCpuInfoProcessor, "ARMv6") ||
-             CpuInfo::FieldContains(kCpuInfoModel, "ARMv6")) {
-    // Raspberry Pi, etc.
-    arm_version_ = ARMv6;
-  } else if (CpuInfo::FieldContains(kCpuInfoProcessor, "ARMv7") ||
-             CpuInfo::FieldContains(kCpuInfoModel, "ARMv7") ||
-             CpuInfo::FieldContains(kCpuInfoArchitecture, "7")) {
-    arm_version_ = ARMv7;
-  } else {
-#if defined(DART_RUN_IN_QEMU_ARMv7)
-    arm_version_ = ARMv7;
-#else
+  } else if (!CpuInfo::FieldContains(kCpuInfoProcessor, "ARMv7") &&
+             !CpuInfo::FieldContains(kCpuInfoModel, "ARMv7") &&
+             !CpuInfo::FieldContains(kCpuInfoArchitecture, "7")) {
+#if !defined(DART_RUN_IN_QEMU_ARMv7)
     FATAL("Unrecognized ARM CPU architecture.");
 #endif
   }
@@ -262,12 +232,6 @@
   CpuInfo::Init();
   hardware_ = CpuInfo::GetCpuModel();
 
-#if defined(TARGET_ARCH_ARM_6)
-  arm_version_ = ARMv6;
-#else
-  arm_version_ = ARMv7;
-#endif
-
   integer_division_supported_ = FLAG_use_integer_division;
   vfp_supported_ = FLAG_use_vfp;
   neon_supported_ = FLAG_use_vfp && FLAG_use_neon;
diff --git a/runtime/vm/cpu_arm.h b/runtime/vm/cpu_arm.h
index 18d55fc..2eaf4aa 100644
--- a/runtime/vm/cpu_arm.h
+++ b/runtime/vm/cpu_arm.h
@@ -22,12 +22,6 @@
 // additionally mock the options needed for the target architecture so that
 // they may be altered for testing.
 
-enum ARMVersion {
-  ARMv6,
-  ARMv7,
-  ARMvUnknown,
-};
-
 class HostCPUFeatures : public AllStatic {
  public:
   static void Init();
@@ -52,10 +46,6 @@
     DEBUG_ASSERT(initialized_);
     return hardfp_supported_;
   }
-  static ARMVersion arm_version() {
-    DEBUG_ASSERT(initialized_);
-    return arm_version_;
-  }
   static intptr_t store_pc_read_offset() {
     DEBUG_ASSERT(initialized_);
     return store_pc_read_offset_;
@@ -74,10 +64,6 @@
     DEBUG_ASSERT(initialized_);
     neon_supported_ = supported;
   }
-  static void set_arm_version(ARMVersion version) {
-    DEBUG_ASSERT(initialized_);
-    arm_version_ = version;
-  }
 #endif  // !defined(HOST_ARCH_ARM)
 
  private:
@@ -86,7 +72,6 @@
   static bool vfp_supported_;
   static bool neon_supported_;
   static bool hardfp_supported_;
-  static ARMVersion arm_version_;
   static intptr_t store_pc_read_offset_;
 #if defined(DEBUG)
   static bool initialized_;
@@ -108,7 +93,6 @@
   static bool neon_supported() { return HostCPUFeatures::neon_supported(); }
   static bool hardfp_supported() { return HostCPUFeatures::hardfp_supported(); }
   static const char* hardware() { return HostCPUFeatures::hardware(); }
-  static ARMVersion arm_version() { return HostCPUFeatures::arm_version(); }
   static intptr_t store_pc_read_offset() {
     return HostCPUFeatures::store_pc_read_offset();
   }
diff --git a/runtime/vm/dart_api_impl_test.cc b/runtime/vm/dart_api_impl_test.cc
index e20139f..1940670 100644
--- a/runtime/vm/dart_api_impl_test.cc
+++ b/runtime/vm/dart_api_impl_test.cc
@@ -1557,12 +1557,13 @@
   Dart_Handle result = Dart_StringToUTF8(str1, &utf8_encoded, &utf8_length);
   EXPECT_VALID(result);
   EXPECT_EQ(3, utf8_length);
-  EXPECT_EQ(237, static_cast<intptr_t>(utf8_encoded[0]));
-  EXPECT_EQ(180, static_cast<intptr_t>(utf8_encoded[1]));
-  EXPECT_EQ(158, static_cast<intptr_t>(utf8_encoded[2]));
+  // Unpaired surrogate is encoded as replacement character.
+  EXPECT_EQ(239, static_cast<intptr_t>(utf8_encoded[0]));
+  EXPECT_EQ(191, static_cast<intptr_t>(utf8_encoded[1]));
+  EXPECT_EQ(189, static_cast<intptr_t>(utf8_encoded[2]));
 
   Dart_Handle str2 = Dart_NewStringFromUTF8(utf8_encoded, utf8_length);
-  EXPECT_VALID(str2);  // Standalone low surrogate, but still valid
+  EXPECT_VALID(str2);  // Replacement character, but still valid
 
   Dart_Handle reversed = Dart_Invoke(lib, NewString("reversed"), 0, NULL);
   EXPECT_VALID(reversed);  // This is also allowed.
@@ -1572,7 +1573,8 @@
                              &utf8_length_reversed);
   EXPECT_VALID(result);
   EXPECT_EQ(6, utf8_length_reversed);
-  uint8_t expected[6] = {237, 180, 158, 237, 160, 180};
+  // Two unpaired surrogates are encoded as two replacement characters.
+  uint8_t expected[6] = {239, 191, 189, 239, 191, 189};
   for (int i = 0; i < 6; i++) {
     EXPECT_EQ(expected[i], utf8_encoded_reversed[i]);
   }
diff --git a/runtime/vm/dart_entry.cc b/runtime/vm/dart_entry.cc
index 8a1350e..3a82369 100644
--- a/runtime/vm/dart_entry.cc
+++ b/runtime/vm/dart_entry.cc
@@ -206,6 +206,101 @@
 #endif
 }
 
+ObjectPtr DartEntry::ResolveCallable(const Array& arguments,
+                                     const Array& arguments_descriptor) {
+  auto thread = Thread::Current();
+  auto isolate = thread->isolate();
+  auto zone = thread->zone();
+
+  const ArgumentsDescriptor args_desc(arguments_descriptor);
+  const intptr_t receiver_index = args_desc.FirstArgIndex();
+  const intptr_t type_args_len = args_desc.TypeArgsLen();
+  const intptr_t args_count = args_desc.Count();
+  const intptr_t named_args_count = args_desc.NamedCount();
+  const auto& getter_name = Symbols::GetCall();
+
+  auto& instance = Instance::Handle(zone);
+  auto& function = Function::Handle(zone);
+  auto& cls = Class::Handle(zone);
+
+  // The null instance cannot resolve to a callable, so we can stop there.
+  for (instance ^= arguments.At(receiver_index); !instance.IsNull();
+       instance ^= arguments.At(receiver_index)) {
+    // If the current instance is a compatible callable, return its function.
+    if (instance.IsCallable(&function) &&
+        function.AreValidArgumentCounts(type_args_len, args_count,
+                                        named_args_count, nullptr)) {
+      return function.raw();
+    }
+
+    // Special case: closures are implemented with a call getter instead of a
+    // call method, so checking for a call getter would cause an infinite loop.
+    if (instance.IsClosure()) {
+      break;
+    }
+
+    // Find a call getter, if any, in the class hierarchy.
+    for (cls = instance.clazz(); !cls.IsNull(); cls = cls.SuperClass()) {
+      function = cls.LookupDynamicFunction(getter_name);
+      if (function.IsNull()) {
+        continue;
+      }
+
+      if (!OSThread::Current()->HasStackHeadroom()) {
+        const Instance& exception =
+            Instance::Handle(zone, isolate->object_store()->stack_overflow());
+        return UnhandledException::New(exception, StackTrace::Handle(zone));
+      }
+
+      const Array& getter_arguments = Array::Handle(zone, Array::New(1));
+      getter_arguments.SetAt(0, instance);
+      const Object& getter_result = Object::Handle(
+          zone, DartEntry::InvokeFunction(function, getter_arguments));
+      if (getter_result.IsError()) {
+        return getter_result.raw();
+      }
+      ASSERT(getter_result.IsNull() || getter_result.IsInstance());
+
+      // We have a new possibly compatible callable, so set the first argument
+      // accordingly so it gets picked up in the main loop.
+      arguments.SetAt(receiver_index, getter_result);
+      break;
+    }
+
+    // No call getter was found in the hierarchy, so stop the search.
+    if (cls.IsNull()) {
+      break;
+    }
+  }
+
+  // No compatible callable was found.
+  return Function::null();
+}
+
+ObjectPtr DartEntry::InvokeCallable(const Function& callable_function,
+                                    const Array& arguments,
+                                    const Array& arguments_descriptor) {
+  if (!callable_function.IsNull()) {
+    return InvokeFunction(callable_function, arguments, arguments_descriptor);
+  }
+
+  // No compatible callable was found, so invoke noSuchMethod.
+  Thread* thread = Thread::Current();
+  Zone* zone = thread->zone();
+  const ArgumentsDescriptor args_desc(arguments_descriptor);
+  auto& instance =
+      Instance::CheckedHandle(zone, arguments.At(args_desc.FirstArgIndex()));
+  auto& target_name = String::Handle(zone, Symbols::Call().raw());
+  if (instance.IsClosure()) {
+    const auto& closure = Closure::Cast(instance);
+    // For closures, use the name of the closure, not 'call'.
+    const auto& function = Function::Handle(zone, closure.function());
+    target_name = function.QualifiedUserVisibleName();
+  }
+  return InvokeNoSuchMethod(instance, target_name, arguments,
+                            arguments_descriptor);
+}
+
 ObjectPtr DartEntry::InvokeClosure(const Array& arguments) {
   const int kTypeArgsLen = 0;  // No support to pass type args to generic func.
 
@@ -217,68 +312,15 @@
 
 ObjectPtr DartEntry::InvokeClosure(const Array& arguments,
                                    const Array& arguments_descriptor) {
-  Thread* thread = Thread::Current();
-  Zone* zone = thread->zone();
-  const ArgumentsDescriptor args_desc(arguments_descriptor);
-  Instance& instance = Instance::Handle(zone);
-  instance ^= arguments.At(args_desc.FirstArgIndex());
-  // Get the entrypoint corresponding to the closure function or to the call
-  // method of the instance. This will result in a compilation of the function
-  // if it is not already compiled.
-  Function& function = Function::Handle(zone);
-  if (instance.IsCallable(&function)) {
-    // Only invoke the function if its arguments are compatible.
-    if (function.AreValidArgumentCounts(args_desc.TypeArgsLen(),
-                                        args_desc.Count(),
-                                        args_desc.NamedCount(), NULL)) {
-      // The closure or non-closure object (receiver) is passed as implicit
-      // first argument. It is already included in the arguments array.
-      return InvokeFunction(function, arguments, arguments_descriptor);
-    }
+  const Object& resolved_result =
+      Object::Handle(ResolveCallable(arguments, arguments_descriptor));
+  if (resolved_result.IsError()) {
+    return resolved_result.raw();
   }
 
-  // There is no compatible 'call' method, see if there's a getter.
-  if (instance.IsClosure()) {
-    // Special case: closures are implemented with a call getter instead of a
-    // call method. If the arguments didn't match, go to noSuchMethod instead
-    // of infinitely recursing on the getter.
-  } else {
-    const String& getter_name = Symbols::GetCall();
-    Class& cls = Class::Handle(zone, instance.clazz());
-    while (!cls.IsNull()) {
-      function = cls.LookupDynamicFunction(getter_name);
-      if (!function.IsNull()) {
-        Isolate* isolate = thread->isolate();
-        if (!OSThread::Current()->HasStackHeadroom()) {
-          const Instance& exception =
-              Instance::Handle(zone, isolate->object_store()->stack_overflow());
-          return UnhandledException::New(exception, StackTrace::Handle(zone));
-        }
-
-        const Array& getter_arguments = Array::Handle(zone, Array::New(1));
-        getter_arguments.SetAt(0, instance);
-        const Object& getter_result = Object::Handle(
-            zone, DartEntry::InvokeFunction(function, getter_arguments));
-        if (getter_result.IsError()) {
-          return getter_result.raw();
-        }
-        ASSERT(getter_result.IsNull() || getter_result.IsInstance());
-
-        arguments.SetAt(0, getter_result);
-        // This otherwise unnecessary handle is used to prevent clang from
-        // doing tail call elimination, which would make the stack overflow
-        // check above ineffective.
-        Object& result = Object::Handle(
-            zone, InvokeClosure(arguments, arguments_descriptor));
-        return result.raw();
-      }
-      cls = cls.SuperClass();
-    }
-  }
-
-  // No compatible method or getter so invoke noSuchMethod.
-  return InvokeNoSuchMethod(instance, Symbols::Call(), arguments,
-                            arguments_descriptor);
+  const auto& function =
+      Function::Handle(Function::RawCast(resolved_result.raw()));
+  return InvokeCallable(function, arguments, arguments_descriptor);
 }
 
 ObjectPtr DartEntry::InvokeNoSuchMethod(const Instance& receiver,
diff --git a/runtime/vm/dart_entry.h b/runtime/vm/dart_entry.h
index 9ab0115..f635cb2 100644
--- a/runtime/vm/dart_entry.h
+++ b/runtime/vm/dart_entry.h
@@ -206,6 +206,23 @@
       const Array& arguments_descriptor,
       uword current_sp = OSThread::GetCurrentStackPointer());
 
+  // Resolves the first argument to a callable compatible with the arguments.
+  //
+  // If no errors occur, the first argument is changed to be either the resolved
+  // callable or, if Function::null() is returned, an appropriate target for
+  // invoking noSuchMethod.
+  //
+  // On success, returns a RawFunction. On failure, a RawError.
+  static ObjectPtr ResolveCallable(const Array& arguments,
+                                   const Array& arguments_descriptor);
+
+  // Invokes the function returned by ResolveCallable.
+  //
+  // On success, returns a RawInstance. On failure, a RawError.
+  static ObjectPtr InvokeCallable(const Function& callable_function,
+                                  const Array& arguments,
+                                  const Array& arguments_descriptor);
+
   // Invokes the closure object given as the first argument.
   // On success, returns a RawInstance.  On failure, a RawError.
   // This is used when there is no type argument vector and
diff --git a/runtime/vm/instructions_arm.cc b/runtime/vm/instructions_arm.cc
index 0ac106e..d46838f 100644
--- a/runtime/vm/instructions_arm.cc
+++ b/runtime/vm/instructions_arm.cc
@@ -118,42 +118,17 @@
   uword start = end - Instr::kInstrSize;
   int32_t instr = Instr::At(start)->InstructionBits();
   intptr_t imm = 0;
-  const ARMVersion version = TargetCPUFeatures::arm_version();
-  if (version == ARMv6) {
-    ASSERT((instr & 0xfff00000) == 0xe3800000);  // orr rd, rd, byte0
-    imm |= (instr & 0x000000ff);
-
+  if ((instr & 0xfff00000) == 0xe3400000) {  // movt reg, #imm_hi
+    imm |= (instr & 0xf0000) << 12;
+    imm |= (instr & 0xfff) << 16;
     start -= Instr::kInstrSize;
     instr = Instr::At(start)->InstructionBits();
-    ASSERT((instr & 0xfff00000) == 0xe3800c00);  // orr rd, rd, (byte1 rot 12)
-    imm |= (instr & 0x000000ff);
-
-    start -= Instr::kInstrSize;
-    instr = Instr::At(start)->InstructionBits();
-    ASSERT((instr & 0xfff00f00) == 0xe3800800);  // orr rd, rd, (byte2 rot 8)
-    imm |= (instr & 0x000000ff);
-
-    start -= Instr::kInstrSize;
-    instr = Instr::At(start)->InstructionBits();
-    ASSERT((instr & 0xffff0f00) == 0xe3a00400);  // mov rd, (byte3 rot 4)
-    imm |= (instr & 0x000000ff);
-
-    *reg = static_cast<Register>((instr & 0x0000f000) >> 12);
-    *value = imm;
-  } else {
-    ASSERT(version == ARMv7);
-    if ((instr & 0xfff00000) == 0xe3400000) {  // movt reg, #imm_hi
-      imm |= (instr & 0xf0000) << 12;
-      imm |= (instr & 0xfff) << 16;
-      start -= Instr::kInstrSize;
-      instr = Instr::At(start)->InstructionBits();
-    }
-    ASSERT((instr & 0xfff00000) == 0xe3000000);  // movw reg, #imm_lo
-    imm |= (instr & 0xf0000) >> 4;
-    imm |= instr & 0xfff;
-    *reg = static_cast<Register>((instr & 0xf000) >> 12);
-    *value = imm;
   }
+  ASSERT((instr & 0xfff00000) == 0xe3000000);  // movw reg, #imm_lo
+  imm |= (instr & 0xf0000) >> 4;
+  imm |= instr & 0xfff;
+  *reg = static_cast<Register>((instr & 0xf000) >> 12);
+  *value = imm;
   return start;
 }
 
@@ -368,14 +343,7 @@
   int32_t instruction = (static_cast<int32_t>(AL) << kConditionShift) | B24 |
                         B21 | (0xfff << 8) | B4 |
                         (static_cast<int32_t>(LR) << kRmShift);
-  const ARMVersion version = TargetCPUFeatures::arm_version();
-  if (version == ARMv6) {
-    return bx_lr->InstructionBits() == instruction;
-  } else {
-    ASSERT(version == ARMv7);
-    return bx_lr->InstructionBits() == instruction;
-  }
-  return false;
+  return bx_lr->InstructionBits() == instruction;
 }
 
 bool PcRelativeCallPattern::IsValid() const {
diff --git a/runtime/vm/interpreter.cc b/runtime/vm/interpreter.cc
index a48d019..d296e6e 100644
--- a/runtime/vm/interpreter.cc
+++ b/runtime/vm/interpreter.cc
@@ -3431,29 +3431,39 @@
     const intptr_t receiver_idx = type_args_len > 0 ? 1 : 0;
     const intptr_t argc =
         InterpreterHelpers::ArgDescArgCount(argdesc_) + receiver_idx;
-
     ObjectPtr receiver = FrameArguments(FP, argc)[receiver_idx];
 
-    // Invoke field getter on receiver.
+    // Possibly demangle field name and invoke field getter on receiver.
     {
       SP[1] = argdesc_;                // Save argdesc_.
       SP[2] = 0;                       // Result of runtime call.
       SP[3] = receiver;                // Receiver.
-      SP[4] = function->ptr()->name_;  // Field name.
+      SP[4] = function->ptr()->name_;  // Field name (may change during call).
       Exit(thread, FP, SP + 5, pc);
       if (!InvokeRuntime(thread, this, DRT_GetFieldForDispatch,
                          NativeArguments(thread, 2, SP + 3, SP + 2))) {
         HANDLE_EXCEPTION;
       }
+      function = FrameFunction(FP);
       argdesc_ = Array::RawCast(SP[1]);
     }
 
+    // If the field name in the arguments is different after the call, then
+    // this was a dynamic call.
+    StringPtr field_name = String::RawCast(SP[4]);
+    const bool is_dynamic_call = function->ptr()->name_ != field_name;
+
     // Replace receiver with field value, keep all other arguments, and
     // invoke 'call' function, or if not found, invoke noSuchMethod.
     FrameArguments(FP, argc)[receiver_idx] = receiver = SP[2];
 
     // If the field value is a closure, no need to resolve 'call' function.
     if (InterpreterHelpers::GetClassId(receiver) == kClosureCid) {
+      if (is_dynamic_call) {
+        // TODO(dartbug.com/40813): Move checks that are currently compiled
+        // in the closure body to here as they are also moved to
+        // FlowGraphBuilder::BuildGraphOfInvokeFieldDispatcher.
+      }
       SP[1] = Closure::RawCast(receiver)->ptr()->function_;
       goto TailCallSP1;
     }
diff --git a/runtime/vm/isolate.h b/runtime/vm/isolate.h
index 7eae97d..2c217e6 100644
--- a/runtime/vm/isolate.h
+++ b/runtime/vm/isolate.h
@@ -370,6 +370,10 @@
   }
   Mutex* subtype_test_cache_mutex() { return &subtype_test_cache_mutex_; }
 
+#if defined(DART_PRECOMPILED_RUNTIME)
+  Mutex* unlinked_call_map_mutex() { return &unlinked_call_map_mutex_; }
+#endif
+
 #if !defined(DART_PRECOMPILED_RUNTIME)
   Mutex* initializer_functions_mutex() { return &initializer_functions_mutex_; }
 #endif  // !defined(DART_PRECOMPILED_RUNTIME)
@@ -646,6 +650,10 @@
   Mutex type_arguments_canonicalization_mutex_;
   Mutex subtype_test_cache_mutex_;
 
+#if defined(DART_PRECOMPILED_RUNTIME)
+  Mutex unlinked_call_map_mutex_;
+#endif
+
 #if !defined(DART_PRECOMPILED_RUNTIME)
   Mutex initializer_functions_mutex_;
 #endif  // !defined(DART_PRECOMPILED_RUNTIME)
diff --git a/runtime/vm/kernel_binary.cc b/runtime/vm/kernel_binary.cc
index 3720fe2..c34523e 100644
--- a/runtime/vm/kernel_binary.cc
+++ b/runtime/vm/kernel_binary.cc
@@ -15,6 +15,7 @@
 #include "vm/kernel.h"
 #include "vm/object.h"
 #include "vm/os.h"
+#include "vm/version.h"
 
 namespace dart {
 
@@ -84,12 +85,17 @@
     "Invalid kernel binary format version";
 const char* kKernelInvalidSizeIndicated =
     "Invalid kernel binary: Indicated size is invalid";
+const char* kKernelInvalidSdkHash = "Invalid SDK hash";
+
+const int kSdkHashSizeInBytes = 10;
+const char* kSdkHashNull = "0000000000";
 
 std::unique_ptr<Program> Program::ReadFrom(Reader* reader, const char** error) {
-  if (reader->size() < 60) {
-    // A kernel file (v41) currently contains at least the following:
+  if (reader->size() < 70) {
+    // A kernel file (v43) currently contains at least the following:
     //   * Magic number (32)
     //   * Kernel version (32)
+    //   * SDK Hash (10 * 8)
     //   * List of problems (8)
     //   * Length of source map (32)
     //   * Length of canonical name table (8)
@@ -98,7 +104,7 @@
     //   * Length of constant table (8)
     //   * Component index (11 * 32)
     //
-    // so is at least 64 bytes.
+    // so is at least 74 bytes.
     // (Technically it will also contain an empty entry in both source map and
     // string table, taking up another 8 bytes.)
     if (error != nullptr) {
@@ -124,6 +130,18 @@
     return nullptr;
   }
 
+  uint8_t sdkHash[kSdkHashSizeInBytes + 1];
+  reader->ReadBytes(sdkHash, kSdkHashSizeInBytes);
+  sdkHash[kSdkHashSizeInBytes] = 0;  // Null terminate.
+  if (strcmp(Version::SdkHash(), kSdkHashNull) != 0 &&
+      strcmp((const char*)sdkHash, kSdkHashNull) != 0 &&
+      strcmp((const char*)sdkHash, Version::SdkHash()) != 0) {
+    if (error != nullptr) {
+      *error = kKernelInvalidSdkHash;
+    }
+    return nullptr;
+  }
+
   std::unique_ptr<Program> program(new Program());
   program->binary_version_ = formatVersion;
   program->typed_data_ = reader->typed_data();
@@ -152,13 +170,8 @@
   // Read backwards at the end.
   program->library_count_ = reader->ReadFromIndexNoReset(
       reader->size_, LibraryCountFieldCountFromEnd, 1, 0);
-  static_assert(kMinSupportedKernelFormatVersion < 41, "cleanup this code");
   intptr_t count_from_first_library_offset =
-      SourceTableFieldCountFromFirstLibraryOffsetPre41;
-  if (formatVersion >= 41) {
-    count_from_first_library_offset =
-        SourceTableFieldCountFromFirstLibraryOffset41Plus;
-  }
+      SourceTableFieldCountFromFirstLibraryOffset41Plus;
   program->source_table_offset_ = reader->ReadFromIndexNoReset(
       reader->size_,
       LibraryCountFieldCountFromEnd + 1 + program->library_count_ + 1 +
@@ -171,13 +184,9 @@
   program->constant_table_offset_ = reader->ReadUInt32();
 
   program->main_method_reference_ = NameIndex(reader->ReadUInt32() - 1);
-  if (formatVersion >= 41) {
-    NNBDCompiledMode compilation_mode =
-        static_cast<NNBDCompiledMode>(reader->ReadUInt32());
-    program->compilation_mode_ = compilation_mode;
-  } else {
-    program->compilation_mode_ = NNBDCompiledMode::kDisabled;
-  }
+  NNBDCompiledMode compilation_mode =
+      static_cast<NNBDCompiledMode>(reader->ReadUInt32());
+  program->compilation_mode_ = compilation_mode;
 
   return program;
 }
diff --git a/runtime/vm/kernel_binary.h b/runtime/vm/kernel_binary.h
index 11527eb..33dc838 100644
--- a/runtime/vm/kernel_binary.h
+++ b/runtime/vm/kernel_binary.h
@@ -20,8 +20,8 @@
 static const uint32_t kMagicProgramFile = 0x90ABCDEFu;
 
 // Both version numbers are inclusive.
-static const uint32_t kMinSupportedKernelFormatVersion = 29;
-static const uint32_t kMaxSupportedKernelFormatVersion = 42;
+static const uint32_t kMinSupportedKernelFormatVersion = 43;
+static const uint32_t kMaxSupportedKernelFormatVersion = 43;
 
 // Keep in sync with package:kernel/lib/binary/tag.dart
 #define KERNEL_TAG_LIST(V)                                                     \
@@ -326,6 +326,12 @@
 
   uint8_t PeekByte() { return buffer()[offset_]; }
 
+  void ReadBytes(uint8_t* buffer, uint8_t size) {
+    for (int i = 0; i < size; i++) {
+      buffer[i] = ReadByte();
+    }
+  }
+
   bool ReadBool() { return (ReadByte() & 1) == 1; }
 
   uint8_t ReadFlags() { return ReadByte(); }
diff --git a/runtime/vm/kernel_loader.cc b/runtime/vm/kernel_loader.cc
index 1d0d5437..37a5469 100644
--- a/runtime/vm/kernel_loader.cc
+++ b/runtime/vm/kernel_loader.cc
@@ -297,7 +297,11 @@
     reader.set_raw_buffer(program->kernel_data() + subprogram_start);
     reader.set_size(subprogram_end - subprogram_start);
     reader.set_offset(0);
-    std::unique_ptr<Program> subprogram = Program::ReadFrom(&reader);
+    const char* error = nullptr;
+    std::unique_ptr<Program> subprogram = Program::ReadFrom(&reader, &error);
+    if (subprogram == nullptr) {
+      FATAL1("Failed to load kernel file: %s", error);
+    }
     ASSERT(subprogram->is_single_program());
     KernelLoader loader(subprogram.get(), &uri_to_source_table);
     Object& load_result = Object::Handle(loader.LoadProgram(false));
@@ -894,7 +898,11 @@
       reader.set_raw_buffer(program->kernel_data() + subprogram_start);
       reader.set_size(subprogram_end - subprogram_start);
       reader.set_offset(0);
-      std::unique_ptr<Program> subprogram = Program::ReadFrom(&reader);
+      const char* error = nullptr;
+      std::unique_ptr<Program> subprogram = Program::ReadFrom(&reader, &error);
+      if (subprogram == nullptr) {
+        FATAL1("Failed to load kernel file: %s", error);
+      }
       ASSERT(subprogram->is_single_program());
       KernelLoader loader(subprogram.get(), /*uri_to_source_table=*/nullptr);
       loader.walk_incremental_kernel(modified_libs, is_empty_program,
diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc
index 29e4c97..db3458a 100644
--- a/runtime/vm/object.cc
+++ b/runtime/vm/object.cc
@@ -6939,6 +6939,22 @@
   return FfiTrampolineData::Cast(obj).c_signature();
 }
 
+bool Function::FfiCSignatureContainsHandles() const {
+  ASSERT(IsFfiTrampoline());
+  const Function& c_signature = Function::Handle(FfiCSignature());
+  const intptr_t num_params = c_signature.num_fixed_parameters();
+  for (intptr_t i = 0; i < num_params; i++) {
+    const bool is_handle =
+        AbstractType::Handle(c_signature.ParameterTypeAt(i)).type_class_id() ==
+        kFfiHandleCid;
+    if (is_handle) {
+      return true;
+    }
+  }
+  return AbstractType::Handle(c_signature.result_type()).type_class_id() ==
+         kFfiHandleCid;
+}
+
 int32_t Function::FfiCallbackId() const {
   ASSERT(IsFfiTrampoline());
   const Object& obj = Object::Handle(raw_ptr()->data_);
@@ -14332,14 +14348,6 @@
   return result.raw();
 }
 
-void UnlinkedCall::set_target_name(const String& value) const {
-  StorePointer(&raw_ptr()->target_name_, value.raw());
-}
-
-void UnlinkedCall::set_args_descriptor(const Array& value) const {
-  StorePointer(&raw_ptr()->args_descriptor_, value.raw());
-}
-
 void UnlinkedCall::set_can_patch_to_monomorphic(bool value) const {
   StoreNonPointer(&raw_ptr()->can_patch_to_monomorphic_, value);
 }
@@ -14350,7 +14358,7 @@
 
 bool UnlinkedCall::Equals(const UnlinkedCall& other) const {
   return (target_name() == other.target_name()) &&
-         (args_descriptor() == other.args_descriptor()) &&
+         (arguments_descriptor() == other.arguments_descriptor()) &&
          (can_patch_to_monomorphic() == other.can_patch_to_monomorphic());
 }
 
@@ -15295,7 +15303,7 @@
   ASSERT(!is_tracking_exactness());
   const UnlinkedCall& result = UnlinkedCall::Handle(UnlinkedCall::New());
   result.set_target_name(String::Handle(target_name()));
-  result.set_args_descriptor(Array::Handle(arguments_descriptor()));
+  result.set_arguments_descriptor(Array::Handle(arguments_descriptor()));
   result.set_can_patch_to_monomorphic(!FLAG_precompiled_mode ||
                                       receiver_cannot_be_smi());
   return result.raw();
@@ -15956,6 +15964,7 @@
 
 #if defined(DART_PRECOMPILER)
 DECLARE_FLAG(charp, write_v8_snapshot_profile_to);
+DECLARE_FLAG(charp, trace_precompiler_to);
 #endif  // defined(DART_PRECOMPILER)
 
 CodePtr Code::FinalizeCode(FlowGraphCompiler* compiler,
@@ -15977,12 +15986,13 @@
     }
   } else {
 #if defined(DART_PRECOMPILER)
-    if (FLAG_write_v8_snapshot_profile_to != nullptr &&
-        assembler->HasObjectPoolBuilder() &&
+    const bool needs_pool = (FLAG_write_v8_snapshot_profile_to != nullptr) ||
+                            (FLAG_trace_precompiler_to != nullptr);
+    if (needs_pool && assembler->HasObjectPoolBuilder() &&
         assembler->object_pool_builder().HasParent()) {
       // We are not going to write this pool into snapshot, but we will use
-      // it to emit references from code object to other objects in the
-      // snapshot that it caused to be added to the pool.
+      // it to emit references from this code object to other objects in the
+      // snapshot that it uses.
       object_pool =
           ObjectPool::NewFromBuilder(assembler->object_pool_builder());
     }
@@ -23460,7 +23470,7 @@
 }
 
 PointerPtr Pointer::New(const AbstractType& type_arg,
-                        size_t native_address,
+                        uword native_address,
                         Heap::Space space) {
   Thread* thread = Thread::Current();
   Zone* zone = thread->zone();
diff --git a/runtime/vm/object.h b/runtime/vm/object.h
index 0193fcd..ccb84d4 100644
--- a/runtime/vm/object.h
+++ b/runtime/vm/object.h
@@ -1919,36 +1919,9 @@
   friend class Class;
 };
 
-class UnlinkedCall : public Object {
- public:
-  StringPtr target_name() const { return raw_ptr()->target_name_; }
-  void set_target_name(const String& target_name) const;
-  ArrayPtr args_descriptor() const { return raw_ptr()->args_descriptor_; }
-  void set_args_descriptor(const Array& args_descriptor) const;
-
-  bool can_patch_to_monomorphic() const {
-    return raw_ptr()->can_patch_to_monomorphic_;
-  }
-  void set_can_patch_to_monomorphic(bool value) const;
-
-  static intptr_t InstanceSize() {
-    return RoundedAllocationSize(sizeof(UnlinkedCallLayout));
-  }
-
-  intptr_t Hashcode() const;
-  bool Equals(const UnlinkedCall& other) const;
-
-  static UnlinkedCallPtr New();
-
- private:
-  FINAL_HEAP_OBJECT_IMPLEMENTATION(UnlinkedCall, Object);
-  friend class Class;
-};
-
 class CallSiteData : public Object {
  public:
   StringPtr target_name() const { return raw_ptr()->target_name_; }
-
   ArrayPtr arguments_descriptor() const { return raw_ptr()->args_descriptor_; }
 
   static intptr_t target_name_offset() {
@@ -1961,7 +1934,6 @@
 
  private:
   void set_target_name(const String& value) const;
-
   void set_arguments_descriptor(const Array& value) const;
 
   HEAP_OBJECT_IMPLEMENTATION(CallSiteData, Object)
@@ -1970,6 +1942,30 @@
   friend class MegamorphicCache;
 };
 
+class UnlinkedCall : public CallSiteData {
+ public:
+  bool can_patch_to_monomorphic() const {
+    return raw_ptr()->can_patch_to_monomorphic_;
+  }
+
+  static intptr_t InstanceSize() {
+    return RoundedAllocationSize(sizeof(UnlinkedCallLayout));
+  }
+
+  intptr_t Hashcode() const;
+  bool Equals(const UnlinkedCall& other) const;
+
+  static UnlinkedCallPtr New();
+
+ private:
+  friend class ICData;  // For set_*() methods.
+
+  void set_can_patch_to_monomorphic(bool value) const;
+
+  FINAL_HEAP_OBJECT_IMPLEMENTATION(UnlinkedCall, CallSiteData);
+  friend class Class;
+};
+
 // Object holding information about an IC: test classes and their
 // corresponding targets. The owner of the ICData can be either the function
 // or the original ICData object. In case of background compilation we
@@ -2504,6 +2500,8 @@
   // Can only be used on FFI trampolines.
   FunctionPtr FfiCSignature() const;
 
+  bool FfiCSignatureContainsHandles() const;
+
   // Can only be called on FFI trampolines.
   // -1 for Dart -> native calls.
   int32_t FfiCallbackId() const;
diff --git a/runtime/vm/object_service.cc b/runtime/vm/object_service.cc
index e9138c1..2e4bc9b 100644
--- a/runtime/vm/object_service.cc
+++ b/runtime/vm/object_service.cc
@@ -810,7 +810,8 @@
   if (ref) {
     return;
   }
-  jsobj.AddProperty("_argumentsDescriptor", Array::Handle(args_descriptor()));
+  jsobj.AddProperty("_argumentsDescriptor",
+                    Array::Handle(arguments_descriptor()));
 }
 
 void MonomorphicSmiableCall::PrintJSONImpl(JSONStream* stream, bool ref) const {
diff --git a/runtime/vm/object_store.h b/runtime/vm/object_store.h
index a42a8eb..4b28057 100644
--- a/runtime/vm/object_store.h
+++ b/runtime/vm/object_store.h
@@ -180,6 +180,8 @@
   RW(Code, null_error_stub_without_fpu_regs_stub)                              \
   RW(Code, null_arg_error_stub_with_fpu_regs_stub)                             \
   RW(Code, null_arg_error_stub_without_fpu_regs_stub)                          \
+  RW(Code, null_cast_error_stub_with_fpu_regs_stub)                            \
+  RW(Code, null_cast_error_stub_without_fpu_regs_stub)                         \
   RW(Code, range_error_stub_with_fpu_regs_stub)                                \
   RW(Code, range_error_stub_without_fpu_regs_stub)                             \
   RW(Code, allocate_mint_with_fpu_regs_stub)                                   \
@@ -224,6 +226,9 @@
   DO(null_arg_error_stub_with_fpu_regs_stub, NullArgErrorSharedWithFPURegs)    \
   DO(null_arg_error_stub_without_fpu_regs_stub,                                \
      NullArgErrorSharedWithoutFPURegs)                                         \
+  DO(null_cast_error_stub_with_fpu_regs_stub, NullCastErrorSharedWithFPURegs)  \
+  DO(null_cast_error_stub_without_fpu_regs_stub,                               \
+     NullCastErrorSharedWithoutFPURegs)                                        \
   DO(range_error_stub_with_fpu_regs_stub, RangeErrorSharedWithFPURegs)         \
   DO(range_error_stub_without_fpu_regs_stub, RangeErrorSharedWithoutFPURegs)   \
   DO(allocate_mint_with_fpu_regs_stub, AllocateMintSharedWithFPURegs)          \
diff --git a/runtime/vm/profiler.cc b/runtime/vm/profiler.cc
index db586ce..bc8199f 100644
--- a/runtime/vm/profiler.cc
+++ b/runtime/vm/profiler.cc
@@ -32,17 +32,10 @@
 
 DEFINE_FLAG(bool, trace_profiled_isolates, false, "Trace profiled isolates.");
 
-#if defined(TARGET_ARCH_ARM_6)
-DEFINE_FLAG(int,
-            profile_period,
-            10000,
-            "Time between profiler samples in microseconds. Minimum 50.");
-#else
 DEFINE_FLAG(int,
             profile_period,
             1000,
             "Time between profiler samples in microseconds. Minimum 50.");
-#endif
 DEFINE_FLAG(int,
             max_profile_depth,
             kSampleSize* kMaxSamplesPerTick,
diff --git a/runtime/vm/program_visitor.cc b/runtime/vm/program_visitor.cc
index 4d467b0..41582a3 100644
--- a/runtime/vm/program_visitor.cc
+++ b/runtime/vm/program_visitor.cc
@@ -414,6 +414,7 @@
   WalkProgram(zone, isolate, &visitor);
 }
 
+DECLARE_FLAG(charp, trace_precompiler_to);
 DECLARE_FLAG(charp, write_v8_snapshot_profile_to);
 
 void ProgramVisitor::ShareMegamorphicBuckets(Zone* zone, Isolate* isolate) {
@@ -913,7 +914,8 @@
   // implicit and go through global object pool). This information is needed
   // to produce more informative snapshot profile.
   if (!FLAG_use_bare_instructions ||
-      FLAG_write_v8_snapshot_profile_to != nullptr) {
+      FLAG_write_v8_snapshot_profile_to != nullptr ||
+      FLAG_trace_precompiler_to != nullptr) {
     WalkProgram(zone, isolate, &deduper);
   }
 }
@@ -1274,6 +1276,25 @@
 
   // Reduces binary size but obfuscates profiler results.
   if (FLAG_dedup_instructions) {
+    // In non-bare mode (unused atm) dedupping instructions would cause us to
+    // loose the ability to uniquely map a PC to a given UnlinkedCall object,
+    // since two code objects might point to the same deduped instructions
+    // object but might have two different UnlinkedCall objects in their pool.
+    //
+    // In bare mode this cannot happen because different UnlinkedCall objects
+    // would get different indices into the (global) object pool, therefore
+    // making the instructions different.
+    //
+    // (When transitioning the switchable call site we loose track of the args
+    // descriptor. Since we need it for further transitions we currently save it
+    // via a PC -> UnlinkedCall mapping).
+    //
+    // We therfore disable the instruction deduplication in product-non-bare
+    // mode (which is unused atm).
+#if defined(PRODUCT)
+    if (FLAG_precompiled_mode && !FLAG_use_bare_instructions) return;
+#endif
+
     DedupInstructions(zone, isolate);
   }
 #endif  // !defined(DART_PRECOMPILED_RUNTIME)
diff --git a/runtime/vm/raw_object.h b/runtime/vm/raw_object.h
index c9875ca..3089d0b 100644
--- a/runtime/vm/raw_object.h
+++ b/runtime/vm/raw_object.h
@@ -1979,16 +1979,6 @@
   classid_t upper_limit_;
 };
 
-class UnlinkedCallLayout : public ObjectLayout {
-  RAW_HEAP_OBJECT_IMPLEMENTATION(UnlinkedCall);
-  VISIT_FROM(ObjectPtr, target_name_);
-  StringPtr target_name_;
-  ArrayPtr args_descriptor_;
-  VISIT_TO(ObjectPtr, args_descriptor_);
-  bool can_patch_to_monomorphic_;
-  ObjectPtr* to_snapshot(Snapshot::Kind kind) { return to(); }
-};
-
 class MonomorphicSmiableCallLayout : public ObjectLayout {
   RAW_HEAP_OBJECT_IMPLEMENTATION(MonomorphicSmiableCall);
   VISIT_FROM(ObjectPtr, target_);
@@ -2010,6 +2000,15 @@
   RAW_HEAP_OBJECT_IMPLEMENTATION(CallSiteData)
 };
 
+class UnlinkedCallLayout : public CallSiteDataLayout {
+  RAW_HEAP_OBJECT_IMPLEMENTATION(UnlinkedCall);
+  VISIT_FROM(ObjectPtr, target_name_);
+  VISIT_TO(ObjectPtr, args_descriptor_);
+  ObjectPtr* to_snapshot(Snapshot::Kind kind) { return to(); }
+
+  bool can_patch_to_monomorphic_;
+};
+
 class ICDataLayout : public CallSiteDataLayout {
   RAW_HEAP_OBJECT_IMPLEMENTATION(ICData);
   VISIT_FROM(ObjectPtr, target_name_);
diff --git a/runtime/vm/regexp_assembler_ir.cc b/runtime/vm/regexp_assembler_ir.cc
index 8234775..0111496 100644
--- a/runtime/vm/regexp_assembler_ir.cc
+++ b/runtime/vm/regexp_assembler_ir.cc
@@ -285,18 +285,8 @@
       TypedData::New(kTypedDataInt32ArrayCid, registers_count_, Heap::kOld);
 }
 
-#if defined(TARGET_ARCH_ARM)
-// Disabling unaligned accesses forces the regexp engine to load characters one
-// by one instead of up to 4 at once, along with the associated performance hit.
-// TODO(zerny): Be less conservative about disabling unaligned accesses.
-// For instance, ARMv6 supports unaligned accesses. Once it is enabled here,
-// update LoadCodeUnitsInstr methods for the appropriate architectures.
-static const bool kEnableUnalignedAccesses = false;
-#else
-static const bool kEnableUnalignedAccesses = true;
-#endif
 bool IRRegExpMacroAssembler::CanReadUnaligned() {
-  return kEnableUnalignedAccesses && !slow_safe();
+  return !slow_safe();
 }
 
 ArrayPtr IRRegExpMacroAssembler::Execute(const RegExp& regexp,
diff --git a/runtime/vm/runtime_entry.cc b/runtime/vm/runtime_entry.cc
index 82f5b67..98813d1 100644
--- a/runtime/vm/runtime_entry.cc
+++ b/runtime/vm/runtime_entry.cc
@@ -227,6 +227,10 @@
   NullErrorHelper(zone, selector);
 }
 
+DEFINE_RUNTIME_ENTRY(NullCastError, 0) {
+  NullErrorHelper(zone, String::null_string());
+}
+
 DEFINE_RUNTIME_ENTRY(ArgumentNullError, 0) {
   const String& error = String::Handle(String::New("argument value is null"));
   Exceptions::ThrowArgumentError(error);
@@ -507,13 +511,17 @@
 
 // Invoke field getter before dispatch.
 // Arg0: instance.
-// Arg1: field name.
+// Arg1: field name (may be demangled during call).
 // Return value: field value.
 DEFINE_RUNTIME_ENTRY(GetFieldForDispatch, 2) {
   ASSERT(FLAG_enable_interpreter);
   const Instance& receiver = Instance::CheckedHandle(zone, arguments.ArgAt(0));
-  const String& name = String::CheckedHandle(zone, arguments.ArgAt(1));
+  String& name = String::CheckedHandle(zone, arguments.ArgAt(1));
   const Class& receiver_class = Class::Handle(zone, receiver.clazz());
+  if (Function::IsDynamicInvocationForwarderName(name)) {
+    name = Function::DemangleDynamicInvocationForwarderName(name);
+    arguments.SetArgAt(1, name);  // Reflect change in arguments.
+  }
   const String& getter_name = String::Handle(zone, Field::GetterName(name));
   const int kTypeArgsLen = 0;
   const int kNumArguments = 1;
@@ -1082,10 +1090,10 @@
 // non-closure, attempt to invoke "call" on it.
 static bool ResolveCallThroughGetter(const Class& receiver_class,
                                      const String& target_name,
+                                     const String& demangled,
                                      const Array& arguments_descriptor,
                                      Function* result) {
-  // 1. Check if there is a getter with the same name.
-  const String& getter_name = String::Handle(Field::GetterName(target_name));
+  const String& getter_name = String::Handle(Field::GetterName(demangled));
   const int kTypeArgsLen = 0;
   const int kNumArguments = 1;
   ArgumentsDescriptor args_desc(Array::Handle(
@@ -1096,6 +1104,9 @@
   if (getter.IsNull() || getter.IsMethodExtractor()) {
     return false;
   }
+  // We do this on the target_name, _not_ on the demangled name, so that
+  // FlowGraphBuilder::BuildGraphOfInvokeFieldDispatcher can detect dynamic
+  // calls from the dyn: tag on the name of the dispatcher.
   const Function& target_function =
       Function::Handle(receiver_class.GetInvocationDispatcher(
           target_name, arguments_descriptor,
@@ -1115,21 +1126,21 @@
 FunctionPtr InlineCacheMissHelper(const Class& receiver_class,
                                   const Array& args_descriptor,
                                   const String& target_name) {
-  // Handle noSuchMethod for dyn:methodName by getting a noSuchMethod dispatcher
-  // (or a call-through getter for methodName).
+  // Create a demangled version of the target_name, if necessary, This is used
+  // for the field getter in ResolveCallThroughGetter and as the target name
+  // for the NoSuchMethod dispatcher (if needed).
+  const String* demangled = &target_name;
   if (Function::IsDynamicInvocationForwarderName(target_name)) {
-    const String& demangled = String::Handle(
+    demangled = &String::Handle(
         Function::DemangleDynamicInvocationForwarderName(target_name));
-    return InlineCacheMissHelper(receiver_class, args_descriptor, demangled);
   }
-
   Function& result = Function::Handle();
-  if (!ResolveCallThroughGetter(receiver_class, target_name, args_descriptor,
-                                &result)) {
+  if (!ResolveCallThroughGetter(receiver_class, target_name, *demangled,
+                                args_descriptor, &result)) {
     ArgumentsDescriptor desc(args_descriptor);
     const Function& target_function =
         Function::Handle(receiver_class.GetInvocationDispatcher(
-            target_name, args_descriptor,
+            *demangled, args_descriptor,
             FunctionLayout::kNoSuchMethodDispatcher, FLAG_lazy_dispatchers));
     if (FLAG_trace_ic) {
       OS::PrintErr(
@@ -1478,6 +1489,8 @@
   return true;
 }
 
+#if defined(DART_PRECOMPILED_RUNTIME)
+
 class SavedUnlinkedCallMapKeyEqualsTraits : public AllStatic {
  public:
   static const char* Name() { return "SavedUnlinkedCallMapKeyEqualsTraits "; }
@@ -1499,6 +1512,8 @@
                              uword frame_pc,
                              const UnlinkedCall& unlinked_call) {
   IsolateGroup* isolate_group = isolate->group();
+
+  SafepointMutexLocker ml(isolate_group->unlinked_call_map_mutex());
   if (isolate_group->saved_unlinked_calls() == Array::null()) {
     const auto& initial_map =
         Array::Handle(zone, HashTables::New<UnlinkedCallMap>(16, Heap::kOld));
@@ -1510,37 +1525,44 @@
   const auto& pc = Integer::Handle(zone, Integer::NewFromUint64(frame_pc));
   // Some other isolate might have updated unlinked_call_map[pc] too, but
   // their update should be identical to ours.
-  UnlinkedCall& new_or_old_value = UnlinkedCall::Handle(
+  const auto& new_or_old_value = UnlinkedCall::Handle(
       zone, UnlinkedCall::RawCast(
                 unlinked_call_map.InsertOrGetValue(pc, unlinked_call)));
   RELEASE_ASSERT(new_or_old_value.raw() == unlinked_call.raw());
   isolate_group->set_saved_unlinked_calls(unlinked_call_map.Release());
 }
 
-#if defined(DART_PRECOMPILED_RUNTIME)
 static UnlinkedCallPtr LoadUnlinkedCall(Zone* zone,
                                         Isolate* isolate,
-                                        uword pc,
-                                        bool is_monomorphic_hit) {
+                                        uword pc) {
   IsolateGroup* isolate_group = isolate->group();
-  ASSERT(isolate_group->saved_unlinked_calls() != Array::null());
 
+  SafepointMutexLocker ml(isolate_group->unlinked_call_map_mutex());
+  ASSERT(isolate_group->saved_unlinked_calls() != Array::null());
   UnlinkedCallMap unlinked_call_map(zone,
                                     isolate_group->saved_unlinked_calls());
 
   const auto& pc_integer = Integer::Handle(zone, Integer::NewFromUint64(pc));
   const auto& unlinked_call = UnlinkedCall::Cast(
       Object::Handle(zone, unlinked_call_map.GetOrDie(pc_integer)));
-  // Only remove entry from unlinked_call_map if we are actually transitioning
-  // out of monomorphic state.
-  if (!is_monomorphic_hit) {
-    unlinked_call_map.Remove(pc_integer);
-    isolate_group->set_saved_unlinked_calls(unlinked_call_map.Release());
-  }
-
+  isolate_group->set_saved_unlinked_calls(unlinked_call_map.Release());
   return unlinked_call.raw();
 }
-#endif
+
+// NOTE: Right now we never delete [UnlinkedCall] objects. They are needed while
+// a call site is in Unlinked/Monomorphic/MonomorphicSmiable/SingleTarget
+// states.
+//
+// Theoretically we could free the [UnlinkedCall] object once we transition the
+// call site to use ICData/MegamorphicCache, but that would require careful
+// coordination between the deleter and a possible concurrent reader.
+//
+// To simplify the code we decided not to do that atm (only a very small
+// fraction of callsites in AOT use switchable calls, the name/args-descriptor
+// objects are kept alive anyways -> there is little memory savings from
+// freeing the [UnlinkedCall] objects).
+
+#endif  // defined(DART_PRECOMPILED_RUNTIME)
 
 class SwitchableCallHandler {
  public:
@@ -1557,7 +1579,9 @@
         arguments_(arguments),
         caller_frame_(caller_frame),
         caller_code_(caller_code),
-        caller_function_(caller_function) {}
+        caller_function_(caller_function),
+        name_(String::Handle()),
+        args_descriptor_(Array::Handle()) {}
 
   FunctionPtr ResolveTargetFunction(const Object& data);
   void HandleMiss(const Object& old_data,
@@ -1572,16 +1596,11 @@
                                   const Function& target_function,
                                   intptr_t* lower,
                                   intptr_t* upper);
-  FunctionPtr LookupMonomorphicOldTargetNameDescriptorCid(
-      const Object& data,
-      String* out_name,
-      Array* out_descriptor,
-      classid_t* out_old_expected_cid,
-      bool keep_unlinked_call_map_entry_regardless,
-      bool* out_is_monomorphic_hit);
   void DoMonomorphicMiss(const Object& data, const Function& target_function);
+#if defined(DART_PRECOMPILED_RUNTIME)
   void DoSingleTargetMiss(const SingleTargetCache& data,
                           const Function& target_function);
+#endif  // !defined(DART_PRECOMPILED_RUNTIME)
   void DoICDataMiss(const ICData& data, const Function& target_function);
   void DoMegamorphicMiss(const MegamorphicCache& data,
                          const Function& target_function);
@@ -1594,12 +1613,18 @@
   StackFrame* caller_frame_;
   const Code& caller_code_;
   const Function& caller_function_;
+
+  // Call-site information populated during resolution.
+  String& name_;
+  Array& args_descriptor_;
+  bool is_monomorphic_hit_ = false;
 };
 
 void SwitchableCallHandler::DoUnlinkedCall(const UnlinkedCall& unlinked,
                                            const Function& target_function) {
   const String& name = String::Handle(zone_, unlinked.target_name());
-  const Array& descriptor = Array::Handle(zone_, unlinked.args_descriptor());
+  const Array& descriptor =
+      Array::Handle(zone_, unlinked.arguments_descriptor());
   const ICData& ic_data =
       ICData::Handle(zone_, ICData::New(caller_function_, name, descriptor,
                                         DeoptId::kNone, 1, /* args_tested */
@@ -1608,36 +1633,6 @@
     ic_data.AddReceiverCheck(receiver_.GetClassId(), target_function);
   }
 
-  // In AOT bare mode, the PC -> Code mapping is ambiguous, since multiple code
-  // objects can have the same deduped instructions and bare frames are compact
-  // (i.e. have only PC but no code object in the frame)
-  //
-  // In JIT and AOT non-bare mode, instructions will push the unique code
-  // object on the frame.
-  //
-  // If we can find the unique code object of the callee, we can find it's
-  // owner function. If the callee function is non-generic and has no optional
-  // parameters, we can and thereby deduce the call-site argument descriptor +
-  // name from it.
-  //
-  // If not, we'll save the unlinked call object in a map.
-  //
-  // See [DoMonomorphicMiss]
-  const bool need_saved_unlinked_call =
-      (FLAG_use_bare_instructions && FLAG_dedup_instructions);
-
-  // We transition from an unlinked call to a monomorphic call. This transition
-  // will cause us to loose the argument descriptor information on the call
-  // site.
-  //
-  // Though if the monomorphic call site transitions to a
-  // polymorphic/megamorphic we need to reconstruct the arguments descriptor.
-  //
-  // We assume here that generated code never moves.
-  if (need_saved_unlinked_call) {
-    SaveUnlinkedCall(zone_, isolate_, caller_frame_->pc(), unlinked);
-  }
-
   Object& object = Object::Handle(zone_, ic_data.raw());
   Code& code = Code::Handle(zone_, StubCode::ICCallThroughCode().raw());
   // If the target function has optional parameters or is generic, it's
@@ -1739,90 +1734,26 @@
   return target_function.raw();
 }
 
-FunctionPtr SwitchableCallHandler::LookupMonomorphicOldTargetNameDescriptorCid(
-    const Object& data,
-    String* out_name,
-    Array* out_descriptor,
-    classid_t* out_old_expected_cid,
-    bool keep_unlinked_call_map_entry_regardless,
-    bool* out_is_monomorphic_hit) {
-#if defined(DART_PRECOMPILED_RUNTIME)
-  ASSERT(out_name != nullptr);
-  ASSERT(out_descriptor != nullptr);
-  ASSERT(out_old_expected_cid != nullptr);
-  ASSERT(out_is_monomorphic_hit != nullptr);
-  Function& old_target = Function::Handle(zone_);
-  if (data.IsSmi()) {
-    *out_old_expected_cid = Smi::Cast(data).Value();
-  } else if (data.IsMonomorphicSmiableCall()) {
-    *out_old_expected_cid = MonomorphicSmiableCall::Cast(data).expected_cid();
-    old_target ^=
-        Code::Handle(zone_, MonomorphicSmiableCall::Cast(data).target())
-            .owner();
-  } else {
-    UNREACHABLE();
-  }
-
-  // The site might have just been updated to monomorphic state with same
-  // exact class id, in which case we are staying in monomorphic state.
-  *out_is_monomorphic_hit = *out_old_expected_cid == receiver_.GetClassId();
-
-  if (FLAG_use_bare_instructions && FLAG_dedup_instructions) {
-    const UnlinkedCall& unlinked_call = UnlinkedCall::Handle(
-        zone_, LoadUnlinkedCall(zone_, isolate_, caller_frame_->pc(),
-                                keep_unlinked_call_map_entry_regardless ||
-                                    *out_is_monomorphic_hit));
-    *out_name = unlinked_call.target_name();
-    *out_descriptor = unlinked_call.args_descriptor();
-
-    const Class& old_receiver_class = Class::Handle(
-        zone_, isolate_->class_table()->At(*out_old_expected_cid));
-    return Resolve(zone_, old_receiver_class, *out_name, *out_descriptor);
-  }
-
-  // We lost the original UnlinkedCall (and the name + arg descriptor inside
-  // it) when the call site transitioned from unlinked to monomorphic.
-  //
-  // Though we can deduce name + arg descriptor based on the first
-  // monomorphic callee (we are guaranteed it is not generic and does not have
-  // optional parameters, see DEFINE_RUNTIME_ENTRY(UnlinkedCall) above).
-  if (old_target.IsNull()) {
-    const Code& old_target_code =
-        Code::Handle(zone_, CodePatcher::GetSwitchableCallTargetAt(
-                                caller_frame_->pc(), caller_code_));
-    old_target ^= old_target_code.owner();
-  }
-
-  const int kTypeArgsLen = 0;
-  *out_name = old_target.name();
-  // TODO(dartbug.com/33549): Update this code to use the size of the
-  // parameters when supporting calls to non-static methods with
-  // unboxed parameters.
-  *out_descriptor = ArgumentsDescriptor::NewBoxed(
-      kTypeArgsLen, old_target.num_fixed_parameters());
-  return old_target.raw();
-#else
-  UNREACHABLE();
-#endif
-}
-
 void SwitchableCallHandler::DoMonomorphicMiss(const Object& data,
                                               const Function& target_function) {
 #if defined(DART_PRECOMPILED_RUNTIME)
-  String& name = String::Handle(zone_);
-  Array& descriptor = Array::Handle(zone_);
-  bool is_monomorphic_hit;
   classid_t old_expected_cid;
-  const Function& old_target = Function::Handle(
-      zone_, LookupMonomorphicOldTargetNameDescriptorCid(
-                 data, &name, &descriptor, &old_expected_cid,
-                 /*keep_unlinked_call_map_entry_regardless=*/false,
-                 &is_monomorphic_hit));
+  if (data.IsSmi()) {
+    old_expected_cid = Smi::Cast(data).Value();
+  } else {
+    RELEASE_ASSERT(data.IsMonomorphicSmiableCall());
+    old_expected_cid = MonomorphicSmiableCall::Cast(data).expected_cid();
+  }
+  const bool is_monomorphic_hit = old_expected_cid == receiver_.GetClassId();
+  const auto& old_receiver_class =
+      Class::Handle(zone_, isolate_->class_table()->At(old_expected_cid));
+  const auto& old_target = Function::Handle(
+      zone_, Resolve(zone_, old_receiver_class, name_, args_descriptor_));
 
-  const ICData& ic_data =
-      ICData::Handle(zone_, ICData::New(caller_function_, name, descriptor,
-                                        DeoptId::kNone, 1, /* args_tested */
-                                        ICData::kInstance));
+  const ICData& ic_data = ICData::Handle(
+      zone_, ICData::New(caller_function_, name_, args_descriptor_,
+                         DeoptId::kNone, 1, /* args_tested */
+                         ICData::kInstance));
   // Add the first target.
   if (!old_target.IsNull()) {
     ic_data.AddReceiverCheck(old_expected_cid, old_target);
@@ -1838,7 +1769,7 @@
 
   intptr_t lower = old_expected_cid;
   intptr_t upper = old_expected_cid;
-  if (CanExtendSingleTargetRange(name, old_target, target_function, &lower,
+  if (CanExtendSingleTargetRange(name_, old_target, target_function, &lower,
                                  &upper)) {
     const SingleTargetCache& cache =
         SingleTargetCache::Handle(zone_, SingleTargetCache::New());
@@ -1900,6 +1831,7 @@
 #endif  // defined(DART_PRECOMPILED_RUNTIME)
 }
 
+#if defined(DART_PRECOMPILED_RUNTIME)
 void SwitchableCallHandler::DoSingleTargetMiss(
     const SingleTargetCache& data,
     const Function& target_function) {
@@ -1908,24 +1840,17 @@
       Function::Handle(zone_, Function::RawCast(old_target_code.owner()));
 
   // We lost the original ICData when we patched to the monomorphic case.
-  const String& name = String::Handle(zone_, old_target.name());
-  ASSERT(!old_target.HasOptionalParameters());
-  ASSERT(!old_target.IsGeneric());
-  const int kTypeArgsLen = 0;
-  const Array& descriptor = Array::Handle(
-      zone_, ArgumentsDescriptor::NewBoxed(kTypeArgsLen,
-                                           old_target.num_fixed_parameters()));
-  const ICData& ic_data =
-      ICData::Handle(zone_, ICData::New(caller_function_, name, descriptor,
-                                        DeoptId::kNone, 1, /* args_tested */
-                                        ICData::kInstance));
+  const ICData& ic_data = ICData::Handle(
+      zone_, ICData::New(caller_function_, name_, args_descriptor_,
+                         DeoptId::kNone, 1, /* args_tested */
+                         ICData::kInstance));
   if (!target_function.IsNull()) {
     ic_data.AddReceiverCheck(receiver_.GetClassId(), target_function);
   }
 
   intptr_t lower = data.lower_limit();
   intptr_t upper = data.upper_limit();
-  if (CanExtendSingleTargetRange(name, old_target, target_function, &lower,
+  if (CanExtendSingleTargetRange(name_, old_target, target_function, &lower,
                                  &upper)) {
     data.set_lower_limit(lower);
     data.set_upper_limit(upper);
@@ -1946,6 +1871,7 @@
   arguments_.SetArgAt(0, stub);
   arguments_.SetReturn(ic_data);
 }
+#endif  // !defined(DART_PRECOMPILED_RUNTIME)
 
 void SwitchableCallHandler::DoICDataMiss(const ICData& ic_data,
                                          const Function& target_function) {
@@ -2036,76 +1962,68 @@
 }
 
 FunctionPtr SwitchableCallHandler::ResolveTargetFunction(const Object& data) {
-  const Class& cls = Class::Handle(zone_, receiver_.clazz());
   switch (data.GetClassId()) {
     case kUnlinkedCallCid: {
-      const UnlinkedCall& unlinked = UnlinkedCall::Cast(data);
-      const String& name = String::Handle(zone_, unlinked.target_name());
-      const Array& descriptor =
-          Array::Handle(zone_, unlinked.args_descriptor());
-      return Resolve(zone_, cls, name, descriptor);
+      const auto& unlinked_call = UnlinkedCall::Cast(data);
+
+#if defined(DART_PRECOMPILED_RUNTIME)
+      // When transitioning out of UnlinkedCall to other states (e.g.
+      // Monomorphic, MonomorphicSmiable, SingleTarget) we lose
+      // name/arg-descriptor in AOT mode and cannot recover it.
+      //
+      // Even if we could recover an old target function (which was missed) -
+      // which we cannot in AOT bare mode - we can still lose the name due to a
+      // dyn:* call site potentially targeting non-dyn:* targets.
+      //
+      // => We will therefore retain the unlinked call here.
+      //
+      // In JIT mode we always use ICData from the call site, which has the
+      // correct name/args-descriptor.
+      SaveUnlinkedCall(zone_, isolate_, caller_frame_->pc(), unlinked_call);
+#endif  // defined(DART_PRECOMPILED_RUNTIME)
+
+      name_ = unlinked_call.target_name();
+      args_descriptor_ = unlinked_call.arguments_descriptor();
+      break;
     }
     case kMonomorphicSmiableCallCid:
       FALL_THROUGH;
 #if defined(DART_PRECOMPILED_RUNTIME)
-    case kSmiCid: {
-      String& name = String::Handle(zone_);
-      Array& descriptor = Array::Handle(zone_);
-      classid_t old_expected_cid;
-      bool is_monomorphic_hit;
-      LookupMonomorphicOldTargetNameDescriptorCid(
-          data, &name, &descriptor, &old_expected_cid,
-          /*keep_unlinked_call_map_entry=*/true, &is_monomorphic_hit);
-      return Resolve(zone_, cls, name, descriptor);
+    case kSmiCid:
+      FALL_THROUGH;
+    case kSingleTargetCacheCid: {
+      const auto& unlinked_call = UnlinkedCall::Handle(
+          zone_, LoadUnlinkedCall(zone_, isolate_, caller_frame_->pc()));
+      name_ = unlinked_call.target_name();
+      args_descriptor_ = unlinked_call.arguments_descriptor();
+      break;
     }
-#else  // JIT
-    case kArrayCid:
+#else
+    case kArrayCid: {
       // ICData three-element array: Smi(receiver CID), Smi(count),
       // Function(target). It is the Array from ICData::entries_.
-      {
-        const ICData& ic_data = ICData::Handle(
-            zone_, FindICDataForInstanceCall(zone_, caller_code_,
-                                             caller_frame_->pc()));
-        RELEASE_ASSERT(!ic_data.IsNull());
-
-        const String& name = String::Handle(zone_, ic_data.target_name());
-        ASSERT(name.IsSymbol());
-
-        const Array& descriptor =
-            Array::CheckedHandle(zone_, ic_data.arguments_descriptor());
-        return Resolve(zone_, cls, name, descriptor);
-      }
-#endif
-    case kSingleTargetCacheCid: {
-      const SingleTargetCache& single_target_cache =
-          SingleTargetCache::Cast(data);
-      const Code& old_target_code =
-          Code::Handle(zone_, single_target_cache.target());
-      const Function& old_target =
-          Function::Handle(zone_, Function::RawCast(old_target_code.owner()));
-
-      // We lost the original ICData when we patched to the monomorphic case.
-      const String& name = String::Handle(zone_, old_target.name());
-      ASSERT(!old_target.HasOptionalParameters());
-      ASSERT(!old_target.IsGeneric());
-      const int kTypeArgsLen = 0;
-      const Array& descriptor = Array::Handle(
-          zone_, ArgumentsDescriptor::NewBoxed(
-                     kTypeArgsLen, old_target.num_fixed_parameters()));
-      return Resolve(zone_, cls, name, descriptor);
+      const auto& ic_data = ICData::Handle(
+          zone_,
+          FindICDataForInstanceCall(zone_, caller_code_, caller_frame_->pc()));
+      RELEASE_ASSERT(!ic_data.IsNull());
+      name_ = ic_data.target_name();
+      args_descriptor_ = ic_data.arguments_descriptor();
+      break;
     }
+#endif  // defined(DART_PRECOMPILED_RUNTIME)
     case kICDataCid:
       FALL_THROUGH;
     case kMegamorphicCacheCid: {
       const CallSiteData& call_site_data = CallSiteData::Cast(data);
-      const String& name = String::Handle(zone_, call_site_data.target_name());
-      const Array& descriptor =
-          Array::CheckedHandle(zone_, call_site_data.arguments_descriptor());
-      return Resolve(zone_, cls, name, descriptor);
+      name_ = call_site_data.target_name();
+      args_descriptor_ = call_site_data.arguments_descriptor();
+      break;
     }
     default:
       UNREACHABLE();
   }
+  const Class& cls = Class::Handle(zone_, receiver_.clazz());
+  return Resolve(zone_, cls, name_, args_descriptor_);
 }
 
 void SwitchableCallHandler::HandleMiss(const Object& old_data,
@@ -2121,17 +2039,19 @@
       FALL_THROUGH;
 #if defined(DART_PRECOMPILED_RUNTIME)
     case kSmiCid:
-#else  // JIT
-    case kArrayCid:
-      // ICData three-element array: Smi(receiver CID), Smi(count),
-      // Function(target). It is the Array from ICData::entries_.
-#endif
       DoMonomorphicMiss(old_data, target_function);
       break;
     case kSingleTargetCacheCid:
       ASSERT(old_code.raw() == StubCode::SingleTargetCall().raw());
       DoSingleTargetMiss(SingleTargetCache::Cast(old_data), target_function);
       break;
+#else
+    case kArrayCid:
+      // ICData three-element array: Smi(receiver CID), Smi(count),
+      // Function(target). It is the Array from ICData::entries_.
+      DoMonomorphicMiss(old_data, target_function);
+      break;
+#endif  // !defined(DART_PRECOMPILED_RUNTIME)
     case kICDataCid:
       ASSERT(old_code.raw() == StubCode::ICCallThroughCode().raw());
       DoICDataMiss(ICData::Cast(old_data), target_function);
@@ -2257,7 +2177,9 @@
     target_name = MegamorphicCache::Cast(ic_data_or_cache).target_name();
   }
 
-  if (Function::IsDynamicInvocationForwarderName(target_name)) {
+  const bool is_dynamic_call =
+      Function::IsDynamicInvocationForwarderName(target_name);
+  if (is_dynamic_call) {
     target_name = Function::DemangleDynamicInvocationForwarderName(target_name);
   }
 
@@ -2306,8 +2228,19 @@
       // Special case: closures are implemented with a call getter instead of a
       // call method and with lazy dispatchers the field-invocation-dispatcher
       // would perform the closure call.
-      const Object& result = Object::Handle(
-          zone, DartEntry::InvokeClosure(orig_arguments, orig_arguments_desc));
+      auto& result = Object::Handle(
+          zone,
+          DartEntry::ResolveCallable(orig_arguments, orig_arguments_desc));
+      ThrowIfError(result);
+      const Function& callable_function =
+          Function::Handle(zone, Function::RawCast(result.raw()));
+      if (is_dynamic_call && !callable_function.IsNull()) {
+        // TODO(dartbug.com/40813): Move checks that are currently compiled
+        // in the closure body to here as they are also moved to
+        // FlowGraphBuilder::BuildGraphOfInvokeFieldDispatcher.
+      }
+      result = DartEntry::InvokeCallable(callable_function, orig_arguments,
+                                         orig_arguments_desc);
       ThrowIfError(result);
       arguments.SetReturn(result);
       return;
@@ -2332,9 +2265,19 @@
         ASSERT(getter_result.IsNull() || getter_result.IsInstance());
 
         orig_arguments.SetAt(args_desc.FirstArgIndex(), getter_result);
-        const Object& call_result = Object::Handle(
+        auto& call_result = Object::Handle(
             zone,
-            DartEntry::InvokeClosure(orig_arguments, orig_arguments_desc));
+            DartEntry::ResolveCallable(orig_arguments, orig_arguments_desc));
+        ThrowIfError(call_result);
+        const Function& callable_function =
+            Function::Handle(zone, Function::RawCast(call_result.raw()));
+        if (is_dynamic_call && !callable_function.IsNull()) {
+          // TODO(dartbug.com/40813): Move checks that are currently compiled
+          // in the closure body to here as they are also moved to
+          // FlowGraphBuilder::BuildGraphOfInvokeFieldDispatcher.
+        }
+        call_result = DartEntry::InvokeCallable(
+            callable_function, orig_arguments, orig_arguments_desc);
         ThrowIfError(call_result);
         arguments.SetReturn(call_result);
         return;
diff --git a/runtime/vm/runtime_entry_list.h b/runtime/vm/runtime_entry_list.h
index fd743ef6..5b83f13 100644
--- a/runtime/vm/runtime_entry_list.h
+++ b/runtime/vm/runtime_entry_list.h
@@ -40,6 +40,7 @@
   V(RangeError)                                                                \
   V(NullError)                                                                 \
   V(NullErrorWithSelector)                                                     \
+  V(NullCastError)                                                             \
   V(ArgumentNullError)                                                         \
   V(ArgumentError)                                                             \
   V(ArgumentErrorUnboxedInt64)                                                 \
diff --git a/runtime/vm/simulator_arm.cc b/runtime/vm/simulator_arm.cc
index 46f13f3..a09361b 100644
--- a/runtime/vm/simulator_arm.cc
+++ b/runtime/vm/simulator_arm.cc
@@ -934,26 +934,6 @@
   FATAL("Cannot continue execution after illegal memory access.");
 }
 
-// Processor versions prior to ARMv7 could not do unaligned reads and writes.
-// On some ARM platforms an interrupt is caused.  On others it does a funky
-// rotation thing.  However, from version v7, unaligned access is supported.
-// Note that simulator runs have the runtime system running directly on the host
-// system and only generated code is executed in the simulator.  Since the host
-// is typically IA32 we will get the correct ARMv7-like behaviour on unaligned
-// accesses, but we should actually not generate code accessing unaligned data,
-// so we still want to know and abort if we encounter such code.
-void Simulator::UnalignedAccess(const char* msg, uword addr, Instr* instr) {
-  // The debugger will not be able to single step past this instruction, but
-  // it will be possible to disassemble the code and inspect registers.
-  char buffer[64];
-  snprintf(buffer, sizeof(buffer), "unaligned %s at 0x%" Px ", pc=%p\n", msg,
-           addr, instr);
-  SimulatorDebugger dbg(this);
-  dbg.Stop(instr, buffer);
-  // The debugger will return control in non-interactive mode.
-  FATAL("Cannot continue execution after unaligned access.");
-}
-
 void Simulator::UnimplementedInstruction(Instr* instr) {
   char buffer[64];
   snprintf(buffer, sizeof(buffer), "Unimplemented instruction: pc=%p\n", instr);
@@ -963,67 +943,39 @@
 }
 
 DART_FORCE_INLINE intptr_t Simulator::ReadW(uword addr, Instr* instr) {
-  if ((addr & 3) == 0) {
-    intptr_t* ptr = reinterpret_cast<intptr_t*>(addr);
-    return *ptr;
-  }
-  UnalignedAccess("read", addr, instr);
-  return 0;
+  return *reinterpret_cast<intptr_t*>(addr);
 }
 
 DART_FORCE_INLINE void Simulator::WriteW(uword addr,
                                          intptr_t value,
                                          Instr* instr) {
-  if ((addr & 3) == 0) {
-    intptr_t* ptr = reinterpret_cast<intptr_t*>(addr);
-    *ptr = value;
-    return;
-  }
-  UnalignedAccess("write", addr, instr);
+  *reinterpret_cast<intptr_t*>(addr) = value;
 }
 
 DART_FORCE_INLINE uint16_t Simulator::ReadHU(uword addr, Instr* instr) {
-  if ((addr & 1) == 0) {
-    uint16_t* ptr = reinterpret_cast<uint16_t*>(addr);
-    return *ptr;
-  }
-  UnalignedAccess("unsigned halfword read", addr, instr);
-  return 0;
+  return *reinterpret_cast<uint16_t*>(addr);
 }
 
 DART_FORCE_INLINE int16_t Simulator::ReadH(uword addr, Instr* instr) {
-  if ((addr & 1) == 0) {
-    int16_t* ptr = reinterpret_cast<int16_t*>(addr);
-    return *ptr;
-  }
-  UnalignedAccess("signed halfword read", addr, instr);
-  return 0;
+  return *reinterpret_cast<int16_t*>(addr);
 }
 
 DART_FORCE_INLINE void Simulator::WriteH(uword addr,
                                          uint16_t value,
                                          Instr* instr) {
-  if ((addr & 1) == 0) {
-    uint16_t* ptr = reinterpret_cast<uint16_t*>(addr);
-    *ptr = value;
-    return;
-  }
-  UnalignedAccess("halfword write", addr, instr);
+  *reinterpret_cast<uint16_t*>(addr) = value;
 }
 
 DART_FORCE_INLINE uint8_t Simulator::ReadBU(uword addr) {
-  uint8_t* ptr = reinterpret_cast<uint8_t*>(addr);
-  return *ptr;
+  return *reinterpret_cast<uint8_t*>(addr);
 }
 
 DART_FORCE_INLINE int8_t Simulator::ReadB(uword addr) {
-  int8_t* ptr = reinterpret_cast<int8_t*>(addr);
-  return *ptr;
+  return *reinterpret_cast<int8_t*>(addr);
 }
 
 DART_FORCE_INLINE void Simulator::WriteB(uword addr, uint8_t value) {
-  uint8_t* ptr = reinterpret_cast<uint8_t*>(addr);
-  *ptr = value;
+  *reinterpret_cast<uint8_t*>(addr) = value;
 }
 
 void Simulator::ClearExclusive() {
@@ -1611,10 +1563,6 @@
             // Format(instr, "mul'cond's 'rn, 'rm, 'rs");
             uint32_t alu_out = rm_val * rs_val;
             if (instr->Bits(21, 3) == 3) {  // mls
-              if (TargetCPUFeatures::arm_version() != ARMv7) {
-                UnimplementedInstruction(instr);
-                break;
-              }
               alu_out = -alu_out;
             }
             alu_out += rd_val;
@@ -1745,18 +1693,14 @@
       switch (instr->Bits(20, 5)) {
         case 16:
         case 20: {
-          if (TargetCPUFeatures::arm_version() == ARMv7) {
-            uint16_t imm16 = instr->MovwField();
-            Register rd = instr->RdField();
-            if (instr->Bit(22) == 0) {
-              // Format(instr, "movw'cond 'rd, #'imm4_12");
-              set_register(rd, imm16);
-            } else {
-              // Format(instr, "movt'cond 'rd, #'imm4_12");
-              set_register(rd, (get_register(rd) & 0xffff) | (imm16 << 16));
-            }
+          uint16_t imm16 = instr->MovwField();
+          Register rd = instr->RdField();
+          if (instr->Bit(22) == 0) {
+            // Format(instr, "movw'cond 'rd, #'imm4_12");
+            set_register(rd, imm16);
           } else {
-            UnimplementedInstruction(instr);
+            // Format(instr, "movt'cond 'rd, #'imm4_12");
+            set_register(rd, (get_register(rd) & 0xffff) | (imm16 << 16));
           }
           break;
         }
diff --git a/runtime/vm/stub_code_list.h b/runtime/vm/stub_code_list.h
index 107d8d7..8343572 100644
--- a/runtime/vm/stub_code_list.h
+++ b/runtime/vm/stub_code_list.h
@@ -81,6 +81,8 @@
   V(NullErrorSharedWithoutFPURegs)                                             \
   V(NullArgErrorSharedWithFPURegs)                                             \
   V(NullArgErrorSharedWithoutFPURegs)                                          \
+  V(NullCastErrorSharedWithFPURegs)                                            \
+  V(NullCastErrorSharedWithoutFPURegs)                                         \
   V(RangeErrorSharedWithFPURegs)                                               \
   V(RangeErrorSharedWithoutFPURegs)                                            \
   V(StackOverflowSharedWithFPURegs)                                            \
diff --git a/runtime/vm/symbols.h b/runtime/vm/symbols.h
index 8598430..7e38f9e 100644
--- a/runtime/vm/symbols.h
+++ b/runtime/vm/symbols.h
@@ -107,6 +107,7 @@
   V(DotWithType, "._withType")                                                 \
   V(Double, "double")                                                          \
   V(Dynamic, "dynamic")                                                        \
+  V(DynamicCall, "dyn:call")                                                   \
   V(DynamicPrefix, "dyn:")                                                     \
   V(EntryPointsTemp, ":entry_points_temp")                                     \
   V(EqualOperator, "==")                                                       \
@@ -360,6 +361,7 @@
   V(_FutureListener, "_FutureListener")                                        \
   V(_GrowableList, "_GrowableList")                                            \
   V(_GrowableListFactory, "_GrowableList.")                                    \
+  V(_GrowableListFilledFactory, "_GrowableList.filled")                        \
   V(_GrowableListWithData, "_GrowableList._withData")                          \
   V(_ImmutableList, "_ImmutableList")                                          \
   V(_Int16ArrayFactory, "Int16List.")                                          \
@@ -387,6 +389,7 @@
   V(_LinkedHashSet, "_CompactLinkedHashSet")                                   \
   V(_List, "_List")                                                            \
   V(_ListFactory, "_List.")                                                    \
+  V(_ListFilledFactory, "_List.filled")                                        \
   V(_MethodMirror, "_MethodMirror")                                            \
   V(_Mint, "_Mint")                                                            \
   V(_MirrorReference, "_MirrorReference")                                      \
diff --git a/runtime/vm/thread.h b/runtime/vm/thread.h
index 48af59f..8ec17a2 100644
--- a/runtime/vm/thread.h
+++ b/runtime/vm/thread.h
@@ -109,6 +109,10 @@
     StubCode::NullArgErrorSharedWithoutFPURegs().raw(), nullptr)               \
   V(CodePtr, null_arg_error_shared_with_fpu_regs_stub_,                        \
     StubCode::NullArgErrorSharedWithFPURegs().raw(), nullptr)                  \
+  V(CodePtr, null_cast_error_shared_without_fpu_regs_stub_,                    \
+    StubCode::NullCastErrorSharedWithoutFPURegs().raw(), nullptr)              \
+  V(CodePtr, null_cast_error_shared_with_fpu_regs_stub_,                       \
+    StubCode::NullCastErrorSharedWithFPURegs().raw(), nullptr)                 \
   V(CodePtr, range_error_shared_without_fpu_regs_stub_,                        \
     StubCode::RangeErrorSharedWithoutFPURegs().raw(), nullptr)                 \
   V(CodePtr, range_error_shared_with_fpu_regs_stub_,                           \
diff --git a/runtime/vm/timeline.h b/runtime/vm/timeline.h
index 2824fd0..d5be399 100644
--- a/runtime/vm/timeline.h
+++ b/runtime/vm/timeline.h
@@ -20,7 +20,15 @@
 #include <lib/trace-engine/instrumentation.h>
 #elif defined(HOST_OS_MACOS)
 #include <os/availability.h>
+#if defined(__MAC_10_14) || defined (__IPHONE_12_0)
+#define HOST_OS_SUPPORTS_SIGNPOST 1
+#endif
+//signpost.h exists in macOS 10.14, iOS 12 or above
+#if defined(HOST_OS_SUPPORTS_SIGNPOST)
 #include <os/signpost.h>
+#else
+#include <os/log.h>
+#endif
 #endif
 
 namespace dart {
diff --git a/runtime/vm/timeline_macos.cc b/runtime/vm/timeline_macos.cc
index d43e3cc..93e0f7d 100644
--- a/runtime/vm/timeline_macos.cc
+++ b/runtime/vm/timeline_macos.cc
@@ -5,7 +5,6 @@
 #include "vm/globals.h"
 #if defined(HOST_OS_MACOS) && defined(SUPPORT_TIMELINE)
 
-#include <os/signpost.h>
 
 #include "vm/log.h"
 #include "vm/timeline.h"
@@ -23,6 +22,7 @@
     return;
   }
 
+#if defined(HOST_OS_SUPPORTS_SIGNPOST)
   os_log_t log = event->stream_->macos_log();
   if (!os_signpost_enabled(log)) {
     return;
@@ -75,6 +75,7 @@
     default:
       break;
   }
+#endif  // defined(HOST_OS_SUPPORTS_SIGNPOST)
 }
 
 }  // namespace dart
diff --git a/runtime/vm/unicode.cc b/runtime/vm/unicode.cc
index 0ecb72c..fc2a8bf 100644
--- a/runtime/vm/unicode.cc
+++ b/runtime/vm/unicode.cc
@@ -119,6 +119,13 @@
     String::CodePointIterator it(src);
     while (it.Next()) {
       int32_t ch = it.Current();
+      ASSERT(!Utf::IsOutOfRange(ch));
+      if (Utf16::IsSurrogate(ch)) {
+        // Encode unpaired surrogates as replacement characters to ensure the
+        // output is valid UTF-8. Encoded size is the same (3), so the computed
+        // length is still valid.
+        ch = Utf::kReplacementChar;
+      }
       intptr_t num_bytes = Utf8::Length(ch);
       if (pos + num_bytes > len) {
         break;
diff --git a/runtime/vm/version.h b/runtime/vm/version.h
index fdc6bb0..a3769f6 100644
--- a/runtime/vm/version.h
+++ b/runtime/vm/version.h
@@ -16,11 +16,13 @@
   static const char* CommitString();
   static int CurrentAbiVersion();
   static int OldestSupportedAbiVersion();
+  static const char* SdkHash();
 
  private:
   static const char* str_;
   static const char* snapshot_hash_;
   static const char* commit_;
+  static const char* git_short_hash_;
 };
 
 }  // namespace dart
diff --git a/runtime/vm/version_in.cc b/runtime/vm/version_in.cc
index b4f1e2d..f63fe3f 100644
--- a/runtime/vm/version_in.cc
+++ b/runtime/vm/version_in.cc
@@ -38,8 +38,13 @@
   return {{OLDEST_SUPPORTED_ABI_VERSION}};
 }
 
+const char* Version::SdkHash() {
+  return git_short_hash_;
+}
+
 const char* Version::snapshot_hash_ = "{{SNAPSHOT_HASH}}";
 const char* Version::str_ = "{{VERSION_STR}} ({{CHANNEL}}) ({{COMMIT_TIME}})";
 const char* Version::commit_ = "{{VERSION_STR}}";
+const char* Version::git_short_hash_ = "{{GIT_HASH}}";
 
 }  // namespace dart
diff --git a/sdk/lib/_internal/allowed_experiments.json b/sdk/lib/_internal/allowed_experiments.json
index a1ff760..bd6900f 100644
--- a/sdk/lib/_internal/allowed_experiments.json
+++ b/sdk/lib/_internal/allowed_experiments.json
@@ -34,6 +34,9 @@
     "collection": {
       "experimentSet": "nullSafety"
     },
+    "dart_internal": {
+      "experimentSet": "nullSafety"
+    },
     "fake_async": {
       "experimentSet": "nullSafety"
     },
@@ -43,6 +46,9 @@
     "flutter": {
       "experimentSet": "nullSafety"
     },
+    "flutter_test": {
+      "experimentSet": "nullSafety"
+    },
     "js": {
       "experimentSet": "nullSafety"
     },
diff --git a/sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/types.dart b/sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/types.dart
index ad77d63..a4bcaf8 100644
--- a/sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/types.dart
+++ b/sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/types.dart
@@ -528,22 +528,26 @@
   }
   if (_jsInstanceOf(type, GenericFunctionType)) {
     var formals = _getCanonicalTypeFormals(type.typeFormals.length);
-    var normBounds =
+    List<dynamic> normBounds =
         type.instantiateTypeBounds(formals).map(normalizeHelper).toList();
 
-    // Normalize type arguments that are bounded by Never to Never at their
-    // use site in the function type signature.
     var substitutedTypes = [];
-    for (var i = 0; i < formals.length; i++) {
-      var substitutedType = normBounds[i];
-      while (formals.contains(substitutedType)) {
-        substitutedType = normBounds[formals.indexOf(substitutedType)];
+    if (normBounds.contains(_never)) {
+      // Normalize type arguments that are bounded by Never to Never at their
+      // use site in the function type signature.
+      for (var i = 0; i < formals.length; i++) {
+        var substitutedType = normBounds[i];
+        while (formals.contains(substitutedType)) {
+          substitutedType = normBounds[formals.indexOf(substitutedType)];
+        }
+        if (substitutedType == _never) {
+          substitutedTypes.add(_never);
+        } else {
+          substitutedTypes.add(formals[i]);
+        }
       }
-      if (substitutedType == _never) {
-        substitutedTypes.add(_never);
-        continue;
-      }
-      substitutedTypes.add(formals[i]);
+    } else {
+      substitutedTypes = formals;
     }
 
     var normFunc =
diff --git a/sdk/lib/_internal/js_dev_runtime/private/js_array.dart b/sdk/lib/_internal/js_dev_runtime/private/js_array.dart
index 4538120..0f1eb4b 100644
--- a/sdk/lib/_internal/js_dev_runtime/private/js_array.dart
+++ b/sdk/lib/_internal/js_dev_runtime/private/js_array.dart
@@ -98,7 +98,7 @@
     }
     @nullCheck
     int insertionLength = iterable.length;
-    this.length += insertionLength;
+    this._setLengthUnsafe(this.length + insertionLength);
     int end = index + insertionLength;
     this.setRange(end, this.length, this, index);
     this.setRange(index, end, iterable);
@@ -421,7 +421,7 @@
       int delta = insertLength - removeLength;
       int newLength = this.length + delta;
       int insertEnd = start + insertLength; // aka. end + delta.
-      this.length = newLength;
+      this._setLengthUnsafe(newLength);
       this.setRange(insertEnd, newLength, this, end);
       this.setRange(start, insertEnd, replacement);
     }
@@ -545,6 +545,27 @@
     if (newLength < 0) {
       throw RangeError.range(newLength, 0, null, 'newLength');
     }
+
+    // Verify that element type is nullable.
+    if (newLength > length) null as E;
+
+    // JavaScript with throw a RangeError for numbers that are too big. The
+    // message does not contain the value.
+    JS('void', r'#.length = #', this, newLength);
+  }
+
+  /// Unsafe alternative to the [length] setter that skips the check and will
+  /// not fail when increasing the size of a list of non-nullable elements.
+  ///
+  /// To ensure null safe soundness this should only be called when every new
+  /// index will be filled before returning.
+  ///
+  /// Should only be called when the list is already known to be growable.
+  void _setLengthUnsafe(int newLength) {
+    // TODO(sra): Remove this test and let JavaScript throw an error.
+    if (newLength < 0) {
+      throw RangeError.range(newLength, 0, null, 'newLength');
+    }
     // JavaScript with throw a RangeError for numbers that are too big. The
     // message does not contain the value.
     JS('void', r'#.length = #', this, newLength);
diff --git a/sdk/lib/_internal/js_dev_runtime/private/native_typed_data.dart b/sdk/lib/_internal/js_dev_runtime/private/native_typed_data.dart
index 3a7f409..e98c6c1 100644
--- a/sdk/lib/_internal/js_dev_runtime/private/native_typed_data.dart
+++ b/sdk/lib/_internal/js_dev_runtime/private/native_typed_data.dart
@@ -1361,21 +1361,25 @@
 
   /// Copy [this] and replace the [x] lane.
   Float32x4 withX(double newX) {
+    ArgumentError.checkNotNull(newX);
     return NativeFloat32x4._truncated(_truncate(newX), y, z, w);
   }
 
   /// Copy [this] and replace the [y] lane.
   Float32x4 withY(double newY) {
+    ArgumentError.checkNotNull(newY);
     return NativeFloat32x4._truncated(x, _truncate(newY), z, w);
   }
 
   /// Copy [this] and replace the [z] lane.
   Float32x4 withZ(double newZ) {
+    ArgumentError.checkNotNull(newZ);
     return NativeFloat32x4._truncated(x, y, _truncate(newZ), w);
   }
 
   /// Copy [this] and replace the [w] lane.
   Float32x4 withW(double newW) {
+    ArgumentError.checkNotNull(newW);
     return NativeFloat32x4._truncated(x, y, z, _truncate(newW));
   }
 
@@ -1583,24 +1587,28 @@
 
   /// Returns a new [Int32x4] copied from [this] with a new x value.
   Int32x4 withX(int x) {
+    ArgumentError.checkNotNull(x);
     int _x = _truncate(x);
     return NativeInt32x4._truncated(_x, y, z, w);
   }
 
   /// Returns a new [Int32x4] copied from [this] with a new y value.
   Int32x4 withY(int y) {
+    ArgumentError.checkNotNull(y);
     int _y = _truncate(y);
     return NativeInt32x4._truncated(x, _y, z, w);
   }
 
   /// Returns a new [Int32x4] copied from [this] with a new z value.
   Int32x4 withZ(int z) {
+    ArgumentError.checkNotNull(z);
     int _z = _truncate(z);
     return NativeInt32x4._truncated(x, y, _z, w);
   }
 
   /// Returns a new [Int32x4] copied from [this] with a new w value.
   Int32x4 withW(int w) {
+    ArgumentError.checkNotNull(w);
     int _w = _truncate(w);
     return NativeInt32x4._truncated(x, y, z, _w);
   }
diff --git a/sdk/lib/_internal/js_runtime/lib/async_patch.dart b/sdk/lib/_internal/js_runtime/lib/async_patch.dart
index 45ed0c5..4faeb51 100644
--- a/sdk/lib/_internal/js_runtime/lib/async_patch.dart
+++ b/sdk/lib/_internal/js_runtime/lib/async_patch.dart
@@ -402,9 +402,10 @@
     return;
   }
 
+  _WrappedAsyncBody bodyFunction = bodyFunctionOrErrorCode;
   if (object is _IterationMarker) {
     if (controller.isCanceled) {
-      bodyFunctionOrErrorCode(async_error_codes.STREAM_WAS_CANCELED, null);
+      bodyFunction(async_error_codes.STREAM_WAS_CANCELED, null);
       return;
     }
     if (object.state == _IterationMarker.YIELD_SINGLE) {
@@ -418,7 +419,7 @@
           controller.isSuspended = true;
           return;
         }
-        bodyFunctionOrErrorCode(null, async_error_codes.SUCCESS);
+        bodyFunction(async_error_codes.SUCCESS, null);
       });
       return;
     } else if (object.state == _IterationMarker.YIELD_STAR) {
@@ -434,13 +435,13 @@
         int errorCode = controller.isCanceled
             ? async_error_codes.STREAM_WAS_CANCELED
             : async_error_codes.SUCCESS;
-        bodyFunctionOrErrorCode(errorCode, null);
+        bodyFunction(errorCode, null);
       });
       return;
     }
   }
 
-  _awaitOnObject(object, bodyFunctionOrErrorCode);
+  _awaitOnObject(object, bodyFunction);
 }
 
 Stream _streamOfController(_AsyncStarStreamController controller) {
diff --git a/sdk/lib/_internal/js_runtime/lib/js_array.dart b/sdk/lib/_internal/js_runtime/lib/js_array.dart
index d131658..e3a6b03 100644
--- a/sdk/lib/_internal/js_runtime/lib/js_array.dart
+++ b/sdk/lib/_internal/js_runtime/lib/js_array.dart
@@ -156,7 +156,7 @@
       iterable = iterable.toList();
     }
     int insertionLength = iterable.length;
-    this.length += insertionLength;
+    this._setLengthUnsafe(this.length + insertionLength);
     int end = index + insertionLength;
     this.setRange(end, this.length, this, index);
     this.setRange(index, end, iterable);
@@ -489,7 +489,7 @@
       int delta = insertLength - removeLength;
       int newLength = this.length + delta;
       int insertEnd = start + insertLength; // aka. end + delta.
-      this.length = newLength;
+      this._setLengthUnsafe(newLength);
       this.setRange(insertEnd, newLength, this, end);
       this.setRange(start, insertEnd, replacement);
     }
@@ -616,6 +616,29 @@
     if (newLength < 0) {
       throw new RangeError.range(newLength, 0, null, 'newLength');
     }
+
+    // Verify that element type is nullable.
+    if (newLength > length) null as E;
+
+    // JavaScript with throw a RangeError for numbers that are too big. The
+    // message does not contain the value.
+    JS('void', r'#.length = #', this, newLength);
+  }
+
+  /// Unsafe alternative to the [length] setter that skips the check and will
+  /// not fail when increasing the size of a list of non-nullable elements.
+  ///
+  /// To ensure null safe soundness this should only be called when every new
+  /// index will be filled before returning.
+  ///
+  /// Should only be called when the list is already known to be growable.
+  void _setLengthUnsafe(int newLength) {
+    assert(newLength is int,
+        throw new ArgumentError.value(newLength, 'newLength'));
+
+    assert(newLength >= 0,
+        throw new RangeError.range(newLength, 0, null, 'newLength'));
+
     // JavaScript with throw a RangeError for numbers that are too big. The
     // message does not contain the value.
     JS('void', r'#.length = #', this, newLength);
diff --git a/sdk/lib/_internal/js_runtime/lib/mirrors_patch_cfe.dart b/sdk/lib/_internal/js_runtime/lib/mirrors_patch_cfe.dart
index cd961a0..c429ecb 100644
--- a/sdk/lib/_internal/js_runtime/lib/mirrors_patch_cfe.dart
+++ b/sdk/lib/_internal/js_runtime/lib/mirrors_patch_cfe.dart
@@ -20,17 +20,11 @@
 ClassMirror reflectClass(Type key) => throw new UnsupportedError(_message);
 
 @patch
-TypeMirror reflectType(Type key, [List<Type> typeArguments]) =>
+TypeMirror reflectType(Type key, [List<Type>? typeArguments]) =>
     throw new UnsupportedError(_message);
 
 @patch
 abstract class MirrorSystem {
-  Map<Uri, LibraryMirror> get libraries;
-  IsolateMirror get isolate;
-  TypeMirror get dynamicType;
-  TypeMirror get voidType;
-  TypeMirror get neverType;
-
   @patch
   LibraryMirror findLibrary(Symbol libraryName) =>
       throw new UnsupportedError(_message);
@@ -39,6 +33,6 @@
   static String getName(Symbol symbol) => throw new UnsupportedError(_message);
 
   @patch
-  static Symbol getSymbol(String name, [LibraryMirror library]) =>
+  static Symbol getSymbol(String name, [LibraryMirror? library]) =>
       throw new UnsupportedError(_message);
 }
diff --git a/sdk/lib/_internal/js_runtime/lib/native_typed_data.dart b/sdk/lib/_internal/js_runtime/lib/native_typed_data.dart
index 39d527b..6e19c50 100644
--- a/sdk/lib/_internal/js_runtime/lib/native_typed_data.dart
+++ b/sdk/lib/_internal/js_runtime/lib/native_typed_data.dart
@@ -11,6 +11,7 @@
 import 'dart:_interceptors' show JSIndexable, JSUInt32, JSUInt31;
 import 'dart:_js_helper'
     show
+        checkNum,
         Creates,
         JavaScriptIndexingBehavior,
         JSName,
@@ -1351,22 +1352,26 @@
 
   /// Copy [this] and replace the [x] lane.
   Float32x4 withX(double newX) {
-    return NativeFloat32x4._truncated(_truncate(newX), y, z, w);
+    double _newX = _truncate(checkNum(newX));
+    return NativeFloat32x4._truncated(_newX, y, z, w);
   }
 
   /// Copy [this] and replace the [y] lane.
   Float32x4 withY(double newY) {
-    return NativeFloat32x4._truncated(x, _truncate(newY), z, w);
+    double _newY = _truncate(checkNum(newY));
+    return NativeFloat32x4._truncated(x, _newY, z, w);
   }
 
   /// Copy [this] and replace the [z] lane.
   Float32x4 withZ(double newZ) {
-    return NativeFloat32x4._truncated(x, y, _truncate(newZ), w);
+    double _newZ = _truncate(checkNum(newZ));
+    return NativeFloat32x4._truncated(x, y, _newZ, w);
   }
 
   /// Copy [this] and replace the [w] lane.
   Float32x4 withW(double newW) {
-    return NativeFloat32x4._truncated(x, y, z, _truncate(newW));
+    double _newW = _truncate(checkNum(newW));
+    return NativeFloat32x4._truncated(x, y, z, _newW);
   }
 
   /// Returns the lane-wise minimum value in [this] or [other].
@@ -1573,25 +1578,25 @@
 
   /// Returns a new [Int32x4] copied from [this] with a new x value.
   Int32x4 withX(int x) {
-    int _x = _truncate(x);
+    int _x = _truncate(checkNum(x));
     return NativeInt32x4._truncated(_x, y, z, w);
   }
 
   /// Returns a new [Int32x4] copied from [this] with a new y value.
   Int32x4 withY(int y) {
-    int _y = _truncate(y);
+    int _y = _truncate(checkNum(y));
     return NativeInt32x4._truncated(x, _y, z, w);
   }
 
   /// Returns a new [Int32x4] copied from [this] with a new z value.
   Int32x4 withZ(int z) {
-    int _z = _truncate(z);
+    int _z = _truncate(checkNum(z));
     return NativeInt32x4._truncated(x, y, _z, w);
   }
 
   /// Returns a new [Int32x4] copied from [this] with a new w value.
   Int32x4 withW(int w) {
-    int _w = _truncate(w);
+    int _w = _truncate(checkNum(w));
     return NativeInt32x4._truncated(x, y, z, _w);
   }
 
diff --git a/sdk/lib/_internal/vm/bin/stdio_patch.dart b/sdk/lib/_internal/vm/bin/stdio_patch.dart
index bc32221..cf02d62 100644
--- a/sdk/lib/_internal/vm/bin/stdio_patch.dart
+++ b/sdk/lib/_internal/vm/bin/stdio_patch.dart
@@ -126,15 +126,7 @@
 @patch
 class Stdout {
   @patch
-  bool _hasTerminal(int fd) {
-    try {
-      _terminalSize(fd);
-      return true;
-    } catch (_) {
-      return false;
-    }
-  }
-
+  bool _hasTerminal(int fd) => _getTerminalSize(fd) is List;
   @patch
   int _terminalColumns(int fd) => _terminalSize(fd)[0];
   @patch
diff --git a/sdk/lib/_internal/vm/bin/vmservice_server.dart b/sdk/lib/_internal/vm/bin/vmservice_server.dart
index 26f1bfa..9857cd6 100644
--- a/sdk/lib/_internal/vm/bin/vmservice_server.dart
+++ b/sdk/lib/_internal/vm/bin/vmservice_server.dart
@@ -393,7 +393,7 @@
       'uri': serverAddress.toString(),
     };
     final file = File.fromUri(Uri.parse(serviceInfoFilenameLocal));
-    return file.writeAsString(json.encode(serviceInfo));
+    return file.writeAsString(json.encode(serviceInfo)) as Future<void>;
   }
 
   Future<Server> startup() async {
diff --git a/sdk/lib/_internal/vm/lib/array.dart b/sdk/lib/_internal/vm/lib/array.dart
index 5304841..9ada6e9 100644
--- a/sdk/lib/_internal/vm/lib/array.dart
+++ b/sdk/lib/_internal/vm/lib/array.dart
@@ -11,6 +11,18 @@
   @pragma("vm:prefer-inline")
   factory _List(length) native "List_allocate";
 
+  // Specialization of List.filled constructor for growable == false.
+  // Used by pkg/vm/lib/transformations/list_factory_specializer.dart.
+  factory _List.filled(int length, E fill) {
+    final result = _List<E>(length);
+    if (fill != null) {
+      for (int i = 0; i < result.length; i++) {
+        result[i] = fill;
+      }
+    }
+    return result;
+  }
+
   E operator [](int index) native "List_getIndexed";
 
   void operator []=(int index, E value) {
diff --git a/sdk/lib/_internal/vm/lib/growable_array.dart b/sdk/lib/_internal/vm/lib/growable_array.dart
index bca95ab..1c14701 100644
--- a/sdk/lib/_internal/vm/lib/growable_array.dart
+++ b/sdk/lib/_internal/vm/lib/growable_array.dart
@@ -107,6 +107,18 @@
     return new _GrowableList<T>._withData(data);
   }
 
+  // Specialization of List.filled constructor for growable == true.
+  // Used by pkg/vm/lib/transformations/list_factory_specializer.dart.
+  factory _GrowableList.filled(int length, T fill) {
+    final result = _GrowableList<T>(length);
+    if (fill != null) {
+      for (int i = 0; i < result.length; i++) {
+        result[i] = fill;
+      }
+    }
+    return result;
+  }
+
   @pragma("vm:exact-result-type",
       <dynamic>[_GrowableList, "result-type-uses-passed-type-arguments"])
   factory _GrowableList._withData(_List data) native "GrowableList_allocate";
@@ -120,15 +132,16 @@
   int get length native "GrowableList_getLength";
 
   void set length(int new_length) {
-    int old_capacity = _capacity;
-    int new_capacity = new_length;
-    if (new_capacity > old_capacity) {
+    if (new_length > length) {
       // Verify that element type is nullable.
       null as T;
-      _grow(new_capacity);
+      if (new_length > _capacity) {
+        _grow(new_length);
+      }
       _setLength(new_length);
       return;
     }
+    final int new_capacity = new_length;
     // We are shrinking. Pick the method which has fewer writes.
     // In the shrink-to-fit path, we write |new_capacity + new_length| words
     // (null init + copy).
diff --git a/sdk/lib/async/async.dart b/sdk/lib/async/async.dart
index 8cce959..5e72a00 100644
--- a/sdk/lib/async/async.dart
+++ b/sdk/lib/async/async.dart
@@ -98,6 +98,7 @@
     show
         CastStream,
         CastStreamTransformer,
+        checkNotNullable,
         EmptyIterator,
         IterableElementError,
         printToZone,
diff --git a/sdk/lib/async/stream.dart b/sdk/lib/async/stream.dart
index 46ec161..e0a2ce2 100644
--- a/sdk/lib/async/stream.dart
+++ b/sdk/lib/async/stream.dart
@@ -248,6 +248,77 @@
   }
 
   /**
+   * Creates a multi-subscription stream.
+   *
+   * Each time the created stream is listened to,
+   * the [onListen] callback is invoked with a new [MultiStreamController]
+   * which forwards events to the [StreamSubscription]
+   * returned by that [listen] call.
+   *
+   * This allows each listener to be treated as an individual stream.
+   *
+   * The [MultiStreamController] does not support reading its
+   * [StreamController.stream]. Setting its [StreamController.onListen]
+   * has no effect since the [onListen] callback is called instead,
+   * and the [StreamController.onListen] won't be called later.
+   * The controller acts like an asynchronous controller,
+   * but provides extra methods for delivering events synchronously.
+   *
+   * If [isBroadcast] is set to `true`, the returned stream's
+   * [Stream.isBroadcast] will be `true`.
+   * This has no effect on the stream behavior,
+   * it is up to the [onListen] function
+   * to act like a broadcast stream if it claims to be one.
+   *
+   * A multi-subscription stream can behave like any other stream.
+   * If the [onListen] callback throws on every call after the first,
+   * the stream behaves like a single-subscription stream.
+   * If the stream emits the same events to all current listeners,
+   * it behaves like a broadcast stream.
+   *
+   * It can also choose to emit different events to different listeners.
+   * For example, a stream which repeats the most recent
+   * non-`null` event to new listeners, could be implemented as this example:
+   * ```dart
+   * extension StreamRepeatLatestExtension<T extends Object> on Stream<T> {
+   *   Stream<T> repeatLatest() {
+   *     var done = false;
+   *     T? latest = null;
+   *     var currentListeners = <MultiStreamController<T>>{};
+   *     this.listen((event) {
+   *       latest = event;
+   *       for (var listener in [...currentListeners]) listener.addSync(event);
+   *     }, onError: (Object error, StackTrace stack) {
+   *       for (var listener in [...currentListeners]) listener.addErrorSync(error, stack);
+   *     }, onDone: () {
+   *       done = true;
+   *       latest = null;
+   *       for (var listener in currentListeners) listener.closeSync();
+   *       currentListeners.clear();
+   *     });
+   *     return Stream.multi((controller) {
+   *       if (done) {
+   *         controller.close();
+   *         return;
+   *       }
+   *       currentListeners.add(controller);
+   *       var latestValue = latest;
+   *       if (latestValue != null) controller.add(latestValue);
+   *       controller.onCancel = () {
+   *         currentListeners.remove(controller);
+   *       };
+   *     });
+   *   }
+   * }
+   * ```
+   */
+  @Since("2.9")
+  factory Stream.multi(void Function(MultiStreamController<T>) onListen,
+      {bool isBroadcast = false}) {
+    return _MultiStream<T>(onListen, isBroadcast);
+  }
+
+  /**
    * Creates a stream that repeatedly emits events at [period] intervals.
    *
    * The event values are computed by invoking [computation]. The argument to
@@ -2230,3 +2301,49 @@
     _ensureSink().close();
   }
 }
+
+/**
+ * An enhanced stream controller provided by [Stream.multi].
+ *
+ * Acts like a normal asynchronous controller, but also allows
+ * adding events synchronously.
+ * As with any synchronous event delivery, the sender should be very careful
+ * to not deliver events at times when a new listener might not
+ * be ready to receive them.
+ * That generally means only delivering events synchronously in response to other
+ * asynchronous events, because that is a time when an asynchronous event could
+ * happen.
+ */
+@Since("2.9")
+abstract class MultiStreamController<T> implements StreamController<T> {
+  /**
+   * Adds and delivers an event.
+   *
+   * Adds an event like [add] and attempts to deliver it immediately.
+   * Delivery can be delayed if other previously added events are
+   * still pending delivery, if the subscription is paused,
+   * or if the subscription isn't listening yet.
+   */
+  void addSync(T value);
+
+  /**
+   * Adds and delivers an error event.
+   *
+   * Adds an error like [addError] and attempts to deliver it immediately.
+   * Delivery can be delayed if other previously added events are
+   * still pending delivery, if the subscription is paused,
+   * or if the subscription isn't listening yet.
+   */
+  void addErrorSync(Object error, [StackTrace? stackTrace]);
+
+  /**
+   * Closes the controller and delivers a done event.
+   *
+   * Closes the controller like [close] and attempts to deliver a "done"
+   * event immediately.
+   * Delivery can be delayed if other previously added events are
+   * still pending delivery, if the subscription is paused,
+   * or if the subscription isn't listening yet.
+   */
+  void closeSync();
+}
diff --git a/sdk/lib/async/stream_controller.dart b/sdk/lib/async/stream_controller.dart
index 9688dd1..0dc3c97 100644
--- a/sdk/lib/async/stream_controller.dart
+++ b/sdk/lib/async/stream_controller.dart
@@ -628,7 +628,7 @@
    * Send or enqueue an error event.
    */
   void addError(Object error, [StackTrace? stackTrace]) {
-    // TODO(40614): Remove once non-nullability is sound.
+    // TODO(40614): Remove once non-nullability is sound. Use checkNotNullable.
     ArgumentError.checkNotNull(error, "error");
     if (!_mayAddEvent) throw _badEventState();
     AsyncError? replacement = Zone.current.errorCallback(error, stackTrace);
@@ -804,9 +804,6 @@
 
 abstract class _SyncStreamControllerDispatch<T>
     implements _StreamController<T>, SynchronousStreamController<T> {
-  int get _state;
-  void set _state(int state);
-
   void _sendData(T data) {
     _subscription._add(data);
   }
diff --git a/sdk/lib/async/stream_impl.dart b/sdk/lib/async/stream_impl.dart
index 1c6fa50..942f4a7 100644
--- a/sdk/lib/async/stream_impl.dart
+++ b/sdk/lib/async/stream_impl.dart
@@ -1097,3 +1097,43 @@
     return new _DoneStreamSubscription<T>(onDone);
   }
 }
+
+/** A stream which creates a new controller for each listener. */
+class _MultiStream<T> extends Stream<T> {
+  final bool isBroadcast;
+  /** The callback called for each listen. */
+  final void Function(MultiStreamController<T>) _onListen;
+
+  _MultiStream(this._onListen, this.isBroadcast);
+
+  StreamSubscription<T> listen(void onData(T event)?,
+      {Function? onError, void onDone()?, bool? cancelOnError}) {
+    var controller = _MultiStreamController<T>();
+    controller.onListen = () {
+      _onListen(controller);
+    };
+    return controller._subscribe(
+        onData, onError, onDone, cancelOnError ?? false);
+  }
+}
+
+class _MultiStreamController<T> extends _AsyncStreamController<T>
+    implements MultiStreamController<T> {
+  _MultiStreamController() : super(null, null, null, null);
+
+  void addSync(T data) {
+    _subscription._add(data);
+  }
+
+  void addErrorSync(Object error, [StackTrace? stackTrace]) {
+    _subscription._addError(error, stackTrace ?? StackTrace.empty);
+  }
+
+  void closeSync() {
+    _subscription._close();
+  }
+
+  Stream<T> get stream {
+    throw UnsupportedError("Not available");
+  }
+}
diff --git a/sdk/lib/core/duration.dart b/sdk/lib/core/duration.dart
index 2a1f406..c4c6846 100644
--- a/sdk/lib/core/duration.dart
+++ b/sdk/lib/core/duration.dart
@@ -235,10 +235,13 @@
    * Returns a string representation of this `Duration`.
    *
    * Returns a string with hours, minutes, seconds, and microseconds, in the
-   * following format: `HH:MM:SS.mmmmmm`. For example,
+   * following format: `H:MM:SS.mmmmmm`. For example,
    *
-   *     var d = new Duration(days:1, hours:1, minutes:33, microseconds: 500);
+   *     var d = Duration(days: 1, hours: 1, minutes: 33, microseconds: 500);
    *     d.toString();  // "25:33:00.000500"
+   *
+   *     d = Duration(days: 0, hours: 1, minutes: 10, microseconds: 500);
+   *     d.toString();  // "1:10:00.000500"
    */
   String toString() {
     String sixDigits(int n) {
diff --git a/sdk/lib/html/dart2js/html_dart2js.dart b/sdk/lib/html/dart2js/html_dart2js.dart
index 04dcc3d..a3bcc02 100644
--- a/sdk/lib/html/dart2js/html_dart2js.dart
+++ b/sdk/lib/html/dart2js/html_dart2js.dart
@@ -39846,72 +39846,96 @@
   MemoryInfo? get memory =>
       _isConsoleDefined ? JS('MemoryInfo', 'window.console.memory') : null;
 
-  void assertCondition(bool condition, Object arg) => _isConsoleDefined
-      ? JS('void', 'window.console.assertCondition(#, #)', condition, arg)
+  // Even though many of the following JS methods can take in multiple
+  // arguments, we historically and currently limit the number of variable
+  // arguments to 1. Depending on the need, these methods may be updated to
+  // allow for more.
+
+  // We rename assert to assertCondition here.
+  void assertCondition([bool? condition, Object? arg]) => _isConsoleDefined
+      ? JS('void', 'window.console.assert(#, #)', condition, arg)
       : null;
 
-  void clear(Object arg) =>
+  // clear no longer takes in an argument, but we keep this as optional to
+  // maintain backwards compatibility.
+  void clear([Object? arg]) =>
       _isConsoleDefined ? JS('void', 'window.console.clear(#)', arg) : null;
 
-  void count(Object arg) =>
+  // count takes in a String instead, but we keep this as an Object for
+  // backwards compatibility.
+  void count([Object? arg]) =>
       _isConsoleDefined ? JS('void', 'window.console.count(#)', arg) : null;
 
-  void debug(Object arg) =>
+  void countReset([String? arg]) => _isConsoleDefined
+      ? JS('void', 'window.console.countReset(#)', arg)
+      : null;
+
+  void debug(Object? arg) =>
       _isConsoleDefined ? JS('void', 'window.console.debug(#)', arg) : null;
 
-  void dir(Object arg) =>
-      _isConsoleDefined ? JS('void', 'window.console.dir(#)', arg) : null;
+  void dir([Object? item, Object? options]) => _isConsoleDefined
+      ? JS('void', 'window.console.dir(#, #)', item, options)
+      : null;
 
-  void dirxml(Object arg) =>
+  void dirxml(Object? arg) =>
       _isConsoleDefined ? JS('void', 'window.console.dirxml(#)', arg) : null;
 
-  void error(Object arg) =>
+  void error(Object? arg) =>
       _isConsoleDefined ? JS('void', 'window.console.error(#)', arg) : null;
 
-  void group(Object arg) =>
+  void group(Object? arg) =>
       _isConsoleDefined ? JS('void', 'window.console.group(#)', arg) : null;
 
-  void groupCollapsed(Object arg) => _isConsoleDefined
+  void groupCollapsed(Object? arg) => _isConsoleDefined
       ? JS('void', 'window.console.groupCollapsed(#)', arg)
       : null;
 
   void groupEnd() =>
       _isConsoleDefined ? JS('void', 'window.console.groupEnd()') : null;
 
-  void info(Object arg) =>
+  void info(Object? arg) =>
       _isConsoleDefined ? JS('void', 'window.console.info(#)', arg) : null;
 
-  void log(Object arg) =>
+  void log(Object? arg) =>
       _isConsoleDefined ? JS('void', 'window.console.log(#)', arg) : null;
 
-  void markTimeline(Object arg) => _isConsoleDefined
-      ? JS('void', 'window.console.markTimeline(#)', arg)
+  void table([Object? tabularData, List<String>? properties]) =>
+      _isConsoleDefined
+          ? JS('void', 'window.console.table(#, #)', tabularData, properties)
+          : null;
+
+  void time([String? label]) =>
+      _isConsoleDefined ? JS('void', 'window.console.time(#)', label) : null;
+
+  void timeEnd([String? label]) =>
+      _isConsoleDefined ? JS('void', 'window.console.timeEnd(#)', label) : null;
+
+  void timeLog([String? label, Object? arg]) => _isConsoleDefined
+      ? JS('void', 'window.console.timeLog(#, #)', label, arg)
       : null;
 
-  void profile(String title) =>
+  void trace(Object? arg) =>
+      _isConsoleDefined ? JS('void', 'window.console.trace(#)', arg) : null;
+
+  void warn(Object? arg) =>
+      _isConsoleDefined ? JS('void', 'window.console.warn(#)', arg) : null;
+
+  // The following are non-standard methods.
+  void profile([String? title]) =>
       _isConsoleDefined ? JS('void', 'window.console.profile(#)', title) : null;
 
-  void profileEnd(String title) => _isConsoleDefined
+  void profileEnd([String? title]) => _isConsoleDefined
       ? JS('void', 'window.console.profileEnd(#)', title)
       : null;
 
-  void table(Object arg) =>
-      _isConsoleDefined ? JS('void', 'window.console.table(#)', arg) : null;
-
-  void time(String title) =>
-      _isConsoleDefined ? JS('void', 'window.console.time(#)', title) : null;
-
-  void timeEnd(String title) =>
-      _isConsoleDefined ? JS('void', 'window.console.timeEnd(#)', title) : null;
-
-  void timeStamp(Object arg) =>
+  void timeStamp([Object? arg]) =>
       _isConsoleDefined ? JS('void', 'window.console.timeStamp(#)', arg) : null;
 
-  void trace(Object arg) =>
-      _isConsoleDefined ? JS('void', 'window.console.trace(#)', arg) : null;
-
-  void warn(Object arg) =>
-      _isConsoleDefined ? JS('void', 'window.console.warn(#)', arg) : null;
+  // The following is deprecated and should be removed once we drop support for
+  // older Safari browsers.
+  void markTimeline(Object? arg) => _isConsoleDefined
+      ? JS('void', 'window.console.markTimeline(#)', arg)
+      : null;
 }
 // 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
diff --git a/sdk_args.gni b/sdk_args.gni
index 94e6b7a8..06dc3e8 100644
--- a/sdk_args.gni
+++ b/sdk_args.gni
@@ -19,4 +19,22 @@
   # to out/ReleaseX64/args.gn. The path above can be extracted from the `.git`
   # file under the git worktree folder.
   default_git_folder = "$_dart_root/.git"
+
+  # Whether to enable the SDK hash check that will prevent loading a kernel
+  # into a VM which was built with a different SDK.
+  verify_sdk_hash = true
+}
+
+# The SDK hash to build into VM and kernels.
+# The value 0000000000 signifies no hash is set, which will disable the check.
+if (verify_sdk_hash) {
+  sdk_hash = exec_script("$_dart_root/tools/make_version.py",
+                         [ "--format={{GIT_HASH}}" ],
+                         "trim string",
+                         [
+                           "$_dart_root/tools/VERSION",
+                           "$_dart_root/tools/utils.py",
+                         ])
+} else {
+  sdk_hash = "0000000000"
 }
diff --git a/tests/co19/co19-co19.status b/tests/co19/co19-co19.status
index 5f06590..2176473 100644
--- a/tests/co19/co19-co19.status
+++ b/tests/co19/co19-co19.status
@@ -20,22 +20,9 @@
 Language/Generics/parameter_A01_t03: Skip # Type aliases are not fully implemented
 Language/Generics/syntax_t31: Skip # Type aliases are not fully implemented
 Language/Generics/typedef_A01_t10: Skip # Type aliases are not fully implemented
-Language/Libraries_and_Scripts/*: Skip # Not migrated to NNBD
-Language/Libraries_and_Scripts/Exports/*: Skip # Not migrated to NNBD
-Language/Libraries_and_Scripts/Parts/*: Skip # Not migrated to NNBD
-Language/Libraries_and_Scripts/Scripts/*: Skip # Not migrated to NNBD
-Language/Libraries_and_Scripts/URIs/*: Skip # Not migrated to NNBD
-Language/Metadata/*: Skip # Not migrated to NNBD
-Language/Mixins/*: Skip # Not migrated to NNBD
-Language/Mixins/Mixin_Application/*: Skip # Not migrated to NNBD
-Language/Mixins/Mixin_Composition/*: Skip # Not migrated to NNBD
-Language/Overview/*: Skip # Not migrated to NNBD
-Language/Overview/Privacy/*: Skip # Not migrated to NNBD
-Language/Overview/Scoping/*: Skip # Not migrated to NNBD
-Language/Reference/Lexical_Rules/*: Skip # Not migrated to NNBD
-Language/Reference/Lexical_Rules/Comments/*: Skip # Not migrated to NNBD
-Language/Reference/Lexical_Rules/Reserved_Words/*: Skip # Not migrated to NNBD
-Language/Reference/Operator_Precedence/*: Skip # Not migrated to NNBD
+Language/Reference/Operator_Precedence/precedence_01_assignment_t14: Skip # Triple shift is not implemented yet
+Language/Reference/Operator_Precedence/precedence_12_Shift_t04: Skip # Triple shift is not implemented yet
+Language/Reference/Operator_Precedence/precedence_t05: Skip # Triple shift is not implemented yet
 Language/Statements/Assert/*: Skip # Not migrated to NNBD
 Language/Statements/Blocks/*: Skip # Not migrated to NNBD
 Language/Statements/Break/*: Skip # Not migrated to NNBD
@@ -90,7 +77,6 @@
 LanguageFeatures/Simple-bounds/static/type-aliases/*: Skip # Not migrated to NNBD
 LanguageFeatures/Spread-collections/*: Skip # Not migrated to NNBD
 LanguageFeatures/Super-bounded-types/*: Skip # Not migrated to NNBD
-LanguageFeatures/Super-mixins/*: Skip # Not migrated to NNBD
 LanguageFeatures/Triple-Shift/*: Skip # Not migrated to NNBD
 LanguageFeatures/int-to-double/*: Skip # Not migrated to NNBD
 LanguageFeatures/regression/*: Skip # Not migrated to NNBD
diff --git a/tests/co19/co19-dart2js.status b/tests/co19/co19-dart2js.status
index a3cfd33..d6f8c83 100644
--- a/tests/co19/co19-dart2js.status
+++ b/tests/co19/co19-dart2js.status
@@ -18,6 +18,7 @@
 Language/Expressions/Shift/integer_t02: SkipByDesign # big integer cannot be represented in JavaScript
 Language/Expressions/Spawning_an_Isolate/new_isolate_t01: SkipByDesign
 Language/Metadata/before*: Skip # dart:mirrors not supported https://github.com/dart-lang/co19/issues/523.
+Language/Reference/Operator_Precedence/precedence_15_unary_prefix_t08: SkipByDesign # binary '~' produces different results in JavaScript and Dart
 LibTest/io/*: SkipByDesign # dart:io not supported.
 LibTest/isolate/*: SkipByDesign # dart:isolate not supported.
 
diff --git a/tests/co19/co19-dartdevc.status b/tests/co19/co19-dartdevc.status
index c833149..08f3b56 100644
--- a/tests/co19/co19-dartdevc.status
+++ b/tests/co19/co19-dartdevc.status
@@ -69,6 +69,7 @@
 Language/Expressions/Shift/integer_t02: SkipByDesign # big integer cannot be represented in JavaScript
 Language/Expressions/Spawning_an_Isolate/new_isolate_t01: SkipByDesign # dart:isolate not supported.
 Language/Metadata/before*: Skip # dart:mirrors not supported https://github.com/dart-lang/co19/issues/523.
+Language/Reference/Operator_Precedence/precedence_15_unary_prefix_t08: SkipByDesign # binary '~' produces different results in JavaScript and Dart
 Language/Types/Interface_Types/subtype_t27: Skip # Times out
 Language/Types/Interface_Types/subtype_t28: Skip # Times out
 LibTest/html/CanvasRenderingContext2D/addEventListener_A01_t03: Skip # Times out
diff --git a/tests/corelib/regress_42502_test.dart b/tests/corelib/regress_42502_test.dart
new file mode 100644
index 0000000..c3bac67
--- /dev/null
+++ b/tests/corelib/regress_42502_test.dart
@@ -0,0 +1,27 @@
+// Copyright (c) 2020, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// Regression test for https://github.com/dart-lang/sdk/issues/42502.
+// Requirements=nnbd-strong
+
+import "package:expect/expect.dart";
+
+void main() {
+  List<int> x = [];
+  Expect.throws(() {
+    x.length = x.length + 1;
+  });
+  Expect.equals(0, x.length);
+  x.add(222);
+  Expect.equals(1, x.length);
+  Expect.throws(() {
+    x.length = 2;
+  });
+  Expect.equals(1, x.length);
+  Expect.throws(() {
+    x.length = x.length + 1;
+  });
+  Expect.equals(1, x.length);
+  Expect.equals(222, x[0]);
+}
diff --git a/tests/dart2js/12320_test.dart b/tests/dart2js/12320_test.dart
index d47c05a..6871ab1 100644
--- a/tests/dart2js/12320_test.dart
+++ b/tests/dart2js/12320_test.dart
@@ -7,7 +7,7 @@
 // Regression test for Issue 12320, Issue 12363.
 
 String log = '';
-int x;
+int? x;
 
 void main() {
   (run)(run);
diff --git a/tests/dart2js/17856_test.dart b/tests/dart2js/17856_test.dart
index aa5a243..27cebd5 100644
--- a/tests/dart2js/17856_test.dart
+++ b/tests/dart2js/17856_test.dart
@@ -9,7 +9,7 @@
 void main() {
   var all = {"a": new A(), "b": new B()};
 
-  A a = all["a"];
+  A a = all["a"] as A;
   a.load();
 }
 
diff --git a/tests/dart2js/29130_test.dart b/tests/dart2js/29130_test.dart
index e4daa34..4426f26 100644
--- a/tests/dart2js/29130_test.dart
+++ b/tests/dart2js/29130_test.dart
@@ -20,7 +20,7 @@
 
 // interface scenario: we shouldn't trace B
 abstract class B implements A {
-  factory B() => null;
+  factory B() => null as dynamic;
 }
 
 // mixin scenario: we should trace C, but we should trace _C
diff --git a/tests/dart2js/32770c_test.dart b/tests/dart2js/32770c_test.dart
index 15ac166..72602a8 100644
--- a/tests/dart2js/32770c_test.dart
+++ b/tests/dart2js/32770c_test.dart
@@ -2,13 +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.
 
-// dart2jsOptions=--strong
-
 // Regression test for issue 32770.
 
 import 'dart:async' show Future;
 
-A<J> futureToA<T, J>(Future<T> future, [J wrapValue(T value)]) {
+A<J> futureToA<T, J>(Future<T> future, [J wrapValue(T value)?]) {
   return new A<J>(
     (void resolveFn(J value), void rejectFn(error)) {
       future.then((value) {
diff --git a/tests/dart2js/32828_test.dart b/tests/dart2js/32828_test.dart
index c56a904..12b82ca 100644
--- a/tests/dart2js/32828_test.dart
+++ b/tests/dart2js/32828_test.dart
@@ -2,10 +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.
 
-// dart2jsOptions=--strong
-
 class A {
-  void m2<T>(void Function(T) f, [a]) {}
+  void m2<T>(void Function(T)? f, [a]) {}
 }
 
 main() => new A().m2<String>(null);
diff --git a/tests/dart2js/37494_test.dart b/tests/dart2js/37494_test.dart
index d2d8283..c940299 100644
--- a/tests/dart2js/37494_test.dart
+++ b/tests/dart2js/37494_test.dart
@@ -46,7 +46,7 @@
 
   @override
   @pragma('dart2js:noInline')
-  void sort([int compare(T a, T b)]) {
+  void sort([int compare(T a, T b)?]) {
     super.sort(compare); // This super call had bad dummy interceptor.
   }
 }
diff --git a/tests/dart2js/41449a_test.dart b/tests/dart2js/41449a_test.dart
new file mode 100644
index 0000000..5115f50
--- /dev/null
+++ b/tests/dart2js/41449a_test.dart
@@ -0,0 +1,57 @@
+// Copyright (c) 2020, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+//
+// dart2jsOptions=-O0
+
+// Regression test for passing type parameters through call-through stub.
+//
+// We use an abstract class with two implementations to avoid the optimizer
+// 'inlining' the call-through stub, so we are testing that the stub itself
+// passes through the type parameters.
+
+import 'package:expect/expect.dart';
+
+abstract class AAA {
+  dynamic get foo;
+}
+
+class B1 implements AAA {
+  final dynamic foo;
+  B1(this.foo);
+}
+
+class B2 implements AAA {
+  final dynamic _arr;
+  B2(foo) : _arr = [foo];
+  dynamic get foo => _arr.first;
+}
+
+class B3 implements AAA {
+  final dynamic __foo;
+  B3(this.__foo);
+  dynamic get _foo => __foo;
+  dynamic get foo => _foo;
+}
+
+@pragma('dart2js:noInline')
+test1<T>(AAA a, String expected) {
+  // call-through getter 'foo' with one type argument.
+  Expect.equals(expected, a.foo<T>());
+}
+
+@pragma('dart2js:noInline')
+test2<U, V>(AAA a, String expected) {
+  // call-through getter 'foo' with two type arguments.
+  Expect.equals(expected, a.foo<U, V>());
+}
+
+main() {
+  test1<int>(B1(<P>() => '$P'), 'int');
+  test1<num>(B2(<Q>() => '$Q'), 'num');
+  test1<double>(B3(<R>() => '$R'), 'double');
+
+  test2<int, num>(B1(<A, B>() => '$A $B'), 'int num');
+  test2<num, int>(B2(<X, Y>() => '$X $Y'), 'num int');
+  test2<double, String>(B3(<C, D>() => '$C $D'), 'double String');
+}
diff --git a/tests/dart2js/41449b_test.dart b/tests/dart2js/41449b_test.dart
new file mode 100644
index 0000000..addeb57
--- /dev/null
+++ b/tests/dart2js/41449b_test.dart
@@ -0,0 +1,57 @@
+// Copyright (c) 2020, the Dart project authors.  Please see the AUTHORS file
+// for 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 test is the same as 41449a_test.dart without forcing `-O0`.
+//
+// Regression test for passing type parameters through call-through stub.
+//
+// We use an abstract class with two implementations to avoid the optimizer
+// 'inlining' the call-through stub, so we are testing that the stub itself
+// passes through the type parameters.
+
+import 'package:expect/expect.dart';
+
+abstract class AAA {
+  dynamic get foo;
+}
+
+class B1 implements AAA {
+  final dynamic foo;
+  B1(this.foo);
+}
+
+class B2 implements AAA {
+  final dynamic _arr;
+  B2(foo) : _arr = [foo];
+  dynamic get foo => _arr.first;
+}
+
+class B3 implements AAA {
+  final dynamic __foo;
+  B3(this.__foo);
+  dynamic get _foo => __foo;
+  dynamic get foo => _foo;
+}
+
+@pragma('dart2js:noInline')
+test1<T>(AAA a, String expected) {
+  // call-through getter 'foo' with one type argument.
+  Expect.equals(expected, a.foo<T>());
+}
+
+@pragma('dart2js:noInline')
+test2<U, V>(AAA a, String expected) {
+  // call-through getter 'foo' with two type arguments.
+  Expect.equals(expected, a.foo<U, V>());
+}
+
+main() {
+  test1<int>(B1(<P>() => '$P'), 'int');
+  test1<num>(B2(<Q>() => '$Q'), 'num');
+  test1<double>(B3(<R>() => '$R'), 'double');
+
+  test2<int, num>(B1(<A, B>() => '$A $B'), 'int num');
+  test2<num, int>(B2(<X, Y>() => '$X $Y'), 'num int');
+  test2<double, String>(B3(<C, D>() => '$C $D'), 'double String');
+}
diff --git a/tests/dart2js/42088_test.dart b/tests/dart2js/42088_test.dart
new file mode 100644
index 0000000..2a63dfb
--- /dev/null
+++ b/tests/dart2js/42088_test.dart
@@ -0,0 +1,14 @@
+// Copyright (c) 2020, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// Regression test for issue 42088.
+
+class Foo<T> {}
+
+void main() {
+  var f = <T>() => Foo<T>().runtimeType;
+
+  print(f<int>());
+  print(f<String>());
+}
diff --git a/tests/dart2js/42189_test.dart b/tests/dart2js/42189_test.dart
new file mode 100644
index 0000000..a581061
--- /dev/null
+++ b/tests/dart2js/42189_test.dart
@@ -0,0 +1,37 @@
+// Copyright (c) 2020, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+//
+// dart2jsOptions=-O0
+
+// Regression test for issue 42891. The root cause was a malformed SSA due to
+// generating a dynamic entry point argument test for an elided parameter
+// directly on the HLocalValue , which should only be an operand to HLocalGet
+// and HLocalSet.
+
+import "package:expect/expect.dart";
+
+class CCC {
+  void foo([num x = 123]) {
+    try {
+      Expect.equals(123, x);
+      x = 0;
+    } finally {
+      Expect.equals(0, x);
+    }
+  }
+
+  void bar([num x = 456]) {
+    try {
+      Expect.equals(123, x);
+      x = 0;
+    } finally {
+      Expect.equals(0, x);
+    }
+  }
+}
+
+void main() {
+  CCC().foo();
+  CCC().bar(123);
+}
diff --git a/tests/dart2js/42501_test.dart b/tests/dart2js/42501_test.dart
new file mode 100644
index 0000000..91b7970
--- /dev/null
+++ b/tests/dart2js/42501_test.dart
@@ -0,0 +1,16 @@
+// Copyright (c) 2020, the Dart project authors.  Please see the AUTHORS file
+// for 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';
+
+typedef F = num? Function();
+
+F foo() {
+  T? local<T>() => null;
+  return local;
+}
+
+void main() {
+  Expect.type<F>(foo());
+}
diff --git a/tests/dart2js/881_test.dart b/tests/dart2js/881_test.dart
index 5be849c..59c00af 100644
--- a/tests/dart2js/881_test.dart
+++ b/tests/dart2js/881_test.dart
@@ -6,6 +6,6 @@
 
 @pragma('dart2js:disableFinal')
 void main() {
-  String v = null;
+  String? v = null;
   print('${v.hashCode}');
 }
diff --git a/tests/dart2js/assert_with_message_test.dart b/tests/dart2js/assert_with_message_test.dart
index 993ab11..f848734 100644
--- a/tests/dart2js/assert_with_message_test.dart
+++ b/tests/dart2js/assert_with_message_test.dart
@@ -44,7 +44,7 @@
   }
 
   check('constant type error', () {
-    assert(null, 'Mumble');
+    assert(null as dynamic, 'Mumble');
   });
   check('variable type error', () {
     assert(confuse(null), 'Mumble');
diff --git a/tests/dart2js/boolean_conversion_test.dart b/tests/dart2js/boolean_conversion_test.dart
index 64cd441..48c1cb6 100644
--- a/tests/dart2js/boolean_conversion_test.dart
+++ b/tests/dart2js/boolean_conversion_test.dart
@@ -23,12 +23,12 @@
 }
 
 void conditionalTest() {
-  bool x = null;
+  bool x = null as dynamic;
   Expect.isFalse(x ? true : false);
 }
 
 void orTest() {
-  bool x = null;
+  bool x = null as dynamic;
   Expect.equals(null, x || x);
   Expect.isFalse(x || false);
   Expect.isTrue(x || true);
@@ -37,7 +37,7 @@
 }
 
 void andTest() {
-  bool x = null;
+  bool x = null as dynamic;
   Expect.isFalse(x && x);
   Expect.isFalse(x && false);
   Expect.isFalse(x && true);
@@ -46,7 +46,7 @@
 }
 
 void ifTest() {
-  bool x = null;
+  bool x = null as dynamic;
   Expect.isFalse(() {
     if (x) {
       return true;
@@ -57,7 +57,7 @@
 }
 
 void forTest() {
-  bool x = null;
+  bool x = null as dynamic;
   Expect.isFalse(() {
     for (; x;) {
       return true;
@@ -67,7 +67,7 @@
 }
 
 void whileTest() {
-  bool x = null;
+  bool x = null as dynamic;
   Expect.isFalse(() {
     while (x) {
       return true;
@@ -77,7 +77,7 @@
 }
 
 void doTest() {
-  bool x = null;
+  bool x = null as dynamic;
   Expect.equals(1, () {
     int n = 0;
     do {
@@ -88,16 +88,16 @@
 }
 
 void notTest() {
-  bool x = null;
+  bool x = null as dynamic;
   Expect.isTrue(!x);
 }
 
 void ifElementTest() {
-  bool x = null;
+  bool x = null as dynamic;
   Expect.listEquals([], [if (x) 1]);
 }
 
 void forElementTest() {
-  bool x = null;
+  bool x = null as dynamic;
   Expect.listEquals([], [for (var i = 0; x; i++) i]);
 }
diff --git a/tests/dart2js/bound_closure_interceptor_type_test.dart b/tests/dart2js/bound_closure_interceptor_type_test.dart
index 7d4ea10..3410dbe 100644
--- a/tests/dart2js/bound_closure_interceptor_type_test.dart
+++ b/tests/dart2js/bound_closure_interceptor_type_test.dart
@@ -15,7 +15,7 @@
 class A<T> {
   const A();
   void add(T x) {}
-  T elementAt(int index) => index == 0 ? 42 : 'string';
+  T elementAt(int index) => index == 0 ? 42 as dynamic : 'string';
 
   // This call get:elementAt has a known receiver type, so is is potentially
   // eligible for a dummy receiver optimization.
@@ -89,7 +89,7 @@
 
     for (var object in objects) {
       for (var methodName in methodNames) {
-        var methodFn = methods[methodName];
+        var methodFn = methods[methodName] as dynamic;
         var description = '$object';
         checkers.forEach((checkName, checkFn) {
           bool answer = trueCheckNames.contains(checkName);
diff --git a/tests/dart2js/call_signature_test.dart b/tests/dart2js/call_signature_test.dart
index 20978d5..b675f3b 100644
--- a/tests/dart2js/call_signature_test.dart
+++ b/tests/dart2js/call_signature_test.dart
@@ -9,7 +9,7 @@
 
 class A<T> {
   /// Weird signature to ensure it isn't match by any call selector.
-  call(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, {T t}) {}
+  call(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, {T? t}) {}
 }
 
 class B<T> {
diff --git a/tests/dart2js/cfe_instance_constant_test.dart b/tests/dart2js/cfe_instance_constant_test.dart
index 0c202c1..3bd9917 100644
--- a/tests/dart2js/cfe_instance_constant_test.dart
+++ b/tests/dart2js/cfe_instance_constant_test.dart
@@ -17,5 +17,5 @@
 const c0 = const bool.fromEnvironment("x") ? null : const Class9();
 
 main() {
-  Expect.equals(0, c0.field);
+  Expect.equals(0, c0!.field);
 }
diff --git a/tests/dart2js/checked_setter_test.dart b/tests/dart2js/checked_setter_test.dart
index 60ca4fa..9b86f4d 100644
--- a/tests/dart2js/checked_setter_test.dart
+++ b/tests/dart2js/checked_setter_test.dart
@@ -5,11 +5,11 @@
 import 'package:expect/expect.dart';
 
 class A {
-  String field;
+  String? field;
 }
 
 class B {
-  int field;
+  int? field;
 }
 
 @pragma('dart2js:noInline')
diff --git a/tests/dart2js/class_hierarchy_extends_clause_test.dart b/tests/dart2js/class_hierarchy_extends_clause_test.dart
index b6131c9..b61ec0f 100644
--- a/tests/dart2js/class_hierarchy_extends_clause_test.dart
+++ b/tests/dart2js/class_hierarchy_extends_clause_test.dart
@@ -2,6 +2,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+import 'package:expect/expect.dart';
 
 class A {}
 
diff --git a/tests/dart2js/closure_capture7_test.dart b/tests/dart2js/closure_capture7_test.dart
index 045f6a5..9b8482d 100644
--- a/tests/dart2js/closure_capture7_test.dart
+++ b/tests/dart2js/closure_capture7_test.dart
@@ -3,12 +3,12 @@
 // BSD-style license that can be found in the LICENSE file.
 
 class A<T> {
-  List<List> xs;
+  List<List>? xs;
 
   void foo() {
     // the inner closure only needs to capture 'this' if
     // `A` needs runtime type information.
-    xs.map((x) => x.map((a) => a as T));
+    xs!.map((x) => x.map((a) => a as T));
   }
 }
 
diff --git a/tests/dart2js/compound_operator_index_test.dart b/tests/dart2js/compound_operator_index_test.dart
index 508a9e0..0c527d2 100644
--- a/tests/dart2js/compound_operator_index_test.dart
+++ b/tests/dart2js/compound_operator_index_test.dart
@@ -69,7 +69,7 @@
   a[0] += 2;
   Expect.equals(3, a[0]);
 
-  List trace = new List();
+  List trace = [];
   getB(trace)[getIndex(trace)] += 37;
 
   Expect.listEquals([-1, -2, -3, 42, 100, -4, 101, 37, -5, 42, 102], trace);
diff --git a/tests/dart2js_2/42088_test.dart b/tests/dart2js_2/42088_test.dart
new file mode 100644
index 0000000..2a63dfb
--- /dev/null
+++ b/tests/dart2js_2/42088_test.dart
@@ -0,0 +1,14 @@
+// Copyright (c) 2020, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// Regression test for issue 42088.
+
+class Foo<T> {}
+
+void main() {
+  var f = <T>() => Foo<T>().runtimeType;
+
+  print(f<int>());
+  print(f<String>());
+}
diff --git a/tests/dart2js_2/42501_test.dart b/tests/dart2js_2/42501_test.dart
new file mode 100644
index 0000000..ae89413
--- /dev/null
+++ b/tests/dart2js_2/42501_test.dart
@@ -0,0 +1,16 @@
+// Copyright (c) 2020, the Dart project authors.  Please see the AUTHORS file
+// for 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';
+
+typedef F = num Function();
+
+F foo() {
+  T local<T>() => null;
+  return local;
+}
+
+void main() {
+  Expect.type<F>(foo());
+}
diff --git a/tests/ffi/vmspecific_handle_test.dart b/tests/ffi/vmspecific_handle_test.dart
index 4548c70..dcb5e38 100644
--- a/tests/ffi/vmspecific_handle_test.dart
+++ b/tests/ffi/vmspecific_handle_test.dart
@@ -23,6 +23,7 @@
   testDeepException2();
   testNull();
   testDeepRecursive();
+  testNoHandlePropagateError();
 }
 
 void testHandle() {
@@ -220,6 +221,19 @@
   Expect.isTrue(identical(someObject, result));
 }
 
+void testNoHandlePropagateError() {
+  bool throws = false;
+  try {
+    final result = propagateErrorWithoutHandle(exceptionHandleCallbackPointer);
+    print(result);
+  } catch (e) {
+    throws = true;
+    print("caught ($e)");
+    Expect.isTrue(identical(someException, e));
+  }
+  Expect.isTrue(throws);
+}
+
 final testLibrary = dlopenPlatformSpecific("ffi_test_functions");
 
 final passObjectToC = testLibrary.lookupFunction<Handle Function(Handle),
@@ -247,3 +261,8 @@
         Handle, Pointer<NativeFunction<Handle Function(Int64)>>, Int64),
     Object Function(Object, Pointer<NativeFunction<Handle Function(Int64)>>,
         int)>("HandleRecursion");
+
+final propagateErrorWithoutHandle = testLibrary.lookupFunction<
+        Int64 Function(Pointer<NativeFunction<Handle Function()>>),
+        int Function(Pointer<NativeFunction<Handle Function()>>)>(
+    "PropagateErrorWithoutHandle");
diff --git a/tests/ffi_2/vmspecific_handle_test.dart b/tests/ffi_2/vmspecific_handle_test.dart
index 85afae4..b7416e7 100644
--- a/tests/ffi_2/vmspecific_handle_test.dart
+++ b/tests/ffi_2/vmspecific_handle_test.dart
@@ -23,6 +23,7 @@
   testDeepException2();
   testNull();
   testDeepRecursive();
+  testNoHandlePropagateError();
 }
 
 void testHandle() {
@@ -220,6 +221,19 @@
   Expect.isTrue(identical(someObject, result));
 }
 
+void testNoHandlePropagateError() {
+  bool throws = false;
+  try {
+    final result = propagateErrorWithoutHandle(exceptionHandleCallbackPointer);
+    print(result);
+  } catch (e) {
+    throws = true;
+    print("caught ($e)");
+    Expect.isTrue(identical(someException, e));
+  }
+  Expect.isTrue(throws);
+}
+
 final testLibrary = dlopenPlatformSpecific("ffi_test_functions");
 
 final passObjectToC = testLibrary.lookupFunction<Handle Function(Handle),
@@ -247,3 +261,8 @@
         Handle, Pointer<NativeFunction<Handle Function(Int64)>>, Int64),
     Object Function(Object, Pointer<NativeFunction<Handle Function(Int64)>>,
         int)>("HandleRecursion");
+
+final propagateErrorWithoutHandle = testLibrary.lookupFunction<
+        Int64 Function(Pointer<NativeFunction<Handle Function()>>),
+        int Function(Pointer<NativeFunction<Handle Function()>>)>(
+    "PropagateErrorWithoutHandle");
diff --git a/tests/language/call/constructor_on_unresolvable_class_test.dart b/tests/language/call/constructor_on_unresolvable_class_test.dart
index f3fa482..3b32987 100644
--- a/tests/language/call/constructor_on_unresolvable_class_test.dart
+++ b/tests/language/call/constructor_on_unresolvable_class_test.dart
@@ -11,14 +11,14 @@
 main() {
   new A();
   //  ^
-  // [analyzer] STATIC_WARNING.NEW_WITH_NON_TYPE
+  // [analyzer] STATIC_WARNING.CREATION_WITH_NON_TYPE
   // [cfe] Method not found: 'A'.
   new A.foo();
   //  ^^^^^
-  // [analyzer] STATIC_WARNING.NEW_WITH_NON_TYPE
+  // [analyzer] STATIC_WARNING.CREATION_WITH_NON_TYPE
   // [cfe] Method not found: 'A.foo'.
   new lib.A();
   //  ^^^^^
-  // [analyzer] STATIC_WARNING.NEW_WITH_NON_TYPE
+  // [analyzer] STATIC_WARNING.CREATION_WITH_NON_TYPE
   // [cfe] Method not found: 'lib.A'.
 }
diff --git a/tests/language/class/variable_shadow_class_test.dart b/tests/language/class/variable_shadow_class_test.dart
index 35a1fda..5e24390 100644
--- a/tests/language/class/variable_shadow_class_test.dart
+++ b/tests/language/class/variable_shadow_class_test.dart
@@ -16,7 +16,7 @@
     // Now this refers to the variable.
     var i = new Test.named(10);
     //          ^^^^^^^^^^
-    // [analyzer] STATIC_WARNING.NEW_WITH_NON_TYPE
+    // [analyzer] STATIC_WARNING.CREATION_WITH_NON_TYPE
     //          ^^^^
     // [cfe] Method not found: 'Test.named'.
     Expect.equals(10, i.field);
diff --git a/tests/language/closure/with_super_field_test.dart b/tests/language/closure/with_super_field_test.dart
index 68cc3be..603c0f6 100644
--- a/tests/language/closure/with_super_field_test.dart
+++ b/tests/language/closure/with_super_field_test.dart
@@ -3,10 +3,8 @@
 // BSD-style license that can be found in the LICENSE file.
 
 import "package:expect/expect.dart";
-import "package:meta/meta.dart" show virtual;
 
 class A {
-  @virtual
   int a;
   A() : a = 42;
 }
diff --git a/tests/language/const/constructor_nonconst_field_test.dart b/tests/language/const/constructor_nonconst_field_test.dart
index d2e7030..3533842 100644
--- a/tests/language/const/constructor_nonconst_field_test.dart
+++ b/tests/language/const/constructor_nonconst_field_test.dart
@@ -10,7 +10,7 @@
   // [cfe] Method invocation is not a constant expression.
   final int j = 1;
   const A();
-//^^^^^^^^^^
+//^^^^^
 // [analyzer] COMPILE_TIME_ERROR.CONST_CONSTRUCTOR_WITH_FIELD_INITIALIZED_BY_NON_CONST
 }
 
diff --git a/tests/language/constructor/named_constructor_test.dart b/tests/language/constructor/named_constructor_test.dart
index 915f147..12a58b1 100644
--- a/tests/language/constructor/named_constructor_test.dart
+++ b/tests/language/constructor/named_constructor_test.dart
@@ -36,13 +36,13 @@
   // 'prefix' is not a type:
   new prefix<int>.Class().value;
   //  ^^^^^^
-  // [analyzer] STATIC_WARNING.NEW_WITH_NON_TYPE
+  // [analyzer] STATIC_WARNING.CREATION_WITH_NON_TYPE
   // [cfe] Method not found: 'prefix.Class'.
   new prefix.Class<int>().value;
   // 'prefix<int>.Class<int>' doesn't fit the grammar syntax T.id:
   new prefix<int>.Class<int>().value;
   //  ^^^^^^
-  // [analyzer] STATIC_WARNING.NEW_WITH_NON_TYPE
+  // [analyzer] STATIC_WARNING.CREATION_WITH_NON_TYPE
   // [cfe] Method not found: 'prefix.Class'.
   //              ^^^^^
   // [analyzer] STATIC_TYPE_WARNING.WRONG_NUMBER_OF_TYPE_ARGUMENTS_CONSTRUCTOR
@@ -52,7 +52,7 @@
   // 'prefix<int>.Class.named' doesn't fit the grammar syntax T.id:
   new prefix<int>.Class.named().value;
   //  ^^^^^^
-  // [analyzer] STATIC_WARNING.NEW_WITH_NON_TYPE
+  // [analyzer] STATIC_WARNING.CREATION_WITH_NON_TYPE
   // [cfe] Method not found: 'prefix.Class'.
   //              ^^^^^
   // [analyzer] SYNTACTIC_ERROR.EXPECTED_TOKEN
@@ -70,7 +70,7 @@
   // 'prefix<int>.Class<int>' doesn't fit the grammar syntax T.id:
   new prefix<int>.Class<int>.named().value;
   //  ^^^^^^
-  // [analyzer] STATIC_WARNING.NEW_WITH_NON_TYPE
+  // [analyzer] STATIC_WARNING.CREATION_WITH_NON_TYPE
   // [cfe] Method not found: 'prefix.Class'.
   //              ^^^^^
   // [analyzer] STATIC_TYPE_WARNING.WRONG_NUMBER_OF_TYPE_ARGUMENTS_CONSTRUCTOR
@@ -80,7 +80,7 @@
   // 'prefix<int>.Class.named<int>' doesn't fit the grammar syntax T.id:
   new prefix<int>.Class.named<int>().value;
   //  ^^^^^^
-  // [analyzer] STATIC_WARNING.NEW_WITH_NON_TYPE
+  // [analyzer] STATIC_WARNING.CREATION_WITH_NON_TYPE
   // [cfe] Method not found: 'prefix.Class'.
   //              ^^^^^
   // [analyzer] SYNTACTIC_ERROR.EXPECTED_TOKEN
@@ -96,7 +96,7 @@
   // 'prefix<int>.Class<int>.named<int>' doesn't fit the grammar syntax T.id:
   new prefix<int>.Class<int>.named<int>().value;
   //  ^^^^^^
-  // [analyzer] STATIC_WARNING.NEW_WITH_NON_TYPE
+  // [analyzer] STATIC_WARNING.CREATION_WITH_NON_TYPE
   // [cfe] Method not found: 'prefix.Class'.
   //              ^^^^^
   // [analyzer] STATIC_TYPE_WARNING.WRONG_NUMBER_OF_TYPE_ARGUMENTS_CONSTRUCTOR
diff --git a/tests/language/constructor/reference_test.dart b/tests/language/constructor/reference_test.dart
index cecfbf3..7aab1ff 100644
--- a/tests/language/constructor/reference_test.dart
+++ b/tests/language/constructor/reference_test.dart
@@ -13,7 +13,7 @@
   new Foo.bar();
   new Foo.bar.baz();
   //  ^^^^^^^
-  // [analyzer] STATIC_WARNING.NEW_WITH_NON_TYPE
+  // [analyzer] STATIC_WARNING.CREATION_WITH_NON_TYPE
   //          ^
   // [cfe] Method not found: 'Foo.bar.baz'.
   new Foo<int>();
@@ -34,12 +34,12 @@
   //      ^
   // [cfe] A constructor invocation can't have type arguments on the constructor name.
   //  ^^^^^^^
-  // [analyzer] STATIC_WARNING.NEW_WITH_NON_TYPE
+  // [analyzer] STATIC_WARNING.CREATION_WITH_NON_TYPE
   //               ^
   // [cfe] Method not found: 'Foo.bar.baz'.
   new Foo.bar.baz<int>();
   //  ^^^^^^^
-  // [analyzer] STATIC_WARNING.NEW_WITH_NON_TYPE
+  // [analyzer] STATIC_WARNING.CREATION_WITH_NON_TYPE
   //          ^^^
   // [analyzer] STATIC_TYPE_WARNING.WRONG_NUMBER_OF_TYPE_ARGUMENTS_CONSTRUCTOR
   // [cfe] A constructor invocation can't have type arguments on the constructor name.
@@ -50,7 +50,7 @@
   const Foo.bar();
   const Foo.bar.baz();
   //    ^^^^^^^
-  // [analyzer] COMPILE_TIME_ERROR.CONST_WITH_NON_TYPE
+  // [analyzer] COMPILE_TIME_ERROR.CREATION_WITH_NON_TYPE
   //            ^
   // [cfe] Method not found: 'Foo.bar.baz'.
   const Foo<int>();
@@ -71,12 +71,12 @@
   //        ^
   // [cfe] A constructor invocation can't have type arguments on the constructor name.
   //    ^^^^^^^
-  // [analyzer] COMPILE_TIME_ERROR.CONST_WITH_NON_TYPE
+  // [analyzer] COMPILE_TIME_ERROR.CREATION_WITH_NON_TYPE
   //                 ^
   // [cfe] Method not found: 'Foo.bar.baz'.
   const Foo.bar.baz<int>();
   //    ^^^^^^^
-  // [analyzer] COMPILE_TIME_ERROR.CONST_WITH_NON_TYPE
+  // [analyzer] COMPILE_TIME_ERROR.CREATION_WITH_NON_TYPE
   //            ^^^
   // [analyzer] STATIC_TYPE_WARNING.WRONG_NUMBER_OF_TYPE_ARGUMENTS_CONSTRUCTOR
   // [cfe] A constructor invocation can't have type arguments on the constructor name.
@@ -107,7 +107,7 @@
   //  ^
   // [cfe] A constructor invocation can't have type arguments on the constructor name.
 //^^^^^^^
-// [analyzer] STATIC_WARNING.NEW_WITH_NON_TYPE
+// [analyzer] STATIC_WARNING.CREATION_WITH_NON_TYPE
   //           ^
   // [cfe] Method not found: 'Foo.bar.baz'.
   Foo.bar.baz<int>();
diff --git a/tests/language/external_abstract_fields/abstract_fields_error_test.dart b/tests/language/external_abstract_fields/abstract_fields_error_test.dart
new file mode 100644
index 0000000..317b8ca
--- /dev/null
+++ b/tests/language/external_abstract_fields/abstract_fields_error_test.dart
@@ -0,0 +1,71 @@
+// Copyright (c) 2020, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// Check that abstract instance variable declarations are abstract and
+// do not allow more than they should.
+
+// Check that abstract declarations are abstract.
+class Abstract1 {
+  // The class is not abstract and does not have an implementation of `x`.
+  abstract int x;
+  //           ^
+  // [analyzer] unspecified
+  // [cfe] unspecified
+}
+
+// Check that class has expected interface.
+abstract class Abstract2 {
+  // Getter only.
+  abstract final int x;
+  // Getter and setter.
+  abstract covariant String y;
+
+  static void staticTest(Abstract2 a) {
+    int x = a.x;
+
+    // Cannot assign to final field.
+    a.x = 42;
+    //  ^
+    // [analyzer] unspecified
+    // [cfe] unspecified
+
+    String y = a.y;
+    a.y = "ab";
+
+    // Cannot assign something of wrong type, even if covariant.
+    a.y = Object();
+    //    ^^^^^^^^
+    // [analyzer] unspecified
+    // [cfe] unspecified
+  }
+
+  void test() {
+    int x = this.x;
+
+    // Cannot assign to final field.
+    this.x = 42;
+    //     ^
+    // [analyzer] unspecified
+    // [cfe] unspecified
+
+    String y = this.y;
+    this.y = "ab";
+
+    // Cannot assign something of wrong type, even if covariant.
+    this.y = Object();
+    //       ^^^^^^^^
+    // [analyzer] unspecified
+    // [cfe] unspecified
+  }
+}
+
+class Concrete2 implements Abstract2 {
+  final int x;
+  String y;
+}
+
+void main() {
+  Abstract2.staticTest(throw 0);
+  Concrete2().test();
+}
diff --git a/tests/language/external_abstract_fields/abstract_fields_syntax_error_test.dart b/tests/language/external_abstract_fields/abstract_fields_syntax_error_test.dart
new file mode 100644
index 0000000..71998c9
--- /dev/null
+++ b/tests/language/external_abstract_fields/abstract_fields_syntax_error_test.dart
@@ -0,0 +1,52 @@
+// Copyright (c) 2020, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// Check that abstract instance variable declarations are abstract and
+// do not allow more than they should.
+
+// Top-level declarations cannot be abstract.
+abstract int top0; //# 1: syntax error
+abstract var top1; //# 2: syntax error
+abstract final top2; //# 3: syntax error
+abstract final int top3; //# 4: syntax error
+abstract covariant int top4; //# 5: syntax error
+abstract covariant var top5; //# 6: syntax error
+
+// Check that only the syntactically correct declarations are allowed.
+abstract class C {
+  // Abstract fields cannot have initializers.
+  abstract int init1 = 0; //# 7: syntax error
+
+  // Abstract fields cannot be late.
+  abstract late int late1; //# 8: syntax error
+
+  // Abstract fields cannot be late and final.
+  abstract late final int late2; //# 9: syntax error
+
+  // Abstract fields cannot be static.
+  abstract static int static1; //# 10: syntax error
+
+  /// Static fields cannot be abstract.
+  static abstract int static2; //# 11: syntax error
+
+  /// Abstract fields cannot be const (because const fields must be static).
+  abstract const int const1; //# 12: syntax error
+
+  /// Abstract fields cannot be static const.
+  abstract static const int staticConst1; //# 13: syntax error
+
+  // Abstract fields cannot be final and covariant (because no declaration can).
+  abstract covariant final int covariant1; //# 14: syntax error
+
+  // Abstract fields cannot be final and covariant (because no declaration can).
+  abstract final covariant int covariant2; //# 15: syntax error
+}
+
+void main() {
+  // No abstract local variables
+  abstract var x; //# 16: syntax error
+
+  // Make sure `C` is in use.
+  print(C);
+}
diff --git a/tests/language/external_abstract_fields/abstract_fields_test.dart b/tests/language/external_abstract_fields/abstract_fields_test.dart
new file mode 100644
index 0000000..8deca66
--- /dev/null
+++ b/tests/language/external_abstract_fields/abstract_fields_test.dart
@@ -0,0 +1,143 @@
+// Copyright (c) 2020, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+/// Checks that abstract instance variable declarations are allowed.
+
+import "package:expect/expect.dart";
+
+// Valid declarations for abstract class.
+abstract class C {
+  abstract int x1, x2;
+  abstract var y1, y2, y3; // infers dynamic.
+  abstract final z;
+  abstract final int u1, u2;
+  abstract covariant int v1, v2, v3;
+  abstract covariant var w;
+}
+
+class D {
+  int x1, x2;
+  var y1, y2, y3;
+  var z;
+  int u1, u2;
+  covariant int v1, v2, v3;
+  covariant var w;
+  D() :
+      x1 = 0,
+      x2 = 0,
+      y1 = 1,
+      y2 = 1,
+      y3 = 1,
+      z = 2,
+      u1 = 3,
+      u2 = 3,
+      v1 = 4,
+      v2 = 4,
+      v3 = 4,
+      w = 5;
+}
+
+/// Valid implementation of abstract interface.
+class E extends D implements C {}
+
+// Valid declarations when superclass has implementation.
+class F extends D { // Class is not abstract.
+  abstract int x1, x2;
+  abstract var y1, y2, y3;
+  abstract final z;
+  abstract final int u1, u2;
+  abstract covariant int v1, v2, v3;
+  abstract covariant var w;
+}
+
+// Records accesses.
+class Logger {
+  Symbol? lastName;
+  String _x = "x";
+  int _y = 0;
+  String get x {
+    lastName = #x;
+    return _x;
+  }
+  set x(String value) {
+    lastName = #x;
+    _x = value;
+  }
+  int get y {
+    lastName = #y;
+    return 0;
+  }
+  set y(int value) {
+    lastName = #y;
+    _y = value;
+  }
+}
+
+/// Check that abstract declarations do not shadow implementation.
+class Override extends Logger {
+  abstract String x;
+  abstract final int y;
+}
+
+void main() {
+  C c = E();
+  Expect.equals(0, c.x1);
+  Expect.equals(0, c.x2);
+  Expect.equals(1, c.y1);
+  Expect.equals(1, c.y2);
+  Expect.equals(1, c.y3);
+  Expect.equals(2, c.z);
+  Expect.equals(3, c.u1);
+  Expect.equals(3, c.u2);
+  Expect.equals(4, c.v1);
+  Expect.equals(4, c.v2);
+  Expect.equals(4, c.v3);
+  Expect.equals(5, c.w);
+  c.x1 = 6;
+  Expect.equals(6, c.x1);
+  c.y2 = 7;
+  Expect.equals(7, c.y2);
+  c.v3 = 8;
+  Expect.equals(8, c.v3);
+  c.w = 9;
+  Expect.equals(9, c.w);
+
+  // Class F is not abstract and can be instantiated.
+  F f = F();
+  Expect.equals(0, f.x1);
+  Expect.equals(0, f.x2);
+  Expect.equals(1, f.y1);
+  Expect.equals(1, f.y2);
+  Expect.equals(1, f.y3);
+  Expect.equals(2, f.z);
+  Expect.equals(3, f.u1);
+  Expect.equals(3, f.u2);
+  Expect.equals(4, f.v1);
+  Expect.equals(4, f.v2);
+  Expect.equals(4, f.v3);
+  Expect.equals(5, f.w);
+  f.x1 = 6;
+  Expect.equals(6, f.x1);
+  f.y2 = 7;
+  Expect.equals(7, f.y2);
+  f.v3 = 8;
+  Expect.equals(8, f.v3);
+  f.w = 9;
+  Expect.equals(9, f.w);
+
+  // Check that abstract declarations do not shadow superclass implementation.
+  Override o = Override();
+  Expect.equals("x", o.x);
+  Expect.equals(#x, o.lastName);
+  Expect.equals(0, o.y);
+  Expect.equals(#y, o.lastName);
+  o.x = "b";
+  Expect.equals(#x, o.lastName);
+  o.y = 42;
+  Expect.equals(#y, o.lastName);
+  Expect.equals("b", o.x);
+  Expect.equals(#x, o.lastName);
+  Expect.equals(42, o.y);
+  Expect.equals(#y, o.lastName);
+}
diff --git a/tests/language/external_abstract_fields/external_fields_error_test.dart b/tests/language/external_abstract_fields/external_fields_error_test.dart
new file mode 100644
index 0000000..394d6cf
--- /dev/null
+++ b/tests/language/external_abstract_fields/external_fields_error_test.dart
@@ -0,0 +1,42 @@
+// Copyright (c) 2020, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// Check that external variable declarations do not allow more
+// than they should.
+
+// Check that external declarations are not abstract.
+class External1 {
+  external int x;
+}
+
+// Check that class has expected interface.
+class External2 {
+  // Getter only.
+  external final int x;
+  // Getter and setter.
+  external covariant String y;
+
+  static void test(External2 a) {
+    int x = a.x;
+
+    // Cannot assign to final field.
+    a.x = 42;
+    //  ^
+    // [analyzer] unspecified
+    // [cfe] unspecified
+
+    String y = a.y;
+    a.y = "ab";
+
+    // Cannot assign something of wrong type, even if covariant.
+    a.y = Object();
+    //    ^^^^^^^^
+    // [analyzer] unspecified
+    // [cfe] unspecified
+  }
+}
+
+void main() {
+  External2.test(External2());
+}
diff --git a/tests/language/external_abstract_fields/external_fields_syntax_error_test.dart b/tests/language/external_abstract_fields/external_fields_syntax_error_test.dart
new file mode 100644
index 0000000..2ae3671
--- /dev/null
+++ b/tests/language/external_abstract_fields/external_fields_syntax_error_test.dart
@@ -0,0 +1,83 @@
+// Copyright (c) 2020, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// Check that external variable declarations do not allow more
+// than they should.
+
+// Checks that only the syntactically correct declarations are allowed.
+
+// External variables must not have initializers.
+external var topInit = 0; //# 1: syntax error
+
+// External variables must not be const.
+external const topConst; //# 2: syntax error
+
+// External variables must not have be late.
+external late var topLate; //# 3: syntax error
+
+// External variables must not have be abstract
+// (and top-level declaration must not be abstract).
+external abstract var topAbstract1; //# 4: syntax error
+abstract external var topAbstract2; //# 5: syntax error
+
+class StaticMembers {
+  // External static fields cannot have initializers.
+  external static int init1 = 0; //# 6: syntax error
+
+  // External static fields cannot be late.
+  external static late int late1; //# 7: syntax error
+
+  // External static fields cannot be late and final.
+  external static late final int late2; //# 8: syntax error
+
+  // External static fields cannot be const.
+  external static const int const1; //# 9: syntax error
+  external static const int const1 = 0; //# 10: syntax error
+
+  // External static fields cannot be final and covariant.
+  external static covariant final int covariant1; //# 11: syntax error
+  external static final covariant int covariant2; //# 12: syntax error
+
+  // External static fields cannot be abstract.
+  external static abstract int abstract1; //# 13: syntax error
+}
+
+class InstanceMembers {
+  // External fields cannot have initializers.
+  external int init1 = 0; //# 14: syntax error
+
+  // External fields cannot be late.
+  external late int late1; //# 15: syntax error
+
+  // External fields cannot be late and final.
+  external late final int late2; //# 16: syntax error
+
+  // External fields cannot be const.
+  external const int const1; //# 17: syntax error
+
+  // External fields cannot be final and covariant.
+  external covariant final int covariant1; //# 18: syntax error
+  external final covariant int covariant2; //# 19: syntax error
+
+  // External fields cannot be abstract.
+  external abstract int abstract1; //# 20: syntax error
+  abstract external int abstract2; //# 21: syntax error
+}
+
+void main() {
+  // No external local variables
+  external var x; //# 22: syntax error
+
+  // Ensure that the declarations are in use.
+  List _ = [
+    StaticMembers.init1, //# 6: continued
+    StaticMembers.late1, //# 7: continued
+    StaticMembers.late2, //# 8: continued
+    StaticMembers.const1, //# 9: continued
+    StaticMembers.covariant1, //# 10: continued
+    StaticMembers.covariant2, //# 11: continued
+    StaticMembers.abstract1, //# 12: continued
+    InstanceMembers(),
+  ];
+}
diff --git a/tests/language/external_abstract_fields/external_fields_test.dart b/tests/language/external_abstract_fields/external_fields_test.dart
new file mode 100644
index 0000000..58e792f
--- /dev/null
+++ b/tests/language/external_abstract_fields/external_fields_test.dart
@@ -0,0 +1,61 @@
+// Copyright (c) 2020, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// Checks that external variable declarations are allowed.
+// Can only be statically checked, there is no implementation at run-time.
+
+// External variables cannot be abstract, const, late or have an initializer.
+
+external var top1;
+external final top2;
+external int top3;
+external final bool top4;
+
+/// Class C is not abstract.
+class C {
+  external static var static1;
+  external static final static2;
+  external static int static3;
+  external static final bool static4;
+
+  external var instance1;
+  external final instance2;
+  external int instance3;
+  external final bool instance4;
+  external covariant var instance5;
+  external covariant num instance6;
+}
+
+class D extends C {
+  // Valid override. Inherits covariance.
+  external int instance6;
+}
+
+void main() {
+  top1;
+  top1 = 0;
+  top2;
+  top3;
+  top3 = 0;
+  top4;
+
+  C.static1;
+  C.static1 = 0;
+  C.static2;
+  C.static3;
+  C.static3 = 0;
+  C.static4;
+
+  C c = C();
+  c.instance1;
+  c.instance1 = 0;
+  c.instance2;
+  c.instance3;
+  c.instance3 = 0;
+  c.instance4;
+  c.instance5;
+  c.instance5 = 0;
+  c.instance6;
+  c.instance6 = 0;
+}
diff --git a/tests/language/field/override_optimization_test.dart b/tests/language/field/override_optimization_test.dart
index 83ad81e..17e1016 100644
--- a/tests/language/field/override_optimization_test.dart
+++ b/tests/language/field/override_optimization_test.dart
@@ -3,12 +3,9 @@
 // BSD-style license that can be found in the LICENSE file.
 
 import "package:expect/expect.dart";
-import "package:meta/meta.dart";
 
 class A {
-  @virtual
   final dynamic flag = true;
-  @virtual
   final dynamic x = 42;
 }
 
diff --git a/tests/language/generic/instantiate_type_variable_test.dart b/tests/language/generic/instantiate_type_variable_test.dart
index f8df489..e03c49f 100644
--- a/tests/language/generic/instantiate_type_variable_test.dart
+++ b/tests/language/generic/instantiate_type_variable_test.dart
@@ -9,7 +9,7 @@
   dynamic make() {
     return new T();
     //         ^
-    // [analyzer] STATIC_WARNING.NEW_WITH_NON_TYPE
+    // [analyzer] STATIC_WARNING.CREATION_WITH_NON_TYPE
     // [cfe] Method not found: 'T'.
   }
 }
diff --git a/tests/language/implicit_downcast_during/return_async_test.dart b/tests/language/implicit_downcast_during/return_async_test.dart
index aea8c61..a976d1e 100644
--- a/tests/language/implicit_downcast_during/return_async_test.dart
+++ b/tests/language/implicit_downcast_during/return_async_test.dart
@@ -13,14 +13,14 @@
   //     ^^^^^^^^^^^^^^^^
   // [analyzer] STATIC_TYPE_WARNING.RETURN_OF_INVALID_TYPE
   //       ^
-  // [cfe] A value of type 'Future<A>' can't be assigned to a variable of type 'FutureOr<B>'.
+  // [cfe] A value of type 'FutureOr<A>' can't be assigned to a variable of type 'B'.
 }
 
 Future<B> f2(A a) async => a as FutureOr<A>;
 //                         ^^^^^^^^^^^^^^^^
 // [analyzer] STATIC_TYPE_WARNING.RETURN_OF_INVALID_TYPE
 //                           ^
-// [cfe] A value of type 'Future<A>' can't be assigned to a variable of type 'FutureOr<B>'.
+// [cfe] A value of type 'FutureOr<A>' can't be assigned to a variable of type 'B'.
 
 main() async {
   Object b;
diff --git a/tests/language/invalid_returns/async_invalid_return_26_test.dart b/tests/language/invalid_returns/async_invalid_return_26_test.dart
new file mode 100644
index 0000000..d99d60c
--- /dev/null
+++ b/tests/language/invalid_returns/async_invalid_return_26_test.dart
@@ -0,0 +1,26 @@
+// 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:async';
+
+/* `return exp;` where `exp` has static type `S` is an error if the future
+ * value type of the function is neither `void` nor `dynamic`,
+ * and `flatten(S)` is `void` or `void*`.
+ *
+ * With null-safety, this is an error because of the downcast and the use of
+ * an expression of type `void`.
+ */
+
+void v = null;
+
+Future<int> test() async {
+  return v;
+  //     ^
+  // [analyzer] STATIC_TYPE_WARNING.RETURN_OF_INVALID_TYPE
+  // [cfe] This expression has type 'void' and can't be used.
+}
+
+void main() {
+  test();
+}
diff --git a/tests/language/invalid_returns/async_invalid_return_27_test.dart b/tests/language/invalid_returns/async_invalid_return_27_test.dart
new file mode 100644
index 0000000..6b2faba
--- /dev/null
+++ b/tests/language/invalid_returns/async_invalid_return_27_test.dart
@@ -0,0 +1,25 @@
+// 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:async';
+
+/* `return exp;` where `exp` has static type `S` is an error if the future
+ * value type of the function is neither `void` nor `dynamic`,
+ * and `flatten(S)` is `void` or `void*`.
+ *
+ * With null-safety, this is an error because of the downcast.
+ */
+
+Future<void> v = Future.value(null);
+
+Future<int> test() async {
+  return v;
+  //     ^
+  // [analyzer] STATIC_TYPE_WARNING.RETURN_OF_INVALID_TYPE
+  // [cfe] This expression has type 'void' and can't be used.
+}
+
+void main() {
+  test();
+}
diff --git a/tests/language/invalid_returns/async_invalid_return_28_test.dart b/tests/language/invalid_returns/async_invalid_return_28_test.dart
new file mode 100644
index 0000000..416b127
--- /dev/null
+++ b/tests/language/invalid_returns/async_invalid_return_28_test.dart
@@ -0,0 +1,25 @@
+// 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:async';
+
+/* `return exp;` where `exp` has static type `S` is an error if the future
+ * value type of the function is neither `void` nor `dynamic`,
+ * and `flatten(S)` is `void` or `void*`.
+ *
+ * With null-safety, this is an error because of the downcast.
+ */
+
+FutureOr<void> v = null;
+
+Future<int> test() async {
+  return v;
+  //     ^
+  // [analyzer] STATIC_TYPE_WARNING.RETURN_OF_INVALID_TYPE
+  // [cfe] This expression has type 'void' and can't be used.
+}
+
+void main() {
+  test();
+}
diff --git a/tests/language/invalid_returns/async_invalid_return_29_test.dart b/tests/language/invalid_returns/async_invalid_return_29_test.dart
new file mode 100644
index 0000000..dd8a9e2
--- /dev/null
+++ b/tests/language/invalid_returns/async_invalid_return_29_test.dart
@@ -0,0 +1,26 @@
+// 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:async';
+
+/* `return exp;` where `exp` has static type `S` is an error if the future
+ * value type of the function is neither `void` nor `dynamic`,
+ * and `flatten(S)` is `void` or `void*`.
+ *
+ * With null-safety, this is an error because of the downcast and the use of
+ * an expression of type `void`.
+ */
+
+void v = null;
+
+FutureOr<int> test() async {
+  return v;
+  //     ^
+  // [analyzer] STATIC_TYPE_WARNING.RETURN_OF_INVALID_TYPE
+  // [cfe] This expression has type 'void' and can't be used.
+}
+
+void main() {
+  test();
+}
diff --git a/tests/language/invalid_returns/async_invalid_return_30_test.dart b/tests/language/invalid_returns/async_invalid_return_30_test.dart
new file mode 100644
index 0000000..605f4c9
--- /dev/null
+++ b/tests/language/invalid_returns/async_invalid_return_30_test.dart
@@ -0,0 +1,25 @@
+// 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:async';
+
+/* `return exp;` where `exp` has static type `S` is an error if the future
+ * value type of the function is neither `void` nor `dynamic`,
+ * and `flatten(S)` is `void` or `void*`.
+ *
+ * With null-safety, this is an error because of the downcast.
+ */
+
+Future<void> v = Future.value(null);
+
+FutureOr<int> test() async {
+  return v;
+  //     ^
+  // [analyzer] STATIC_TYPE_WARNING.RETURN_OF_INVALID_TYPE
+  // [cfe] This expression has type 'void' and can't be used.
+}
+
+void main() {
+  test();
+}
diff --git a/tests/language/invalid_returns/async_invalid_return_31_test.dart b/tests/language/invalid_returns/async_invalid_return_31_test.dart
new file mode 100644
index 0000000..9d5ac6c
--- /dev/null
+++ b/tests/language/invalid_returns/async_invalid_return_31_test.dart
@@ -0,0 +1,25 @@
+// 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:async';
+
+/* `return exp;` where `exp` has static type `S` is an error if the future
+ * value type of the function is neither `void` nor `dynamic`,
+ * and `flatten(S)` is `void` or `void*`.
+ *
+ * With null-safety, this is an error because of the downcast.
+ */
+
+FutureOr<void> v = null;
+
+FutureOr<int> test() async {
+  return v;
+  //     ^
+  // [analyzer] STATIC_TYPE_WARNING.RETURN_OF_INVALID_TYPE
+  // [cfe] This expression has type 'void' and can't be used.
+}
+
+void main() {
+  test();
+}
diff --git a/tests/language/malformed/malformed_test.dart b/tests/language/malformed/malformed_test.dart
index 4b35615..54b6a7c 100644
--- a/tests/language/malformed/malformed_test.dart
+++ b/tests/language/malformed/malformed_test.dart
@@ -105,11 +105,11 @@
 
   new undeclared_prefix.Unresolved();
   //  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-  // [analyzer] STATIC_WARNING.NEW_WITH_NON_TYPE
+  // [analyzer] STATIC_WARNING.CREATION_WITH_NON_TYPE
   // [cfe] Method not found: 'undeclared_prefix.Unresolved'.
   new undeclared_prefix.Unresolved<int>();
   //  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-  // [analyzer] STATIC_WARNING.NEW_WITH_NON_TYPE
+  // [analyzer] STATIC_WARNING.CREATION_WITH_NON_TYPE
   // [cfe] Method not found: 'undeclared_prefix.Unresolved'.
 
   try {
diff --git a/tests/language/method/not_found_test.dart b/tests/language/method/not_found_test.dart
index 1eaea26..4755cba 100644
--- a/tests/language/method/not_found_test.dart
+++ b/tests/language/method/not_found_test.dart
@@ -13,7 +13,7 @@
   // [analyzer] COMPILE_TIME_ERROR.IMPLICIT_THIS_REFERENCE_IN_INITIALIZER
   // [cfe] Method not found: 'B'.
   //                         ^
-  // [analyzer] COMPILE_TIME_ERROR.CONST_WITH_NON_TYPE
+  // [analyzer] COMPILE_TIME_ERROR.CREATION_WITH_NON_TYPE
   // [cfe] Can't access 'this' in a field initializer to read 'B'.
 }
 
diff --git a/tests/language/new/create_unresolved_type_test.dart b/tests/language/new/create_unresolved_type_test.dart
index b1ce560..6d215ab 100644
--- a/tests/language/new/create_unresolved_type_test.dart
+++ b/tests/language/new/create_unresolved_type_test.dart
@@ -5,6 +5,6 @@
 main() {
   new F<int>();
   //  ^
-  // [analyzer] STATIC_WARNING.NEW_WITH_NON_TYPE
+  // [analyzer] STATIC_WARNING.CREATION_WITH_NON_TYPE
   // [cfe] Method not found: 'F'.
 }
diff --git a/tests/language/new/expression_type_args_test.dart b/tests/language/new/expression_type_args_test.dart
index debf248..b32f0e1 100644
--- a/tests/language/new/expression_type_args_test.dart
+++ b/tests/language/new/expression_type_args_test.dart
@@ -7,11 +7,11 @@
   // Can't instantiate type parameter (within static or instance method).
   m1() => new T();
   //          ^
-  // [analyzer] STATIC_WARNING.NEW_WITH_NON_TYPE
+  // [analyzer] STATIC_WARNING.CREATION_WITH_NON_TYPE
   // [cfe] Method not found: 'T'.
   static m2() => new T();
   //                 ^
-  // [analyzer] STATIC_WARNING.NEW_WITH_NON_TYPE
+  // [analyzer] STATIC_WARNING.CREATION_WITH_NON_TYPE
   // [cfe] Method not found: 'T'.
   //                 ^
   // [analyzer] STATIC_WARNING.TYPE_PARAMETER_REFERENCED_BY_STATIC
diff --git a/tests/language/new/prefix_test.dart b/tests/language/new/prefix_test.dart
index 72794c8..bef0d69 100644
--- a/tests/language/new/prefix_test.dart
+++ b/tests/language/new/prefix_test.dart
@@ -7,6 +7,6 @@
 main() {
   return new prefix();
   //         ^^^^^^
-  // [analyzer] STATIC_WARNING.NEW_WITH_NON_TYPE
+  // [analyzer] STATIC_WARNING.CREATION_WITH_NON_TYPE
   // [cfe] Method not found: 'prefix'.
 }
diff --git a/tests/language/nonfunction_type_aliases/aliased_cyclic_superclass_error_test.dart b/tests/language/nonfunction_type_aliases/aliased_cyclic_superclass_error_test.dart
new file mode 100644
index 0000000..0000f30
--- /dev/null
+++ b/tests/language/nonfunction_type_aliases/aliased_cyclic_superclass_error_test.dart
@@ -0,0 +1,14 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// SharedOptions=--enable-experiment=nonfunction-type-aliases
+
+typedef T = C;
+
+class C extends T {}
+//    ^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+main() => C();
diff --git a/tests/language/nonfunction_type_aliases/generic_aliased_supertype_test.dart b/tests/language/nonfunction_type_aliases/generic_aliased_supertype_test.dart
new file mode 100644
index 0000000..3eed540
--- /dev/null
+++ b/tests/language/nonfunction_type_aliases/generic_aliased_supertype_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.
+
+// SharedOptions=--enable-experiment=nonfunction-type-aliases
+
+class A<X> {}
+
+typedef A1<Y> = A<Y>;
+typedef A2<U, Z> = A1<A<Z>>;
+typedef A3<W> = A2<int, A<W>>;
+
+class B extends A3<B> {}
+
+void f(A<A<A<B>>> a) {}
+
+void main() {
+  f(B());
+}
diff --git a/tests/language/nonfunction_type_aliases/generic_usage_class_error_test.dart b/tests/language/nonfunction_type_aliases/generic_usage_class_error_test.dart
new file mode 100644
index 0000000..db5c366
--- /dev/null
+++ b/tests/language/nonfunction_type_aliases/generic_usage_class_error_test.dart
@@ -0,0 +1,38 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// SharedOptions=--enable-experiment=nonfunction-type-aliases
+
+import 'dart:async';
+
+// Introduce an aliased type.
+
+class A<X> {
+  A();
+  A.named();
+  static void staticMethod<Y>() {}
+}
+
+typedef T<X> = A<X>;
+
+// Use the aliased type.
+
+abstract class C {}
+
+abstract class D2 extends C with T<int> {}
+//             ^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+abstract class D4 = C with T<void>;
+//             ^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+main() {
+  T<List<List<List<List>>>>.staticMethod<T<int>>();
+  //                        ^
+  // [analyzer] unspecified
+  // [cfe] unspecified
+}
diff --git a/tests/language/nonfunction_type_aliases/generic_usage_class_test.dart b/tests/language/nonfunction_type_aliases/generic_usage_class_test.dart
new file mode 100644
index 0000000..e43cd7c
--- /dev/null
+++ b/tests/language/nonfunction_type_aliases/generic_usage_class_test.dart
@@ -0,0 +1,71 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// SharedOptions=--enable-experiment=nonfunction-type-aliases
+
+import 'dart:async';
+
+// Introduce an aliased type.
+
+class A<X> {
+  A();
+  A.named();
+  static void staticMethod<Y>() {}
+}
+
+typedef T<X> = A<X>;
+
+// Use the aliased type.
+
+T<int>? v1;
+List<T<void>> v2 = [];
+final T<String> v3 = throw "Anything";
+const List<T<C>> v4 = [];
+const v5 = <Type, Type>{T: T};
+
+abstract class C {
+  static T<C>? v1;
+  static List<T<T>> v2 = [];
+  static final T<Null> v3 = throw "Anything";
+  static const List<T<List>> v4 = [];
+
+  T<C>? v5;
+  List<T<T>> v6 = [];
+  final T<Null> v7;
+
+  C(): v7 = T<Null>();
+  C.name1(this.v5, this.v7);
+  factory C.name2(T<C> arg1, T<Null> arg2) = C.name1;
+
+  T<double> operator +(T<double> other);
+  T<FutureOr<FutureOr<void>>> get g;
+  set g(T<FutureOr<FutureOr<void>>> value);
+  Map<T<C>, T<C>> m1(covariant T<C> arg1, [Set<Set<T<C>>> arg2]);
+  void m2({T arg1, Map<T, T> arg2(T Function(T) arg21, T arg22)});
+}
+
+class D1<X> extends T<X> {}
+abstract class D3<X, Y> implements T<T> {}
+
+extension E on T<dynamic> {
+  T<dynamic> foo(T<dynamic> t) => t;
+}
+
+X foo<X>(X x) => x;
+
+T<Object> Function(T<Object>) id = (x) => x;
+
+main() {
+  var v8 = <T<C>>[];
+  var v9 = <Set<T<T>>, Set<T<T>>>{{}: {}};
+  var v10 = {v8};
+  v9[{}] = {T<T>()};
+  Set<List<T<C>>> v11 = v10;
+  v10 = v11;
+  T<Null>();
+  T<Null>.named();
+  T<Object> v12 = foo<T<bool>>(T<bool>());
+  id(v12);
+  T.staticMethod<T<int>>();
+}
diff --git a/tests/language/nonfunction_type_aliases/generic_usage_dynamic_error_test.dart b/tests/language/nonfunction_type_aliases/generic_usage_dynamic_error_test.dart
new file mode 100644
index 0000000..fd700d0
--- /dev/null
+++ b/tests/language/nonfunction_type_aliases/generic_usage_dynamic_error_test.dart
@@ -0,0 +1,72 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// SharedOptions=--enable-experiment=nonfunction-type-aliases
+
+import 'dart:async';
+
+// Introduce an aliased type.
+
+typedef T<X> = dynamic;
+
+// Use the aliased type.
+
+abstract class C {
+  final T<Null> v7;
+
+  C(): v7 = T();
+  //        ^
+  // [analyzer] unspecified
+  // [cfe] unspecified
+}
+
+class D1<X> extends T<X> {}
+//    ^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+abstract class D2 extends C with T<int> {}
+//             ^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+abstract class D3<X, Y> implements T<T> {}
+//             ^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+abstract class D4 = C with T<void>;
+//             ^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+X foo<X>(X x) => x;
+
+main() {
+  var v9 = <Set<T<T>>, Set<T<T>>>{{}: {}};
+  v9[{}] = {T<T>()};
+  //        ^
+  // [analyzer] unspecified
+  // [cfe] unspecified
+
+  T<Null>();
+//^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+  T<Null>.named();
+//^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+  T<Object> v12 = foo<T<bool>>(T<bool>());
+  //                           ^
+  // [analyzer] unspecified
+  // [cfe] unspecified
+
+  T<List<List<List<List>>>>.staticMethod<T<int>>();
+//^
+// [analyzer] unspecified
+// [cfe] unspecified
+}
diff --git a/tests/language/nonfunction_type_aliases/generic_usage_dynamic_test.dart b/tests/language/nonfunction_type_aliases/generic_usage_dynamic_test.dart
new file mode 100644
index 0000000..a9753d9
--- /dev/null
+++ b/tests/language/nonfunction_type_aliases/generic_usage_dynamic_test.dart
@@ -0,0 +1,56 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// SharedOptions=--enable-experiment=nonfunction-type-aliases
+
+import 'dart:async';
+
+// Introduce an aliased type.
+
+typedef T<X> = dynamic;
+
+// Use the aliased type.
+
+T<int>? v1;
+List<T<void>> v2 = [];
+final T<String> v3 = throw "Anything";
+const List<T<C>> v4 = [];
+const v5 = <Type, Type>{T: T};
+
+abstract class C {
+  static T<C>? v1;
+  static List<T<T>> v2 = [];
+  static final T<Null> v3 = throw "Anything";
+  static const List<T<List>> v4 = [];
+
+  T<C>? v5;
+  List<T<T>> v6 = [];
+  final T<Null> v7;
+
+  C.name1(this.v5, this.v7);
+  factory C.name2(T<C> arg1, T<Null> arg2) = C.name1;
+
+  T<double> operator +(T<double> other);
+  T<FutureOr<FutureOr<void>>> get g;
+  set g(T<FutureOr<FutureOr<void>>> value);
+  Map<T<C>, T<C>> m1(covariant T<C> arg1, [Set<Set<T<C>>> arg2]);
+  void m2({T arg1, Map<T, T> arg2(T Function(T) arg21, T arg22)});
+}
+
+extension E on T<dynamic> {
+  T<dynamic> foo(T<dynamic> t) => t;
+}
+
+X foo<X>(X x) => x;
+
+T<Type> Function(T<Type>)? id;
+
+main() {
+  var v8 = <T<C>>[];
+  var v9 = <Set<T<T>>, Set<T<T>>>{{}: {}};
+  var v10 = {v8};
+  v9[{}] = {};
+  Set<List<T<C>>> v11 = v10;
+  v10 = v11;
+}
diff --git a/tests/language/nonfunction_type_aliases/generic_usage_function_error_test.dart b/tests/language/nonfunction_type_aliases/generic_usage_function_error_test.dart
new file mode 100644
index 0000000..9251d61
--- /dev/null
+++ b/tests/language/nonfunction_type_aliases/generic_usage_function_error_test.dart
@@ -0,0 +1,52 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// SharedOptions=--enable-experiment=nonfunction-type-aliases
+
+import 'dart:async';
+
+// Introduce an aliased type.
+
+typedef T<X> = Function;
+
+// Use the aliased type.
+
+abstract class C {
+  final T<Null> v7;
+
+  C(): v7 = T();
+  //        ^
+  // [analyzer] unspecified
+  // [cfe] unspecified
+}
+
+X foo<X>(X x) => x;
+
+main() {
+  var v9 = <Set<T<T>>, Set<T<T>>>{{}: {}};
+  v9[{}] = {T<T>()};
+  //        ^
+  // [analyzer] unspecified
+  // [cfe] unspecified
+
+  T<Null>();
+//^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+  T<Null>.named();
+//^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+  T<Object> v12 = foo<T<bool>>(T<bool>());
+  //                           ^
+  // [analyzer] unspecified
+  // [cfe] unspecified
+
+  T<List<List<List<List>>>>.staticMethod<T<int>>();
+  //                        ^^^^^^^^^^^^
+  // [analyzer] unspecified
+  // [cfe] unspecified
+}
diff --git a/tests/language/nonfunction_type_aliases/generic_usage_function_test.dart b/tests/language/nonfunction_type_aliases/generic_usage_function_test.dart
new file mode 100644
index 0000000..b74531c
--- /dev/null
+++ b/tests/language/nonfunction_type_aliases/generic_usage_function_test.dart
@@ -0,0 +1,62 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// SharedOptions=--enable-experiment=nonfunction-type-aliases
+
+import 'dart:async';
+
+// Introduce an aliased type.
+
+typedef T<X> = Function;
+
+// Use the aliased type.
+
+T<int>? v1;
+List<T<void>> v2 = [];
+final T<String> v3 = throw "Anything";
+const List<T<C>> v4 = [];
+const v5 = <Type, Type>{T: T};
+
+abstract class C {
+  static T<C>? v1;
+  static List<T<T>> v2 = [];
+  static final T<Null> v3 = throw "Anything";
+  static const List<T<List>> v4 = [];
+
+  T<C>? v5;
+  List<T<T>> v6 = [];
+  final T<Null> v7;
+
+  C(): v7 = print;
+  C.name1(this.v5, this.v7);
+  factory C.name2(T<C> arg1, T<Null> arg2) = C.name1;
+
+  T<double> operator +(T<double> other);
+  T<FutureOr<FutureOr<void>>> get g;
+  set g(T<FutureOr<FutureOr<void>>> value);
+  Map<T<C>, T<C>> m1(covariant T<C> arg1, [Set<Set<T<C>>> arg2]);
+  void m2({T arg1, Map<T, T> arg2(T Function(T) arg21, T arg22)});
+}
+
+class D1<X> extends T<X> {}
+abstract class D2 extends C with T<int> {}
+abstract class D3<X, Y> implements T<T> {}
+abstract class D4 = C with T<void>;
+
+extension E on T<dynamic> {
+  T<dynamic> foo(T<dynamic> t) => t;
+}
+
+X foo<X>(X x) => x;
+
+T<Type> Function(T<Type>)? id;
+
+main() {
+  var v8 = <T<C>>[];
+  var v9 = <Set<T<T>>, Set<T<T>>>{{}: {}};
+  var v10 = {v8};
+  v9[{}] = {};
+  Set<List<T<C>>> v11 = v10;
+  v10 = v11;
+}
diff --git a/tests/language/nonfunction_type_aliases/generic_usage_futureor_error_test.dart b/tests/language/nonfunction_type_aliases/generic_usage_futureor_error_test.dart
new file mode 100644
index 0000000..fd5939c
--- /dev/null
+++ b/tests/language/nonfunction_type_aliases/generic_usage_futureor_error_test.dart
@@ -0,0 +1,73 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// SharedOptions=--enable-experiment=nonfunction-type-aliases
+
+import 'dart:async';
+
+// Introduce an aliased type.
+
+typedef T<X> = FutureOr<X>;
+
+// Use the aliased type.
+
+abstract class C {
+  final T<Null> v7;
+
+  C(): v7 = T();
+  //        ^
+  // [analyzer] unspecified
+  // [cfe] unspecified
+}
+
+class D1<X> extends T<X> {}
+//                  ^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+abstract class D2 extends C with T<int> {}
+//                               ^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+abstract class D3<X, Y> implements T<T> {}
+//                                 ^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+abstract class D4 = C with T<void>;
+//                         ^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+X foo<X>(X x) => x;
+
+main() {
+  var v9 = <Set<T<T>>, Set<T<T>>>{{}: {}};
+  v9[{}] = {T<T>()};
+  //        ^
+  // [analyzer] unspecified
+  // [cfe] unspecified
+
+  T<Null>();
+//^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+  T<Null>.named();
+//^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+
+  T<Object> v12 = foo<T<bool>>(T<bool>());
+  //                           ^
+  // [analyzer] unspecified
+  // [cfe] unspecified
+
+  T<List<List<List<List>>>>.staticMethod<T<int>>();
+  //                        ^^^^^^^^^^^^
+  // [analyzer] unspecified
+  // [cfe] unspecified
+}
diff --git a/tests/language/nonfunction_type_aliases/generic_usage_futureor_test.dart b/tests/language/nonfunction_type_aliases/generic_usage_futureor_test.dart
new file mode 100644
index 0000000..4ae5da9
--- /dev/null
+++ b/tests/language/nonfunction_type_aliases/generic_usage_futureor_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.
+
+// SharedOptions=--enable-experiment=nonfunction-type-aliases
+
+import 'dart:async';
+
+// Introduce an aliased type.
+
+typedef T<X> = FutureOr<X>;
+
+// Use the aliased type.
+
+T<int>? v1;
+List<T<void>> v2 = [];
+final T<String> v3 = throw "Anything";
+const List<T<C>> v4 = [];
+const v5 = <Type, Type>{T: T};
+
+abstract class C {
+  static T<C>? v1;
+  static List<T<T>> v2 = [];
+  static final T<Null> v3 = throw "Anything";
+  static const List<T<List>> v4 = [];
+
+  T<C>? v5;
+  List<T<T>> v6 = [];
+  final T<Null> v7;
+
+  C(): v7 = null;
+  C.name1(this.v5, this.v7);
+  factory C.name2(T<C> arg1, T<Null> arg2) = C.name1;
+
+  T<double> operator +(T<double> other);
+  T<FutureOr<FutureOr<void>>> get g;
+  set g(T<FutureOr<FutureOr<void>>> value);
+  Map<T<C>, T<C>> m1(covariant T<C> arg1, [Set<Set<T<C>>> arg2]);
+  void m2({T arg1, Map<T, T> arg2(T Function(T) arg21, T arg22)});
+}
+
+extension E on T<dynamic> {
+  T<dynamic> foo(T<dynamic> t) => t;
+}
+
+X foo<X>(X x) => x;
+
+T<Type> Function(T<Type>)? id;
+
+main() {
+  var v8 = <T<C>>[];
+  var v9 = <Set<T<T>>, Set<T<T>>>{{}: {}};
+  var v10 = {v8};
+  v9[{}] = {};
+  Set<List<T<C>>> v11 = v10;
+  v10 = v11;
+}
diff --git a/tests/language/nonfunction_type_aliases/generic_usage_null_error_test.dart b/tests/language/nonfunction_type_aliases/generic_usage_null_error_test.dart
new file mode 100644
index 0000000..af1a1b7
--- /dev/null
+++ b/tests/language/nonfunction_type_aliases/generic_usage_null_error_test.dart
@@ -0,0 +1,72 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// SharedOptions=--enable-experiment=nonfunction-type-aliases
+
+import 'dart:async';
+
+// Introduce an aliased type.
+
+typedef T<X> = Null;
+
+// Use the aliased type.
+
+abstract class C {
+  final T<Null> v7;
+
+  C(): v7 = T();
+  //        ^
+  // [analyzer] unspecified
+  // [cfe] unspecified
+}
+
+class D1<X> extends T<X> {}
+//                  ^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+abstract class D2 extends C with T<int> {}
+//                               ^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+abstract class D3<X, Y> implements T<T> {}
+//                                 ^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+abstract class D4 = C with T<void>;
+//                         ^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+X foo<X>(X x) => x;
+
+main() {
+  var v9 = <Set<T<T>>, Set<T<T>>>{{}: {}};
+  v9[{}] = {T<T>()};
+  //        ^
+  // [analyzer] unspecified
+  // [cfe] unspecified
+
+  T<Null>();
+//^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+  T<Null>.named();
+//^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+  T<Object> v12 = foo<T<bool>>(T<bool>());
+  //                           ^
+  // [analyzer] unspecified
+  // [cfe] unspecified
+
+  T<List<List<List<List>>>>.staticMethod<T<int>>();
+  //                        ^^^^^^^^^^^^
+  // [analyzer] unspecified
+  // [cfe] unspecified
+}
diff --git a/tests/language/nonfunction_type_aliases/generic_usage_null_test.dart b/tests/language/nonfunction_type_aliases/generic_usage_null_test.dart
new file mode 100644
index 0000000..235cd1e
--- /dev/null
+++ b/tests/language/nonfunction_type_aliases/generic_usage_null_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.
+
+// SharedOptions=--enable-experiment=nonfunction-type-aliases
+
+import 'dart:async';
+
+// Introduce an aliased type.
+
+typedef T<X> = Null;
+
+// Use the aliased type.
+
+T<int> v1;
+List<T<void>> v2 = [];
+final T<String> v3 = throw "Anything";
+const List<T<C>> v4 = [];
+const v5 = <Type, Type>{T: T};
+
+abstract class C {
+  static T<C> v1;
+  static List<T<T>> v2 = [];
+  static final T<Null> v3 = throw "Anything";
+  static const List<T<List>> v4 = [];
+
+  T<C> v5;
+  List<T<T>> v6 = [];
+  final T<Null> v7;
+
+  C(): v7 = null;
+  C.name1(this.v5, this.v7);
+  factory C.name2(T<C> arg1, T<Null> arg2) = C.name1;
+
+  T<double> operator +(T<double> other);
+  T<FutureOr<FutureOr<void>>> get g;
+  set g(T<FutureOr<FutureOr<void>>> value);
+  Map<T<C>, T<C>> m1(covariant T<C> arg1, [Set<Set<T<C>>> arg2]);
+  void m2({T arg1, Map<T, T> arg2(T Function(T) arg21, T arg22)});
+}
+
+extension E on T<dynamic> {
+  T<dynamic> foo(T<dynamic> t) => t;
+}
+
+X foo<X>(X x) => x;
+
+T<Type> Function(T<Type>)? id;
+
+main() {
+  var v8 = <T<C>>[];
+  var v9 = <Set<T<T>>, Set<T<T>>>{{}: {}};
+  var v10 = {v8};
+  v9[{}] = {};
+  Set<List<T<C>>> v11 = v10;
+  v10 = v11;
+}
diff --git a/tests/language/nonfunction_type_aliases/generic_usage_object_error_test.dart b/tests/language/nonfunction_type_aliases/generic_usage_object_error_test.dart
new file mode 100644
index 0000000..9e72a9e
--- /dev/null
+++ b/tests/language/nonfunction_type_aliases/generic_usage_object_error_test.dart
@@ -0,0 +1,37 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// SharedOptions=--enable-experiment=nonfunction-type-aliases
+
+import 'dart:async';
+
+// Introduce an aliased type.
+
+typedef T<X> = Object;
+
+// Use the aliased type.
+
+abstract class C {}
+
+abstract class D2 extends C with T<int> {}
+//                               ^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+abstract class D4 = C with T<void>;
+//                         ^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+main() {
+  T<Null>.named();
+  //      ^
+  // [analyzer] unspecified
+  // [cfe] unspecified
+
+  T<List<List<List<List>>>>.staticMethod<T<int>>();
+  //                        ^^^^^^^^^^^^
+  // [analyzer] unspecified
+  // [cfe] unspecified
+}
diff --git a/tests/language/nonfunction_type_aliases/generic_usage_object_test.dart b/tests/language/nonfunction_type_aliases/generic_usage_object_test.dart
new file mode 100644
index 0000000..6bafbb8
--- /dev/null
+++ b/tests/language/nonfunction_type_aliases/generic_usage_object_test.dart
@@ -0,0 +1,63 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// SharedOptions=--enable-experiment=nonfunction-type-aliases
+
+import 'dart:async';
+
+// Introduce an aliased type.
+
+typedef T<X> = Object;
+
+// Use the aliased type.
+
+T<int>? v1;
+List<T<void>> v2 = [];
+final T<String> v3 = throw "Anything";
+const List<T<C>> v4 = [];
+const v5 = <Type, Type>{T: T};
+
+abstract class C {
+  static T<C>? v6;
+  static List<T<T>> v7 = [];
+  static final T<Null> v8 = throw "Anything";
+  static const List<T<List>> v9 = [];
+
+  T<C>? v10;
+  List<T<T>> v11 = [];
+  final T<Null> v12;
+
+  C(): v12 = T();
+  C.name1(this.v10, this.v12);
+  factory C.name2(T<C> arg1, T<Null> arg2) = C.name1;
+
+  T<double> operator +(T<double> other);
+  T<FutureOr<FutureOr<void>>> get g;
+  set g(T<FutureOr<FutureOr<void>>> value);
+  Map<T<C>, T<C>> m1(covariant T<C> arg1, [Set<Set<T<C>>> arg2]);
+  void m2({T arg1, Map<T, T> arg2(T Function(T) arg21, T arg22)});
+}
+
+class D1<X> extends T<X> {}
+
+abstract class D3<X, Y> extends C implements T<T> {}
+
+extension E on T<dynamic> {
+  T<dynamic> foo(T<dynamic> t) => t;
+}
+
+T<Type> Function(T<Type>)? id;
+
+X foo<X>(X x) => x;
+
+main() {
+  var v8 = <T<C>>[];
+  var v9 = <Set<T<T>>, Set<T<T>>>{{}: {}};
+  var v10 = {v8};
+  v9[{}] = {T<T>()};
+  Set<List<T<C>>> v11 = v10;
+  v10 = v11;
+  T<Null>();
+  T<Object> v12 = foo<T<bool>>(T<bool>());
+}
diff --git a/tests/language/nonfunction_type_aliases/generic_usage_type_variable_error_test.dart b/tests/language/nonfunction_type_aliases/generic_usage_type_variable_error_test.dart
new file mode 100644
index 0000000..80b22b7
--- /dev/null
+++ b/tests/language/nonfunction_type_aliases/generic_usage_type_variable_error_test.dart
@@ -0,0 +1,82 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// SharedOptions=--enable-experiment=nonfunction-type-aliases
+
+import 'dart:async';
+
+// Introduce an aliased type.
+
+typedef T<X> = X;
+
+// Use the aliased type.
+
+abstract class C {
+  final T<Map> v7;
+
+  C(): v7 = T<Map>();
+  //        ^
+  // [analyzer] unspecified
+  // [cfe] unspecified
+}
+
+class D1<X> extends T<X> {}
+//                  ^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+abstract class D2 extends C with T<int> {}
+//                               ^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+abstract class D3<X, Y> implements T<T> {}
+//                                 ^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+abstract class D4 = C with T<void>;
+//                         ^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+X foo<X>(X x) => x;
+
+main() {
+  var v9 = <Set<T<T>>, Set<T<T>>>{{}: {}};
+  v9[{}] = {T<C>()};
+  //        ^
+  // [analyzer] unspecified
+  // [cfe] unspecified
+
+  T<Null>();
+//^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+  T<Null>.named();
+  //      ^
+  // [analyzer] unspecified
+  // [cfe] unspecified
+
+  T<Object> v12 = foo<T<bool>>(T<bool>());
+  //                           ^
+  // [analyzer] unspecified
+  // [cfe] unspecified
+
+  T<List<List<List<List>>>>.staticMethod<T<int>>();
+  //                        ^^^^^^^^^^^^
+  // [analyzer] unspecified
+  // [cfe] unspecified
+
+  T<Object>();
+//^^^^^^^^^^^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+  T<C>.name1(C(), null);
+//^^^^^^^^^^^^^^^^^^^^^
+// [analyzer] unspecified
+// [cfe] unspecified
+}
diff --git a/tests/language/nonfunction_type_aliases/generic_usage_type_variable_test.dart b/tests/language/nonfunction_type_aliases/generic_usage_type_variable_test.dart
new file mode 100644
index 0000000..11118f8
--- /dev/null
+++ b/tests/language/nonfunction_type_aliases/generic_usage_type_variable_test.dart
@@ -0,0 +1,61 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// SharedOptions=--enable-experiment=nonfunction-type-aliases
+
+import 'dart:async';
+
+// Introduce an aliased type.
+
+typedef T<X> = X;
+
+// Use the aliased type.
+
+T<int>? v1;
+List<T<void>> v2 = [];
+final T<String> v3 = throw "Anything";
+const List<T<C>> v4 = [];
+const v5 = <Type, Type>{T: T};
+
+abstract class C {
+  static T<C>? v1;
+  static List<T<T>> v2 = [];
+  static final T<Null> v3 = throw "Anything";
+  static const List<T<List>> v4 = [];
+
+  T<D>? v5;
+  List<T<T>> v6 = [];
+  final T<Null> v7;
+
+  C(): v7 = null;
+  C.name1(this.v5, this.v7);
+  factory C.name2(T<D> arg1, T<Null> arg2) = C.name1;
+
+  T<double> operator +(T<double> other);
+  T<FutureOr<FutureOr<void>>> get g;
+  set g(T<FutureOr<FutureOr<void>>> value);
+  Map<T<C>, T<C>> m1(covariant T<C> arg1, [Set<Set<T<C>>> arg2]);
+  void m2({T arg1, Map<T, T> arg2(T Function(T) arg21, T arg22)});
+}
+
+class D {}
+mixin M {}
+
+abstract class D1<X> extends T<D> {}
+abstract class D2 extends C with T<M> {}
+abstract class D3<X, Y> implements T<T<D>> {}
+abstract class D4 = C with T<D>;
+
+extension E on T<dynamic> {
+  T<dynamic> foo(T<dynamic> t) => t;
+}
+
+main() {
+  var v8 = <T<C>>[];
+  var v9 = <Set<T<T>>, Set<T<T>>>{{}: {}};
+  var v10 = {v8};
+  v9[{}] = {42};
+  Set<List<T<C>>> v11 = v10;
+  v10 = v11;
+}
diff --git a/tests/language/nonfunction_type_aliases/generic_usage_void_error_test.dart b/tests/language/nonfunction_type_aliases/generic_usage_void_error_test.dart
new file mode 100644
index 0000000..1bddbc3
--- /dev/null
+++ b/tests/language/nonfunction_type_aliases/generic_usage_void_error_test.dart
@@ -0,0 +1,81 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// SharedOptions=--enable-experiment=nonfunction-type-aliases
+
+import 'dart:async';
+
+// Introduce an aliased type.
+
+typedef T<X> = void;
+
+// Use the aliased type.
+
+abstract class C {
+  final T<Null> v7;
+
+  C(): v7 = T();
+  //        ^
+  // [analyzer] unspecified
+  // [cfe] unspecified
+}
+
+class D1<X> extends T<X> {}
+//                  ^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+abstract class D2 extends C with T<int> {}
+//                               ^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+abstract class D3<X, Y> implements T<T> {}
+//                                 ^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+abstract class D4 = C with T<void>;
+//                         ^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+extension E on T<dynamic> {
+  T<dynamic> foo(T<dynamic> t) => t;
+}
+
+X foo<X>(X x) => x;
+
+main() {
+  var v8 = <T<C>>[];
+  var v9 = <Set<T<T>>, Set<T<T>>>{{}: {}};
+  var v10 = {v8};
+  v9[{}] = {T<T>()};
+  //        ^
+  // [analyzer] unspecified
+  // [cfe] unspecified
+
+  Set<List<T<C>>> v11 = v10;
+  v10 = v11;
+
+  T<Null>();
+//^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+  T<Null>.named();
+//^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+  T<Object> v12 = foo<T<bool>>(T<bool>());
+  //                           ^
+  // [analyzer] unspecified
+  // [cfe] unspecified
+
+  T<List<List<List<List>>>>.staticMethod<T<int>>();
+  //                        ^^^^^^^^^^^^
+  // [analyzer] unspecified
+  // [cfe] unspecified
+}
diff --git a/tests/language/nonfunction_type_aliases/generic_usage_void_test.dart b/tests/language/nonfunction_type_aliases/generic_usage_void_test.dart
new file mode 100644
index 0000000..d38a5c5
--- /dev/null
+++ b/tests/language/nonfunction_type_aliases/generic_usage_void_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.
+
+// SharedOptions=--enable-experiment=nonfunction-type-aliases
+
+import 'dart:async';
+
+// Introduce an aliased type.
+
+typedef T<X> = void;
+
+// Use the aliased type.
+
+T<int> v1;
+List<T<void>> v2 = [];
+final T<String> v3 = throw "Anything";
+const List<T<C>> v4 = [];
+const v5 = <Type, Type>{T: T};
+
+abstract class C {
+  static T<C> v1;
+  static List<T<T>> v2 = [];
+  static final T<Null> v3 = throw "Anything";
+  static const List<T<List>> v4 = [];
+
+  T<C> v5;
+  List<T<T>> v6 = [];
+  final T<Null> v7;
+
+  C(): v7 = null;
+  C.name1(this.v5, this.v7);
+  factory C.name2(T<C> arg1, T<Null> arg2) = C.name1;
+
+  T<double> operator +(T<double> other);
+  T<FutureOr<FutureOr<void>>> get g;
+  set g(T<FutureOr<FutureOr<void>>> value);
+  Map<T<C>, T<C>> m1(covariant T<C> arg1, [Set<Set<T<C>>> arg2]);
+  void m2({T arg1, Map<T, T> arg2(T Function(T) arg21, T arg22)});
+}
+
+extension E on T<dynamic> {
+  T<dynamic> foo(T<dynamic> t) => t;
+}
+
+X foo<X>(X x) => x;
+
+T<Type> Function(T<Type>)? id;
+
+main() {
+  var v8 = <T<C>>[];
+  var v9 = <Set<T<T>>, Set<T<T>>>{{}: {}};
+  var v10 = {v8};
+  v9[{}] = {};
+  Set<List<T<C>>> v11 = v10;
+  v10 = v11;
+}
diff --git a/tests/language/nonfunction_type_aliases/infer_aliased_factory_invocation_01_test.dart b/tests/language/nonfunction_type_aliases/infer_aliased_factory_invocation_01_test.dart
new file mode 100644
index 0000000..0b59c9b
--- /dev/null
+++ b/tests/language/nonfunction_type_aliases/infer_aliased_factory_invocation_01_test.dart
@@ -0,0 +1,24 @@
+// Copyright (c) 2020, the Dart project authors.  Please see the AUTHORS file
+// for 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=nonfunction-type-aliases
+
+import 'package:expect/expect.dart';
+
+class C<X> {
+  factory C(Type t) => D<X>(t);
+}
+
+class D<X> implements C<X> {
+  D(Type t) {
+    Expect.equals(t, X);
+  }
+}
+
+typedef T<X> = C<X>;
+
+void main() {
+  T<num> x1 = T(num);
+  C<num> x2 = T(num);
+}
diff --git a/tests/language/nonfunction_type_aliases/infer_aliased_factory_invocation_02_test.dart b/tests/language/nonfunction_type_aliases/infer_aliased_factory_invocation_02_test.dart
new file mode 100644
index 0000000..e5caf2a
--- /dev/null
+++ b/tests/language/nonfunction_type_aliases/infer_aliased_factory_invocation_02_test.dart
@@ -0,0 +1,20 @@
+// Copyright (c) 2020, the Dart project authors.  Please see the AUTHORS file
+// for 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=nonfunction-type-aliases
+
+import 'package:expect/expect.dart';
+
+class C {
+  factory C() => D();
+}
+
+class D implements C {}
+
+typedef T<X> = C;
+
+void main() {
+  T<num> x1 = T();
+  C x2 = T();
+}
diff --git a/tests/language/nonfunction_type_aliases/infer_aliased_factory_invocation_03_test.dart b/tests/language/nonfunction_type_aliases/infer_aliased_factory_invocation_03_test.dart
new file mode 100644
index 0000000..5bda338
--- /dev/null
+++ b/tests/language/nonfunction_type_aliases/infer_aliased_factory_invocation_03_test.dart
@@ -0,0 +1,24 @@
+// Copyright (c) 2020, the Dart project authors.  Please see the AUTHORS file
+// for 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=nonfunction-type-aliases
+
+import 'package:expect/expect.dart';
+
+class C<X> {
+  factory C(Type t) => D<X>(t);
+}
+
+class D<X> implements C<X> {
+  D(Type t) {
+    Expect.equals(t, X);
+  }
+}
+
+typedef T = C<num>;
+
+void main() {
+  T x1 = T(num);
+  C<num> x2 = T(num);
+}
diff --git a/tests/language/nonfunction_type_aliases/infer_aliased_factory_invocation_04_test.dart b/tests/language/nonfunction_type_aliases/infer_aliased_factory_invocation_04_test.dart
new file mode 100644
index 0000000..5fbec80
--- /dev/null
+++ b/tests/language/nonfunction_type_aliases/infer_aliased_factory_invocation_04_test.dart
@@ -0,0 +1,26 @@
+// Copyright (c) 2020, the Dart project authors.  Please see the AUTHORS file
+// for 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=nonfunction-type-aliases
+
+import 'package:expect/expect.dart';
+
+class C<X> {
+  factory C(Type t) => D<X>(t);
+}
+
+class D<X> implements C<X> {
+  D(Type t) {
+    Expect.equals(t, X);
+  }
+}
+
+typedef T<X> = C<List<X>>;
+
+Type typeOf<X>() => X;
+
+void main() {
+  T<num> x1 = T(typeOf<List<num>>());
+  C<Iterable<num>> x2 = T(typeOf<List<num>>());
+}
diff --git a/tests/language/nonfunction_type_aliases/infer_aliased_factory_invocation_05_test.dart b/tests/language/nonfunction_type_aliases/infer_aliased_factory_invocation_05_test.dart
new file mode 100644
index 0000000..3e4dd64
--- /dev/null
+++ b/tests/language/nonfunction_type_aliases/infer_aliased_factory_invocation_05_test.dart
@@ -0,0 +1,25 @@
+// Copyright (c) 2020, the Dart project authors.  Please see the AUTHORS file
+// for 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=nonfunction-type-aliases
+
+import 'package:expect/expect.dart';
+
+class C<X, Y> {
+  factory C(Type tx, Type ty) => D<X, Y>(tx, ty);
+}
+
+class D<X, Y> implements C<X, Y> {
+  D(Type tx, Type ty) {
+    Expect.equals(tx, X);
+    Expect.equals(ty, Y);
+  }
+}
+
+typedef T<Y, X> = C<X, Y>;
+
+void main() {
+  T<int, String> x1 = T(String, int);
+  C<String, int> x2 = T(String, int);
+}
diff --git a/tests/language/nonfunction_type_aliases/infer_aliased_factory_invocation_06_test.dart b/tests/language/nonfunction_type_aliases/infer_aliased_factory_invocation_06_test.dart
new file mode 100644
index 0000000..b5b8cce
--- /dev/null
+++ b/tests/language/nonfunction_type_aliases/infer_aliased_factory_invocation_06_test.dart
@@ -0,0 +1,23 @@
+// Copyright (c) 2020, the Dart project authors.  Please see the AUTHORS file
+// for 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=nonfunction-type-aliases
+
+import 'package:expect/expect.dart';
+
+class C<X> {
+  factory C(X x, Type t) => D<X>(x, t);
+}
+
+class D<X> implements C<X> {
+  D(X x, Type t) {
+    Expect.equals(t, X);
+  }
+}
+
+typedef T<X> = C<X>;
+
+void main() {
+  T(1, int);
+}
diff --git a/tests/language/nonfunction_type_aliases/infer_aliased_factory_invocation_07_test.dart b/tests/language/nonfunction_type_aliases/infer_aliased_factory_invocation_07_test.dart
new file mode 100644
index 0000000..abd1f08
--- /dev/null
+++ b/tests/language/nonfunction_type_aliases/infer_aliased_factory_invocation_07_test.dart
@@ -0,0 +1,25 @@
+// Copyright (c) 2020, the Dart project authors.  Please see the AUTHORS file
+// for 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=nonfunction-type-aliases
+
+import 'package:expect/expect.dart';
+
+class C<X> {
+  factory C(X x, Type t) => D<X>(x, t);
+}
+
+class D<X> implements C<X> {
+  D(X x, Type t) {
+    Expect.equals(t, X);
+  }
+}
+
+typedef T<X> = C<List<X>>;
+
+Type typeOf<X>() => X;
+
+void main() {
+  T(<num>[1], typeOf<List<num>>());
+}
diff --git a/tests/language/nonfunction_type_aliases/infer_aliased_factory_invocation_08_test.dart b/tests/language/nonfunction_type_aliases/infer_aliased_factory_invocation_08_test.dart
new file mode 100644
index 0000000..954b7e2
--- /dev/null
+++ b/tests/language/nonfunction_type_aliases/infer_aliased_factory_invocation_08_test.dart
@@ -0,0 +1,24 @@
+// Copyright (c) 2020, the Dart project authors.  Please see the AUTHORS file
+// for 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=nonfunction-type-aliases
+
+import 'package:expect/expect.dart';
+
+class C<X extends num> {
+  factory C(Type t) => D<X>(t);
+}
+
+class D<X extends num> implements C<X> {
+  D(Type t) {
+    Expect.equals(t, X);
+  }
+}
+
+typedef T<X extends int> = C<X>;
+
+void main() {
+  T<int> x1 = T(int);
+  C<int> x2 = T(int);
+}
diff --git a/tests/language/nonfunction_type_aliases/infer_aliased_factory_invocation_09_test.dart b/tests/language/nonfunction_type_aliases/infer_aliased_factory_invocation_09_test.dart
new file mode 100644
index 0000000..68ea8b9
--- /dev/null
+++ b/tests/language/nonfunction_type_aliases/infer_aliased_factory_invocation_09_test.dart
@@ -0,0 +1,20 @@
+// Copyright (c) 2020, the Dart project authors.  Please see the AUTHORS file
+// for 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=nonfunction-type-aliases
+
+import 'package:expect/expect.dart';
+
+class C {
+  factory C() => D();
+}
+
+class D implements C {}
+
+typedef T<X extends num> = C;
+
+void main() {
+  T<num> x1 = T();
+  C x2 = T();
+}
diff --git a/tests/language/nonfunction_type_aliases/infer_aliased_factory_invocation_10_test.dart b/tests/language/nonfunction_type_aliases/infer_aliased_factory_invocation_10_test.dart
new file mode 100644
index 0000000..d9dc455
--- /dev/null
+++ b/tests/language/nonfunction_type_aliases/infer_aliased_factory_invocation_10_test.dart
@@ -0,0 +1,24 @@
+// Copyright (c) 2020, the Dart project authors.  Please see the AUTHORS file
+// for 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=nonfunction-type-aliases
+
+import 'package:expect/expect.dart';
+
+class C<X extends num> {
+  factory C(Type t) => D<X>(t);
+}
+
+class D<X extends num> implements C<X> {
+  D(Type t) {
+    Expect.equals(t, X);
+  }
+}
+
+typedef T = C<num>;
+
+void main() {
+  T x1 = T(num);
+  C<num> x2 = T(num);
+}
diff --git a/tests/language/nonfunction_type_aliases/infer_aliased_factory_invocation_11_test.dart b/tests/language/nonfunction_type_aliases/infer_aliased_factory_invocation_11_test.dart
new file mode 100644
index 0000000..42aaab5
--- /dev/null
+++ b/tests/language/nonfunction_type_aliases/infer_aliased_factory_invocation_11_test.dart
@@ -0,0 +1,26 @@
+// Copyright (c) 2020, the Dart project authors.  Please see the AUTHORS file
+// for 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=nonfunction-type-aliases
+
+import 'package:expect/expect.dart';
+
+class C<X extends Iterable<num>> {
+  factory C(Type t) => D<X>(t);
+}
+
+class D<X extends Iterable<num>> implements C<X> {
+  D(Type t) {
+    Expect.equals(t, X);
+  }
+}
+
+typedef T<X extends int> = C<List<X>>;
+
+Type typeOf<X>() => X;
+
+void main() {
+  T<int> x1 = T(typeOf<List<int>>());
+  C<Iterable<num>> x2 = T(typeOf<List<int>>());
+}
diff --git a/tests/language/nonfunction_type_aliases/infer_aliased_factory_invocation_12_test.dart b/tests/language/nonfunction_type_aliases/infer_aliased_factory_invocation_12_test.dart
new file mode 100644
index 0000000..1d4a419
--- /dev/null
+++ b/tests/language/nonfunction_type_aliases/infer_aliased_factory_invocation_12_test.dart
@@ -0,0 +1,25 @@
+// Copyright (c) 2020, the Dart project authors.  Please see the AUTHORS file
+// for 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=nonfunction-type-aliases
+
+import 'package:expect/expect.dart';
+
+class C<X extends String, Y extends num> {
+  factory C(Type tx, Type ty) => D<X, Y>(tx, ty);
+}
+
+class D<X extends String, Y extends num> implements C<X, Y> {
+  D(Type tx, Type ty) {
+    Expect.equals(tx, X);
+    Expect.equals(ty, Y);
+  }
+}
+
+typedef T<Y extends int, X extends String> = C<X, Y>;
+
+void main() {
+  T<int, String> x1 = T(String, int);
+  C<String, int> x2 = T(String, int);
+}
diff --git a/tests/language/nonfunction_type_aliases/infer_aliased_instance_creation_01_test.dart b/tests/language/nonfunction_type_aliases/infer_aliased_instance_creation_01_test.dart
new file mode 100644
index 0000000..99f6365c
--- /dev/null
+++ b/tests/language/nonfunction_type_aliases/infer_aliased_instance_creation_01_test.dart
@@ -0,0 +1,20 @@
+// Copyright (c) 2020, the Dart project authors.  Please see the AUTHORS file
+// for 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=nonfunction-type-aliases
+
+import 'package:expect/expect.dart';
+
+class C<X> {
+  C(Type t) {
+    Expect.equals(t, X);
+  }
+}
+
+typedef T<X> = C<X>;
+
+void main() {
+  T<num> x1 = T(num);
+  C<num> x2 = T(num);
+}
diff --git a/tests/language/nonfunction_type_aliases/infer_aliased_instance_creation_02_test.dart b/tests/language/nonfunction_type_aliases/infer_aliased_instance_creation_02_test.dart
new file mode 100644
index 0000000..081f4d8
--- /dev/null
+++ b/tests/language/nonfunction_type_aliases/infer_aliased_instance_creation_02_test.dart
@@ -0,0 +1,16 @@
+// Copyright (c) 2020, the Dart project authors.  Please see the AUTHORS file
+// for 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=nonfunction-type-aliases
+
+import 'package:expect/expect.dart';
+
+class C {}
+
+typedef T<X> = C;
+
+void main() {
+  T<num> x1 = T();
+  C x2 = T();
+}
diff --git a/tests/language/nonfunction_type_aliases/infer_aliased_instance_creation_03_test.dart b/tests/language/nonfunction_type_aliases/infer_aliased_instance_creation_03_test.dart
new file mode 100644
index 0000000..b11314a
--- /dev/null
+++ b/tests/language/nonfunction_type_aliases/infer_aliased_instance_creation_03_test.dart
@@ -0,0 +1,20 @@
+// Copyright (c) 2020, the Dart project authors.  Please see the AUTHORS file
+// for 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=nonfunction-type-aliases
+
+import 'package:expect/expect.dart';
+
+class C<X> {
+  C(Type t) {
+    Expect.equals(t, X);
+  }
+}
+
+typedef T = C<num>;
+
+void main() {
+  T x1 = T(num);
+  C<num> x2 = T(num);
+}
diff --git a/tests/language/nonfunction_type_aliases/infer_aliased_instance_creation_04_test.dart b/tests/language/nonfunction_type_aliases/infer_aliased_instance_creation_04_test.dart
new file mode 100644
index 0000000..97d6600
--- /dev/null
+++ b/tests/language/nonfunction_type_aliases/infer_aliased_instance_creation_04_test.dart
@@ -0,0 +1,22 @@
+// Copyright (c) 2020, the Dart project authors.  Please see the AUTHORS file
+// for 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=nonfunction-type-aliases
+
+import 'package:expect/expect.dart';
+
+class C<X> {
+  C(Type t) {
+    Expect.equals(t, X);
+  }
+}
+
+typedef T<X> = C<List<X>>;
+
+Type typeOf<X>() => X;
+
+void main() {
+  T<num> x1 = T(typeOf<List<num>>());
+  C<Iterable<num>> x2 = T(typeOf<List<num>>());
+}
diff --git a/tests/language/nonfunction_type_aliases/infer_aliased_instance_creation_05_test.dart b/tests/language/nonfunction_type_aliases/infer_aliased_instance_creation_05_test.dart
new file mode 100644
index 0000000..7736a0d
--- /dev/null
+++ b/tests/language/nonfunction_type_aliases/infer_aliased_instance_creation_05_test.dart
@@ -0,0 +1,21 @@
+// Copyright (c) 2020, the Dart project authors.  Please see the AUTHORS file
+// for 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=nonfunction-type-aliases
+
+import 'package:expect/expect.dart';
+
+class C<X, Y> {
+  C(Type tx, Type ty) {
+    Expect.equals(tx, X);
+    Expect.equals(ty, Y);
+  }
+}
+
+typedef T<Y, X> = C<X, Y>;
+
+void main() {
+  T<int, String> x1 = T(String, int);
+  C<String, int> x2 = T(String, int);
+}
diff --git a/tests/language/nonfunction_type_aliases/infer_aliased_instance_creation_06_test.dart b/tests/language/nonfunction_type_aliases/infer_aliased_instance_creation_06_test.dart
new file mode 100644
index 0000000..543deb9
--- /dev/null
+++ b/tests/language/nonfunction_type_aliases/infer_aliased_instance_creation_06_test.dart
@@ -0,0 +1,19 @@
+// Copyright (c) 2020, the Dart project authors.  Please see the AUTHORS file
+// for 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=nonfunction-type-aliases
+
+import 'package:expect/expect.dart';
+
+class C<X> {
+  C(X x, Type t) {
+    Expect.equals(t, X);
+  }
+}
+
+typedef T<X> = C<X>;
+
+void main() {
+  T(1, int);
+}
diff --git a/tests/language/nonfunction_type_aliases/infer_aliased_instance_creation_07_test.dart b/tests/language/nonfunction_type_aliases/infer_aliased_instance_creation_07_test.dart
new file mode 100644
index 0000000..0d61966
--- /dev/null
+++ b/tests/language/nonfunction_type_aliases/infer_aliased_instance_creation_07_test.dart
@@ -0,0 +1,21 @@
+// Copyright (c) 2020, the Dart project authors.  Please see the AUTHORS file
+// for 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=nonfunction-type-aliases
+
+import 'package:expect/expect.dart';
+
+class C<X> {
+  C(X x, Type t) {
+    Expect.equals(t, X);
+  }
+}
+
+typedef T<X> = C<List<X>>;
+
+Type typeOf<X>() => X;
+
+void main() {
+  T(<num>[1], typeOf<List<num>>());
+}
diff --git a/tests/language/nonfunction_type_aliases/infer_aliased_instance_creation_08_test.dart b/tests/language/nonfunction_type_aliases/infer_aliased_instance_creation_08_test.dart
new file mode 100644
index 0000000..fe92b57
--- /dev/null
+++ b/tests/language/nonfunction_type_aliases/infer_aliased_instance_creation_08_test.dart
@@ -0,0 +1,20 @@
+// Copyright (c) 2020, the Dart project authors.  Please see the AUTHORS file
+// for 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=nonfunction-type-aliases
+
+import 'package:expect/expect.dart';
+
+class C<X extends num> {
+  C(Type t) {
+    Expect.equals(t, X);
+  }
+}
+
+typedef T<X extends int> = C<X>;
+
+void main() {
+  T<int> x1 = T(int);
+  C<int> x2 = T(int);
+}
diff --git a/tests/language/nonfunction_type_aliases/infer_aliased_instance_creation_09_test.dart b/tests/language/nonfunction_type_aliases/infer_aliased_instance_creation_09_test.dart
new file mode 100644
index 0000000..7a07602
--- /dev/null
+++ b/tests/language/nonfunction_type_aliases/infer_aliased_instance_creation_09_test.dart
@@ -0,0 +1,16 @@
+// Copyright (c) 2020, the Dart project authors.  Please see the AUTHORS file
+// for 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=nonfunction-type-aliases
+
+import 'package:expect/expect.dart';
+
+class C {}
+
+typedef T<X extends num> = C;
+
+void main() {
+  T<num> x1 = T();
+  C x2 = T();
+}
diff --git a/tests/language/nonfunction_type_aliases/infer_aliased_instance_creation_10_test.dart b/tests/language/nonfunction_type_aliases/infer_aliased_instance_creation_10_test.dart
new file mode 100644
index 0000000..8ce475d
--- /dev/null
+++ b/tests/language/nonfunction_type_aliases/infer_aliased_instance_creation_10_test.dart
@@ -0,0 +1,20 @@
+// Copyright (c) 2020, the Dart project authors.  Please see the AUTHORS file
+// for 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=nonfunction-type-aliases
+
+import 'package:expect/expect.dart';
+
+class C<X extends num> {
+  C(Type t) {
+    Expect.equals(t, X);
+  }
+}
+
+typedef T = C<num>;
+
+void main() {
+  T x1 = T(num);
+  C<num> x2 = T(num);
+}
diff --git a/tests/language/nonfunction_type_aliases/infer_aliased_instance_creation_11_test.dart b/tests/language/nonfunction_type_aliases/infer_aliased_instance_creation_11_test.dart
new file mode 100644
index 0000000..b669f00
--- /dev/null
+++ b/tests/language/nonfunction_type_aliases/infer_aliased_instance_creation_11_test.dart
@@ -0,0 +1,22 @@
+// Copyright (c) 2020, the Dart project authors.  Please see the AUTHORS file
+// for 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=nonfunction-type-aliases
+
+import 'package:expect/expect.dart';
+
+class C<X extends Iterable<num>> {
+  C(Type t) {
+    Expect.equals(t, X);
+  }
+}
+
+typedef T<X extends int> = C<List<X>>;
+
+Type typeOf<X>() => X;
+
+void main() {
+  T<int> x1 = T(typeOf<List<int>>());
+  C<Iterable<num>> x2 = T(typeOf<List<int>>());
+}
diff --git a/tests/language/nonfunction_type_aliases/infer_aliased_instance_creation_12_test.dart b/tests/language/nonfunction_type_aliases/infer_aliased_instance_creation_12_test.dart
new file mode 100644
index 0000000..4322e2d
--- /dev/null
+++ b/tests/language/nonfunction_type_aliases/infer_aliased_instance_creation_12_test.dart
@@ -0,0 +1,21 @@
+// Copyright (c) 2020, the Dart project authors.  Please see the AUTHORS file
+// for 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=nonfunction-type-aliases
+
+import 'package:expect/expect.dart';
+
+class C<X extends String, Y extends num> {
+  C(Type tx, Type ty) {
+    Expect.equals(tx, X);
+    Expect.equals(ty, Y);
+  }
+}
+
+typedef T<Y extends int, X extends String> = C<X, Y>;
+
+void main() {
+  T<int, String> x1 = T(String, int);
+  C<String, int> x2 = T(String, int);
+}
diff --git a/tests/language/nonfunction_type_aliases/infer_aliased_redirecting_factory_invocation_01_test.dart b/tests/language/nonfunction_type_aliases/infer_aliased_redirecting_factory_invocation_01_test.dart
new file mode 100644
index 0000000..c4e1da4
--- /dev/null
+++ b/tests/language/nonfunction_type_aliases/infer_aliased_redirecting_factory_invocation_01_test.dart
@@ -0,0 +1,24 @@
+// Copyright (c) 2020, the Dart project authors.  Please see the AUTHORS file
+// for 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=nonfunction-type-aliases
+
+import 'package:expect/expect.dart';
+
+class C<X> {
+  factory C(Type t) = D<X>;
+}
+
+class D<X> implements C<X> {
+  D(Type t) {
+    Expect.equals(t, X);
+  }
+}
+
+typedef T<X> = C<X>;
+
+void main() {
+  T<num> x1 = T(num);
+  C<num> x2 = T(num);
+}
diff --git a/tests/language/nonfunction_type_aliases/infer_aliased_redirecting_factory_invocation_02_test.dart b/tests/language/nonfunction_type_aliases/infer_aliased_redirecting_factory_invocation_02_test.dart
new file mode 100644
index 0000000..79ba8a6
--- /dev/null
+++ b/tests/language/nonfunction_type_aliases/infer_aliased_redirecting_factory_invocation_02_test.dart
@@ -0,0 +1,20 @@
+// Copyright (c) 2020, the Dart project authors.  Please see the AUTHORS file
+// for 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=nonfunction-type-aliases
+
+import 'package:expect/expect.dart';
+
+class C {
+  factory C() = D;
+}
+
+class D implements C {}
+
+typedef T<X> = C;
+
+void main() {
+  T<num> x1 = T();
+  C x2 = T();
+}
diff --git a/tests/language/nonfunction_type_aliases/infer_aliased_redirecting_factory_invocation_03_test.dart b/tests/language/nonfunction_type_aliases/infer_aliased_redirecting_factory_invocation_03_test.dart
new file mode 100644
index 0000000..28efd82
--- /dev/null
+++ b/tests/language/nonfunction_type_aliases/infer_aliased_redirecting_factory_invocation_03_test.dart
@@ -0,0 +1,24 @@
+// Copyright (c) 2020, the Dart project authors.  Please see the AUTHORS file
+// for 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=nonfunction-type-aliases
+
+import 'package:expect/expect.dart';
+
+class C<X> {
+  factory C(Type t) = D<X>;
+}
+
+class D<X> implements C<X> {
+  D(Type t) {
+    Expect.equals(t, X);
+  }
+}
+
+typedef T = C<num>;
+
+void main() {
+  T x1 = T(num);
+  C<num> x2 = T(num);
+}
diff --git a/tests/language/nonfunction_type_aliases/infer_aliased_redirecting_factory_invocation_04_test.dart b/tests/language/nonfunction_type_aliases/infer_aliased_redirecting_factory_invocation_04_test.dart
new file mode 100644
index 0000000..e8047da
--- /dev/null
+++ b/tests/language/nonfunction_type_aliases/infer_aliased_redirecting_factory_invocation_04_test.dart
@@ -0,0 +1,26 @@
+// Copyright (c) 2020, the Dart project authors.  Please see the AUTHORS file
+// for 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=nonfunction-type-aliases
+
+import 'package:expect/expect.dart';
+
+class C<X> {
+  factory C(Type t) = D<X>;
+}
+
+class D<X> implements C<X> {
+  D(Type t) {
+    Expect.equals(t, X);
+  }
+}
+
+typedef T<X> = C<List<X>>;
+
+Type typeOf<X>() => X;
+
+void main() {
+  T<num> x1 = T(typeOf<List<num>>());
+  C<Iterable<num>> x2 = T(typeOf<List<num>>());
+}
diff --git a/tests/language/nonfunction_type_aliases/infer_aliased_redirecting_factory_invocation_05_test.dart b/tests/language/nonfunction_type_aliases/infer_aliased_redirecting_factory_invocation_05_test.dart
new file mode 100644
index 0000000..1171b23
--- /dev/null
+++ b/tests/language/nonfunction_type_aliases/infer_aliased_redirecting_factory_invocation_05_test.dart
@@ -0,0 +1,25 @@
+// Copyright (c) 2020, the Dart project authors.  Please see the AUTHORS file
+// for 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=nonfunction-type-aliases
+
+import 'package:expect/expect.dart';
+
+class C<X, Y> {
+  factory C(Type tx, Type ty) = D<X, Y>;
+}
+
+class D<X, Y> implements C<X, Y> {
+  D(Type tx, Type ty) {
+    Expect.equals(tx, X);
+    Expect.equals(ty, Y);
+  }
+}
+
+typedef T<Y, X> = C<X, Y>;
+
+void main() {
+  T<int, String> x1 = T(String, int);
+  C<String, int> x2 = T(String, int);
+}
diff --git a/tests/language/nonfunction_type_aliases/infer_aliased_redirecting_factory_invocation_06_test.dart b/tests/language/nonfunction_type_aliases/infer_aliased_redirecting_factory_invocation_06_test.dart
new file mode 100644
index 0000000..86d7f84
--- /dev/null
+++ b/tests/language/nonfunction_type_aliases/infer_aliased_redirecting_factory_invocation_06_test.dart
@@ -0,0 +1,23 @@
+// Copyright (c) 2020, the Dart project authors.  Please see the AUTHORS file
+// for 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=nonfunction-type-aliases
+
+import 'package:expect/expect.dart';
+
+class C<X> {
+  factory C(X x, Type t) = D<X>;
+}
+
+class D<X> implements C<X> {
+  D(X x, Type t) {
+    Expect.equals(t, X);
+  }
+}
+
+typedef T<X> = C<X>;
+
+void main() {
+  T(1, int);
+}
diff --git a/tests/language/nonfunction_type_aliases/infer_aliased_redirecting_factory_invocation_07_test.dart b/tests/language/nonfunction_type_aliases/infer_aliased_redirecting_factory_invocation_07_test.dart
new file mode 100644
index 0000000..a58164c
--- /dev/null
+++ b/tests/language/nonfunction_type_aliases/infer_aliased_redirecting_factory_invocation_07_test.dart
@@ -0,0 +1,25 @@
+// Copyright (c) 2020, the Dart project authors.  Please see the AUTHORS file
+// for 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=nonfunction-type-aliases
+
+import 'package:expect/expect.dart';
+
+class C<X> {
+  factory C(X x, Type t) = D<X>;
+}
+
+class D<X> implements C<X> {
+  D(X x, Type t) {
+    Expect.equals(t, X);
+  }
+}
+
+typedef T<X> = C<List<X>>;
+
+Type typeOf<X>() => X;
+
+void main() {
+  T(<num>[1], typeOf<List<num>>());
+}
diff --git a/tests/language/nonfunction_type_aliases/infer_aliased_redirecting_factory_invocation_08_test.dart b/tests/language/nonfunction_type_aliases/infer_aliased_redirecting_factory_invocation_08_test.dart
new file mode 100644
index 0000000..a539743
--- /dev/null
+++ b/tests/language/nonfunction_type_aliases/infer_aliased_redirecting_factory_invocation_08_test.dart
@@ -0,0 +1,24 @@
+// Copyright (c) 2020, the Dart project authors.  Please see the AUTHORS file
+// for 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=nonfunction-type-aliases
+
+import 'package:expect/expect.dart';
+
+class C<X extends num> {
+  factory C(Type t) = D<X>;
+}
+
+class D<X extends num> implements C<X> {
+  D(Type t) {
+    Expect.equals(t, X);
+  }
+}
+
+typedef T<X extends int> = C<X>;
+
+void main() {
+  T<int> x1 = T(int);
+  C<int> x2 = T(int);
+}
diff --git a/tests/language/nonfunction_type_aliases/infer_aliased_redirecting_factory_invocation_09_test.dart b/tests/language/nonfunction_type_aliases/infer_aliased_redirecting_factory_invocation_09_test.dart
new file mode 100644
index 0000000..f7dc992
--- /dev/null
+++ b/tests/language/nonfunction_type_aliases/infer_aliased_redirecting_factory_invocation_09_test.dart
@@ -0,0 +1,20 @@
+// Copyright (c) 2020, the Dart project authors.  Please see the AUTHORS file
+// for 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=nonfunction-type-aliases
+
+import 'package:expect/expect.dart';
+
+class C {
+  factory C() = D;
+}
+
+class D implements C {}
+
+typedef T<X extends num> = C;
+
+void main() {
+  T<num> x1 = T();
+  C x2 = T();
+}
diff --git a/tests/language/nonfunction_type_aliases/infer_aliased_redirecting_factory_invocation_10_test.dart b/tests/language/nonfunction_type_aliases/infer_aliased_redirecting_factory_invocation_10_test.dart
new file mode 100644
index 0000000..0d3aae3
--- /dev/null
+++ b/tests/language/nonfunction_type_aliases/infer_aliased_redirecting_factory_invocation_10_test.dart
@@ -0,0 +1,24 @@
+// Copyright (c) 2020, the Dart project authors.  Please see the AUTHORS file
+// for 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=nonfunction-type-aliases
+
+import 'package:expect/expect.dart';
+
+class C<X extends num> {
+  factory C(Type t) = D<X>;
+}
+
+class D<X extends num> implements C<X> {
+  D(Type t) {
+    Expect.equals(t, X);
+  }
+}
+
+typedef T = C<num>;
+
+void main() {
+  T x1 = T(num);
+  C<num> x2 = T(num);
+}
diff --git a/tests/language/nonfunction_type_aliases/infer_aliased_redirecting_factory_invocation_11_test.dart b/tests/language/nonfunction_type_aliases/infer_aliased_redirecting_factory_invocation_11_test.dart
new file mode 100644
index 0000000..bae703d
--- /dev/null
+++ b/tests/language/nonfunction_type_aliases/infer_aliased_redirecting_factory_invocation_11_test.dart
@@ -0,0 +1,26 @@
+// Copyright (c) 2020, the Dart project authors.  Please see the AUTHORS file
+// for 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=nonfunction-type-aliases
+
+import 'package:expect/expect.dart';
+
+class C<X extends Iterable<num>> {
+  factory C(Type t) = D<X>;
+}
+
+class D<X extends Iterable<num>> implements C<X> {
+  D(Type t) {
+    Expect.equals(t, X);
+  }
+}
+
+typedef T<X extends int> = C<List<X>>;
+
+Type typeOf<X>() => X;
+
+void main() {
+  T<int> x1 = T(typeOf<List<int>>());
+  C<Iterable<num>> x2 = T(typeOf<List<int>>());
+}
diff --git a/tests/language/nonfunction_type_aliases/infer_aliased_redirecting_factory_invocation_12_test.dart b/tests/language/nonfunction_type_aliases/infer_aliased_redirecting_factory_invocation_12_test.dart
new file mode 100644
index 0000000..adc2ae5
--- /dev/null
+++ b/tests/language/nonfunction_type_aliases/infer_aliased_redirecting_factory_invocation_12_test.dart
@@ -0,0 +1,25 @@
+// Copyright (c) 2020, the Dart project authors.  Please see the AUTHORS file
+// for 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=nonfunction-type-aliases
+
+import 'package:expect/expect.dart';
+
+class C<X extends String, Y extends num> {
+  factory C(Type tx, Type ty) = D<X, Y>;
+}
+
+class D<X extends String, Y extends num> implements C<X, Y> {
+  D(Type tx, Type ty) {
+    Expect.equals(tx, X);
+    Expect.equals(ty, Y);
+  }
+}
+
+typedef T<Y extends int, X extends String> = C<X, Y>;
+
+void main() {
+  T<int, String> x1 = T(String, int);
+  C<String, int> x2 = T(String, int);
+}
diff --git a/tests/language/nonfunction_type_aliases/usage_class_error_test.dart b/tests/language/nonfunction_type_aliases/usage_class_error_test.dart
new file mode 100644
index 0000000..49e55ae
--- /dev/null
+++ b/tests/language/nonfunction_type_aliases/usage_class_error_test.dart
@@ -0,0 +1,31 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// SharedOptions=--enable-experiment=nonfunction-type-aliases
+
+// Introduce an aliased type.
+
+class A {
+  A();
+}
+
+typedef T = A;
+
+// Use the aliased type.
+
+abstract class C {}
+
+abstract class D2 extends C with T {}
+//                               ^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+abstract class D4 = C with T;
+//                         ^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+main() {
+  T();
+}
diff --git a/tests/language/nonfunction_type_aliases/usage_class_test.dart b/tests/language/nonfunction_type_aliases/usage_class_test.dart
new file mode 100644
index 0000000..cb10823
--- /dev/null
+++ b/tests/language/nonfunction_type_aliases/usage_class_test.dart
@@ -0,0 +1,69 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// SharedOptions=--enable-experiment=nonfunction-type-aliases
+
+// Introduce an aliased type.
+
+class A {
+  A();
+  A.named();
+  static void staticMethod<X>() {}
+}
+
+typedef T = A;
+
+// Use the aliased type.
+
+T? v1;
+List<T> v2 = [];
+final T v3 = throw "Anything";
+const List<T> v4 = [];
+const v5 = <Type, Type>{T: T};
+
+abstract class C {
+  static T? v6;
+  static List<T> v7 = [];
+  static final T v8 = throw "Anything";
+  static const List<T> v9 = [];
+
+  T? v10;
+  List<T> v11 = [];
+  final T v12;
+
+  C(): v12 = T();
+  C.name1(this.v10, this.v12);
+  factory C.name2(T arg1, T arg2) = C.name1;
+
+  T operator +(T other);
+  T get g;
+  set g(T value);
+  Map<T, T> m1(covariant T arg1, [Set<Set<T>> arg2]);
+  void m2({T arg1, T arg2(T arg21, T arg22)});
+}
+
+class D1 extends T {}
+abstract class D3 implements T {}
+
+extension E on T {
+  T foo(T t) => t;
+}
+
+X foo<X>(X x) => x;
+
+T Function(T) id = (x) => x;
+
+main() {
+  var v13 = <T>[];
+  var v14 = <Set<T>, Set<T>>{{}: {}};
+  v14[{}] = {T()};
+  var v15 = {v13};
+  Set<List<T>> v16 = v15;
+  v15 = v16;
+  T();
+  T.named();
+  T v17 = foo<T>(T());
+  id(v17);
+  T.staticMethod<T>();
+}
diff --git a/tests/language/nonfunction_type_aliases/usage_dynamic_error_test.dart b/tests/language/nonfunction_type_aliases/usage_dynamic_error_test.dart
new file mode 100644
index 0000000..ce35fbe
--- /dev/null
+++ b/tests/language/nonfunction_type_aliases/usage_dynamic_error_test.dart
@@ -0,0 +1,70 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// SharedOptions=--enable-experiment=nonfunction-type-aliases
+
+// Introduce an aliased type.
+
+typedef T = dynamic;
+
+// Use the aliased type.
+
+abstract class C {
+  final T v12;
+
+  C(): v12 = T();
+  //         ^
+  // [analyzer] unspecified
+  // [cfe] unspecified
+}
+
+class D1 extends T {}
+//               ^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+abstract class D2 extends C with T {}
+//                               ^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+abstract class D3 implements T {}
+//                           ^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+abstract class D4 = C with T;
+//                         ^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+X foo<X>(X x) => x;
+
+main() {
+  var v14 = <Set<T>, Set<T>>{{}: {}};
+  v14[{}] = {T()};
+  //         ^
+  // [analyzer] unspecified
+  // [cfe] unspecified
+  
+  T();
+//^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+  T.named();
+  //^^^^^
+  // [analyzer] unspecified
+  // [cfe] unspecified
+
+  T v17 = foo<T>(T());
+  //             ^
+  // [analyzer] unspecified
+  // [cfe] unspecified
+
+  T.staticMethod<T>();
+  //^^^^^^^^^^^^
+  // [analyzer] unspecified
+  // [cfe] unspecified
+}
diff --git a/tests/language/nonfunction_type_aliases/usage_dynamic_test.dart b/tests/language/nonfunction_type_aliases/usage_dynamic_test.dart
new file mode 100644
index 0000000..3ff37e1
--- /dev/null
+++ b/tests/language/nonfunction_type_aliases/usage_dynamic_test.dart
@@ -0,0 +1,54 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// SharedOptions=--enable-experiment=nonfunction-type-aliases
+
+// Introduce an aliased type.
+
+typedef T = dynamic;
+
+// Use the aliased type.
+
+T v1;
+List<T> v2 = [];
+final T v3 = throw "Anything";
+const List<T> v4 = [];
+const v5 = <Type, Type>{T: T};
+
+abstract class C {
+  static T v6;
+  static List<T> v7 = [];
+  static final T v8 = throw "Anything";
+  static const List<T> v9 = [];
+
+  T v10;
+  List<T> v11 = [];
+  final T v12;
+
+  C.name1(this.v10, this.v12);
+  factory C.name2(T arg1, T arg2) = C.name1;
+
+  T operator +(T other);
+  T get g;
+  set g(T value);
+  Map<T, T> m1(covariant T arg1, [Set<Set<T>> arg2]);
+  void m2({T arg1, T arg2(T arg21, T arg22)});
+}
+
+X foo<X>(X x) => x;
+
+T Function(T) id = (x) => x;
+
+extension E on T {
+  T foo(T t) => t;
+}
+
+main() {
+  var v13 = <T>[];
+  var v14 = <Set<T>, Set<T>>{{}: {}};
+  v14[{}] = {};
+  var v15 = {v13};
+  Set<List<T>> v16 = v15;
+  v15 = v16;
+}
diff --git a/tests/language/nonfunction_type_aliases/usage_function_error_test.dart b/tests/language/nonfunction_type_aliases/usage_function_error_test.dart
new file mode 100644
index 0000000..c79c642
--- /dev/null
+++ b/tests/language/nonfunction_type_aliases/usage_function_error_test.dart
@@ -0,0 +1,45 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// SharedOptions=--enable-experiment=nonfunction-type-aliases
+
+// Introduce an aliased type.
+
+typedef T = Function;
+
+// Use the aliased type.
+
+abstract class C {
+  final T v12;
+
+  C(): v12 = T();
+  //         ^
+  // [analyzer] unspecified
+  // [cfe] unspecified
+}
+
+X foo<X>(X x) => x;
+
+main() {
+  var v14 = <Set<T>, Set<T>>{{}: {}};
+  v14[{}] = {T()};
+  //         ^
+  // [analyzer] unspecified
+  // [cfe] unspecified
+
+  T();
+//^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+  T.named();
+  //^^^^^
+  // [analyzer] unspecified
+  // [cfe] unspecified
+
+  T v17 = foo<T>(T());
+  //             ^
+  // [analyzer] unspecified
+  // [cfe] unspecified
+}
diff --git a/tests/language/nonfunction_type_aliases/usage_function_test.dart b/tests/language/nonfunction_type_aliases/usage_function_test.dart
new file mode 100644
index 0000000..845a68b
--- /dev/null
+++ b/tests/language/nonfunction_type_aliases/usage_function_test.dart
@@ -0,0 +1,66 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// SharedOptions=--enable-experiment=nonfunction-type-aliases
+
+// Introduce an aliased type.
+
+typedef T = Function;
+
+// Use the aliased type.
+
+T? v1;
+List<T> v2 = [];
+final T v3 = throw "Anything";
+const List<T> v4 = [];
+const v5 = <Type, Type>{T: T};
+
+abstract class C {
+  static T? v6;
+  static List<T> v7 = [];
+  static final T v8 = throw "Anything";
+  static const List<T> v9 = [];
+
+  T? v10;
+  List<T> v11 = [];
+  final T v12;
+
+  C(): v12 = (() {});
+  C.name1(this.v10, this.v12);
+  factory C.name2(T arg1, T arg2) = C.name1;
+
+  T operator +(T other);
+  T get g;
+  set g(T value);
+  Map<T, T> m1(covariant T arg1, [Set<Set<T>> arg2]);
+  void m2({T arg1, T arg2(T arg21, T arg22)});
+}
+
+// Awaiting updates in front end to handle crash caused by null from
+// `ClassHierarchyBuilder.getKernelTypeAsInstanceOf`. So for now the
+// following are multi-test cases, so that the rest can be tested.
+class D1 extends T {} //# 01: ok
+abstract class D2 extends C with T {} //# 02: ok
+abstract class D3 implements T {} //# 03: ok
+abstract class D4 = C with T; //# 04: ok
+
+extension E on T {
+  T foo(T t) => t;
+}
+
+X foo<X>(X x) => x;
+
+T Function(T) id = (x) => x;
+
+main() {
+  var v13 = <T>[];
+  var v14 = <Set<T>, Set<T>>{{}: {}};
+  v14[{}] = {};
+  var v15 = {v13};
+  Set<List<T>> v16 = v15;
+  v15 = v16;
+  T v17 = foo<T>(() {});
+  id(v17);
+  T.apply(() {}, []);
+}
diff --git a/tests/language/nonfunction_type_aliases/usage_futureor_error_test.dart b/tests/language/nonfunction_type_aliases/usage_futureor_error_test.dart
new file mode 100644
index 0000000..293b727
--- /dev/null
+++ b/tests/language/nonfunction_type_aliases/usage_futureor_error_test.dart
@@ -0,0 +1,72 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// SharedOptions=--enable-experiment=nonfunction-type-aliases
+
+import 'dart:async';
+
+// Introduce an aliased type.
+
+typedef T = FutureOr<int>;
+
+// Use the aliased type.
+
+abstract class C {
+  final T v12;
+
+  C(): v12 = T();
+  //         ^
+  // [analyzer] unspecified
+  // [cfe] unspecified
+}
+
+class D1 extends T {}
+//               ^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+abstract class D2 extends C with T {}
+//                               ^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+abstract class D3 implements T {}
+//                           ^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+abstract class D4 = C with T;
+//                         ^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+X foo<X>(X x) => x;
+
+main() {
+  var v14 = <Set<T>, Set<T>>{{}: {}};
+  v14[{}] = {T()};
+  //         ^
+  // [analyzer] unspecified
+  // [cfe] unspecified
+
+  T();
+//^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+  T.named();
+  //^^^^^
+  // [analyzer] unspecified
+  // [cfe] unspecified
+
+  T v17 = foo<T>(T());
+  //             ^
+  // [analyzer] unspecified
+  // [cfe] unspecified
+
+  T.staticMethod<T>();
+  //^^^^^^^^^^^^
+  // [analyzer] unspecified
+  // [cfe] unspecified
+}
diff --git a/tests/language/nonfunction_type_aliases/usage_futureor_test.dart b/tests/language/nonfunction_type_aliases/usage_futureor_test.dart
new file mode 100644
index 0000000..cca3885
--- /dev/null
+++ b/tests/language/nonfunction_type_aliases/usage_futureor_test.dart
@@ -0,0 +1,56 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// SharedOptions=--enable-experiment=nonfunction-type-aliases
+
+import 'dart:async';
+
+// Introduce an aliased type.
+
+typedef T = FutureOr<int>;
+
+// Use the aliased type.
+
+T? v1;
+List<T> v2 = [];
+final T v3 = throw "Anything";
+const List<T> v4 = [];
+const v5 = <Type, Type>{T: T};
+
+abstract class C {
+  static T? v6;
+  static List<T> v7 = [];
+  static final T v8 = throw "Anything";
+  static const List<T> v9 = [];
+
+  T? v10;
+  List<T> v11 = [];
+  final T v12;
+
+  C.name1(this.v10, this.v12);
+  factory C.name2(T arg1, T arg2) = C.name1;
+
+  T operator +(T other);
+  T get g;
+  set g(T value);
+  Map<T, T> m1(covariant T arg1, [Set<Set<T>> arg2]);
+  void m2({T arg1, T arg2(T arg21, T arg22)});
+}
+
+extension E on T {
+  T foo(T t) => t;
+}
+
+X foo<X>(X x) => x;
+
+T Function(T) id = (x) => x;
+
+main() {
+  var v13 = <T>[];
+  var v14 = <Set<T>, Set<T>>{{}: {}};
+  v14[{}] = {};
+  var v15 = {v13};
+  Set<List<T>> v16 = v15;
+  v15 = v16;
+}
diff --git a/tests/language/nonfunction_type_aliases/usage_null_error_test.dart b/tests/language/nonfunction_type_aliases/usage_null_error_test.dart
new file mode 100644
index 0000000..834b5f1
--- /dev/null
+++ b/tests/language/nonfunction_type_aliases/usage_null_error_test.dart
@@ -0,0 +1,80 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// SharedOptions=--enable-experiment=nonfunction-type-aliases
+
+// Introduce an aliased type.
+
+typedef T = Null;
+
+// Use the aliased type.
+
+abstract class C {
+  final T v12;
+
+  C(): v12 = T();
+  //         ^
+  // [analyzer] unspecified
+  // [cfe] unspecified
+
+  T operator +(T other);
+  T get g;
+  set g(T value);
+  Map<T, T> m1(covariant T arg1, [Set<Set<T>> arg2]);
+  void m2({T arg1, T arg2(T arg21, T arg22)});
+}
+
+class D1 extends T {}
+//               ^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+abstract class D2 extends C with T {}
+//                               ^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+abstract class D3 implements T {}
+//                           ^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+abstract class D4 = C with T;
+//                         ^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+X foo<X>(X x) => x;
+
+main() {
+  var v13 = <T>[];
+  var v14 = <Set<T>, Set<T>>{{}: {}};
+  v14[{}] = {T()};
+  //         ^
+  // [analyzer] unspecified
+  // [cfe] unspecified
+
+  var v15 = {v13};
+  Set<List<T>> v16 = v15;
+  v15 = v16;
+  T();
+//^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+  T.named();
+  //^^^^^
+  // [analyzer] unspecified
+  // [cfe] unspecified
+
+  T v17 = foo<T>(T());
+  //             ^
+  // [analyzer] unspecified
+  // [cfe] unspecified
+
+  T.staticMethod<T>();
+  //^^^^^^^^^^^^
+  // [analyzer] unspecified
+  // [cfe] unspecified
+}
diff --git a/tests/language/nonfunction_type_aliases/usage_null_test.dart b/tests/language/nonfunction_type_aliases/usage_null_test.dart
new file mode 100644
index 0000000..8610487
--- /dev/null
+++ b/tests/language/nonfunction_type_aliases/usage_null_test.dart
@@ -0,0 +1,56 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// SharedOptions=--enable-experiment=nonfunction-type-aliases
+
+// Introduce an aliased type.
+
+typedef T = Null;
+
+// Use the aliased type.
+
+T v1;
+List<T> v2 = [];
+final T v3 = throw "Anything";
+const List<T> v4 = [];
+const v5 = <Type, Type>{T: T};
+
+abstract class C {
+  static T v6;
+  static List<T> v7 = [];
+  static final T v8 = throw "Anything";
+  static const List<T> v9 = [];
+
+  T v10;
+  List<T> v11 = [];
+  final T v12;
+
+  C(): v12 = null;
+  C.name1(this.v10, this.v12);
+  factory C.name2(T arg1, T arg2) = C.name1;
+
+  T operator +(T other);
+  T get g;
+  set g(T value);
+  Map<T, T> m1(covariant T arg1, [Set<Set<T>> arg2]);
+  void m2({T arg1, T arg2(T arg21, T arg22)});
+}
+
+extension E on T {
+  T foo(T t) => t;
+}
+
+X foo<X>(X x) => x;
+
+// Function literal signature inference yields `Object? x`, so we force it.
+T Function(T) id = (Null x) => x;
+
+main() {
+  var v13 = <T>[];
+  var v14 = <Set<T>, Set<T>>{{}: {}};
+  v14[{}] = {};
+  var v15 = {v13};
+  Set<List<T>> v16 = v15;
+  v15 = v16;
+}
diff --git a/tests/language/nonfunction_type_aliases/usage_object_error_test.dart b/tests/language/nonfunction_type_aliases/usage_object_error_test.dart
new file mode 100644
index 0000000..2ea105c
--- /dev/null
+++ b/tests/language/nonfunction_type_aliases/usage_object_error_test.dart
@@ -0,0 +1,48 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// SharedOptions=--enable-experiment=nonfunction-type-aliases
+
+// Introduce an aliased type.
+
+typedef T = Object;
+
+// Use the aliased type.
+
+abstract class C {
+  T? v10;
+  final T v12;
+  C(): v12 = T();
+  C.name1(this.v10, this.v12);
+  factory C.name2(T arg1, T arg2) = C.name1;
+}
+
+abstract class D2 extends C with T {}
+//             ^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+abstract class D3 implements T {}
+//             ^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+abstract class D4 = C with T;
+//             ^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+main() {
+  T.named();
+//  ^^^^^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+  T.staticMethod<T>();
+//  ^^^^^^^^^^^^
+// [analyzer] unspecified
+// [cfe] Method not found: 'Object.staticMethod'.
+//  ^^^^^^^^^^^^
+// [cfe] A constructor invocation can't have type arguments on the constructor name.
+}
diff --git a/tests/language/nonfunction_type_aliases/usage_object_test.dart b/tests/language/nonfunction_type_aliases/usage_object_test.dart
new file mode 100644
index 0000000..66c278c
--- /dev/null
+++ b/tests/language/nonfunction_type_aliases/usage_object_test.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.
+
+// SharedOptions=--enable-experiment=nonfunction-type-aliases
+
+// Introduce an aliased type.
+
+typedef T = Object;
+
+// Use the aliased type.
+
+T? v1;
+List<T> v2 = [];
+final T v3 = throw "Anything";
+const List<T> v4 = [];
+const v5 = <Type, Type>{T: T};
+
+abstract class C {
+  static T? v6;
+  static List<T> v7 = [];
+  static final T v8 = throw "Anything";
+  static const List<T> v9 = [];
+
+  T? v10;
+  List<T> v11 = [];
+  final T v12;
+
+  C(): v12 = T();
+  C.name1(this.v10, this.v12);
+  factory C.name2(T arg1, T arg2) = C.name1;
+
+  T operator +(T other);
+  T get g;
+  set g(T value);
+  Map<T, T> m1(covariant T arg1, [Set<Set<T>> arg2]);
+  void m2({T arg1, T arg2(T arg21, T arg22)});
+}
+
+class D1 extends T {}
+
+extension E on T {
+  T foo(T t) => t;
+}
+
+X foo<X>(X x) => x;
+
+T Function(T) id = (x) => x;
+
+main() {
+  var v13 = <T>[];
+  var v14 = <Set<T>, Set<T>>{{}: {}};
+  v14[{}] = {T()};
+  var v15 = {v13};
+  Set<List<T>> v16 = v15;
+  v15 = v16;
+  T();
+  T v17 = foo<T>(T());
+  id(v17);
+}
diff --git a/tests/language/nonfunction_type_aliases/usage_type_variable_error_test.dart b/tests/language/nonfunction_type_aliases/usage_type_variable_error_test.dart
new file mode 100644
index 0000000..b24e824
--- /dev/null
+++ b/tests/language/nonfunction_type_aliases/usage_type_variable_error_test.dart
@@ -0,0 +1,74 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// SharedOptions=--enable-experiment=nonfunction-type-aliases
+
+// Introduce an aliased type.
+
+class A {
+  A();
+  A.named();
+  static void staticMethod<X>() {}
+}
+
+typedef T<X extends A> = X;
+
+// Use the aliased type.
+
+class C {
+  final T v12;
+
+  C(): v12 = T();
+  //         ^
+  // [analyzer] unspecified
+  // [cfe] unspecified
+}
+
+abstract class D2 extends C with T {}
+//             ^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+abstract class D4 = C with T;
+//             ^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+main() {
+  var v14 = <Set<T>, Set<T>>{{}: {}};
+  v14[{}] = {T()};
+  //         ^
+  // [analyzer] unspecified
+  // [cfe] unspecified
+
+  T();
+//^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+  T v17 = foo<T>(T());
+  //             ^
+  // [analyzer] unspecified
+  // [cfe] unspecified
+
+  T.named();
+//^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+  T().unknownInstanceMethod();
+//^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+  T.staticMethod<T>();
+//^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+  T.unknownStaticMethod();
+//^
+// [analyzer] unspecified
+// [cfe] unspecified
+}
diff --git a/tests/language/nonfunction_type_aliases/usage_type_variable_test.dart b/tests/language/nonfunction_type_aliases/usage_type_variable_test.dart
new file mode 100644
index 0000000..12aec39
--- /dev/null
+++ b/tests/language/nonfunction_type_aliases/usage_type_variable_test.dart
@@ -0,0 +1,66 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// SharedOptions=--enable-experiment=nonfunction-type-aliases
+
+// Introduce an aliased type.
+
+class A {
+  A();
+  A.named();
+  static void staticMethod<X>() {}
+}
+
+typedef T<X extends A> = X;
+
+// Use the aliased type.
+
+T? v1;
+List<T> v2 = [];
+final T v3 = throw "Anything";
+const List<T> v4 = [];
+const v5 = <Type, Type>{T: T};
+
+abstract class C {
+  static T? v6;
+  static List<T> v7 = [];
+  static final T v8 = throw "Anything";
+  static const List<T> v9 = [];
+
+  T? v10;
+  List<T> v11 = [];
+  final T? v12;
+
+  C(): v12 = null;
+  C.name1(this.v10, this.v12);
+  factory C.name2(T arg1, T arg2) = C.name1;
+
+  T operator +(T other);
+  T get g;
+  set g(T value);
+  Map<T, T> m1(covariant T arg1, [Set<Set<T>> arg2]);
+  void m2({T arg1, T arg2(T arg21, T arg22)});
+}
+
+class D1 extends T {}
+abstract class D3 implements T {}
+
+extension E on T {
+  T foo(T t) => t;
+}
+
+X foo<X>(X x) => x;
+
+T Function(T) id = (x) => x;
+
+main() {
+  var v13 = <T>[];
+  var v14 = <Set<T>, Set<T>>{{}: {}};
+  v14[{}] = {D1()};
+  var v15 = {v13};
+  Set<List<T>> v16 = v15;
+  v15 = v16;
+  T v17 = foo<T>(A());
+  id(v17);
+}
diff --git a/tests/language/nonfunction_type_aliases/usage_void_error_test.dart b/tests/language/nonfunction_type_aliases/usage_void_error_test.dart
new file mode 100644
index 0000000..8b97111
--- /dev/null
+++ b/tests/language/nonfunction_type_aliases/usage_void_error_test.dart
@@ -0,0 +1,70 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// SharedOptions=--enable-experiment=nonfunction-type-aliases
+
+// Introduce an aliased type.
+
+typedef T = void;
+
+// Use the aliased type.
+
+abstract class C {
+  final T v12;
+
+  C(): v12 = T();
+  //         ^
+  // [analyzer] unspecified
+  // [cfe] unspecified
+}
+
+class D1 extends T {}
+//    ^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+abstract class D2 extends C with T {}
+//                               ^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+abstract class D3 implements T {}
+//                           ^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+abstract class D4 = C with T;
+//                         ^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+X foo<X>(X x) => x;
+
+main() {
+  var v14 = <Set<T>, Set<T>>{{}: {}};
+  v14[{}] = {T()};
+  //         ^
+  // [analyzer] unspecified
+  // [cfe] unspecified
+
+  T();
+//^
+// [analyzer] unspecified
+// [cfe] unspecified
+
+  T.named();
+  //^^^^^
+  // [analyzer] unspecified
+  // [cfe] unspecified
+
+  T v17 = foo<T>(T());
+  //             ^
+  // [analyzer] unspecified
+  // [cfe] unspecified
+
+  T.staticMethod<T>();
+  //^^^^^^^^^^^^
+  // [analyzer] unspecified
+  // [cfe] unspecified
+}
diff --git a/tests/language/nonfunction_type_aliases/usage_void_test.dart b/tests/language/nonfunction_type_aliases/usage_void_test.dart
new file mode 100644
index 0000000..cb752e5
--- /dev/null
+++ b/tests/language/nonfunction_type_aliases/usage_void_test.dart
@@ -0,0 +1,56 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// SharedOptions=--enable-experiment=nonfunction-type-aliases
+
+// Introduce an aliased type.
+
+typedef T = void;
+
+// Use the aliased type.
+
+T v1;
+List<T> v2 = [];
+final T v3 = throw "Anything";
+const List<T> v4 = [];
+const v5 = <Type, Type>{T: T};
+
+abstract class C {
+  static T v6;
+  static List<T> v7 = [];
+  static final T v8 = throw "Anything";
+  static const List<T> v9 = [];
+
+  T v10;
+  List<T> v11 = [];
+  final T v12;
+
+  C.name1(this.v10, this.v12);
+  factory C.name2(T arg1, T arg2) = C.name1;
+
+  T operator +(T other);
+  T get g;
+  set g(T value);
+  Map<T, T> m1(covariant T arg1, [Set<Set<T>> arg2]);
+  void m2({T arg1, T arg2(T arg21, T arg22)});
+}
+
+extension E on T {
+  T foo(T t) => t;
+}
+
+X foo<X>(X x) => x;
+
+T Function(T) id = (x) => x;
+
+main() {
+  var v13 = <T>[];
+  var v14 = <Set<T>, Set<T>>{{}: {}};
+  v14[{}] = {};
+  var v15 = {v13};
+  Set<List<T>> v16 = v15;
+  v15 = v16;
+  T v17 = null;
+  id(v17);
+}
diff --git a/tests/language/override/inheritance_field_test.dart b/tests/language/override/inheritance_field_test.dart
index 847de4d..871f1f1 100644
--- a/tests/language/override/inheritance_field_test.dart
+++ b/tests/language/override/inheritance_field_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.
 
-import "package:meta/meta.dart" show virtual;
-
 class A {
   get getter1 => null; //# 01: ok
   num get getter2 => 0; //# 02: ok
@@ -26,12 +24,12 @@
   set setter10(int _) => null; //# 30: compile-time error
   set setter11(int _) => null; //# 31: compile-time error
 
-  @virtual int field1 = 0; //# 41: ok
+  int field1 = 0; //# 41: ok
   num field2 = 0; //# 42: compile-time error
   int field3 = 0; //# 43: compile-time error
   int field4 = 0; //# 44: compile-time error
   int field5 = 0; //# 45: compile-time error
-  @virtual num field6 = 0; //# 46: ok
+  num field6 = 0; //# 46: ok
   num field7 = 0; //# 47: compile-time error
   num get field8 => 0; //# 48: compile-time error
   num field9 = 0; //# 49: compile-time error
diff --git a/tests/language/prefix/transitive_import_prefix_test.dart b/tests/language/prefix/transitive_import_prefix_test.dart
index 9186560..34c3020 100644
--- a/tests/language/prefix/transitive_import_prefix_test.dart
+++ b/tests/language/prefix/transitive_import_prefix_test.dart
@@ -7,7 +7,7 @@
   // Library prefixes in the imported libraries should not be visible here.
   new lib11.Library11(1);
   //  ^^^^^^^^^^^^^^^
-  // [analyzer] STATIC_WARNING.NEW_WITH_NON_TYPE
+  // [analyzer] STATIC_WARNING.CREATION_WITH_NON_TYPE
   // [cfe] Method not found: 'lib11.Library11'.
   lib11.Library11.static_func();
 //^^^^^
diff --git a/tests/language/prefix/transitive_import_test.dart b/tests/language/prefix/transitive_import_test.dart
index 0ae3fa7..256894c 100644
--- a/tests/language/prefix/transitive_import_test.dart
+++ b/tests/language/prefix/transitive_import_test.dart
@@ -10,7 +10,7 @@
   // Class should not be visible.
   new lib12.Library11(1);
   //        ^^^^^^^^^
-  // [analyzer] STATIC_WARNING.NEW_WITH_NON_TYPE
+  // [analyzer] STATIC_WARNING.CREATION_WITH_NON_TYPE
   // [cfe] Method not found: 'Library11'.
 
   // Variable should not be visible.
diff --git a/tests/language/private/access_test.dart b/tests/language/private/access_test.dart
index a1cf6a1..016e4dc 100644
--- a/tests/language/private/access_test.dart
+++ b/tests/language/private/access_test.dart
@@ -19,7 +19,7 @@
 // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_FUNCTION
   new _Class();
   //  ^^^^^^
-  // [analyzer] STATIC_WARNING.NEW_WITH_NON_TYPE
+  // [analyzer] STATIC_WARNING.CREATION_WITH_NON_TYPE
   // [cfe] Method not found: '_Class'.
   private._Class();
 //^
diff --git a/tests/language/regress/regress14348_test.dart b/tests/language/regress/regress14348_test.dart
index 96ac17d..cc33a48 100644
--- a/tests/language/regress/regress14348_test.dart
+++ b/tests/language/regress/regress14348_test.dart
@@ -7,7 +7,7 @@
 import "package:collection/equality.dart";
 
 main() {
-  const Equality<Iterable> eq = const UnorderedIterableEquality();
-  const Equality<Map<dynamic, Iterable>> mapeq =
-      const MapEquality<dynamic, Iterable>(values: eq);
+  const Equality<Iterable?> eq = const UnorderedIterableEquality();
+  const Equality<Map<dynamic, Iterable?>> mapeq =
+      const MapEquality<dynamic, Iterable?>(values: eq);
 }
diff --git a/tests/language/regress/regress21793_test.dart b/tests/language/regress/regress21793_test.dart
index d767690..26d9ff6d 100644
--- a/tests/language/regress/regress21793_test.dart
+++ b/tests/language/regress/regress21793_test.dart
@@ -15,6 +15,6 @@
 main() {
   print(new A()(499));
   //        ^
-  // [analyzer] STATIC_WARNING.NEW_WITH_NON_TYPE
+  // [analyzer] STATIC_WARNING.CREATION_WITH_NON_TYPE
   // [cfe] Method not found: 'A'.
 }
diff --git a/tests/language/regress/regress34495_test.dart b/tests/language/regress/regress34495_test.dart
index cce9bfe..f33f4c5 100644
--- a/tests/language/regress/regress34495_test.dart
+++ b/tests/language/regress/regress34495_test.dart
@@ -4,7 +4,7 @@
 
 final foo = A<B>.foo();
 //          ^
-// [analyzer] STATIC_WARNING.NEW_WITH_NON_TYPE
+// [analyzer] STATIC_WARNING.CREATION_WITH_NON_TYPE
 // [cfe] Method not found: 'A'.
 //            ^
 // [analyzer] STATIC_TYPE_WARNING.NON_TYPE_AS_TYPE_ARGUMENT
diff --git a/tests/language/super/field_2_test.dart b/tests/language/super/field_2_test.dart
index 51cc926..82b899c 100644
--- a/tests/language/super/field_2_test.dart
+++ b/tests/language/super/field_2_test.dart
@@ -3,10 +3,8 @@
 // BSD-style license that can be found in the LICENSE file.
 
 import "package:expect/expect.dart";
-import "package:meta/meta.dart" show virtual;
 
 class A {
-  @virtual
   var foo;
   A(this.foo);
 
diff --git a/tests/language/super/field_test.dart b/tests/language/super/field_test.dart
index e4dd127..1bef878 100644
--- a/tests/language/super/field_test.dart
+++ b/tests/language/super/field_test.dart
@@ -4,7 +4,6 @@
 // Dart test for testing super field access.
 
 import "package:expect/expect.dart";
-import "package:meta/meta.dart" show virtual;
 
 class A {
   A() {
@@ -14,7 +13,6 @@
     return "Gruezi";
   }
 
-  @virtual
   String city = "";
 }
 
diff --git a/tests/language/unsorted/ackermann_test.dart b/tests/language/unsorted/ackermann_test.dart
new file mode 100644
index 0000000..c35d2d3
--- /dev/null
+++ b/tests/language/unsorted/ackermann_test.dart
@@ -0,0 +1,22 @@
+// Copyright (c) 2011, the Dart project authors.  Please see the AUTHORS file
+// for 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 version of two-argument Ackermann-Peter function.
+
+import "package:expect/expect.dart";
+
+class AckermannTest {
+  static int ack(int m, int n) {
+    return m == 0
+        ? n + 1
+        : ((n == 0) ? ack(m - 1, 1) : ack(m - 1, ack(m, n - 1)));
+  }
+
+  static testMain() {
+    Expect.equals(253, ack(3, 5));
+  }
+}
+
+main() {
+  AckermannTest.testMain();
+}
diff --git a/tests/language/unsorted/additional_interface_adds_optional_args_concrete_test.dart b/tests/language/unsorted/additional_interface_adds_optional_args_concrete_test.dart
new file mode 100644
index 0000000..2fe4137
--- /dev/null
+++ b/tests/language/unsorted/additional_interface_adds_optional_args_concrete_test.dart
@@ -0,0 +1,24 @@
+// Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+class A {
+  void foo() {}
+}
+
+abstract class I {
+  void foo([x]);
+}
+
+class /*@compile-error=unspecified*/ B extends A implements I {
+  // This class declaration violates soundness, since it allows `new
+  // B().foo(42)`, which would lead to invalid arguments being passed to A.foo.
+}
+
+void f(B b) {
+  b.foo();
+}
+
+main() {
+  f(new B());
+}
diff --git a/tests/language/unsorted/additional_interface_adds_optional_args_test.dart b/tests/language/unsorted/additional_interface_adds_optional_args_test.dart
new file mode 100644
index 0000000..5c9953e
--- /dev/null
+++ b/tests/language/unsorted/additional_interface_adds_optional_args_test.dart
@@ -0,0 +1,36 @@
+// Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// This test exercises a corner case of override checking that is safe from a
+// soundness perspective, but which we haven't decided whether or not to allow
+// from a usability perspective.
+
+class A {
+  void foo() {}
+}
+
+abstract class I {
+  void foo([x]);
+}
+
+abstract class B extends A implements I {
+  // If this class were concrete, there would be a problem, since `new
+  // B().foo(42)` would be statically allowed, but would lead to invalid
+  // arguments being passed to A.foo.  But since the class is abstract, there is
+  // no problem.
+}
+
+class C extends B {
+  void foo([x]) {
+    super.foo();
+  }
+}
+
+void f(B b) {
+  b.foo(42);
+}
+
+main() {
+  f(new C());
+}
diff --git a/tests/language/unsorted/allocate_large_object_test.dart b/tests/language/unsorted/allocate_large_object_test.dart
new file mode 100644
index 0000000..a94d26d5
--- /dev/null
+++ b/tests/language/unsorted/allocate_large_object_test.dart
@@ -0,0 +1,46 @@
+// Copyright (c) 2011, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import "package:expect/expect.dart";
+
+class A {
+  int a;
+  double? d1;
+  double? d2;
+  double? d3;
+  double? d4;
+  double? d5;
+  double? d6;
+  double? d7;
+  double? d8;
+  double? d9;
+  double? d10;
+  double? d11;
+  double? d12;
+  double? d13;
+  double? d14;
+  static var s;
+
+  static foo() {
+    return s;
+  }
+
+  A(this.a) {}
+
+  value() {
+    return a + foo();
+  }
+}
+
+class AllocateLargeObject {
+  static testMain() {
+    var a = new A(1);
+    A.s = 4;
+    Expect.equals(5, a.value());
+  }
+}
+
+main() {
+  AllocateLargeObject.testMain();
+}
diff --git a/tests/language/unsorted/allocate_test.dart b/tests/language/unsorted/allocate_test.dart
new file mode 100644
index 0000000..2ab25c5
--- /dev/null
+++ b/tests/language/unsorted/allocate_test.dart
@@ -0,0 +1,24 @@
+// Copyright (c) 2011, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import "package:expect/expect.dart";
+
+class MyAllocate {
+  const MyAllocate([int value = 0]) : value_ = value;
+  int getValue() {
+    return value_;
+  }
+
+  final int value_;
+}
+
+class AllocateTest {
+  static testMain() {
+    Expect.equals(900, (new MyAllocate(900)).getValue());
+  }
+}
+
+main() {
+  AllocateTest.testMain();
+}
diff --git a/tests/language/unsorted/arg_param_trailing_comma_test.dart b/tests/language/unsorted/arg_param_trailing_comma_test.dart
new file mode 100644
index 0000000..ab9c425
--- /dev/null
+++ b/tests/language/unsorted/arg_param_trailing_comma_test.dart
@@ -0,0 +1,562 @@
+// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+// Dart test program for testing params.
+
+// Convenience values.
+var c = new C();
+var x = 42;
+var y = 42;
+var z = 42;
+
+// Trailing comma in parameter lists.
+
+// Typedefs.
+typedef fx(x, ); //                                     //# none: ok
+typedef fy([y,]); //                                    //# none: continued
+typedef fxy(x, [y, ]); //                               //# none: continued
+typedef fz({z,}); //                                    //# none: continued
+typedef fxz(x, {z, }); //                               //# none: continued
+
+// As arguments type.
+argfx(void f(x, )) {} //                                //# none: continued
+argfy(void f([y, ])) {} //                              //# none: continued
+argfxy(void f(x, [y, ])) {} //                          //# none: continued
+argfz(void f({z, })) {} //                              //# none: continued
+argfxz(void f(x, {z, })) {} //                          //# none: continued
+
+// Top level functions
+void topx(x,) {} //                                     //# none: continued
+void topy([y, ]) {} //                                  //# none: continued
+void topxy(x, [y, ]) {} //                              //# none: continued
+void topz({z, }) {} //                                  //# none: continued
+void topxz(x, {z, }) {} //                              //# none: continued
+
+void set topsetx(x, ) {} //                             //# none: continued
+
+// After specific parameter formats.
+void afterDefaultValueY([int y = 42, ]) {} //           //# none: continued
+void afterDefaultValueZ({int z : 42, }) {} //           //# none: continued
+void afterFunsigX(void f(),) {} //                      //# none: continued
+void afterFunsigY([void f()?,]) {} //                   //# none: continued
+void afterFunsigZ({void f()?,}) {} //                   //# none: continued
+void afterFunsigDefaultValueY([void f() = topy,]) {} // //# none: continued
+void afterFunsigDefaultValueZ({void f() : topz,}) {} // //# none: continued
+
+class C {
+  C();
+
+  // Constructors.
+  C.x(x, ); //                                          //# none: continued
+  C.y([y, ]); //                                        //# none: continued
+  C.xy(x, [y, ]); //                                    //# none: continued
+  C.z({z, }); //                                        //# none: continued
+  C.xz(x, {z, }); //                                    //# none: continued
+
+  // Static members
+  static void staticx(x,) {} //                         //# none: continued
+  static void staticy([y, ]) {} //                      //# none: continued
+  static void staticxy(x, [y, ]) {} //                  //# none: continued
+  static void staticz({z, }) {} //                      //# none: continued
+  static void staticxz(x, {z, }) {} //                  //# none: continued
+
+  static void set staticsetx(x, ) {} //                 //# none: continued
+
+  // Instance members
+  void instancex(x,) {} //                              //# none: continued
+  void instancey([y, ]) {} //                           //# none: continued
+  void instancexy(x, [y, ]) {} //                       //# none: continued
+  void instancez({z, }) {} //                           //# none: continued
+  void instancexz(x, {z, }) {} //                       //# none: continued
+
+  void set instancesetx(x, ) {} //                      //# none: continued
+
+  operator +(x, ) => this; //                           //# none: continued
+  operator []=(x, y, ) {} //                            //# none: continued
+}
+
+main() {
+  testCalls(); //                                       //# none: continued
+  // Make sure the cases are checked.
+  testBadCalls();
+}
+
+void testCalls() {
+  // Check that all functions can be called normally
+  topx(x); //                                           //# none: continued
+  topy(y); //                                           //# none: continued
+  topxy(x, y); //                                       //# none: continued
+  topz(); //                                            //# none: continued
+  topz(z: z); //                                        //# none: continued
+  topxz(x); //                                          //# none: continued
+  topxz(x, z: z); //                                    //# none: continued
+  topsetx = x; //                                       //# none: continued
+  afterDefaultValueY(); //                              //# none: continued
+  afterDefaultValueY(y); //                             //# none: continued
+  afterDefaultValueZ(); //                              //# none: continued
+  afterDefaultValueZ(z: z); //                          //# none: continued
+  new C.x(x); //                                        //# none: continued
+  new C.xy(x); //                                       //# none: continued
+  new C.xy(x, y); //                                    //# none: continued
+  new C.y(y); //                                        //# none: continued
+  new C.xz(x); //                                       //# none: continued
+  new C.xz(x, z: z); //                                 //# none: continued
+  new C.z(z: z); //                                     //# none: continued
+  C.staticx(x); //                                      //# none: continued
+  C.staticy(y); //                                      //# none: continued
+  C.staticxy(x); //                                     //# none: continued
+  C.staticxy(x, y); //                                  //# none: continued
+  C.staticz(); //                                       //# none: continued
+  C.staticz(z: z); //                                   //# none: continued
+  C.staticxz(x); //                                     //# none: continued
+  C.staticxz(x, z: z); //                               //# none: continued
+  C.staticsetx = x; //                                  //# none: continued
+  c.instancex(x); //                                    //# none: continued
+  c.instancey(); //                                     //# none: continued
+  c.instancey(y); //                                    //# none: continued
+  c.instancexy(x); //                                   //# none: continued
+  c.instancexy(x, y); //                                //# none: continued
+  c.instancez(); //                                     //# none: continued
+  c.instancez(z: z); //                                 //# none: continued
+  c.instancexz(x); //                                   //# none: continued
+  c.instancexz(x, z: z); //                             //# none: continued
+  c.instancesetx = x; //                                //# none: continued
+  c + x; //                                             //# none: continued
+  c[x] = y; //                                          //# none: continued
+
+  // Call with extra comma (not possible for setters and operators).
+  topx(x, ); //                                         //# none: continued
+  topy(y, ); //                                         //# none: continued
+  topxy(x, y, ); //                                     //# none: continued
+  topxy(x, ); //                                        //# none: continued
+  topz(z: z, ); //                                      //# none: continued
+  topxz(x, ); //                                        //# none: continued
+  topxz(x, z: z, ); //                                  //# none: continued
+  new C.x(x, ); //                                      //# none: continued
+  new C.xy(x, y, ); //                                  //# none: continued
+  new C.xy(x, ); //                                     //# none: continued
+  new C.y(y, ); //                                      //# none: continued
+  new C.xz(x, ); //                                     //# none: continued
+  new C.xz(x, z: z, ); //                               //# none: continued
+  new C.z(z: z, ); //                                   //# none: continued
+  C.staticx(x, ); //                                    //# none: continued
+  C.staticy(y, ); //                                    //# none: continued
+  C.staticxy(x, y, ); //                                //# none: continued
+  C.staticxy(x, ); //                                   //# none: continued
+  C.staticz(z: z, ); //                                 //# none: continued
+  C.staticxz(x, ); //                                   //# none: continued
+  C.staticxz(x, z: z, ); //                             //# none: continued
+  c.instancex(x, ); //                                  //# none: continued
+  c.instancey(y, ); //                                  //# none: continued
+  c.instancexy(x, y, ); //                              //# none: continued
+  c.instancexy(x, ); //                                 //# none: continued
+  c.instancez(z: z, ); //                               //# none: continued
+  c.instancexz(x, ); //                                 //# none: continued
+  c.instancexz(x, z: z, ); //                           //# none: continued
+
+  // Typedefs work as expected.
+  if (topx is! fx) throw "Bad type: $fx"; //            //# none: continued
+  if (topy is! fy) throw "Bad type: $fy"; //            //# none: continued
+  if (topxy is! fxy) throw "Bad type: $fxy"; //         //# none: continued
+  if (topz is! fz) throw "Bad type: $fz"; //            //# none: continued
+  if (topxz is! fxz) throw "Bad type: $fxz"; //         //# none: continued
+
+  // Parameter types work (checked mode only test).
+  argfx(topx); //                                       //# none: continued
+  argfy(topy); //                                       //# none: continued
+  argfxy(topxy); //                                     //# none: continued
+  argfz(topz); //                                       //# none: continued
+  argfxz(topxz); //                                     //# none: continued
+}
+
+// Invalid syntax. This was invalid syntax before the addition of trailing
+// commas too, and should stay that way.
+void topBadEmpty(,) {} //                          //# 1: syntax error
+void topBadStart(, a) {} //                        //# 2: syntax error
+void topBadEnd(a,,) {} //                          //# 3: syntax error
+void topBadMiddle(a,, b) {} //                     //# 4: syntax error
+void topBadPosEmpty([]) {} //                      //# 5: syntax error
+void topBadPosEmpty(,[]) {} //                     //# 6: syntax error
+void topBadPosEmpty([,]) {} //                     //# 7: syntax error
+void topBadPosEmpty([],) {} //                     //# 8: syntax error
+void topBadPosStart(,[a]) {} //                    //# 9: syntax error
+void topBadPosStart([, a]) {} //                   //# 10: syntax error
+void topBadPosEnd([a,,]) {} //                     //# 11: syntax error
+void topBadPosStart([a],) {} //                    //# 12: syntax error
+void topBadPosMiddle([a,, b]) {} //                //# 13: syntax error
+void topBadNamEmpty({}) {} //                      //# 14: syntax error
+void topBadNamEmpty(,{}) {} //                     //# 15: syntax error
+void topBadNamEmpty({,}) {} //                     //# 16: syntax error
+void topBadNamEmpty({},) {} //                     //# 17: syntax error
+void topBadNamStart(,{a}) {} //                    //# 18: syntax error
+void topBadNamStart({, a}) {} //                   //# 19: syntax error
+void topBadNamEnd({a,,}) {} //                     //# 20: syntax error
+void topBadNamStart({a},) {} //                    //# 21: syntax error
+void topBadNamMiddle({a,, b}) {} //                //# 22: syntax error
+void set topSetBadEmpty(,) {} //                   //# 23: syntax error
+void set topSetBadStart(, a) {} //                 //# 24: syntax error
+void set topSetBadEnd(a,,) {} //                   //# 25: syntax error
+void set topSetBadMiddle(a,, b) {} //              //# 26: syntax error
+class Bad {
+  Bad() {}
+  Bad.empty(,) {} //                               //# 27: syntax error
+  Bad.start(, a) {} //                             //# 28: syntax error
+  Bad.end(a,,) {} //                               //# 29: syntax error
+  Bad.middle(a,, b) {} //                          //# 30: syntax error
+  Bad.posEmpty([]) {} //                           //# 31: syntax error
+  Bad.posEmpty(,[]) {} //                          //# 32: syntax error
+  Bad.posEmpty([,]) {} //                          //# 33: syntax error
+  Bad.posEmpty([],) {} //                          //# 34: syntax error
+  Bad.posStart(,[a]) {} //                         //# 35: syntax error
+  Bad.posStart([, a]) {} //                        //# 36: syntax error
+  Bad.posEnd([a,,]) {} //                          //# 37: syntax error
+  Bad.posStart([a],) {} //                         //# 38: syntax error
+  Bad.PosMiddle([a,, b]) {} //                     //# 39: syntax error
+  Bad.namEmpty({}) {} //                           //# 40: syntax error
+  Bad.namEmpty(,{}) {} //                          //# 41: syntax error
+  Bad.namEmpty({,}) {} //                          //# 42: syntax error
+  Bad.namEmpty({},) {} //                          //# 43: syntax error
+  Bad.namStart(,{a}) {} //                         //# 44: syntax error
+  Bad.namStart({, a}) {} //                        //# 45: syntax error
+  Bad.namEnd({a,,}) {} //                          //# 46: syntax error
+  Bad.namStart({a},) {} //                         //# 47: syntax error
+  Bad.namMiddle({a,, b}) {} //                     //# 48: syntax error
+  static void staticBadEmpty(,) {} //              //# 49: syntax error
+  static void staticBadStart(, a) {} //            //# 50: syntax error
+  static void staticBadEnd(a,,) {} //              //# 51: syntax error
+  static void staticBadMiddle(a,, b) {} //         //# 52: syntax error
+  static void staticBadPosEmpty([]) {} //          //# 53: syntax error
+  static void staticBadPosEmpty(,[]) {} //         //# 54: syntax error
+  static void staticBadPosEmpty([,]) {} //         //# 55: syntax error
+  static void staticBadPosEmpty([],) {} //         //# 56: syntax error
+  static void staticBadPosStart(,[a]) {} //        //# 57: syntax error
+  static void staticBadPosStart([, a]) {} //       //# 58: syntax error
+  static void staticBadPosEnd([a,,]) {} //         //# 59: syntax error
+  static void staticBadPosStart([a],) {} //        //# 60: syntax error
+  static void staticBadPosMiddle([a,, b]) {} //    //# 61: syntax error
+  static void staticBadNamEmpty({}) {} //          //# 62: syntax error
+  static void staticBadNamEmpty(,{}) {} //         //# 63: syntax error
+  static void staticBadNamEmpty({,}) {} //         //# 64: syntax error
+  static void staticBadNamEmpty({},) {} //         //# 65: syntax error
+  static void staticBadNamStart(,{a}) {} //        //# 66: syntax error
+  static void staticBadNamStart({, a}) {} //       //# 67: syntax error
+  static void staticBadNamEnd({a,,}) {} //         //# 68: syntax error
+  static void staticBadNamStart({a},) {} //        //# 69: syntax error
+  static void staticBadNamMiddle({a,, b}) {} //    //# 70: syntax error
+  static void set staticSetBadEmpty(,) {} //       //# 71: syntax error
+  static void set staticSetBadStart(, a) {} //     //# 72: syntax error
+  static void set staticSetBadEnd(a,,) {} //       //# 73: syntax error
+  static void set staticSetBadMiddle(a,, b) {} //  //# 74: syntax error
+  void instanceBadEmpty(,) {} //                   //# 75: syntax error
+  void instanceBadStart(, a) {} //                 //# 76: syntax error
+  void instanceBadEnd(a,,) {} //                   //# 77: syntax error
+  void instanceBadMiddle(a,, b) {} //              //# 78: syntax error
+  void instanceBadPosEmpty([]) {} //               //# 79: syntax error
+  void instanceBadPosEmpty(,[]) {} //              //# 80: syntax error
+  void instanceBadPosEmpty([,]) {} //              //# 81: syntax error
+  void instanceBadPosEmpty([],) {} //              //# 82: syntax error
+  void instanceBadPosStart(,[a]) {} //             //# 83: syntax error
+  void instanceBadPosStart([, a]) {} //            //# 84: syntax error
+  void instanceBadPosEnd([a,,]) {} //              //# 85: syntax error
+  void instanceBadPosStart([a],) {} //             //# 86: syntax error
+  void instanceBadPosMiddle([a,, b]) {} //         //# 87: syntax error
+  void instanceBadNamEmpty({}) {} //               //# 88: syntax error
+  void instanceBadNamEmpty(,{}) {} //              //# 89: syntax error
+  void instanceBadNamEmpty({,}) {} //              //# 90: syntax error
+  void instanceBadNamEmpty({},) {} //              //# 91: syntax error
+  void instanceBadNamStart(,{a}) {} //             //# 92: syntax error
+  void instanceBadNamStart({, a}) {} //            //# 93: syntax error
+  void instanceBadNamEnd({a,,}) {} //              //# 94: syntax error
+  void instanceBadNamStart({a},) {} //             //# 95: syntax error
+  void instanceBadNamMiddle({a,, b}) {} //         //# 96: syntax error
+  void set instanceSetBadEmpty(,) {} //            //# 97: syntax error
+  void set instanceSetBadStart(, a) {} //          //# 98: syntax error
+  void set instanceSetBadEnd(a,,) {} //            //# 99: syntax error
+  void set instanceSetBadMiddle(a,, b) {} //       //# 100: syntax error
+  void operator *(,); //                           //# 101: syntax error
+  void operator *(, a); //                         //# 102: syntax error
+  void operator *(a,,); //                         //# 103: syntax error
+  void operator []=(, a); //                       //# 104: syntax error
+  void operator []=(a,,); //                       //# 105: syntax error
+  void operator []=(a,, b); //                     //# 106: syntax error
+  void operator []=(a,); //                        //# 107: compile-time error
+
+  method() {
+    // Local methods.
+    void localBadEmpty(,) {} //                    //# 108: syntax error
+    void localBadStart(, a) {} //                  //# 109: syntax error
+    void localBadEnd(a,,) {} //                    //# 110: syntax error
+    void localBadMiddle(a,, b) {} //               //# 111: syntax error
+    void localBadPosEmpty([]) {} //                //# 112: syntax error
+    void localBadPosEmpty(,[]) {} //               //# 113: syntax error
+    void localBadPosEmpty([,]) {} //               //# 114: syntax error
+    void localBadPosEmpty([],) {} //               //# 115: syntax error
+    void localBadPosStart(,[a]) {} //              //# 116: syntax error
+    void localBadPosStart([, a]) {} //             //# 117: syntax error
+    void localBadPosEnd([a,,]) {} //               //# 118: syntax error
+    void localBadPosStart([a],) {} //              //# 119: syntax error
+    void localBadPosMiddle([a,, b]) {} //          //# 120: syntax error
+    void localBadNamEmpty({}) {} //                //# 121: syntax error
+    void localBadNamEmpty(,{}) {} //               //# 122: syntax error
+    void localBadNamEmpty({,}) {} //               //# 123: syntax error
+    void localBadNamEmpty({},) {} //               //# 124: syntax error
+    void localBadNamStart(,{a}) {} //              //# 125: syntax error
+    void localBadNamStart({, a}) {} //             //# 126: syntax error
+    void localBadNamEnd({a,,}) {} //               //# 127: syntax error
+    void localBadNamStart({a},) {} //              //# 128: syntax error
+    void localBadNamMiddle({a,, b}) {} //          //# 129: syntax error
+
+    // invalid calls.
+
+    topx(,); //                                    //# 130: syntax error
+    topy(,); //                                    //# 131: syntax error
+    topz(,); //                                    //# 132: syntax error
+    topx(, x); //                                  //# 133: syntax error
+    topz(, z:z); //                                //# 134: syntax error
+    topxy(x,, y); //                               //# 135: syntax error
+    topxz(x,, z:z); //                             //# 136: syntax error
+    topx(x,,); //                                  //# 137: syntax error
+    topz(z:z,,); //                                //# 138: syntax error
+
+    new C.x(,); //                                 //# 139: syntax error
+    new C.y(,); //                                 //# 140: syntax error
+    new C.z(,); //                                 //# 141: syntax error
+    new C.x(, x); //                               //# 142: syntax error
+    new C.z(, z:z); //                             //# 143: syntax error
+    new C.xy(x,, y); //                            //# 144: syntax error
+    new C.xz(x,, z:z); //                          //# 145: syntax error
+    new C.x(x,,); //                               //# 146: syntax error
+    new C.z(z:z,,); //                             //# 147: syntax error
+
+    C.staticx(,); //                               //# 148: syntax error
+    C.staticy(,); //                               //# 149: syntax error
+    C.staticz(,); //                               //# 150: syntax error
+    C.staticx(, x); //                             //# 151: syntax error
+    C.staticz(, z:z); //                           //# 152: syntax error
+    C.staticxy(x,, y); //                          //# 153: syntax error
+    C.staticxz(x,, z:z); //                        //# 154: syntax error
+    C.staticx(x,,); //                             //# 155: syntax error
+    C.staticz(z:z,,); //                           //# 156: syntax error
+
+    c.instancex(,); //                             //# 157: syntax error
+    c.instancey(,); //                             //# 158: syntax error
+    c.instancez(,); //                             //# 159: syntax error
+    c.instancex(, x); //                           //# 160: syntax error
+    c.instancez(, z:z); //                         //# 161: syntax error
+    c.instancexy(x,, y); //                        //# 162: syntax error
+    c.instancexz(x,, z:z); //                      //# 163: syntax error
+    c.instancex(x,,); //                           //# 164: syntax error
+    c.instancez(z:z,,); //                         //# 165: syntax error
+
+    c[x,] = y; //                                  //# 166: syntax error
+  }
+
+  // As parameters:
+  void f(void topBadEmpty(,)) {} //                //# 167: syntax error
+  void f(void topBadStart(, a)) {} //              //# 168: syntax error
+  void f(void topBadEnd(a,,)) {} //                //# 169: syntax error
+  void f(void topBadMiddle(a,, b)) {} //           //# 170: syntax error
+  void f(void topBadPosEmpty([])) {} //            //# 171: syntax error
+  void f(void topBadPosEmpty(,[])) {} //           //# 172: syntax error
+  void f(void topBadPosEmpty([,])) {} //           //# 173: syntax error
+  void f(void topBadPosEmpty([],)) {} //           //# 174: syntax error
+  void f(void topBadPosStart(,[a])) {} //          //# 175: syntax error
+  void f(void topBadPosStart([, a])) {} //         //# 176: syntax error
+  void f(void topBadPosEnd([a,,])) {} //           //# 177: syntax error
+  void f(void topBadPosStart([a],)) {} //          //# 178: syntax error
+  void f(void topBadPosMiddle([a,, b])) {} //      //# 179: syntax error
+  void f(void topBadNamEmpty({})) {} //            //# 180: syntax error
+  void f(void topBadNamEmpty(,{})) {} //           //# 181: syntax error
+  void f(void topBadNamEmpty({,})) {} //           //# 182: syntax error
+  void f(void topBadNamEmpty({},)) {} //           //# 183: syntax error
+  void f(void topBadNamStart(,{a})) {} //          //# 184: syntax error
+  void f(void topBadNamStart({, a})) {} //         //# 185: syntax error
+  void f(void topBadNamEnd({a,,})) {} //           //# 186: syntax error
+  void f(void topBadNamStart({a},)) {} //          //# 187: syntax error
+  void f(void topBadNamMiddle({a,, b})) {} //      //# 188: syntax error
+}
+
+// As typedefs
+typedef void BadEmpty(,); //                       //# 189: syntax error
+typedef void BadStart(, a); //                     //# 190: syntax error
+typedef void BadEnd(a,,); //                       //# 191: syntax error
+typedef void BadMiddle(a,, b); //                  //# 192: syntax error
+typedef void BadPosEmpty([]); //                   //# 193: syntax error
+typedef void BadPosEmpty(,[]); //                  //# 194: syntax error
+typedef void BadPosEmpty([,]); //                  //# 195: syntax error
+typedef void BadPosEmpty([],); //                  //# 196: syntax error
+typedef void BadPosStart(,[a]); //                 //# 197: syntax error
+typedef void BadPosStart([, a]); //                //# 198: syntax error
+typedef void BadPosEnd([a,,]); //                  //# 199: syntax error
+typedef void BadPosStart([a],); //                 //# 200: syntax error
+typedef void BadPosMiddle([a,, b]); //             //# 201: syntax error
+typedef void BadNamEmpty({}); //                   //# 202: syntax error
+typedef void BadNamEmpty(,{}); //                  //# 203: syntax error
+typedef void BadNamEmpty({,}); //                  //# 204: syntax error
+typedef void BadNamEmpty({},); //                  //# 205: syntax error
+typedef void BadNamStart(,{a}); //                 //# 206: syntax error
+typedef void BadNamStart({, a}); //                //# 207: syntax error
+typedef void BadNamEnd({a,,}); //                  //# 208: syntax error
+typedef void BadNamStart({a},); //                 //# 209: syntax error
+typedef void BadNamMiddle({a,, b}); //             //# 210: syntax error
+
+void testBadCalls() {
+  topBadEmpty(); //                                //# 1: continued
+  topBadStart(); //                                //# 2: continued
+  topBadEnd(); //                                  //# 3: continued
+  topBadMiddle(); //                               //# 4: continued
+  topBadPosEmpty(); //                             //# 5: continued
+  topBadPosEmpty(); //                             //# 6: continued
+  topBadPosEmpty(); //                             //# 7: continued
+  topBadPosEmpty(); //                             //# 8: continued
+  topBadPosStart(); //                             //# 9: continued
+  topBadPosStart(); //                             //# 10: continued
+  topBadPosEnd(); //                               //# 11: continued
+  topBadPosStart(); //                             //# 12: continued
+  topBadPosMiddle(); //                            //# 13: continued
+  topBadNamEmpty(); //                             //# 14: continued
+  topBadNamEmpty(); //                             //# 15: continued
+  topBadNamEmpty(); //                             //# 16: continued
+  topBadNamEmpty(); //                             //# 17: continued
+  topBadNamStart(); //                             //# 18: continued
+  topBadNamStart(); //                             //# 19: continued
+  topBadNamEnd(); //                               //# 20: continued
+  topBadNamStart(); //                             //# 21: continued
+  topBadNamMiddle(); //                            //# 22: continued
+  topSetBadEmpty = 1; //                           //# 23: continued
+  topSetBadStart = 1; //                           //# 24: continued
+  topSetBadEnd = 1; //                             //# 25: continued
+  topSetBadMiddle = 1; //                          //# 26: continued
+  new Bad.empty(); //                              //# 27: continued
+  new Bad.start(); //                              //# 28: continued
+  new Bad.end(); //                                //# 29: continued
+  new Bad.middle(); //                             //# 30: continued
+  new Bad.posEmpty(); //                           //# 31: continued
+  new Bad.posEmpty(); //                           //# 32: continued
+  new Bad.posEmpty(); //                           //# 33: continued
+  new Bad.posEmpty(); //                           //# 34: continued
+  new Bad.posStart(); //                           //# 35: continued
+  new Bad.posStart(); //                           //# 36: continued
+  new Bad.posEnd(); //                             //# 37: continued
+  new Bad.posStart(); //                           //# 38: continued
+  new Bad.PosMiddle(); //                          //# 39: continued
+  new Bad.namEmpty(); //                           //# 40: continued
+  new Bad.namEmpty(); //                           //# 41: continued
+  new Bad.namEmpty(); //                           //# 42: continued
+  new Bad.namEmpty(); //                           //# 43: continued
+  new Bad.namStart(); //                           //# 44: continued
+  new Bad.namStart(); //                           //# 45: continued
+  new Bad.namEnd(); //                             //# 46: continued
+  new Bad.namStart(); //                           //# 47: continued
+  new Bad.namMiddle(); //                          //# 48: continued
+  Bad.staticBadEmpty(); //                         //# 49: continued
+  Bad.staticBadStart(); //                         //# 50: continued
+  Bad.staticBadEnd(); //                           //# 51: continued
+  Bad.staticBadMiddle(); //                        //# 52: continued
+  Bad.staticBadPosEmpty(); //                      //# 53: continued
+  Bad.staticBadPosEmpty(); //                      //# 54: continued
+  Bad.staticBadPosEmpty(); //                      //# 55: continued
+  Bad.staticBadPosEmpty(); //                      //# 56: continued
+  Bad.staticBadPosStart(); //                      //# 57: continued
+  Bad.staticBadPosStart(); //                      //# 58: continued
+  Bad.staticBadPosEnd(); //                        //# 59: continued
+  Bad.staticBadPosStart(); //                      //# 60: continued
+  Bad.staticBadPosMiddle(); //                     //# 61: continued
+  Bad.staticBadNamEmpty(); //                      //# 62: continued
+  Bad.staticBadNamEmpty(); //                      //# 63: continued
+  Bad.staticBadNamEmpty(); //                      //# 64: continued
+  Bad.staticBadNamEmpty(); //                      //# 65: continued
+  Bad.staticBadNamStart(); //                      //# 66: continued
+  Bad.staticBadNamStart(); //                      //# 67: continued
+  Bad.staticBadNamEnd(); //                        //# 68: continued
+  Bad.staticBadNamStart(); //                      //# 69: continued
+  Bad.staticBadNamMiddle(); //                     //# 70: continued
+  Bad.staticSetBadEmpty = 1; //                    //# 71: continued
+  Bad.staticSetBadStart = 1; //                    //# 72: continued
+  Bad.staticSetBadEnd = 1; //                      //# 73: continued
+  Bad.staticSetBadMiddle = 1; //                   //# 74: continued
+
+  var bad = new Bad();
+  bad.instanceBadEmpty(); //                       //# 75: continued
+  bad.instanceBadStart(); //                       //# 76: continued
+  bad.instanceBadEnd(); //                         //# 77: continued
+  bad.instanceBadMiddle(); //                      //# 78: continued
+  bad.instanceBadPosEmpty(); //                    //# 79: continued
+  bad.instanceBadPosEmpty(); //                    //# 80: continued
+  bad.instanceBadPosEmpty(); //                    //# 81: continued
+  bad.instanceBadPosEmpty(); //                    //# 82: continued
+  bad.instanceBadPosStart(); //                    //# 83: continued
+  bad.instanceBadPosStart(); //                    //# 84: continued
+  bad.instanceBadPosEnd(); //                      //# 85: continued
+  bad.instanceBadPosStart(); //                    //# 86: continued
+  bad.instanceBadPosMiddle(); //                   //# 87: continued
+  bad.instanceBadNamEmpty(); //                    //# 88: continued
+  bad.instanceBadNamEmpty(); //                    //# 89: continued
+  bad.instanceBadNamEmpty(); //                    //# 90: continued
+  bad.instanceBadNamEmpty(); //                    //# 91: continued
+  bad.instanceBadNamStart(); //                    //# 92: continued
+  bad.instanceBadNamStart(); //                    //# 93: continued
+  bad.instanceBadNamEnd(); //                      //# 94: continued
+  bad.instanceBadNamStart(); //                    //# 95: continued
+  bad.instanceBadNamMiddle(); //                   //# 96: continued
+  bad.instanceSetBadEmpty = 1; //                  //# 97: continued
+  bad.instanceSetBadStart = 1; //                  //# 98: continued
+  bad.instanceSetBadEnd = 1; //                    //# 99: continued
+  bad.instanceSetBadMiddle = 1; //                 //# 100: continued
+  bad * bad; //                                    //# 101: continued
+  bad * bad; //                                    //# 102: continued
+  bad * bad; //                                    //# 103: continued
+  bad[1] = 1; //                                   //# 104: continued
+  bad[1] = 1; //                                   //# 105: continued
+  bad[1] = 1; //                                   //# 106: continued
+  bad[1] = 1; //                                   //# 107: continued
+
+  // This covers tests 108-166
+  bad.method();
+
+  bad.f(() {}); //                                 //# 167: continued
+  bad.f(() {}); //                                 //# 168: continued
+  bad.f(() {}); //                                 //# 169: continued
+  bad.f(() {}); //                                 //# 170: continued
+  bad.f(() {}); //                                 //# 171: continued
+  bad.f(() {}); //                                 //# 172: continued
+  bad.f(() {}); //                                 //# 173: continued
+  bad.f(() {}); //                                 //# 174: continued
+  bad.f(() {}); //                                 //# 175: continued
+  bad.f(() {}); //                                 //# 176: continued
+  bad.f(() {}); //                                 //# 177: continued
+  bad.f(() {}); //                                 //# 178: continued
+  bad.f(() {}); //                                 //# 179: continued
+  bad.f(() {}); //                                 //# 180: continued
+  bad.f(() {}); //                                 //# 181: continued
+  bad.f(() {}); //                                 //# 182: continued
+  bad.f(() {}); //                                 //# 183: continued
+  bad.f(() {}); //                                 //# 184: continued
+  bad.f(() {}); //                                 //# 185: continued
+  bad.f(() {}); //                                 //# 186: continued
+  bad.f(() {}); //                                 //# 187: continued
+  bad.f(() {}); //                                 //# 188: continued
+
+  BadEmpty x; //                                   //# 189: continued
+  BadStart x; //                                   //# 190: continued
+  BadEnd x; //                                     //# 191: continued
+  BadMiddle x; //                                  //# 192: continued
+  BadPosEmpty x; //                                //# 193: continued
+  BadPosEmpty x; //                                //# 194: continued
+  BadPosEmpty x; //                                //# 195: continued
+  BadPosEmpty x; //                                //# 196: continued
+  BadPosStart x; //                                //# 197: continued
+  BadPosStart x; //                                //# 198: continued
+  BadPosEnd x; //                                  //# 199: continued
+  BadPosStart x; //                                //# 200: continued
+  BadPosMiddle x; //                               //# 201: continued
+  BadNamEmpty x; //                                //# 202: continued
+  BadNamEmpty x; //                                //# 203: continued
+  BadNamEmpty x; //                                //# 204: continued
+  BadNamEmpty x; //                                //# 205: continued
+  BadNamStart x; //                                //# 206: continued
+  BadNamStart x; //                                //# 207: continued
+  BadNamEnd x; //                                  //# 208: continued
+  BadNamStart x; //                                //# 209: continued
+  BadNamMiddle x; //                               //# 210: continued
+}
diff --git a/tests/language/unsorted/assignable_expression_runtime_test.dart b/tests/language/unsorted/assignable_expression_runtime_test.dart
new file mode 100644
index 0000000..942cb23
--- /dev/null
+++ b/tests/language/unsorted/assignable_expression_runtime_test.dart
@@ -0,0 +1,47 @@
+// TODO(multitest): This was automatically migrated from a multitest and may
+// contain strange or dead code.
+
+// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// Test to detect syntactically illegal left-hand-side (assignable)
+// expressions.
+
+class C {
+  static dynamic field = 0;
+}
+
+dynamic variable = 0;
+
+main() {
+  variable = 0;
+
+
+
+
+  C.field = 0;
+
+
+
+
+  variable = [1, 2, 3];
+  variable[0] = 0;
+  (variable)[0] = 0;
+
+
+
+
+  C.field = [1, 2, 3];
+
+
+
+
+  var a = 0;
+
+
+
+
+  // Neat palindrome expression. x is assignable, ((x)) is not.
+
+}
diff --git a/tests/language/unsorted/assignable_expression_test.dart b/tests/language/unsorted/assignable_expression_test.dart
new file mode 100644
index 0000000..5bd904c
--- /dev/null
+++ b/tests/language/unsorted/assignable_expression_test.dart
@@ -0,0 +1,113 @@
+// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// Test to detect syntactically illegal left-hand-side (assignable)
+// expressions.
+
+class C {
+  static dynamic field = 0;
+}
+
+dynamic variable = 0;
+
+main() {
+  variable = 0;
+  (variable) = 0;
+//^^^^^^^^^^
+// [analyzer] SYNTACTIC_ERROR.ILLEGAL_ASSIGNMENT_TO_NON_ASSIGNABLE
+//^^^^^^^^^^
+// [analyzer] SYNTACTIC_ERROR.MISSING_ASSIGNABLE_SELECTOR
+//         ^
+// [cfe] Can't assign to a parenthesized expression.
+  (variable)++;
+  //       ^
+  // [cfe] Can't assign to a parenthesized expression.
+  //        ^^
+  // [analyzer] SYNTACTIC_ERROR.ILLEGAL_ASSIGNMENT_TO_NON_ASSIGNABLE
+  ++(variable);
+  //         ^
+  // [analyzer] SYNTACTIC_ERROR.MISSING_ASSIGNABLE_SELECTOR
+  // [cfe] Can't assign to a parenthesized expression.
+
+  C.field = 0;
+  (C.field) = 0;
+//^^^^^^^^^
+// [analyzer] SYNTACTIC_ERROR.ILLEGAL_ASSIGNMENT_TO_NON_ASSIGNABLE
+//^^^^^^^^^
+// [analyzer] SYNTACTIC_ERROR.MISSING_ASSIGNABLE_SELECTOR
+//        ^
+// [cfe] Can't assign to a parenthesized expression.
+  (C.field)++;
+  //      ^
+  // [cfe] Can't assign to a parenthesized expression.
+  //       ^^
+  // [analyzer] SYNTACTIC_ERROR.ILLEGAL_ASSIGNMENT_TO_NON_ASSIGNABLE
+  ++(C.field);
+  //        ^
+  // [analyzer] SYNTACTIC_ERROR.MISSING_ASSIGNABLE_SELECTOR
+  // [cfe] Can't assign to a parenthesized expression.
+
+  variable = [1, 2, 3];
+  variable[0] = 0;
+  (variable)[0] = 0;
+  (variable[0]) = 0;
+//^^^^^^^^^^^^^
+// [analyzer] SYNTACTIC_ERROR.ILLEGAL_ASSIGNMENT_TO_NON_ASSIGNABLE
+//^^^^^^^^^^^^^
+// [analyzer] SYNTACTIC_ERROR.MISSING_ASSIGNABLE_SELECTOR
+//            ^
+// [cfe] Can't assign to a parenthesized expression.
+  (variable[0])++;
+  //          ^
+  // [cfe] Can't assign to a parenthesized expression.
+  //           ^^
+  // [analyzer] SYNTACTIC_ERROR.ILLEGAL_ASSIGNMENT_TO_NON_ASSIGNABLE
+  ++(variable[0]);
+  //            ^
+  // [analyzer] SYNTACTIC_ERROR.MISSING_ASSIGNABLE_SELECTOR
+  // [cfe] Can't assign to a parenthesized expression.
+
+  C.field = [1, 2, 3];
+  (C.field[0]) = 0;
+//^^^^^^^^^^^^
+// [analyzer] SYNTACTIC_ERROR.ILLEGAL_ASSIGNMENT_TO_NON_ASSIGNABLE
+//^^^^^^^^^^^^
+// [analyzer] SYNTACTIC_ERROR.MISSING_ASSIGNABLE_SELECTOR
+//           ^
+// [cfe] Can't assign to a parenthesized expression.
+  (C.field[0])++;
+  //         ^
+  // [cfe] Can't assign to a parenthesized expression.
+  //          ^^
+  // [analyzer] SYNTACTIC_ERROR.ILLEGAL_ASSIGNMENT_TO_NON_ASSIGNABLE
+  ++(C.field[0]);
+  //           ^
+  // [analyzer] SYNTACTIC_ERROR.MISSING_ASSIGNABLE_SELECTOR
+  // [cfe] Can't assign to a parenthesized expression.
+
+  var a = 0;
+  (a) = 0;
+//^^^
+// [analyzer] SYNTACTIC_ERROR.ILLEGAL_ASSIGNMENT_TO_NON_ASSIGNABLE
+//^^^
+// [analyzer] SYNTACTIC_ERROR.MISSING_ASSIGNABLE_SELECTOR
+//  ^
+// [cfe] Can't assign to a parenthesized expression.
+  (a)++;
+  //^
+  // [cfe] Can't assign to a parenthesized expression.
+  // ^^
+  // [analyzer] SYNTACTIC_ERROR.ILLEGAL_ASSIGNMENT_TO_NON_ASSIGNABLE
+  ++(a);
+  //  ^
+  // [analyzer] SYNTACTIC_ERROR.MISSING_ASSIGNABLE_SELECTOR
+  // [cfe] Can't assign to a parenthesized expression.
+
+  // Neat palindrome expression. x is assignable, ((x)) is not.
+  var funcnuf = (x) => ((x))=((x)) <= (x);
+  //                   ^^^^^
+  // [analyzer] SYNTACTIC_ERROR.MISSING_ASSIGNABLE_SELECTOR
+  //                       ^
+  // [cfe] Can't assign to a parenthesized expression.
+}
diff --git a/tests/language/unsorted/bad_override_runtime_test.dart b/tests/language/unsorted/bad_override_runtime_test.dart
new file mode 100644
index 0000000..1e2abe5
--- /dev/null
+++ b/tests/language/unsorted/bad_override_runtime_test.dart
@@ -0,0 +1,33 @@
+// TODO(multitest): This was automatically migrated from a multitest and may
+// contain strange or dead code.
+
+// 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.
+
+class Fisk {
+  get fisk => null;
+
+  set fisk(x) {}
+
+
+  get hest => null;
+  set hest(x) {}
+
+  foo() {}
+  var field;
+  method() {}
+  nullary() {}
+}
+
+class Hest extends Fisk {
+
+
+
+
+}
+
+main() {
+  new Fisk();
+  new Hest();
+}
diff --git a/tests/language/unsorted/bad_override_test.dart b/tests/language/unsorted/bad_override_test.dart
new file mode 100644
index 0000000..07400d2
--- /dev/null
+++ b/tests/language/unsorted/bad_override_test.dart
@@ -0,0 +1,48 @@
+// 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.
+
+class Fisk {
+  get fisk => null;
+  static
+  set fisk(x) {}
+  //  ^^^^
+  // [analyzer] COMPILE_TIME_ERROR.CONFLICTING_STATIC_AND_INSTANCE
+  // [cfe] This static member conflicts with an instance member.
+
+  static
+  get hest => null;
+  //  ^^^^
+  // [analyzer] COMPILE_TIME_ERROR.CONFLICTING_STATIC_AND_INSTANCE
+  // [cfe] This static member conflicts with an instance member.
+  set hest(x) {}
+
+  foo() {}
+  var field;
+  method() {}
+  nullary() {}
+}
+
+class Hest extends Fisk {
+  static foo() {}
+  //     ^^^
+  // [analyzer] COMPILE_TIME_ERROR.CONFLICTING_STATIC_AND_INSTANCE
+  // [cfe] Can't declare a member that conflicts with an inherited one.
+  field() {}
+//^^^^^
+// [analyzer] COMPILE_TIME_ERROR.CONFLICTING_METHOD_AND_FIELD
+// [cfe] Can't declare a member that conflicts with an inherited one.
+  var method;
+  //  ^^^^^^
+  // [analyzer] COMPILE_TIME_ERROR.CONFLICTING_FIELD_AND_METHOD
+  // [cfe] Can't declare a member that conflicts with an inherited one.
+  nullary(x) {}
+//^^^^^^^
+// [analyzer] COMPILE_TIME_ERROR.INVALID_OVERRIDE
+// [cfe] The method 'Hest.nullary' has more required arguments than those of overridden method 'Fisk.nullary'.
+}
+
+main() {
+  new Fisk();
+  new Hest();
+}
diff --git a/tests/language/unsorted/bind_test.dart b/tests/language/unsorted/bind_test.dart
new file mode 100644
index 0000000..3617af3
--- /dev/null
+++ b/tests/language/unsorted/bind_test.dart
@@ -0,0 +1,16 @@
+// 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.
+
+import "package:expect/expect.dart";
+
+class Bound {
+  run() {
+    return 42;
+  }
+}
+
+void main() {
+  var runner = new Bound().run;
+  Expect.equals(42, runner());
+}
diff --git a/tests/language/unsorted/bootstrap_test.dart b/tests/language/unsorted/bootstrap_test.dart
new file mode 100644
index 0000000..6b56a65
--- /dev/null
+++ b/tests/language/unsorted/bootstrap_test.dart
@@ -0,0 +1,15 @@
+// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+class BootstrapTest {
+  static testMain() {
+    var obj = new Object();
+
+    return obj;
+  }
+}
+
+main() {
+  BootstrapTest.testMain();
+}
diff --git a/tests/language/unsorted/bottom_test.dart b/tests/language/unsorted/bottom_test.dart
new file mode 100644
index 0000000..40fe845
--- /dev/null
+++ b/tests/language/unsorted/bottom_test.dart
@@ -0,0 +1,16 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import "package:expect/expect.dart";
+
+Never never() => throw "!";
+
+void main() {
+  final f1 = () => throw never();
+  final f2 = () => never();
+  Expect.equals(f1.runtimeType, f2.runtimeType);
+
+  final Bottom = (<F>(F Function() f) => F)(() => throw never());
+  Expect.equals(Never, Bottom);
+}
diff --git a/tests/language/unsorted/branch_canonicalization_test.dart b/tests/language/unsorted/branch_canonicalization_test.dart
new file mode 100644
index 0000000..49990cd
--- /dev/null
+++ b/tests/language/unsorted/branch_canonicalization_test.dart
@@ -0,0 +1,66 @@
+// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// Test that branch fusion correctly sets branch environment for comparisons
+// that require unboxing and does not fuse branches that can deoptimize.
+// VMOptions=--optimization-counter-threshold=10 --no-use-osr --no-background-compilation
+
+import "package:expect/expect.dart";
+
+var sideEffect = true;
+
+barDouble(a, b) {
+  sideEffect = false;
+  final result = (a == b);
+  sideEffect = !sideEffect;
+  return result;
+}
+
+fooDouble(a, b) => barDouble(a, b) ? 1 : 0;
+
+barMint(a, b) {
+  sideEffect = false;
+  final result = (a == b);
+  sideEffect = !sideEffect;
+  return result;
+}
+
+fooMint(a, b) => barMint(a, b) ? 1 : 0;
+
+class A {
+  operator ==(other) => identical(this, other);
+}
+
+class B extends A {}
+
+class C extends A {}
+
+barPoly(a, b) {
+  sideEffect = false;
+  final result = a == b;
+  sideEffect = !sideEffect;
+  return result;
+}
+
+fooPoly(a, b) => barPoly(a, b) ? 1 : 0;
+
+main() {
+  final a = 1.0;
+  final b = 0x4000000000000000; // 1 << 62
+  final x = new A(), y = new B(), z = new C();
+  for (var i = 0; i < 20; i++) {
+    Expect.equals(1, fooDouble(a, a));
+    Expect.isTrue(sideEffect);
+    Expect.equals(0, fooMint(b, 0));
+    Expect.isTrue(sideEffect);
+    Expect.equals(1, fooPoly(x, x));
+    Expect.equals(0, fooPoly(y, x));
+  }
+  Expect.equals(1, fooDouble(z, z));
+  Expect.isTrue(sideEffect);
+  Expect.equals(1, fooMint(z, z));
+  Expect.isTrue(sideEffect);
+  Expect.equals(1, fooPoly(z, z));
+  Expect.isTrue(sideEffect);
+}
diff --git a/tests/language/unsorted/branches_test.dart b/tests/language/unsorted/branches_test.dart
new file mode 100644
index 0000000..b459176
--- /dev/null
+++ b/tests/language/unsorted/branches_test.dart
@@ -0,0 +1,159 @@
+// Copyright (c) 2011, the Dart project authors.  Please see the AUTHORS file
+// for 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 for branches. Make sure that shortcuts work, even if they have
+// to jump over several expressions.
+
+import "package:expect/expect.dart";
+
+class BranchesTest {
+  static bool f() {
+    Expect.equals("Never reached", 0);
+    return true;
+  }
+
+  static void testMain() {
+    int checkPointCounter = 1;
+    int checkPoint1 = 0;
+    int checkPoint2 = 0;
+    int checkPoint3 = 0;
+    int checkPoint4 = 0;
+    int checkPoint5 = 0;
+    int checkPoint6 = 0;
+    int i = 0;
+    for (int i = 0; i < 2; i++) {
+      if (i == 0) {
+        checkPoint1 += checkPointCounter++;
+        if (true || // Test branch-if-true.
+            f() ||
+            f() ||
+            f() ||
+            f() ||
+            f() ||
+            f() ||
+            f() ||
+            f() ||
+            f() ||
+            f() ||
+            f() ||
+            f() ||
+            f() ||
+            f() ||
+            f() ||
+            f() ||
+            f() ||
+            f() ||
+            f() ||
+            f() ||
+            f() ||
+            f() ||
+            f() ||
+            f() ||
+            f() ||
+            f() ||
+            f() ||
+            f() ||
+            f() ||
+            f() ||
+            f() ||
+            f() ||
+            f() ||
+            f() ||
+            f() ||
+            f() ||
+            f() ||
+            f() ||
+            f() ||
+            f() ||
+            f() ||
+            f() ||
+            f() ||
+            f() ||
+            f() ||
+            f() ||
+            f() ||
+            f() ||
+            f() ||
+            f() ||
+            f() ||
+            f() ||
+            f() ||
+            f()) {
+          checkPoint2 += checkPointCounter++;
+        }
+      } else {
+        // Test branch (jumping over the else branch).
+        checkPoint3 += checkPointCounter++;
+        if (false) {
+          checkPoint4 = checkPointCounter++; // Never reached.
+          checkPoint4 = checkPointCounter++; // Never reached.
+          checkPoint4 = checkPointCounter++; // Never reached.
+          checkPoint4 = checkPointCounter++; // Never reached.
+          checkPoint4 = checkPointCounter++; // Never reached.
+          checkPoint4 = checkPointCounter++; // Never reached.
+          checkPoint4 = checkPointCounter++; // Never reached.
+          checkPoint4 = checkPointCounter++; // Never reached.
+          checkPoint4 = checkPointCounter++; // Never reached.
+          checkPoint4 = checkPointCounter++; // Never reached.
+          checkPoint4 = checkPointCounter++; // Never reached.
+          checkPoint4 = checkPointCounter++; // Never reached.
+          checkPoint4 = checkPointCounter++; // Never reached.
+          checkPoint4 = checkPointCounter++; // Never reached.
+          checkPoint4 = checkPointCounter++; // Never reached.
+          checkPoint4 = checkPointCounter++; // Never reached.
+          checkPoint4 = checkPointCounter++; // Never reached.
+          checkPoint4 = checkPointCounter++; // Never reached.
+          checkPoint4 = checkPointCounter++; // Never reached.
+          checkPoint4 = checkPointCounter++; // Never reached.
+          checkPoint4 = checkPointCounter++; // Never reached.
+          checkPoint4 = checkPointCounter++; // Never reached.
+          checkPoint4 = checkPointCounter++; // Never reached.
+          checkPoint4 = checkPointCounter++; // Never reached.
+          checkPoint4 = checkPointCounter++; // Never reached.
+          checkPoint4 = checkPointCounter++; // Never reached.
+          checkPoint4 = checkPointCounter++; // Never reached.
+          checkPoint4 = checkPointCounter++; // Never reached.
+          checkPoint4 = checkPointCounter++; // Never reached.
+          checkPoint4 = checkPointCounter++; // Never reached.
+          checkPoint4 = checkPointCounter++; // Never reached.
+          checkPoint4 = checkPointCounter++; // Never reached.
+          checkPoint4 = checkPointCounter++; // Never reached.
+          checkPoint4 = checkPointCounter++; // Never reached.
+          checkPoint4 = checkPointCounter++; // Never reached.
+          checkPoint4 = checkPointCounter++; // Never reached.
+          checkPoint4 = checkPointCounter++; // Never reached.
+          checkPoint4 = checkPointCounter++; // Never reached.
+          checkPoint4 = checkPointCounter++; // Never reached.
+          checkPoint4 = checkPointCounter++; // Never reached.
+          checkPoint4 = checkPointCounter++; // Never reached.
+          checkPoint4 = checkPointCounter++; // Never reached.
+          checkPoint4 = checkPointCounter++; // Never reached.
+          checkPoint4 = checkPointCounter++; // Never reached.
+          checkPoint4 = checkPointCounter++; // Never reached.
+          checkPoint4 = checkPointCounter++; // Never reached.
+          checkPoint4 = checkPointCounter++; // Never reached.
+          checkPoint4 = checkPointCounter++; // Never reached.
+          checkPoint4 = checkPointCounter++; // Never reached.
+          checkPoint4 = checkPointCounter++; // Never reached.
+          checkPoint4 = checkPointCounter++; // Never reached.
+          checkPoint4 = checkPointCounter++; // Never reached.
+          checkPoint4 = checkPointCounter++; // Never reached.
+          checkPoint4 = checkPointCounter++; // Never reached.
+          checkPoint4 = checkPointCounter++; // Never reached.
+        }
+      }
+      checkPoint5 += checkPointCounter++;
+    }
+    checkPoint6 += checkPointCounter++;
+    Expect.equals(1, checkPoint1);
+    Expect.equals(2, checkPoint2);
+    Expect.equals(4, checkPoint3);
+    Expect.equals(0, checkPoint4);
+    Expect.equals(8, checkPoint5);
+    Expect.equals(6, checkPoint6);
+  }
+}
+
+main() {
+  BranchesTest.testMain();
+}
diff --git a/tests/language/unsorted/callable_runtime_test.dart b/tests/language/unsorted/callable_runtime_test.dart
new file mode 100644
index 0000000..05fad49
--- /dev/null
+++ b/tests/language/unsorted/callable_runtime_test.dart
@@ -0,0 +1,70 @@
+// TODO(multitest): This was automatically migrated from a multitest and may
+// contain strange or dead code.
+
+// 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.
+
+import 'package:expect/expect.dart';
+
+class X {
+  call() => 42;
+}
+
+class XX extends X {
+  XX.named();
+}
+
+class Y {
+  call(int x) => 87 + x;
+
+  static int staticMethod(int x) => x + 1;
+}
+
+class Z<T> {
+  final T value;
+  Z(this.value);
+  T call() => value;
+
+  static int staticMethod(int x) => x + 1;
+}
+
+typedef F(int x);
+typedef G(String y);
+typedef H();
+typedef T I<T>();
+
+main() {
+  X x = new X();
+  Function f = x; // Should pass checked mode test
+  Y y = new Y();
+  Function g = y; // Should pass checked mode test
+  F f0 = y; // Should pass checked mode test
+
+
+
+
+  Expect.equals(f(), 42);
+  Expect.equals(g(100), 187);
+
+  var z = new Z<int>(123);
+  Expect.equals(z(), 123);
+  Expect.equals((z as dynamic)(), 123);
+
+  Expect.equals(Y.staticMethod(6), 7);
+  Expect.equals(Z.staticMethod(6), 7);
+
+  var xx = new XX.named();
+  Expect.equals(xx(), 42);
+
+  H xx2 = new XX.named();
+  Expect.equals(xx2(), 42);
+
+  Expect.throwsTypeError(() {
+    F f2 = x as dynamic;
+  });
+
+  Expect.throwsTypeError(() {
+    G g1 = y as dynamic;
+  });
+}
diff --git a/tests/language/unsorted/callable_test.dart b/tests/language/unsorted/callable_test.dart
new file mode 100644
index 0000000..75ff4c2
--- /dev/null
+++ b/tests/language/unsorted/callable_test.dart
@@ -0,0 +1,75 @@
+// 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.
+
+import 'package:expect/expect.dart';
+
+class X {
+  call() => 42;
+}
+
+class XX extends X {
+  XX.named();
+}
+
+class Y {
+  call(int x) => 87 + x;
+
+  static int staticMethod(int x) => x + 1;
+}
+
+class Z<T> {
+  final T value;
+  Z(this.value);
+  T call() => value;
+
+  static int staticMethod(int x) => x + 1;
+}
+
+typedef F(int x);
+typedef G(String y);
+typedef H();
+typedef T I<T>();
+
+main() {
+  X x = new X();
+  Function f = x; // Should pass checked mode test
+  Y y = new Y();
+  Function g = y; // Should pass checked mode test
+  F f0 = y; // Should pass checked mode test
+
+  F f1 = x;
+  //^
+  // [cfe] A value of type 'dynamic Function()' can't be assigned to a variable of type 'dynamic Function(int)'.
+  //     ^
+  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  G g0 = y;
+  //^
+  // [cfe] A value of type 'dynamic Function(int)' can't be assigned to a variable of type 'dynamic Function(String)'.
+  //     ^
+  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+
+  Expect.equals(f(), 42);
+  Expect.equals(g(100), 187);
+
+  var z = new Z<int>(123);
+  Expect.equals(z(), 123);
+  Expect.equals((z as dynamic)(), 123);
+
+  Expect.equals(Y.staticMethod(6), 7);
+  Expect.equals(Z.staticMethod(6), 7);
+
+  var xx = new XX.named();
+  Expect.equals(xx(), 42);
+
+  H xx2 = new XX.named();
+  Expect.equals(xx2(), 42);
+
+  Expect.throwsTypeError(() {
+    F f2 = x as dynamic;
+  });
+
+  Expect.throwsTypeError(() {
+    G g1 = y as dynamic;
+  });
+}
diff --git a/tests/language/unsorted/cascaded_forwarding_stubs_test.dart b/tests/language/unsorted/cascaded_forwarding_stubs_test.dart
new file mode 100644
index 0000000..856f9dc
--- /dev/null
+++ b/tests/language/unsorted/cascaded_forwarding_stubs_test.dart
@@ -0,0 +1,59 @@
+// Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import "package:expect/expect.dart";
+
+class A {}
+
+class B extends A {}
+
+class C {
+  void f(B x, B y) {}
+}
+
+abstract class I1 {
+  void f(covariant A x, B y);
+}
+
+// D contains a forwarding stub for f which ensures that `x` is type checked.
+class D extends C implements I1 {}
+
+abstract class I2 {
+  void f(B x, covariant A y);
+}
+
+// E contains a forwarding stub for f which ensures that `y` is type checked.
+class E extends D implements I2 {
+  void f(B x, B y);
+}
+
+main() {
+  E e = new E();
+  C c = e;
+  I1 i1 = e;
+  D d = e;
+  I2 i2 = e;
+  A a = new A();
+  B b = new B();
+  c.f(b, b); // No error
+  i1.f(b, b); // No error
+  d.f(b, b); // No error
+  i2.f(b, b); // No error
+  e.f(b, b); // No error
+  Expect.throwsTypeError(() {
+    i1.f(a, b);
+  });
+  Expect.throwsTypeError(() {
+    d.f(a, b);
+  });
+  Expect.throwsTypeError(() {
+    i2.f(b, a);
+  });
+  Expect.throwsTypeError(() {
+    e.f(a as dynamic, b);
+  });
+  Expect.throwsTypeError(() {
+    e.f(b, a as dynamic);
+  });
+}
diff --git a/tests/language/unsorted/cast2_test.dart b/tests/language/unsorted/cast2_test.dart
new file mode 100644
index 0000000..01c14fb
--- /dev/null
+++ b/tests/language/unsorted/cast2_test.dart
@@ -0,0 +1,34 @@
+// 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 constructors and initializers.
+
+import "package:expect/expect.dart";
+
+// Test 'expression as Type' casts.
+
+class C {
+  final int foo = 42;
+
+  int val = 0;
+  void inc() {
+    ++val;
+  }
+}
+
+class D extends C {
+  final int bar = 37;
+}
+
+main() {
+  C oc = new C();
+  D od = new D();
+
+  Expect.throwsNoSuchMethodError(() => (oc as dynamic).bar);
+
+  // Casts should always evaluate the left-hand side, if only for its effects.
+  oc.inc() as dynamic;
+  Expect.equals(1, oc.val);
+  oc.inc() as Object?;
+  Expect.equals(2, oc.val);
+}
diff --git a/tests/language/unsorted/cast_test.dart b/tests/language/unsorted/cast_test.dart
new file mode 100644
index 0000000..5f14ccd
--- /dev/null
+++ b/tests/language/unsorted/cast_test.dart
@@ -0,0 +1,77 @@
+// 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 constructors and initializers.
+
+import "package:expect/expect.dart";
+
+// Test 'expression as Type' casts.
+
+class C {
+  final int foo = 42;
+}
+
+class D extends C {
+  final int bar = 37;
+}
+
+Object createC() => new C();
+Object createD() => new D();
+Object? getNull() => null;
+Object createList() => <int>[2];
+Object createInt() => 87;
+Object createString() => "a string";
+
+main() {
+  Object oc = createC();
+  Object od = createD();
+  Object? on = getNull();
+  Object ol = createList();
+  Object oi = createInt();
+  Object os = createString();
+
+  Expect.equals(42, (oc as C).foo);
+  Expect.equals(42, (od as C).foo);
+  Expect.equals(42, (od as D).foo);
+  Expect.equals(37, (od as D).bar);
+  Expect.equals(37, ((od as C) as D).bar);
+  (oc as D).foo; // //# 01: runtime error
+  (on as D?).toString();
+  (on as D).foo; // //# 02: runtime error
+  (on as C).foo; // //# 03: runtime error
+  // Reassign to cancel out the type promotion from the previous "as".
+  oc = oc as dynamic;
+  od = od as dynamic;
+  oc.foo; // //# 04: compile-time error
+  od.foo; // //# 05: compile-time error
+  (on as Object?).toString();
+  (oc as Object).toString();
+  (od as Object).toString();
+  (on as dynamic).toString();
+  (on as dynamic).foo; // //# 07: runtime error
+  (oc as dynamic).foo;
+  (od as dynamic).foo;
+  (oc as dynamic).bar; // //# 08: runtime error
+  (od as dynamic).bar;
+  C c = oc as C;
+  c = od as C;
+  c = oc;
+  D d = od as D;
+  d = oc as D; // //# 10: runtime error
+  d = od;
+
+  (ol as List)[0];
+  (ol as List<int>)[0];
+  (ol as dynamic)[0];
+  (ol as String).length; // //# 12: runtime error
+  int x = (ol as List<int>)[0];
+  (ol as List<int>)[0] = (oi as int);
+
+  (os as String).length;
+  (os as dynamic).length;
+  (oi as String).length; // //# 13: runtime error
+  (os as List).length; // //# 14: runtime error
+
+  (oi as int) + 2;
+  (oi as List).length; // //# 15: runtime error
+}
diff --git a/tests/language/unsorted/check_member_static_runtime_1_test.dart b/tests/language/unsorted/check_member_static_runtime_1_test.dart
new file mode 100644
index 0000000..b9b4391
--- /dev/null
+++ b/tests/language/unsorted/check_member_static_runtime_1_test.dart
@@ -0,0 +1,22 @@
+// TODO(multitest): This was automatically migrated from a multitest and may
+// contain strange or dead code.
+
+// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+class A {
+  static var a;
+  var b;
+}
+
+class B extends A {}
+
+class C extends B {
+  var a;
+
+}
+
+void main() {
+  new C();
+}
diff --git a/tests/language/unsorted/check_member_static_runtime_test.dart b/tests/language/unsorted/check_member_static_runtime_test.dart
new file mode 100644
index 0000000..db884e0
--- /dev/null
+++ b/tests/language/unsorted/check_member_static_runtime_test.dart
@@ -0,0 +1,22 @@
+// TODO(multitest): This was automatically migrated from a multitest and may
+// contain strange or dead code.
+
+// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+class A {
+  static var a;
+  var b;
+}
+
+class B extends A {}
+
+class C extends B {
+
+
+}
+
+void main() {
+  new C();
+}
diff --git a/tests/language/unsorted/check_member_static_test.dart b/tests/language/unsorted/check_member_static_test.dart
new file mode 100644
index 0000000..2987cb8
--- /dev/null
+++ b/tests/language/unsorted/check_member_static_test.dart
@@ -0,0 +1,22 @@
+// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+class A {
+  static var a;
+  var b;
+}
+
+class B extends A {}
+
+class C extends B {
+  var a;
+  static var b;
+  //         ^
+  // [analyzer] COMPILE_TIME_ERROR.CONFLICTING_STATIC_AND_INSTANCE
+  // [cfe] Can't declare a member that conflicts with an inherited one.
+}
+
+void main() {
+  new C();
+}
diff --git a/tests/language/unsorted/check_method_override_runtime_test.dart b/tests/language/unsorted/check_method_override_runtime_test.dart
new file mode 100644
index 0000000..e538a33
--- /dev/null
+++ b/tests/language/unsorted/check_method_override_runtime_test.dart
@@ -0,0 +1,21 @@
+// TODO(multitest): This was automatically migrated from a multitest and may
+// contain strange or dead code.
+
+// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+class A {
+  f([var x]) {}
+  foo(var a, [x, y]) {}
+}
+
+class C extends A {
+
+
+}
+
+main() {
+  new A().foo(2);
+  new C().foo(1);
+}
diff --git a/tests/language/unsorted/check_method_override_test.dart b/tests/language/unsorted/check_method_override_test.dart
new file mode 100644
index 0000000..a23af64
--- /dev/null
+++ b/tests/language/unsorted/check_method_override_test.dart
@@ -0,0 +1,24 @@
+// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+class A {
+  f([var x]) {}
+  foo(var a, [x, y]) {}
+}
+
+class C extends A {
+  f() {}
+//^
+// [analyzer] COMPILE_TIME_ERROR.INVALID_OVERRIDE
+// [cfe] The method 'C.f' has fewer positional arguments than those of overridden method 'A.f'.
+  foo(var a, [x]) {}
+//^^^
+// [analyzer] COMPILE_TIME_ERROR.INVALID_OVERRIDE
+// [cfe] The method 'C.foo' has fewer positional arguments than those of overridden method 'A.foo'.
+}
+
+main() {
+  new A().foo(2);
+  new C().foo(1);
+}
diff --git a/tests/language/unsorted/checked_method_error_order_test.dart b/tests/language/unsorted/checked_method_error_order_test.dart
new file mode 100644
index 0000000..b8ebfe6
--- /dev/null
+++ b/tests/language/unsorted/checked_method_error_order_test.dart
@@ -0,0 +1,45 @@
+// Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+import "package:expect/expect.dart";
+
+class Bar {
+  required({required int i, required String a}) {
+    print(i);
+    print(a);
+  }
+
+  optional({int? i, String? a}) {
+    print(i);
+    print(a);
+  }
+}
+
+main() {
+  bool checkedMode = false;
+  assert((checkedMode = true));
+  // Test that in checked mode, we are checking the type of optional parameters
+  // in the correct order (aka, don't check the type of parameter 'a' first).
+  if (checkedMode) {
+    dynamic x = 'e';
+    dynamic y = 3;
+    Expect.throws(() => new Bar().required(i: x, a: y), (e) {
+      if (e is TypeError) {
+        var m = e.toString();
+        return m.contains("is not a subtype of type 'int'") ||
+            m.contains(
+                "Expected a value of type 'int', but got one of type 'String'");
+      }
+      return false;
+    });
+    Expect.throws(() => new Bar().optional(i: x, a: y), (e) {
+      if (e is TypeError) {
+        var m = e.toString();
+        return m.contains("is not a subtype of type 'int'") ||
+            m.contains(
+                "Expected a value of type 'int', but got one of type 'String'");
+      }
+      return false;
+    });
+  }
+}
diff --git a/tests/language/unsorted/combiner_type_lookup_indexed_test.dart b/tests/language/unsorted/combiner_type_lookup_indexed_test.dart
new file mode 100644
index 0000000..e1f1a38
--- /dev/null
+++ b/tests/language/unsorted/combiner_type_lookup_indexed_test.dart
@@ -0,0 +1,19 @@
+// Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+class A {}
+
+class B extends A {
+  B operator +(int i) => this;
+}
+
+class C {
+  B operator [](int i) => new B();
+
+  void operator []=(int i, A value) {}
+}
+
+main() {
+  new C()[0] += 1;
+}
diff --git a/tests/language/unsorted/combiner_type_lookup_instance_test.dart b/tests/language/unsorted/combiner_type_lookup_instance_test.dart
new file mode 100644
index 0000000..cc9536d
--- /dev/null
+++ b/tests/language/unsorted/combiner_type_lookup_instance_test.dart
@@ -0,0 +1,19 @@
+// Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+class A {}
+
+class B extends A {
+  B operator +(int i) => this;
+}
+
+class C {
+  B get property => new B();
+
+  void set property(A value) {}
+}
+
+main() {
+  new C().property += 1;
+}
diff --git a/tests/language/unsorted/combiner_type_lookup_static_test.dart b/tests/language/unsorted/combiner_type_lookup_static_test.dart
new file mode 100644
index 0000000..925d978
--- /dev/null
+++ b/tests/language/unsorted/combiner_type_lookup_static_test.dart
@@ -0,0 +1,19 @@
+// Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+class A {}
+
+class B extends A {
+  B operator +(int i) => this;
+}
+
+class C {
+  static B get staticProperty => new B();
+
+  static void set staticProperty(A value) {}
+}
+
+main() {
+  C.staticProperty += 1;
+}
diff --git a/tests/language/unsorted/combiner_type_lookup_top_level_test.dart b/tests/language/unsorted/combiner_type_lookup_top_level_test.dart
new file mode 100644
index 0000000..bb1cf5b
--- /dev/null
+++ b/tests/language/unsorted/combiner_type_lookup_top_level_test.dart
@@ -0,0 +1,17 @@
+// Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+class A {}
+
+class B extends A {
+  B operator +(int i) => this;
+}
+
+B get topLevel => new B();
+
+void set topLevel(A value) {}
+
+main() {
+  topLevel += 1;
+}
diff --git a/tests/language/unsorted/condition_bailout_test.dart b/tests/language/unsorted/condition_bailout_test.dart
new file mode 100644
index 0000000..d5d08e1
--- /dev/null
+++ b/tests/language/unsorted/condition_bailout_test.dart
@@ -0,0 +1,47 @@
+// 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 testing closures.
+
+import "package:expect/expect.dart";
+
+class A {
+  operator -() => this;
+
+  foo(x) {
+    -a;
+    if (x) return true;
+    return false;
+  }
+
+  loop1(x) {
+    -a;
+    while (x) return true;
+    return false;
+  }
+
+  loop2(x) {
+    -a;
+    for (; x;) return true;
+    return false;
+  }
+
+  loop3(x) {
+    -a;
+    var i = 0;
+    do {
+      if (i++ == 1) return false;
+    } while (!x);
+    return true;
+  }
+}
+
+var a;
+
+main() {
+  a = new A();
+  Expect.isTrue(a.foo(true));
+  Expect.isTrue(a.loop1(true));
+  Expect.isTrue(a.loop2(true));
+  Expect.isTrue(a.loop3(true));
+}
diff --git a/tests/language/unsorted/context2_test.dart b/tests/language/unsorted/context2_test.dart
new file mode 100644
index 0000000..1db17ff
--- /dev/null
+++ b/tests/language/unsorted/context2_test.dart
@@ -0,0 +1,34 @@
+// 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 for capturing.
+
+import "package:expect/expect.dart";
+
+// Regression test for issue 5991015.
+
+class V {
+  notCalled(Function x) {
+    return x();
+  }
+
+  foofoo(x) {
+    return x;
+  }
+
+  hoop(input, n) {
+    while (n-- > 0) {
+      Expect.equals(5, input);
+      continue; // This continue statement must properly unchain the context.
+      switch (input) {
+        case 3:
+          var values = foofoo;
+          notCalled(() => values(input));
+      }
+    }
+  }
+}
+
+main() {
+  new V().hoop(5, 3);
+}
diff --git a/tests/language/unsorted/context_args_with_defaults_test.dart b/tests/language/unsorted/context_args_with_defaults_test.dart
new file mode 100644
index 0000000..21c89a6
--- /dev/null
+++ b/tests/language/unsorted/context_args_with_defaults_test.dart
@@ -0,0 +1,22 @@
+// Copyright (c) 2011, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import "package:expect/expect.dart";
+
+class ContextArgsWithDefaultsTest {
+  static void testMain() {
+    crasher(1, 'foo')();
+  }
+
+  static crasher(int fixed, [String optional = '']) {
+    return () {
+      Expect.equals(1, fixed);
+      Expect.equals('foo', optional);
+    };
+  }
+}
+
+main() {
+  ContextArgsWithDefaultsTest.testMain();
+}
diff --git a/tests/language/unsorted/context_test.dart b/tests/language/unsorted/context_test.dart
new file mode 100644
index 0000000..f2b96b1
--- /dev/null
+++ b/tests/language/unsorted/context_test.dart
@@ -0,0 +1,26 @@
+// Copyright (c) 2011, the Dart project authors.  Please see the AUTHORS file
+// for 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 for capturing.
+
+import "package:expect/expect.dart";
+
+class ContextTest {
+  static foo(Function f) {
+    return f();
+  }
+
+  static void testMain() {
+    int x = 42;
+    bar() {
+      return x;
+    }
+
+    x++;
+    Expect.equals(43, foo(bar));
+  }
+}
+
+main() {
+  ContextTest.testMain();
+}
diff --git a/tests/language/unsorted/core_type_check_test.dart b/tests/language/unsorted/core_type_check_test.dart
new file mode 100644
index 0000000..79ea2c5
--- /dev/null
+++ b/tests/language/unsorted/core_type_check_test.dart
@@ -0,0 +1,53 @@
+// 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.
+
+import "package:expect/expect.dart";
+
+check(value, expectComparable, expectPattern) {
+  Expect.equals(expectComparable, value is Comparable);
+  Expect.equals(expectPattern, value is Pattern);
+}
+
+int inscrutable(int x) => x == 0 ? 0 : x | inscrutable(x & (x - 1));
+
+class A implements Comparable {
+  int compareTo(o) => 0;
+}
+
+class B {}
+
+class C implements Pattern {
+  matchAsPrefix(String s, [int start = 0]) => null;
+  allMatches(String s, [int start = 0]) => throw "uncalled";
+}
+
+class D implements Pattern, Comparable {
+  int compareTo(o) => 0;
+  matchAsPrefix(String s, [int start = 0]) => null;
+  allMatches(String s, [int start = 0]) => throw "uncalled";
+}
+
+main() {
+  var things = [
+    [],
+    4,
+    4.2,
+    'foo',
+    new Object(),
+    new A(),
+    new B(),
+    new C(),
+    new D()
+  ];
+
+  check(things[inscrutable(0)], false, false); // List
+  check(things[inscrutable(1)], true, false); // int
+  check(things[inscrutable(2)], true, false); // num
+  check(things[inscrutable(3)], true, true); // string
+  check(things[inscrutable(4)], false, false); // Object
+  check(things[inscrutable(5)], true, false); // A
+  check(things[inscrutable(6)], false, false); // B
+  check(things[inscrutable(7)], false, true); // C
+  check(things[inscrutable(8)], true, true); // D
+}
diff --git a/tests/language/unsorted/cyclic_default_values_test.dart b/tests/language/unsorted/cyclic_default_values_test.dart
new file mode 100644
index 0000000..3ac8e0b
--- /dev/null
+++ b/tests/language/unsorted/cyclic_default_values_test.dart
@@ -0,0 +1,21 @@
+// 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 "package:expect/expect.dart";
+
+bar([x = foo]) => x((_) => "bar");
+foo([y = bar]) => y((_) => "foo");
+
+foo2({f: bar2}) => f(f: ({f}) => "foo2");
+bar2({f: foo2}) => f(f: ({f}) => "bar2");
+
+main() {
+  var f = bar;
+  Expect.equals("bar", Function.apply(f, []));
+  Expect.equals("main", Function.apply(f, [(_) => "main"]));
+
+  var f_2 = bar2;
+  Expect.equals("bar2", Function.apply(f_2, []));
+  Expect.equals("main2", Function.apply(f_2, [], {#f: ({f}) => "main2"}));
+}
diff --git a/tests/language/unsorted/cyclic_type2_test.dart b/tests/language/unsorted/cyclic_type2_test.dart
new file mode 100644
index 0000000..0b62f2f
--- /dev/null
+++ b/tests/language/unsorted/cyclic_type2_test.dart
@@ -0,0 +1,35 @@
+// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// Tests self referencing types.
+
+import "package:expect/expect.dart";
+
+class Base<U, V> {
+  get u => U;
+  get v => V;
+}
+
+class Derived1<U, V>
+    extends Base<Derived1<U, V>, Derived1<Derived2<V, U>, Derived2>> {}
+
+class Derived2<U, V>
+    extends Base<Derived2<U, V>, Derived2<Derived1<V, U>, Derived1>> {}
+
+main() {
+  var d = new Derived1<Derived1, Derived2>();
+  Expect.equals(
+      "Derived1<Derived1<dynamic, dynamic>, Derived2<dynamic, dynamic>>",
+      d.u.toString());
+  Expect.equals(
+      "Derived1<Derived2<Derived2<dynamic, dynamic>, "
+      "Derived1<dynamic, dynamic>>, Derived2<dynamic, dynamic>>",
+      d.v.toString());
+  Expect.isTrue(d is Derived1<Derived1, Derived2>);
+  Expect.isFalse(d is Derived1<Derived1, Derived1>);
+  Expect.isTrue(d is Base<Derived1<Derived1, Derived2>,
+      Derived1<Derived2<Derived2, Derived1>, Derived2>>);
+  Expect.isFalse(d is Base<Derived1<Derived1, Derived2>,
+      Derived1<Derived2<Derived2, Derived2>, Derived2>>);
+}
diff --git a/tests/language/unsorted/cyclic_type_test.dart b/tests/language/unsorted/cyclic_type_test.dart
new file mode 100644
index 0000000..3031f62
--- /dev/null
+++ b/tests/language/unsorted/cyclic_type_test.dart
@@ -0,0 +1,80 @@
+// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// Tests self referencing types.
+
+import "package:expect/expect.dart";
+
+@pragma("vm:entry-point")  // Prevent obfuscation
+class Base<T> {
+  get t => T;
+}
+
+// Derived<T> is contractive.
+@pragma("vm:entry-point")  // Prevent obfuscation
+class Derived<T> extends Base<Derived<T>> {} // //# 00: ok
+
+// Derived<T> is contractive.
+@pragma("vm:entry-point")  // Prevent obfuscation
+class Derived<T> extends Base<Derived<Derived<int>>> {} // //# 01: ok
+
+// Derived<T> is non-contractive.
+@pragma("vm:entry-point")  // Prevent obfuscation
+class Derived<T> extends Base<Derived<Derived<T>>> {} // //# 02: ok
+
+// Derived1<U> and Derived2<V> are contractive.
+@pragma("vm:entry-point")  // Prevent obfuscation
+class Derived1<U> extends Base<Derived2<U>> {} //  //# 03: ok
+@pragma("vm:entry-point")  // Prevent obfuscation
+class Derived2<V> extends Base<Derived1<V>> {} //  //# 03: ok
+
+// Derived1<U> and Derived2<V> are non-contractive.
+@pragma("vm:entry-point")  // Prevent obfuscation
+class Derived1<U> extends Base<Derived2<U>> {} //  //# 04: ok
+@pragma("vm:entry-point")  // Prevent obfuscation
+class Derived2<V> extends Base<Derived1<Derived2<V>>> {} //  //# 04: ok
+
+main() {
+  // In the tests below we test that we get "int" and "bool" when calling
+  // toString() on the int and bool type respectively. This is not required
+  // behavior. However, we want to keep the original names for the most common
+  // core types so we make sure to handle these specifically in the compiler.
+
+  var d;
+  d = new Derived(); // //# 00: continued
+  Expect.equals("Derived<dynamic>", d.t.toString()); // //# 00: continued
+  d = new Derived<bool>(); // //# 00: continued
+  Expect.equals("Derived<bool>", d.t.toString()); // //# 00: continued
+  d = new Derived<Derived>(); // //# 00: continued
+  Expect.equals("Derived<Derived<dynamic>>", d.t.toString()); // //# 00: continued
+
+  d = new Derived(); // //# 01: continued
+
+  Expect.equals("Derived<Derived<int>>", d.t.toString()); // //# 01: continued
+  d = new Derived<bool>(); // //# 01: continued
+  Expect.equals("Derived<Derived<int>>", d.t.toString()); // //# 01: continued
+  d = new Derived<Derived>(); // //# 01: continued
+  Expect.equals("Derived<Derived<int>>", d.t.toString()); // //# 01: continued
+
+  d = new Derived(); // //# 02: continued
+  Expect.equals("Derived<Derived<dynamic>>", d.t.toString()); // //# 02: continued
+  d = new Derived<bool>(); // //# 02: continued
+  Expect.equals("Derived<Derived<bool>>", d.t.toString()); // //# 02: continued
+  d = new Derived<Derived>(); // //# 02: continued
+  Expect.equals("Derived<Derived<Derived<dynamic>>>", d.t.toString()); // //# 02: continued
+
+  d = new Derived1(); // //# 03: continued
+  Expect.equals("Derived2<dynamic>", d.t.toString()); // //# 03: continued
+  d = new Derived2(); // //# 03: continued
+  Expect.equals("Derived1<dynamic>", d.t.toString()); // //# 03: continued
+  d = new Derived2<Derived1<int>>(); // //# 03: continued
+  Expect.equals("Derived1<Derived1<int>>", d.t.toString()); // //# 03: continued
+
+  d = new Derived1(); // //# 04: continued
+  Expect.equals("Derived2<dynamic>", d.t.toString()); // //# 04: continued
+  d = new Derived2(); // //# 04: continued
+  Expect.equals("Derived1<Derived2<dynamic>>", d.t.toString()); // //# 04: continued
+  d = new Derived2<Derived1<int>>(); // //# 04: continued
+  Expect.equals("Derived1<Derived2<Derived1<int>>>", d.t.toString()); // //# 04: continued
+}
diff --git a/tests/language/unsorted/default_implementation2_test.dart b/tests/language/unsorted/default_implementation2_test.dart
new file mode 100644
index 0000000..0a3607c
--- /dev/null
+++ b/tests/language/unsorted/default_implementation2_test.dart
@@ -0,0 +1,18 @@
+// 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 to verify incompatible constructor types
+
+abstract class Point {
+  factory Point(int x, int y) = PointImplementation; //# 01: ok
+  factory Point(x, y) = PointImplementation; //# 02: compile-time error
+}
+
+class PointImplementation implements Point {
+   PointImplementation(int x, int y) {}
+}
+
+main() {
+  new Point(1, 2); //# 01: continued
+  new Point(1, 2); //# 02: continued
+}
diff --git a/tests/language/unsorted/default_implementation_test.dart b/tests/language/unsorted/default_implementation_test.dart
new file mode 100644
index 0000000..c40a1ac2
--- /dev/null
+++ b/tests/language/unsorted/default_implementation_test.dart
@@ -0,0 +1,33 @@
+// 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 to verify that factory classes are working.
+
+import "package:expect/expect.dart";
+
+abstract class Point {
+  factory Point(int x, int y) = PointImplementation;
+
+  final int x = -1;
+  final int y = -1;
+}
+
+class PointImplementation implements Point {
+  const PointImplementation(int x, int y)
+      : this.x = x,
+        this.y = y;
+  final int x;
+  final int y;
+}
+
+class DefaultImplementationTest {
+  static void testMain() {
+    Point point = new Point(4, 2);
+    Expect.equals(4, point.x);
+    Expect.equals(2, point.y);
+  }
+}
+
+main() {
+  DefaultImplementationTest.testMain();
+}
diff --git a/tests/language/unsorted/default_init_test.dart b/tests/language/unsorted/default_init_test.dart
new file mode 100644
index 0000000..90a57c2
--- /dev/null
+++ b/tests/language/unsorted/default_init_test.dart
@@ -0,0 +1,66 @@
+// Copyright (c) 2011, the Dart project authors.  Please see the AUTHORS file
+// for 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";
+
+// Tests static and instance fields initialization.
+class DefaultInitTest {
+  static testMain() {
+    Expect.equals(0, A.a);
+    Expect.equals(2, A.b);
+    Expect.equals(null, A.c);
+
+    A a1 = new A(42);
+    Expect.equals(42, a1.d);
+    Expect.equals(null, a1.e);
+
+    A a2 = new A.named(43);
+    Expect.equals(null, a2.d);
+    Expect.equals(43, a2.e);
+
+    Expect.equals(42, B.instance.x);
+    Expect.equals(3, C.instance.z);
+  }
+}
+
+class A {
+  static const int a = 0;
+  static const int b = 2;
+  static int? c;
+  int? d;
+  int? e;
+
+  A(int val) {
+    d = val;
+  }
+
+  A.named(int val) {
+    e = val;
+  }
+}
+
+// The following tests cover cases described in b/4101270
+
+class B {
+  static const B instance = const B();
+  // by putting this field after the static initializer above, the JS code gen
+  // was calling the constructor before the setter of this property was defined.
+  final int x;
+  const B() : this.x = (41 + 1);
+}
+
+class C {
+  // forward reference to another class
+  static const D instance = const D();
+  C() {}
+}
+
+class D {
+  const D() : this.z = 3;
+  final int z;
+}
+
+main() {
+  DefaultInitTest.testMain();
+}
diff --git a/tests/language/unsorted/deny_listed_test.dart b/tests/language/unsorted/deny_listed_test.dart
new file mode 100644
index 0000000..ba49fdc
--- /dev/null
+++ b/tests/language/unsorted/deny_listed_test.dart
@@ -0,0 +1,79 @@
+// 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 checking that static/instance field shadowing do not conflict.
+
+// Test that certain interfaces/classes are denylisted from being
+// implemented or extended.
+
+// bool.
+class MyBool implements bool {} //                    //# 01: compile-time error
+abstract class MyBoolInterface implements bool default F { // //# 02: syntax error
+  MyBoolInterface(); //                               //# 02: continued
+} //                                                  //# 02: continued
+
+// num.
+class MyNum implements num {} //                      //# 03: compile-time error
+abstract class MyNumInterface implements num default F { //   //# 04: syntax error
+  MyNumInterface(); //                                //# 04: continued
+} //                                                  //# 04: continued
+
+// int.
+class MyInt implements int {} //                      //# 05: compile-time error
+abstract class MyIntInterface implements int default F { //   //# 06: syntax error
+  MyIntInterface(); //                                //# 06: continued
+} //                                                  //# 06: continued
+
+// double.
+class MyDouble implements double {} //                    //# 07: compile-time error
+abstract class MyDoubleInterface implements double default F { // //# 08: syntax error
+  MyDoubleInterface(); //                                 //# 08: continued
+} //                                                      //# 08: continued
+
+// String.
+class MyString implements String {} //                    //# 09: compile-time error
+abstract class MyStringInterface implements String default F { // //# 10: syntax error
+  MyStringInterface(); //                                 //# 10: continued
+} //                                                      //# 10: continued
+
+// Function.
+class MyFunction implements Function {}
+
+class MyOtherFunction extends Function {}
+abstract class MyFunctionInterface implements Function default F { // //# 12: syntax error
+  MyFunctionInterface(); //                                   //# 12: continued
+} //                                                          //# 12: continued
+
+// dynamic.
+class MyDynamic implements dynamic {} //                     //# 13: compile-time error
+abstract class MyDynamicInterface implements dynamic default F { //  //# 14: syntax error
+  MyDynamicInterface(); //                                   //# 14: continued
+} //                                                         //# 14: continued
+
+class F {
+  factory MyBoolInterface() { return null; } //     //# 02: continued
+  factory MyNumInterface() { return null; } //      //# 04: continued
+  factory MyIntInterface() { return null; } //      //# 06: continued
+  factory MyDoubleInterface() { return null; } //   //# 08: continued
+  factory MyStringInterface() { return null; } //   //# 10: continued
+  factory MyFunctionInterface() { return null; } // //# 12: continued
+  factory MyDynamicInterface() { return null; } //  //# 14: continued
+}
+
+main() {
+  new MyBool(); //             //# 01: continued
+  new MyBoolInterface(); //    //# 02: continued
+  new MyNum(); //              //# 03: continued
+  new MyNumInterface(); //     //# 04: continued
+  new MyInt(); //              //# 05: continued
+  new MyIntInterface(); //     //# 06: continued
+  new MyDouble(); //           //# 07: continued
+  new MyDoubleInterface(); //  //# 08: continued
+  new MyString(); //           //# 09: continued
+  new MyStringInterface(); //  //# 10: continued
+  new MyFunction();
+  new MyOtherFunction();
+  new MyFunctionInterface(); //# 12: continued
+  new MyDynamic(); //          //# 13: continued
+  new MyDynamicInterface(); // //# 14: continued
+}
diff --git a/tests/language/unsorted/disassemble_test.dart b/tests/language/unsorted/disassemble_test.dart
new file mode 100644
index 0000000..bc3b032
--- /dev/null
+++ b/tests/language/unsorted/disassemble_test.dart
@@ -0,0 +1,16 @@
+// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// VMOptions=--disassemble
+// VMOptions=--disassemble --always_generate_trampolines_for_testing
+
+// Tests proper object recognition in disassembler.
+
+f(x) {
+  return "foo";
+}
+
+main() {
+  print(f(0));
+}
diff --git a/tests/language/unsorted/efficient_length_warning_test.dart b/tests/language/unsorted/efficient_length_warning_test.dart
new file mode 100644
index 0000000..5ba2c6f
--- /dev/null
+++ b/tests/language/unsorted/efficient_length_warning_test.dart
@@ -0,0 +1,17 @@
+// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+// Third dart test program.
+
+import "dart:math";
+
+main() {
+  // This should no longer cause a warning because the least-upper-bound
+  // of List<int> and Set<int> is Object.
+  // The LUB is now EfficientLengthIterable and it extends Iterable.
+  var x = (new Random().nextBool() // Unpredictable condition.
+          ? <int>[1]
+          : new Set<int>.from([1]))
+      .first;
+  if (x != 1) throw "Wat?";
+}
diff --git a/tests/language/unsorted/emit_const_fields_test.dart b/tests/language/unsorted/emit_const_fields_test.dart
new file mode 100644
index 0000000..8264c50
--- /dev/null
+++ b/tests/language/unsorted/emit_const_fields_test.dart
@@ -0,0 +1,21 @@
+// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+// Test that used static consts are emitted.
+
+import "package:expect/expect.dart";
+
+class Guide {
+  static const LTUAE = 42;
+  static const TITLE = "Life, the Universe and Everything";
+  static const EARTH = const {
+    "Sector": "ZZ9 Plural Z Alpha",
+    "Status": const ["Scheduled for demolition", "1978-03-08"],
+    "Description": "Mostly harmless"
+  };
+}
+
+main() {
+  Expect.isTrue(42 == Guide.LTUAE);
+  Expect.isTrue("1978-03-08" == (Guide.EARTH["Status"] as List)[1]);
+}
diff --git a/tests/language/unsorted/expect_test.dart b/tests/language/unsorted/expect_test.dart
new file mode 100644
index 0000000..5cd8c8a3
--- /dev/null
+++ b/tests/language/unsorted/expect_test.dart
@@ -0,0 +1,77 @@
+// Copyright (c) 2011, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+// Testing the Expect class.
+
+import "package:expect/expect.dart";
+
+class ExpectTest {
+  static testEquals(a) {
+    try {
+      Expect.equals("AB", a, "within testEquals");
+    } on ExpectException catch (msg) {
+      print(msg);
+      return;
+    }
+    Expect.equals("AB", "${a}B");
+    throw "Expect.equals did not fail";
+  }
+
+  static testIsTrue(f) {
+    try {
+      Expect.isTrue(f);
+    } on ExpectException catch (msg) {
+      print(msg);
+      return;
+    }
+    Expect.isFalse(f);
+    throw "Expect.isTrue did not fail";
+  }
+
+  static testIsFalse(t) {
+    try {
+      Expect.isFalse(t);
+    } on ExpectException catch (msg) {
+      print(msg);
+      return;
+    }
+    Expect.isTrue(t);
+    throw "Expect.isFalse did not fail";
+  }
+
+  static testIdentical(a) {
+    var ab = a + "B";
+    try {
+      Expect.identical("AB", ab);
+    } on ExpectException catch (msg) {
+      print(msg);
+      return;
+    }
+    Expect.equals("AB", ab);
+    throw "Expect.identical did not fail";
+  }
+
+  static testFail() {
+    try {
+      Expect.fail("fail now");
+    } on ExpectException catch (msg) {
+      print(msg);
+      return;
+    }
+    throw "Expect.fail did not fail";
+  }
+
+  static void testMain() {
+    testEquals("A");
+    testIsTrue(false);
+    testIsTrue(1);
+    testIsFalse(true);
+    testIsFalse(0);
+    testIdentical("A");
+    testFail();
+  }
+}
+
+main() {
+  ExpectTest.testMain();
+}
diff --git a/tests/language/unsorted/extend_type_parameter_test.dart b/tests/language/unsorted/extend_type_parameter_test.dart
new file mode 100644
index 0000000..58991f5
--- /dev/null
+++ b/tests/language/unsorted/extend_type_parameter_test.dart
@@ -0,0 +1,13 @@
+// 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.
+
+// Extending a type parameter is not allowed.
+
+abstract class A<T> extends T {} // //# 00: compile-time error
+class A<T> extends T {} // //# 01: compile-time error
+
+main() {
+  A a = new A(); // //# 00: compile-time error
+  A a = new A(); // //# 01: continued
+}
diff --git a/tests/language/unsorted/extends_test.dart b/tests/language/unsorted/extends_test.dart
new file mode 100644
index 0000000..44c1c18
--- /dev/null
+++ b/tests/language/unsorted/extends_test.dart
@@ -0,0 +1,21 @@
+// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+library ExtendsTestMain;
+
+import "extends_test_lib.dart";
+import "package:expect/expect.dart";
+
+// S should extend class A from below, not the one imported
+// from the library.
+class S extends A {}
+
+class A {
+  var y = "class A from main script";
+}
+
+main() {
+  var s = new S();
+  Expect.equals("class A from main script", s.y);
+}
diff --git a/tests/language/unsorted/extends_test_lib.dart b/tests/language/unsorted/extends_test_lib.dart
new file mode 100644
index 0000000..d62ca8f
--- /dev/null
+++ b/tests/language/unsorted/extends_test_lib.dart
@@ -0,0 +1,9 @@
+// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+library ExtendsTestLib;
+
+class A {
+  var y = "class A from library";
+}
diff --git a/tests/language/unsorted/external_runtime_test.dart b/tests/language/unsorted/external_runtime_test.dart
new file mode 100644
index 0000000..e51282c
--- /dev/null
+++ b/tests/language/unsorted/external_runtime_test.dart
@@ -0,0 +1,54 @@
+// TODO(multitest): This was automatically migrated from a multitest and may
+// contain strange or dead code.
+
+// 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.
+
+class Bar {
+  Bar(val);
+}
+
+class Foo {
+  var x;
+  f() {}
+
+  Foo() : x = 0;
+
+  // fields can't be declared external
+
+
+
+
+
+
+
+
+
+
+
+
+
+}
+
+
+
+
+main() {
+  // Ensure Foo class is compiled.
+  var foo = new Foo();
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+}
diff --git a/tests/language/unsorted/external_test.dart b/tests/language/unsorted/external_test.dart
new file mode 100644
index 0000000..b1008e1
--- /dev/null
+++ b/tests/language/unsorted/external_test.dart
@@ -0,0 +1,102 @@
+// 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.
+
+class Bar {
+  Bar(val);
+}
+
+class Foo {
+//    ^
+// [cfe] The non-abstract class 'Foo' is missing implementations for these members:
+  var x = -1;
+  f() {}
+
+  Foo() : x = 0;
+
+  // fields can't be declared external
+  external var x01;
+//^^^^^^^^
+// [analyzer] SYNTACTIC_ERROR.EXTERNAL_FIELD
+  external int x02;
+//^^^^^^^^
+// [analyzer] SYNTACTIC_ERROR.EXTERNAL_FIELD
+
+  external f11() { }
+  //             ^
+  // [analyzer] SYNTACTIC_ERROR.EXTERNAL_METHOD_WITH_BODY
+  // [cfe] An external or native method can't have a body.
+  external f12() => 1;
+  //             ^^
+  // [analyzer] SYNTACTIC_ERROR.EXTERNAL_METHOD_WITH_BODY
+  // [cfe] An external or native method can't have a body.
+  //                ^
+  // [cfe] An external or native method can't have a body.
+  static external f14();
+  //     ^^^^^^^^
+  // [analyzer] SYNTACTIC_ERROR.MODIFIER_OUT_OF_ORDER
+  // [cfe] The modifier 'external' should be before the modifier 'static'.
+  int external f16();
+  //  ^^^^^^^^
+  // [analyzer] SYNTACTIC_ERROR.EXPECTED_TOKEN
+  // [cfe] Expected ';' after this.
+  //           ^^^^^^
+  // [analyzer] STATIC_WARNING.CONCRETE_CLASS_WITH_ABSTRACT_MEMBER
+
+  external Foo.n21(val) : x = 1;
+  //                    ^
+  // [analyzer] SYNTACTIC_ERROR.EXTERNAL_CONSTRUCTOR_WITH_INITIALIZER
+  // [cfe] An external constructor can't have any initializers.
+  external Foo.n22(val) { x = 1; }
+  //                    ^
+  // [analyzer] SYNTACTIC_ERROR.EXTERNAL_METHOD_WITH_BODY
+  // [cfe] An external or native method can't have a body.
+  external factory Foo.n23(val) => new Foo();
+  //                            ^^
+  // [analyzer] SYNTACTIC_ERROR.EXTERNAL_FACTORY_WITH_BODY
+  // [cfe] External factories can't have a body.
+  //                               ^
+  // [cfe] An external or native method can't have a body.
+  external Foo.n24(this.x);
+  //                    ^
+  // [cfe] An external constructor can't initialize fields.
+  external factory Foo.n25(val) = Bar;
+  //                            ^
+  // [analyzer] SYNTACTIC_ERROR.EXTERNAL_FACTORY_REDIRECTION
+  // [cfe] A redirecting factory can't be external.
+  //                              ^^^
+  // [analyzer] STATIC_WARNING.REDIRECT_TO_INVALID_RETURN_TYPE
+  // [cfe] The constructor function type 'Bar Function(dynamic)' isn't a subtype of 'Foo Function(dynamic)'.
+}
+
+external int t06(int i) { return 1; }
+// [error line 78, column 1, length 8]
+// [analyzer] SYNTACTIC_ERROR.EXTERNAL_METHOD_WITH_BODY
+// [cfe] An external or native method can't have a body.
+//                      ^
+// [cfe] An external or native method can't have a body.
+external int t07(int i) => i + 1;
+// [error line 84, column 1, length 8]
+// [analyzer] SYNTACTIC_ERROR.EXTERNAL_METHOD_WITH_BODY
+// [cfe] An external or native method can't have a body.
+//                         ^
+// [cfe] An external or native method can't have a body.
+
+main() {
+  // Ensure Foo class is compiled.
+  var foo = new Foo();
+
+  new Foo().f11();
+  new Foo().f12();
+  Foo.f14();
+  new Foo().f16();
+
+  new Foo.n21(1);
+  new Foo.n22(1);
+  new Foo.n23(1);
+  new Foo.n24(1);
+  new Foo.n25(1);
+
+  t06(1);
+  t07(1);
+}
diff --git a/tests/language/unsorted/extract_type_arguments_test.dart b/tests/language/unsorted/extract_type_arguments_test.dart
new file mode 100644
index 0000000..52939c7
--- /dev/null
+++ b/tests/language/unsorted/extract_type_arguments_test.dart
@@ -0,0 +1,97 @@
+// Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+/// Tests the (probably temporary) API for extracting reified type arguments
+/// from an object.
+
+import "package:expect/expect.dart";
+
+// It's weird that a language test is testing code defined in a package. The
+// rationale for putting this test here is:
+//
+// * This package is special and "built-in" to Dart in that the various
+//   compilers give it the special privilege of importing "dart:_internal"
+//   without error.
+//
+// * Eventually, the API being tested here may be replaced with an actual
+//   language feature, in which case this test will become an actual language
+//   test.
+//
+// * Placing the test here ensures it is tested on all of the various platforms
+//   and configurations where we need the API to work.
+import "package:dart_internal/extract_type_arguments.dart";
+
+main() {
+  testExtractIterableTypeArgument();
+  testExtractMapTypeArguments();
+}
+
+testExtractIterableTypeArgument() {
+  Iterable object = <int>[];
+
+  // Invokes function with iterable's type argument.
+  var called = false;
+  extractIterableTypeArgument(object, <T>() {
+    Expect.equals(T, int);
+    called = true;
+  });
+  Expect.isTrue(called);
+
+  // Returns result of function.
+  Object result = extractIterableTypeArgument(object, <T>() => new Set<T>());
+  Expect.isTrue(result is Set<int>);
+  Expect.isFalse(result is Set<bool>);
+
+  // Accepts user-defined implementations of Iterable.
+  object = new CustomIterable();
+  result = extractIterableTypeArgument(object, <T>() => new Set<T>());
+  Expect.isTrue(result is Set<String>);
+  Expect.isFalse(result is Set<bool>);
+}
+
+testExtractMapTypeArguments() {
+  Map object = <String, int>{};
+
+  // Invokes function with map's type arguments.
+  var called = false;
+  extractMapTypeArguments(object, <K, V>() {
+    Expect.equals(K, String);
+    Expect.equals(V, int);
+    called = true;
+  });
+  Expect.isTrue(called);
+
+  // Returns result of function.
+  Object result = extractMapTypeArguments(object, <K, V>() => new Two<K, V>());
+  Expect.isTrue(result is Two<String, int>);
+  Expect.isFalse(result is Two<int, String>);
+
+  // Accepts user-defined implementations of Map.
+  object = new CustomMap();
+  result = extractMapTypeArguments(object, <K, V>() => new Two<K, V>());
+  Expect.isTrue(result is Two<int, bool>);
+  Expect.isFalse(result is Two<bool, int>);
+
+  // Uses the type parameter order of Map, not any other type in the hierarchy.
+  object = new FlippedMap<double, Null>();
+  result = extractMapTypeArguments(object, <K, V>() => new Two<K, V>());
+  // Order is reversed here:
+  Expect.isTrue(result is Two<Null, double>);
+  Expect.isFalse(result is Two<double, Null>);
+}
+
+class Two<A, B> {}
+
+class CustomIterable implements Iterable<String> {
+  noSuchMethod(i) => throw new UnimplementedError();
+}
+
+class CustomMap implements Map<int, bool> {
+  noSuchMethod(i) => throw new UnimplementedError();
+}
+
+// Note: Flips order of type parameters.
+class FlippedMap<V, K> implements Map<K, V> {
+  noSuchMethod(i) => throw new UnimplementedError();
+}
diff --git a/tests/language/unsorted/fannkuch_test.dart b/tests/language/unsorted/fannkuch_test.dart
new file mode 100644
index 0000000..be1a890
--- /dev/null
+++ b/tests/language/unsorted/fannkuch_test.dart
@@ -0,0 +1,92 @@
+// Copyright (c) 2011, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+// The Computer Language Benchmarks Game
+// https://benchmarksgame-team.pages.debian.net/benchmarksgame/
+// Ported from JavaScript contributed by Isaac Gouy.
+// Description: Repeatedly access a tiny integer-sequence.
+
+import "package:expect/expect.dart";
+
+class FannkuchTest {
+  static fannkuch(n) {
+    var p = List.filled(n, 0), q = List.filled(n, 0), s = List.filled(n, 0);
+    var sign = 1, maxflips = 0, sum = 0, m = n - 1;
+    for (var i = 0; i < n; i++) {
+      p[i] = i;
+      q[i] = i;
+      s[i] = i;
+    }
+    do {
+      // Copy and flip.
+      var q0 = p[0]; // Cache 0th element.
+      if (q0 != 0) {
+        for (var i = 1; i < n; i++) q[i] = p[i]; // Work on a copy.
+        var flips = 1;
+        do {
+          var qq = q[q0];
+          if (qq == 0) {
+            // ... until 0th element is 0.
+            sum += sign * flips;
+            if (flips > maxflips) maxflips = flips; // New maximum?
+            break;
+          }
+          q[q0] = q0;
+          if (q0 >= 3) {
+            var i = 1, j = q0 - 1, t;
+            do {
+              t = q[i];
+              q[i] = q[j];
+              q[j] = t;
+              i++;
+              j--;
+            } while (i < j);
+          }
+          q0 = qq;
+          flips++;
+        } while (true);
+      }
+      if (sign == 1) {
+        var t = p[1];
+        p[1] = p[0];
+        p[0] = t;
+        sign = -1; // Rotate 0<-1.
+      } else {
+        // Rotate 0<-1 and 0<-1<-2.
+        var t = p[1];
+        p[1] = p[2];
+        p[2] = t;
+        sign = 1;
+        for (var i = 2; i < n; i++) {
+          var sx = s[i];
+          if (sx != 0) {
+            s[i] = sx - 1;
+            break;
+          }
+          if (i == m) {
+            return [sum, maxflips];
+          }
+          s[i] = i;
+          // Rotate 0<-...<-i+1.
+          t = p[0];
+          for (var j = 0; j <= i; j++) {
+            p[j] = p[j + 1];
+          }
+          p[i + 1] = t;
+        }
+      }
+    } while (true);
+  }
+
+  static testMain() {
+    var n = 6;
+    var pf = fannkuch(n);
+    Expect.equals(49, pf[0]);
+    Expect.equals(10, pf[1]);
+    print("${pf[0]}\nPfannkuchen($n) = ${pf[1]}");
+  }
+}
+
+main() {
+  FannkuchTest.testMain();
+}
diff --git a/tests/language/unsorted/fast_method_extraction_test.dart b/tests/language/unsorted/fast_method_extraction_test.dart
new file mode 100644
index 0000000..27620d8
--- /dev/null
+++ b/tests/language/unsorted/fast_method_extraction_test.dart
@@ -0,0 +1,106 @@
+// 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 fast method extraction returns correct closure.
+// VMOptions=--optimization-counter-threshold=10 --no-use-osr
+
+import "package:expect/expect.dart";
+
+class A {
+  var f;
+  A(this.f);
+  foo() => 40 + f;
+}
+
+class B {
+  var f;
+  B(this.f);
+  foo() => -40 - f;
+}
+
+class X {}
+
+class C<T> {
+  foo(v) => v is T;
+}
+
+class ChaA {
+  final magic;
+  ChaA(magic) : this.magic = magic;
+
+  foo() {
+    Expect.isTrue(this is ChaA);
+    Expect.equals("magicA", magic);
+    return "A";
+  }
+
+  bar() => foo;
+}
+
+class ChaB extends ChaA {
+  ChaB(magic) : super(magic);
+
+  foo() {
+    Expect.isTrue(this is ChaB);
+    Expect.equals("magicB", magic);
+    return "B";
+  }
+}
+
+mono(a) {
+  var f = a.foo;
+  return f();
+}
+
+poly(a) {
+  var f = a.foo;
+  return f();
+}
+
+types(a, b) {
+  var f = a.foo;
+  Expect.isTrue(f(b));
+}
+
+cha(a) {
+  var f = a.bar();
+  return f();
+}
+
+extractFromNull() {
+  var f = (null).toString;
+  Expect.equals("null", f());
+}
+
+main() {
+  var a = new A(2);
+  var b = new B(2);
+  for (var i = 0; i < 20; i++) {
+    Expect.equals(42, mono(a));
+  }
+
+  for (var i = 0; i < 20; i++) {
+    Expect.equals(42, poly(a));
+    Expect.equals(-42, poly(b));
+  }
+
+  var c = new C<X>();
+  var x = new X();
+  for (var i = 0; i < 20; i++) {
+    types(c, x);
+  }
+
+  var chaA = new ChaA("magicA");
+  for (var i = 0; i < 20; i++) {
+    Expect.equals("A", cha(chaA));
+  }
+
+  var chaB = new ChaB("magicB");
+  for (var i = 0; i < 20; i++) {
+    Expect.equals("B", cha(chaB));
+  }
+
+  for (var i = 0; i < 20; i++) {
+    extractFromNull();
+  }
+}
diff --git a/tests/language/unsorted/fauxverride_runtime_test.dart b/tests/language/unsorted/fauxverride_runtime_test.dart
new file mode 100644
index 0000000..d5ae11a
--- /dev/null
+++ b/tests/language/unsorted/fauxverride_runtime_test.dart
@@ -0,0 +1,102 @@
+// TODO(multitest): This was automatically migrated from a multitest and may
+// contain strange or dead code.
+
+// Copyright (c) 2011, the Dart project authors.  Please see the AUTHORS file
+// for 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";
+
+// Test the semantics of static members mixed with instance members.
+
+// Following are relevant quotes from Dart Programming Language
+// Specification, Draft Version 0.10, June 7, 2012.
+
+// 7 Classes:
+
+// "It is a compile-time error if a class has an instance method and a
+// static member method with the same name."
+
+// 7.1 Instance Methods:
+
+// "Instance methods are functions (6) whose declarations are
+// immediately contained within a class declaration and that are not
+// declared static. The instance methods of a class C are those
+// instance methods declared by C and the instance methods inherited
+// by C from its superclass."
+
+// 7.6 Static Methods
+
+// "Static methods are functions whose declarations are immediately
+// contained within a class declaration and that are declared
+// static. The static methods of a class C are those static methods
+// declared by C."
+
+// 7.7 Static Variables
+
+// "Static variables are variables whose declarations are immediately
+// contained within a class declaration and that are declared
+// static. The static variables of a class C are those static
+// variables declared by C."
+
+// "A static variable declaration of one of the forms static T v;,
+// static T v = e; , static const T v = e; or static final T v = e;
+// always induces an implicit static getter function (7.2) with
+// signature static T get v whose invocation evaluates as described
+// below (7.7.1)."
+
+m() => 'top level';
+
+class Super {
+  // No error from hiding.
+  static m() => 'super';
+
+  static var i = 'super';
+
+  static var i2 = 'super';
+
+  instanceMethod() => m();
+
+  instanceMethod2() => m();
+}
+
+class Sub extends Super {
+  // According to 7.6, static methods are not inherited.
+  static m() => 'sub';
+
+  // According to 7.7, static variables are not inherited.
+  static var i = 'sub';
+
+  // According to 7.1, instance methods include those of the
+  // superclass, and according to 7, it is a compile-time to have an
+  // instance method and static method with the same name.
+
+  instanceMethod() => m();
+
+  // According to 7.7, static variables are not inherited.
+  static i2() => m();
+
+  // According to 7.1, instance methods include those of the
+  // superclass, and according to 7, it is a compile-time to have an
+  // instance method and static method with the same
+  // name. Furthermore, according to 7.7 a static variable induces an
+  // implicit getter function (a static method).
+
+
+  foo() => 'foo';
+}
+
+main() {
+  Expect.equals('foo', new Sub().foo());
+  Expect.equals('top level', m());
+  Expect.equals('super', Super.m());
+  Expect.equals('sub', Sub.m());
+  Expect.equals('super', Super.i);
+  Expect.equals('sub', Sub.i);
+  Expect.equals('super', Super.i2);
+  Expect.equals('sub', Sub.i2());
+  Expect.equals('super', new Super().instanceMethod());
+  Expect.equals('sub', new Sub().instanceMethod());
+  Expect.equals('super', new Super().instanceMethod2());
+  Expect.equals('super', new Sub().instanceMethod2());
+}
diff --git a/tests/language/unsorted/fauxverride_test.dart b/tests/language/unsorted/fauxverride_test.dart
new file mode 100644
index 0000000..d5fc6b1
--- /dev/null
+++ b/tests/language/unsorted/fauxverride_test.dart
@@ -0,0 +1,109 @@
+// Copyright (c) 2011, the Dart project authors.  Please see the AUTHORS file
+// for 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";
+
+// Test the semantics of static members mixed with instance members.
+
+// Following are relevant quotes from Dart Programming Language
+// Specification, Draft Version 0.10, June 7, 2012.
+
+// 7 Classes:
+
+// "It is a compile-time error if a class has an instance method and a
+// static member method with the same name."
+
+// 7.1 Instance Methods:
+
+// "Instance methods are functions (6) whose declarations are
+// immediately contained within a class declaration and that are not
+// declared static. The instance methods of a class C are those
+// instance methods declared by C and the instance methods inherited
+// by C from its superclass."
+
+// 7.6 Static Methods
+
+// "Static methods are functions whose declarations are immediately
+// contained within a class declaration and that are declared
+// static. The static methods of a class C are those static methods
+// declared by C."
+
+// 7.7 Static Variables
+
+// "Static variables are variables whose declarations are immediately
+// contained within a class declaration and that are declared
+// static. The static variables of a class C are those static
+// variables declared by C."
+
+// "A static variable declaration of one of the forms static T v;,
+// static T v = e; , static const T v = e; or static final T v = e;
+// always induces an implicit static getter function (7.2) with
+// signature static T get v whose invocation evaluates as described
+// below (7.7.1)."
+
+m() => 'top level';
+
+class Super {
+  // No error from hiding.
+  static m() => 'super';
+
+  static var i = 'super';
+
+  static var i2 = 'super';
+
+  instanceMethod() => m();
+
+  instanceMethod2() => m();
+}
+
+class Sub extends Super {
+  // According to 7.6, static methods are not inherited.
+  static m() => 'sub';
+
+  // According to 7.7, static variables are not inherited.
+  static var i = 'sub';
+
+  // According to 7.1, instance methods include those of the
+  // superclass, and according to 7, it is a compile-time to have an
+  // instance method and static method with the same name.
+  static
+  instanceMethod() => m();
+//^^^^^^^^^^^^^^
+// [analyzer] COMPILE_TIME_ERROR.CONFLICTING_STATIC_AND_INSTANCE
+// [cfe] Can't declare a member that conflicts with an inherited one.
+
+  // According to 7.7, static variables are not inherited.
+  static i2() => m();
+
+  // According to 7.1, instance methods include those of the
+  // superclass, and according to 7, it is a compile-time to have an
+  // instance method and static method with the same
+  // name. Furthermore, according to 7.7 a static variable induces an
+  // implicit getter function (a static method).
+  static var instanceMethod2;
+  //         ^^^^^^^^^^^^^^^
+  // [analyzer] COMPILE_TIME_ERROR.CONFLICTING_STATIC_AND_INSTANCE
+  // [cfe] Can't declare a member that conflicts with an inherited one.
+
+  foo() => 'foo';
+}
+
+main() {
+  Expect.equals('foo', new Sub().foo());
+  Expect.equals('top level', m());
+  Expect.equals('super', Super.m());
+  Expect.equals('sub', Sub.m());
+  Expect.equals('super', Super.i);
+  Expect.equals('sub', Sub.i);
+  Expect.equals('super', Super.i2);
+  Expect.equals('sub', Sub.i2());
+  Expect.equals('super', new Super().instanceMethod());
+  Expect.equals('sub', new Sub().instanceMethod());
+  //                             ^
+  // [cfe] The method 'instanceMethod' isn't defined for the class 'Sub'.
+  Expect.equals('super', new Super().instanceMethod2());
+  Expect.equals('super', new Sub().instanceMethod2());
+  //                               ^
+  // [cfe] The method 'instanceMethod2' isn't defined for the class 'Sub'.
+}
diff --git a/tests/language/unsorted/fibo_test.dart b/tests/language/unsorted/fibo_test.dart
new file mode 100644
index 0000000..e6f13bd
--- /dev/null
+++ b/tests/language/unsorted/fibo_test.dart
@@ -0,0 +1,33 @@
+// Copyright (c) 2011, the Dart project authors.  Please see the AUTHORS file
+// for 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 calculating the Fibonacci sequence.
+
+import "package:expect/expect.dart";
+
+class Helper {
+  static int fibonacci(int n) {
+    int a = 0, b = 1, i = 0;
+    while (i++ < n) {
+      a = a + b;
+      b = a - b;
+    }
+    return a;
+  }
+}
+
+class FiboTest {
+  static testMain() {
+    Expect.equals(0, Helper.fibonacci(0));
+    Expect.equals(1, Helper.fibonacci(1));
+    Expect.equals(1, Helper.fibonacci(2));
+    Expect.equals(2, Helper.fibonacci(3));
+    Expect.equals(3, Helper.fibonacci(4));
+    Expect.equals(5, Helper.fibonacci(5));
+    Expect.equals(102334155, Helper.fibonacci(40));
+  }
+}
+
+main() {
+  FiboTest.testMain();
+}
diff --git a/tests/language/unsorted/first_test.dart b/tests/language/unsorted/first_test.dart
new file mode 100644
index 0000000..783dd2e
--- /dev/null
+++ b/tests/language/unsorted/first_test.dart
@@ -0,0 +1,14 @@
+// Copyright (c) 2011, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+// First dart test program.
+
+class FirstTest {
+  static testMain() {
+    return 42;
+  }
+}
+
+main() {
+  FirstTest.testMain();
+}
diff --git a/tests/language/unsorted/fixed_length_test.dart b/tests/language/unsorted/fixed_length_test.dart
new file mode 100644
index 0000000..ee4eb15
--- /dev/null
+++ b/tests/language/unsorted/fixed_length_test.dart
@@ -0,0 +1,27 @@
+// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import "package:expect/expect.dart";
+
+// Regression test for https://code.google.com/p/dart/issues/detail?id=7994.
+
+void main() {
+  Expect.equals(-1, foo());
+}
+
+int foo() {
+  var list = List<int>.filled(1024, 0);
+
+  for (int i = 0; i < list.length; i++) list[i] = -i;
+
+  for (int n = list.length; n > 1; n--) {
+    for (int i = 0; i < n - 1; i++) {
+      if (list[i] > list[i + 1]) {
+        return list[i + 1];
+      }
+    }
+  }
+
+  throw "unreachable";
+}
diff --git a/tests/language/unsorted/flatten_test.dart b/tests/language/unsorted/flatten_test.dart
new file mode 100644
index 0000000..2ff13e9
--- /dev/null
+++ b/tests/language/unsorted/flatten_test.dart
@@ -0,0 +1,41 @@
+// 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:async';
+
+class Derived<T> implements Future<T> {
+  noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation);
+}
+
+class FixedPoint<T> implements Future<FixedPoint<T>> {
+  noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation);
+}
+
+class Divergent<T> implements Future<Divergent<Divergent<T>>> {
+  noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation);
+}
+
+test() async {
+  // flatten(Derived<int>) = int
+  int x = await new Derived<int>(); //# 01: runtime error
+  Future<int> f() async => new Derived<int>(); //# 02: ok
+  Future<int> f() async { return new Derived<int>(); } //# 03: ok
+  Future<int> x = (() async => new Derived<int>())(); //# 04: runtime error
+
+  // flatten(FixedPoint<int>) = FixedPoint<int>
+  FixedPoint<int> x = await new FixedPoint<int>(); //# 05: runtime error
+  Future<FixedPoint<int>> f() async => new FixedPoint<int>(); //# 06: ok
+  Future<FixedPoint<int>> f() async { return new FixedPoint<int>(); } //# 07: ok
+  Future<FixedPoint<int>> x = (() async => new FixedPoint<int>())(); //# 08: runtime error
+
+  // flatten(Divergent<int>) = Divergent<Divergent<int>>
+  Divergent<Divergent<int>> x = await new Divergent<int>(); //# 09: runtime error
+  Future<Divergent<Divergent<int>>> f() async => new Divergent<int>(); //# 10: ok
+  Future<Divergent<Divergent<int>>> f() async { return new Divergent<int>(); } //# 11: ok
+  Future<Divergent<Divergent<int>>> x = (() async => new Divergent<int>())(); //# 12: runtime error
+}
+
+main() {
+  test();
+}
diff --git a/tests/language/unsorted/forwarding_semi_stub_test.dart b/tests/language/unsorted/forwarding_semi_stub_test.dart
new file mode 100644
index 0000000..12db5f8
--- /dev/null
+++ b/tests/language/unsorted/forwarding_semi_stub_test.dart
@@ -0,0 +1,26 @@
+// Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import "package:expect/expect.dart";
+
+class B {
+  void f(num x) {}
+}
+
+abstract class I<T> {
+  void f(T x);
+}
+
+class C extends B implements I<num> {
+  // This method is a "forwarding semi-stub"--the front end needs to add an
+  // implementation to it that performs type checking and forwards to B::f.
+  void f(num x);
+}
+
+main() {
+  I<Object> i = new C();
+  Expect.throwsTypeError(() {
+    i.f('oops');
+  });
+}
diff --git a/tests/language/unsorted/future_or_function_test.dart b/tests/language/unsorted/future_or_function_test.dart
new file mode 100644
index 0000000..2fddb22
--- /dev/null
+++ b/tests/language/unsorted/future_or_function_test.dart
@@ -0,0 +1,10 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'dart:async';
+import 'package:expect/expect.dart';
+
+main() {
+  Expect.subtype<void Function(), FutureOr<void Function()>>();
+}
diff --git a/tests/language/unsorted/fuzzy_arrows_test.dart b/tests/language/unsorted/fuzzy_arrows_test.dart
new file mode 100644
index 0000000..4cbe86c
--- /dev/null
+++ b/tests/language/unsorted/fuzzy_arrows_test.dart
@@ -0,0 +1,21 @@
+// Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// Fuzzy arrows will be eliminated from Dart 2.0 soon.  This test checks that
+// implementations have properly removed fuzzy arrow support, both at compile
+// time and at run time.  See dartbug.com/29630 for a detailed explanation.
+
+import "package:expect/expect.dart";
+
+typedef DynamicToDynamic(x);
+typedef NeverToDynamic(Never x);
+
+num numToNum(num x) => x;
+
+main() {
+  DynamicToDynamic x = numToNum; //# 01: compile-time error
+  NeverToDynamic x = numToNum; //# 02: ok
+  Expect.isFalse(numToNum is DynamicToDynamic); //# 03: ok
+  Expect.isTrue(numToNum is NeverToDynamic); //# 04: ok
+}
diff --git a/tests/language/unsorted/gc_test.dart b/tests/language/unsorted/gc_test.dart
new file mode 100644
index 0000000..ecb3960
--- /dev/null
+++ b/tests/language/unsorted/gc_test.dart
@@ -0,0 +1,19 @@
+// Copyright (c) 2011, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+// Testing GC, issue 1469.
+
+main() {
+  var div;
+  for (int i = 0; i < 200; ++i) {
+    List l = new List<dynamic>.filled(1000000, null);
+    var m = 2;
+    div = (_) {
+      var b = l; // Was causing OutOfMemory.
+    };
+    var lSmall = new List<dynamic>.filled(3, null);
+    // Circular reference between new and old gen objects.
+    lSmall[0] = l;
+    l[0] = lSmall;
+  }
+}
diff --git a/tests/language/unsorted/guess_cid_test.dart b/tests/language/unsorted/guess_cid_test.dart
new file mode 100644
index 0000000..9d62a8a
--- /dev/null
+++ b/tests/language/unsorted/guess_cid_test.dart
@@ -0,0 +1,90 @@
+// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+// Dart test program to test cid guessing optimizations.
+// VMOptions=--optimization-counter-threshold=10 --no-background-compilation
+
+import "package:expect/expect.dart";
+
+main() {
+  // Warmup optimizes methods.
+  for (int i = 0; i < 100; i++) {
+    Expect.equals(i, compareInt(i));
+    Expect.equals(i.toDouble(), compareDouble(i.toDouble()));
+    Expect.equals(i, binOpInt(i, i));
+    Expect.equals(i.toDouble(), binOpDouble(i.toDouble(), i.toDouble()));
+  }
+  Expect.equals(3, compareInt(3));
+  Expect.equals(-2, compareInt(-2));
+  Expect.equals(0, compareInt(-1));
+
+  Expect.equals(3, binOpInt(3, 3));
+  Expect.equals(0, binOpInt(-2, -2));
+
+  Expect.equals(3.0, binOpDouble(3.0, 3.0));
+  Expect.equals(0.0, binOpDouble(-2.0, -2.0));
+
+  Expect.equals(3.0, compareDouble(3.0));
+  Expect.equals(-2.0, compareDouble(-2.0));
+  Expect.equals(0.0, compareDouble(-1.0));
+
+  testOSR();
+}
+
+int compareInt(int i) {
+  if (i < 0) {
+    // Not visited in before optimization.
+    // Guess cid of comparison below.
+    if (i == -1) return 0;
+  }
+  return i;
+}
+
+double compareDouble(double i) {
+  if (i < 0.0) {
+    // Not visited in before optimization.
+    // Guess cid of comparison below.
+    if (i == -1.0) return 0.0;
+  }
+  return i;
+}
+
+int binOpInt(int i, int x) {
+  if (i < 0) {
+    // Not visited in before optimization.
+    // Guess cid of binary operation below.
+    return x + 2;
+  }
+  return i;
+}
+
+double binOpDouble(double i, double x) {
+  if (i < 0.0) {
+    // Not visited in before optimization.
+    // Guess cid of binary operation below.
+    return x + 2.0;
+  }
+  return i;
+}
+
+testOSR() {
+  // Foul up  IC data in integer's unary minus.
+  var y = -0x80000000;
+  Expect.equals(
+      (0x7fffffffffffffff + 2) * 10, testLoop(10, 0x7fffffffffffffff));
+  // Second time no deoptimization can occur, since runtime feedback has been collected.
+  Expect.equals(
+      (0x7fffffffffffffff + 2) * 10, testLoop(10, 0x7fffffffffffffff));
+}
+
+testLoop(N, int x) {
+  for (int i = 0; i < N; ++i) {
+    // Will trigger OSR. Operation in loop below will use guessed cids.
+  }
+  int sum = 0;
+  for (int i = 0; i < N; ++i) {
+    // Guess 'x' is Smi, but is actually Mint: deoptimize.
+    sum += x + 2;
+  }
+  return sum;
+}
diff --git a/tests/language/unsorted/gvn_field_access_test.dart b/tests/language/unsorted/gvn_field_access_test.dart
new file mode 100644
index 0000000..cf124b1
--- /dev/null
+++ b/tests/language/unsorted/gvn_field_access_test.dart
@@ -0,0 +1,21 @@
+// 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.
+
+import "package:expect/expect.dart";
+
+class A {
+  var y = 0;
+  foo(x) {
+    var t = this.y;
+    if (t < x) {
+      for (int i = this.y; i < x; i++) y++;
+    }
+    // dart2js was reusing the 't' from above.
+    return this.y;
+  }
+}
+
+void main() {
+  Expect.equals(3, new A().foo(3));
+}
diff --git a/tests/language/unsorted/gvn_interceptor_test.dart b/tests/language/unsorted/gvn_interceptor_test.dart
new file mode 100644
index 0000000..51f109e
--- /dev/null
+++ b/tests/language/unsorted/gvn_interceptor_test.dart
@@ -0,0 +1,17 @@
+// 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.
+
+import "package:expect/expect.dart";
+
+foo(a, index) {
+  if (a.length < index) {
+    for (int i = a.length; i <= index; i++) a.add(i);
+  }
+  // dart2js was reusing the a.length from above.
+  return a[a.length - 1];
+}
+
+void main() {
+  Expect.equals(3, foo([0], 3));
+}
diff --git a/tests/language/unsorted/gvn_test.dart b/tests/language/unsorted/gvn_test.dart
new file mode 100644
index 0000000..a52944d
--- /dev/null
+++ b/tests/language/unsorted/gvn_test.dart
@@ -0,0 +1,23 @@
+// 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.
+
+import "package:expect/expect.dart";
+
+class A {
+  int x = 0;
+
+  foo(i) {
+    var start = x;
+    do {
+      x++;
+      i++;
+    } while (i != 10);
+  }
+}
+
+main() {
+  var a = new A();
+  a.foo(0);
+  Expect.equals(10, a.x);
+}
diff --git a/tests/language/unsorted/hash_code_mangling_test.dart b/tests/language/unsorted/hash_code_mangling_test.dart
new file mode 100644
index 0000000..615da7b
--- /dev/null
+++ b/tests/language/unsorted/hash_code_mangling_test.dart
@@ -0,0 +1,19 @@
+// 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.
+
+import "package:expect/expect.dart";
+
+class Foo {
+  var $identityHash;
+}
+
+void main() {
+  Foo foo = new Foo();
+  foo.$identityHash = 'fisk';
+  Expect.isTrue(foo.$identityHash is String);
+  int hash = foo.hashCode;
+  Expect.isTrue(hash is int);
+  Expect.isTrue(foo.$identityHash is String);
+  Expect.equals(hash, foo.hashCode);
+}
diff --git a/tests/language/unsorted/hello_dart_test.dart b/tests/language/unsorted/hello_dart_test.dart
new file mode 100644
index 0000000..d53705b
--- /dev/null
+++ b/tests/language/unsorted/hello_dart_test.dart
@@ -0,0 +1,16 @@
+// Copyright (c) 2011, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+// Simple test program invoked with an option to eagerly
+// compile all code that is loaded in the isolate.
+// VMOptions=--compile_all
+
+class HelloDartTest {
+  static testMain() {
+    print("Hello, Darter!");
+  }
+}
+
+main() {
+  HelloDartTest.testMain();
+}
diff --git a/tests/language/unsorted/hello_script_lib.dart b/tests/language/unsorted/hello_script_lib.dart
new file mode 100644
index 0000000..35ecc6a
--- /dev/null
+++ b/tests/language/unsorted/hello_script_lib.dart
@@ -0,0 +1,19 @@
+// Copyright (c) 2011, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// Testing a simple script importing a library.
+// This file contains the library.
+
+library HelloScriptLib;
+
+import "package:expect/expect.dart";
+part "hello_script_lib_source.dart";
+
+class HelloLib {
+  static doTest() {
+    x = 17;
+    Expect.equals(17, x++);
+    print("Hello from Lib!");
+  }
+}
diff --git a/tests/language/unsorted/hello_script_lib_source.dart b/tests/language/unsorted/hello_script_lib_source.dart
new file mode 100644
index 0000000..8c74bc4
--- /dev/null
+++ b/tests/language/unsorted/hello_script_lib_source.dart
@@ -0,0 +1,12 @@
+// Copyright (c) 2011, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// Testing a simple script importing a library.
+// This file contains a source file included from the library.
+
+// A top-level variable being accessed both from the library and the importer.
+
+part of HelloScriptLib;
+
+var x;
diff --git a/tests/language/unsorted/hello_script_test.dart b/tests/language/unsorted/hello_script_test.dart
new file mode 100644
index 0000000..b9f004e
--- /dev/null
+++ b/tests/language/unsorted/hello_script_test.dart
@@ -0,0 +1,18 @@
+#! This is currently only a comment.
+// Copyright (c) 2011, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// Testing a simple script importing a library.
+// This file contains the script (aka root library).
+
+library HelloScriptTest.dart;
+
+import "package:expect/expect.dart";
+import "hello_script_lib.dart";
+
+main() {
+  HelloLib.doTest();
+  Expect.equals(18, x);
+  print("Hello done.");
+}
diff --git a/tests/language/unsorted/illegal_declaration_test.dart b/tests/language/unsorted/illegal_declaration_test.dart
new file mode 100644
index 0000000..6b8714b
--- /dev/null
+++ b/tests/language/unsorted/illegal_declaration_test.dart
@@ -0,0 +1,7 @@
+// 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.
+
+[ //# 01: syntax error
+
+main() {}
diff --git a/tests/language/unsorted/illegal_invocation_lib.dart b/tests/language/unsorted/illegal_invocation_lib.dart
new file mode 100644
index 0000000..0d1b8df4
--- /dev/null
+++ b/tests/language/unsorted/illegal_invocation_lib.dart
@@ -0,0 +1,3 @@
+library foo;
+
+foo() {}
diff --git a/tests/language/unsorted/illegal_invocation_runtime_test.dart b/tests/language/unsorted/illegal_invocation_runtime_test.dart
new file mode 100644
index 0000000..41f46b0
--- /dev/null
+++ b/tests/language/unsorted/illegal_invocation_runtime_test.dart
@@ -0,0 +1,18 @@
+// TODO(multitest): This was automatically migrated from a multitest and may
+// contain strange or dead code.
+
+// 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 constructors and initializers.
+//
+// Test for issue 1393.  Invoking a library prefix name caused an internal error
+// in dartc.
+
+
+
+main() {
+  // probably what the user meant was foo.foo(), but the qualifier refers
+  // to the library prefix, not the method defined within the library.
+
+}
diff --git a/tests/language/unsorted/illegal_invocation_test.dart b/tests/language/unsorted/illegal_invocation_test.dart
new file mode 100644
index 0000000..7af9479
--- /dev/null
+++ b/tests/language/unsorted/illegal_invocation_test.dart
@@ -0,0 +1,18 @@
+// 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 constructors and initializers.
+//
+// Test for issue 1393.  Invoking a library prefix name caused an internal error
+// in dartc.
+
+import "illegal_invocation_lib.dart" as foo;
+
+main() {
+  // probably what the user meant was foo.foo(), but the qualifier refers
+  // to the library prefix, not the method defined within the library.
+  foo();
+//^^^
+// [analyzer] COMPILE_TIME_ERROR.PREFIX_IDENTIFIER_NOT_FOLLOWED_BY_DOT
+// [cfe] A prefix can't be used as an expression.
+}
diff --git a/tests/language/unsorted/implicit_scope_test.dart b/tests/language/unsorted/implicit_scope_test.dart
new file mode 100644
index 0000000..49d0dd9
--- /dev/null
+++ b/tests/language/unsorted/implicit_scope_test.dart
@@ -0,0 +1,40 @@
+// Copyright (c) 2011, the Dart project authors.  Please see the AUTHORS file
+// for 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 if, while etc create an implicit scope if the body
+// is not a compound statement.
+
+import "package:expect/expect.dart";
+
+class ImplicitScopeTest {
+  static bool alwaysTrue() {
+    return 1 + 1 == 2;
+  }
+
+  static testMain() {
+    var a = "foo";
+    var b;
+    if (alwaysTrue())
+      var a = "bar";
+    else
+      var b = a;
+    Expect.equals("foo", a);
+    Expect.equals(null, b);
+
+    while (!alwaysTrue()) var a = "bar", b = "baz";
+    Expect.equals("foo", a);
+    Expect.equals(null, b);
+
+    for (int i = 0; i < 10; i++) var a = "bar", b = "baz";
+    Expect.equals("foo", a);
+    Expect.equals(null, b);
+
+    do var a = "bar", b = "baz"; while ("black" == "white");
+    Expect.equals("foo", a);
+    Expect.equals(null, b);
+  }
+}
+
+main() {
+  ImplicitScopeTest.testMain();
+}
diff --git a/tests/language/unsorted/index_assign_operator_infer_return_type_test.dart b/tests/language/unsorted/index_assign_operator_infer_return_type_test.dart
new file mode 100644
index 0000000..357c281
--- /dev/null
+++ b/tests/language/unsorted/index_assign_operator_infer_return_type_test.dart
@@ -0,0 +1,20 @@
+// 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.
+
+class C {
+  dynamic operator []=(dynamic index, dynamic value) {}
+}
+
+abstract class I {
+  void operator []=(dynamic index, dynamic value) {}
+}
+
+class D extends C implements I {
+  // Even though `C` and `I` define different return types for `operator[]=`, it
+  // should still be possible to infer a return type here, since the return type
+  // of `operator[]=` is always inferred as `void`.
+  operator []=(dynamic index, dynamic value) {}
+}
+
+main() {}
diff --git a/tests/language/unsorted/indirect_const_null_test.dart b/tests/language/unsorted/indirect_const_null_test.dart
new file mode 100644
index 0000000..5161614
--- /dev/null
+++ b/tests/language/unsorted/indirect_const_null_test.dart
@@ -0,0 +1,10 @@
+// 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 "package:expect/expect.dart";
+
+main() {
+  const NULL = 1 == 1 ? null : false;
+  Expect.isNull(NULL);
+}
diff --git a/tests/language/unsorted/inference_enum_list_test.dart b/tests/language/unsorted/inference_enum_list_test.dart
new file mode 100644
index 0000000..dc7b7bd3
--- /dev/null
+++ b/tests/language/unsorted/inference_enum_list_test.dart
@@ -0,0 +1,14 @@
+// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+enum E1 { a, b }
+enum E2 { a, b }
+
+var v = [E1.a, E2.b];
+
+main() {
+  // Test that v is `List<Object>`, so any of these assignemnts are OK.
+  v[0] = 0;
+  v[1] = '1';
+}
diff --git a/tests/language/unsorted/inference_list_or_null_test.dart b/tests/language/unsorted/inference_list_or_null_test.dart
new file mode 100644
index 0000000..1e8bd9c
--- /dev/null
+++ b/tests/language/unsorted/inference_list_or_null_test.dart
@@ -0,0 +1,18 @@
+// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// Regression test for dart2js that used to statically inline the length of an
+// array held in a variable when it could, even if that variable could
+// be null.
+
+import "package:expect/expect.dart";
+
+var list;
+
+main() {
+  if (new DateTime.now().millisecondsSinceEpoch == 0) {
+    list = new List.filled(4, null);
+  }
+  Expect.throwsNoSuchMethodError(() => print(list[5]));
+}
diff --git a/tests/language/unsorted/intrinsified_methods_test.dart b/tests/language/unsorted/intrinsified_methods_test.dart
new file mode 100644
index 0000000..302dfb8
--- /dev/null
+++ b/tests/language/unsorted/intrinsified_methods_test.dart
@@ -0,0 +1,43 @@
+// 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 the instanceof operation.
+
+library intrinsified_methods_test;
+
+import "package:expect/expect.dart";
+import 'dart:math';
+
+testIsNegative() {
+  Expect.isFalse((12.0).isNegative);
+  Expect.isTrue((-12.0).isNegative);
+  Expect.isFalse((double.nan).isNegative);
+  Expect.isFalse((0.0).isNegative);
+  Expect.isTrue((-0.0).isNegative);
+  Expect.isFalse((double.infinity).isNegative);
+  Expect.isTrue((double.negativeInfinity).isNegative);
+}
+
+testIsNaN() {
+  Expect.isFalse((1.0).isNaN);
+  Expect.isTrue((double.nan).isNaN);
+}
+
+testTrigonometric() {
+  Expect.approxEquals(1.0, sin(pi / 2.0), 0.0001);
+  Expect.approxEquals(1.0, cos(0), 0.0001);
+  Expect.approxEquals(1.0, cos(0.0), 0.0001);
+}
+
+void foo(int n) {
+  for (var i = 0; i <= n; ++i) {
+    Expect.equals(2.0, sqrt(4.0));
+    testIsNegative();
+    testIsNaN();
+    testTrigonometric();
+  }
+}
+
+void main() {
+  foo(4000);
+}
diff --git a/tests/language/unsorted/inv_cse_licm_test.dart b/tests/language/unsorted/inv_cse_licm_test.dart
new file mode 100644
index 0000000..78b73ed
--- /dev/null
+++ b/tests/language/unsorted/inv_cse_licm_test.dart
@@ -0,0 +1,459 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// VMOptions=--deterministic --optimization_counter_threshold=10
+
+import 'dart:typed_data';
+import "package:expect/expect.dart";
+
+// Tests a few situations in which invariant instructions
+// can be subject to CSE and LICM.
+
+@pragma('vm:never-inline')
+int cse1(Int32List? a, int n) {
+  int x = a![0];
+  for (int i = 0; i < n; i++) {
+    // The a[0] null check, bounds check, and the actual load can be
+    // CSEed with the instructions above even if loop is not taken.
+    x += a[0] * a[i];
+  }
+  return x;
+}
+
+@pragma('vm:never-inline')
+int cse2(Int32List? a, int n) {
+  int x = a![0];
+  for (int i = 0; i < n; i++) {
+    // The a[0] null check, bounds check, but not the actual load can be
+    // CSEed with the instructions above, since the value of the load
+    // changes in the loop.
+    a[i] = a[0] + 1;
+  }
+  return x;
+}
+
+@pragma('vm:never-inline')
+int licm1(Int32List? a, int n) {
+  int x = 0;
+  for (int i = 0; i < n; i++) {
+    // The a[0] null check, bounds check, and the actual load cannot
+    // be LICMed, since the loop may be non-taken.
+    x += a![0] * a[i];
+  }
+  return x;
+}
+
+@pragma('vm:never-inline')
+int licm2(Int32List? a) {
+  int x = 0;
+  for (int i = 0; i < 16; i++) {
+    // The a[0] null check, bounds check, and the actual load can be
+    // LICMed, since the loop is always-taken.
+    x += a![0] * a[i];
+  }
+  return x;
+}
+
+@pragma('vm:never-inline')
+int licm3(Int32List? a, bool cond) {
+  int x = 0;
+  for (int i = 0; i < 16; i++) {
+    // The a[0] null check, bounds check, and the actual load cannot
+    // be LICMed, since the condition may be non-taken (and we don't
+    // hoist invariant conditions).
+    if (cond) x += a![0] * a[i];
+  }
+  return x;
+}
+
+@pragma('vm:never-inline')
+int licm3_brk(Int32List? a, bool cond) {
+  int x = 0;
+  for (int i = 0; i < 16; i++) {
+    // The a[0] null check, bounds check, and the actual load cannot
+    // be LICMed, since the condition may be taken (and we don't
+    // hoist invariant conditions).
+    if (cond) break;
+    x += a![0] * a[i];
+  }
+  return x;
+}
+
+int global = -1;
+
+@pragma('vm:never-inline')
+int licm4(Int32List? a) {
+  int x = 0;
+  for (int i = 0; i < 16; i++) {
+    // The a[0] null check, bounds check, and the actual load cannot
+    // be LICMed, since something visible happens before an exception
+    // may be thrown.
+    global++;
+    x += a![0] * a[i];
+  }
+  return x;
+}
+
+@pragma('vm:never-inline')
+int licm5(Int32List? a) {
+  int x = 0;
+  // Anything in the loop header can be LICMed.
+  for (int i = 0; i < a![1]; i++) {
+    x++;
+  }
+  return x;
+}
+
+@pragma('vm:never-inline')
+int licm6(Int32List? a, int n) {
+  int x = 0;
+  int i = 0;
+  do {
+    // The a[0] null check, bounds check, and the actual load can be
+    // LICMed, since this "header" is always-taken.
+    x += a![0] * a[i++];
+  } while (i < n);
+  return x;
+}
+
+@pragma('vm:never-inline')
+int licm7(Int32List? a, int n) {
+  int x = 0;
+  int i = 0;
+  while (true) {
+    // The a[0] null check, bounds check, and the actual load can be
+    // LICMed, since this "header" is always-taken.
+    x += a![0] * a[i++];
+    if (i >= n) break;
+  }
+  return x;
+}
+
+@pragma('vm:never-inline')
+int licm8(Int32List? a, int n) {
+  int x = 0;
+  int i = 0;
+  while (true) {
+    if (i >= n) break;
+    // No LICM at this point, loop body may not be taken.
+    x += a![0] * a[i++];
+  }
+  return x;
+}
+
+@pragma('vm:never-inline')
+int licm9(Int32List? a) {
+  int x = 0;
+  int i = 0;
+  while (true) {
+    if (i >= 16) break;
+    // The a[0] null check, bounds check, and the actual load can be
+    // LICMed, since the loop is always-taken.
+    x += a![0] * a[i++];
+  }
+  return x;
+}
+
+@pragma('vm:never-inline')
+int licm10(Int32List? a, bool cond) {
+  int x = 0;
+  int i = 0;
+  while (true) {
+    if (i >= 16) break;
+    // The a[0] null check, bounds check, and the actual load cannot
+    // be LICMed, since the condition may be non-taken (and we don't
+    // hoist invariant conditions).
+    if (cond) x += a![0] * a[i];
+    i++;
+  }
+  return x;
+}
+
+@pragma('vm:never-inline')
+int licm10_brk(Int32List? a, bool cond) {
+  int x = 0;
+  int i = 0;
+  while (true) {
+    if (i >= 16) break;
+    // The a[0] null check, bounds check, and the actual load cannot
+    // be LICMed, since the condition may be taken (and we don't
+    // hoist invariant conditions).
+    if (cond) break;
+    x += a![0] * a[i++];
+  }
+  return x;
+}
+
+@pragma('vm:never-inline')
+int licm11(Int32List? a) {
+  int x = 0;
+  while (true) {
+    // Anything in the loop header can be LICMed.
+    if (x > a![1]) break;
+    x++;
+  }
+  return x;
+}
+
+@pragma('vm:never-inline')
+int foo() {
+  return global--;
+}
+
+@pragma('vm:never-inline')
+int licm12(Int32List? a) {
+  int x = 0;
+  int i = 0;
+  // Side-effect loop bound.
+  for (int i = 0; i < foo(); i++) {
+    x += a![0] * a[i++];
+  }
+  return x;
+}
+
+doTests() {
+  var x = new Int32List(0);
+  var a = new Int32List(16);
+  for (int i = 0; i < 16; i++) {
+    a[i] = i + 1;
+  }
+
+  Expect.throwsTypeError(() {
+    cse1(null, 0);
+  });
+  Expect.throwsTypeError(() {
+    cse1(null, 1);
+  });
+  Expect.throws(() {
+    cse1(x, 0);
+  }, (e) {
+    return e is RangeError;
+  });
+  Expect.throws(() {
+    cse1(x, 1);
+  }, (e) {
+    return e is RangeError;
+  });
+  Expect.equals(1, cse1(a, 0));
+  Expect.equals(137, cse1(a, 16));
+
+  Expect.throwsTypeError(() {
+    cse2(null, 0);
+  });
+  Expect.throwsTypeError(() {
+    cse2(null, 1);
+  });
+  Expect.throws(() {
+    cse2(x, 0);
+  }, (e) {
+    return e is RangeError;
+  });
+  Expect.throws(() {
+    cse2(x, 1);
+  }, (e) {
+    return e is RangeError;
+  });
+  Expect.equals(1, cse2(a, 0));
+  Expect.equals(1, cse2(a, 16));
+  Expect.equals(2, a[0]);
+  for (int i = 1; i < 16; i++) {
+    Expect.equals(3, a[i]);
+  }
+
+  Expect.equals(0, licm1(null, 0));
+  Expect.throwsTypeError(() {
+    licm1(null, 1);
+  });
+  Expect.equals(0, licm1(x, 0));
+  Expect.throws(() {
+    licm1(x, 1);
+  }, (e) {
+    return e is RangeError;
+  });
+  Expect.equals(0, licm1(a, 0));
+  Expect.equals(94, licm1(a, 16));
+
+  Expect.throwsTypeError(() {
+    licm2(null);
+  });
+  Expect.throws(() {
+    licm2(x);
+  }, (e) {
+    return e is RangeError;
+  });
+  Expect.equals(94, licm2(a));
+
+  Expect.equals(0, licm3(null, false));
+  Expect.throwsTypeError(() {
+    licm3(null, true);
+  });
+  Expect.equals(0, licm3(x, false));
+  Expect.throws(() {
+    licm3(x, true);
+  }, (e) {
+    return e is RangeError;
+  });
+  Expect.equals(0, licm3(a, false));
+  Expect.equals(94, licm3(a, true));
+
+  Expect.equals(0, licm3_brk(null, true));
+  Expect.throwsTypeError(() {
+    licm3_brk(null, false);
+  });
+  Expect.equals(0, licm3_brk(x, true));
+  Expect.throws(() {
+    licm3_brk(x, false);
+  }, (e) {
+    return e is RangeError;
+  });
+  Expect.equals(0, licm3_brk(a, true));
+  Expect.equals(94, licm3_brk(a, false));
+
+  global = 0;
+  Expect.throwsTypeError(() {
+    licm4(null);
+  });
+  Expect.equals(1, global);
+  Expect.throws(() {
+    licm4(x);
+  }, (e) {
+    return e is RangeError;
+  });
+  Expect.equals(2, global);
+  Expect.equals(94, licm4(a));
+  Expect.equals(18, global);
+
+  Expect.throwsTypeError(() {
+    licm5(null);
+  });
+  Expect.throws(() {
+    licm5(x);
+  }, (e) {
+    return e is RangeError;
+  });
+  Expect.equals(3, licm5(a));
+
+  Expect.throwsTypeError(() {
+    licm6(null, 0);
+  });
+  Expect.throwsTypeError(() {
+    licm6(null, 1);
+  });
+  Expect.throws(() {
+    licm6(x, 0);
+  }, (e) {
+    return e is RangeError;
+  });
+  Expect.throws(() {
+    licm6(x, 1);
+  }, (e) {
+    return e is RangeError;
+  });
+  Expect.equals(4, licm6(a, 0));
+  Expect.equals(94, licm6(a, 16));
+
+  Expect.throwsTypeError(() {
+    licm7(null, 0);
+  });
+  Expect.throwsTypeError(() {
+    licm7(null, 1);
+  });
+  Expect.throws(() {
+    licm7(x, 0);
+  }, (e) {
+    return e is RangeError;
+  });
+  Expect.throws(() {
+    licm7(x, 1);
+  }, (e) {
+    return e is RangeError;
+  });
+  Expect.equals(4, licm7(a, 0));
+  Expect.equals(94, licm7(a, 16));
+
+  Expect.equals(0, licm8(null, 0));
+  Expect.throwsTypeError(() {
+    licm8(null, 1);
+  });
+  Expect.equals(0, licm8(x, 0));
+  Expect.throws(() {
+    licm8(x, 1);
+  }, (e) {
+    return e is RangeError;
+  });
+  Expect.equals(0, licm8(a, 0));
+  Expect.equals(94, licm8(a, 16));
+
+  Expect.throwsTypeError(() {
+    licm9(null);
+  });
+  Expect.throws(() {
+    licm9(x);
+  }, (e) {
+    return e is RangeError;
+  });
+  Expect.equals(94, licm9(a));
+
+  Expect.equals(0, licm10(null, false));
+  Expect.throwsTypeError(() {
+    licm10(null, true);
+  });
+  Expect.equals(0, licm10(x, false));
+  Expect.throws(() {
+    licm10(x, true);
+  }, (e) {
+    return e is RangeError;
+  });
+  Expect.equals(0, licm10(a, false));
+  Expect.equals(94, licm10(a, true));
+
+  Expect.equals(0, licm10_brk(null, true));
+  Expect.throwsTypeError(() {
+    licm10_brk(null, false);
+  });
+  Expect.equals(0, licm10_brk(x, true));
+  Expect.throws(() {
+    licm10_brk(x, false);
+  }, (e) {
+    return e is RangeError;
+  });
+  Expect.equals(0, licm10_brk(a, true));
+  Expect.equals(94, licm10_brk(a, false));
+
+  Expect.throwsTypeError(() {
+    licm11(null);
+  });
+  Expect.throws(() {
+    licm11(x);
+  }, (e) {
+    return e is RangeError;
+  });
+  Expect.equals(4, licm11(a));
+
+  global = 0;
+  Expect.equals(0, licm12(null));
+  Expect.equals(-1, global);
+  Expect.equals(0, licm12(x));
+  Expect.equals(-2, global);
+  global = 16;
+  Expect.throwsTypeError(() {
+    licm12(null);
+  });
+  Expect.equals(15, global);
+  Expect.throws(() {
+    licm12(x);
+  }, (e) {
+    return e is RangeError;
+  });
+  Expect.equals(14, global);
+  Expect.equals(28, licm12(a));
+  Expect.equals(8, global);
+}
+
+main() {
+  // Repeat to enter JIT (when applicable).
+  for (int i = 0; i < 20; i++) {
+    doTests();
+  }
+}
diff --git a/tests/language/unsorted/invalid_cast_runtime_1_test.dart b/tests/language/unsorted/invalid_cast_runtime_1_test.dart
new file mode 100644
index 0000000..179a739
--- /dev/null
+++ b/tests/language/unsorted/invalid_cast_runtime_1_test.dart
@@ -0,0 +1,36 @@
+// TODO(multitest): This was automatically migrated from a multitest and may
+// contain strange or dead code.
+
+// Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+class C {
+  C();
+  factory C.fact() => D();
+  factory C.fact2() = D;
+  C.nonFact();
+  C.nonFact2() : this.nonFact();
+  static void staticFunction(int i) {}
+}
+
+class D extends C {}
+
+void topLevelFunction(int i) {}
+
+test() {
+  void localFunction(int i) {}
+
+
+
+
+  D e = new C.fact() as D;
+
+
+
+
+
+
+}
+
+main() {}
diff --git a/tests/language/unsorted/invalid_cast_runtime_2_test.dart b/tests/language/unsorted/invalid_cast_runtime_2_test.dart
new file mode 100644
index 0000000..7f6120c
--- /dev/null
+++ b/tests/language/unsorted/invalid_cast_runtime_2_test.dart
@@ -0,0 +1,36 @@
+// TODO(multitest): This was automatically migrated from a multitest and may
+// contain strange or dead code.
+
+// Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+class C {
+  C();
+  factory C.fact() => D();
+  factory C.fact2() = D;
+  C.nonFact();
+  C.nonFact2() : this.nonFact();
+  static void staticFunction(int i) {}
+}
+
+class D extends C {}
+
+void topLevelFunction(int i) {}
+
+test() {
+  void localFunction(int i) {}
+
+
+
+
+
+  D f = new C.fact2() as D;
+
+
+
+
+
+}
+
+main() {}
diff --git a/tests/language/unsorted/invalid_cast_runtime_test.dart b/tests/language/unsorted/invalid_cast_runtime_test.dart
new file mode 100644
index 0000000..44f5851
--- /dev/null
+++ b/tests/language/unsorted/invalid_cast_runtime_test.dart
@@ -0,0 +1,36 @@
+// TODO(multitest): This was automatically migrated from a multitest and may
+// contain strange or dead code.
+
+// Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+class C {
+  C();
+  factory C.fact() => D();
+  factory C.fact2() = D;
+  C.nonFact();
+  C.nonFact2() : this.nonFact();
+  static void staticFunction(int i) {}
+}
+
+class D extends C {}
+
+void topLevelFunction(int i) {}
+
+test() {
+  void localFunction(int i) {}
+
+
+
+
+
+
+
+
+
+
+
+}
+
+main() {}
diff --git a/tests/language/unsorted/invalid_cast_test.dart b/tests/language/unsorted/invalid_cast_test.dart
new file mode 100644
index 0000000..c3b7747
--- /dev/null
+++ b/tests/language/unsorted/invalid_cast_test.dart
@@ -0,0 +1,66 @@
+// Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+class C {
+  C();
+  factory C.fact() => D();
+  factory C.fact2() = D;
+  C.nonFact();
+  C.nonFact2() : this.nonFact();
+  static void staticFunction(int i) {}
+}
+
+class D extends C {}
+
+void topLevelFunction(int i) {}
+
+test() {
+  void localFunction(int i) {}
+  List<int> a = <Object>[];
+  //            ^^^^^^^^^^
+  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  //                    ^
+  // [cfe] A value of type 'List<Object>' can't be assigned to a variable of type 'List<int>'.
+  Map<int, String> b = <Object, String>{};
+  //                   ^^^^^^^^^^^^^^^^^^
+  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  //                                   ^
+  // [cfe] A value of type 'Map<Object, String>' can't be assigned to a variable of type 'Map<int, String>'.
+  Map<int, String> c = <int, Object>{};
+  //                   ^^^^^^^^^^^^^^^
+  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  //                                ^
+  // [cfe] A value of type 'Map<int, Object>' can't be assigned to a variable of type 'Map<int, String>'.
+  int Function(Object) d = (int i) => i;
+  //                       ^^^^^^^^^^^^
+  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  // [cfe] A value of type 'int Function(int)' can't be assigned to a variable of type 'int Function(Object)'.
+  D e = new C.fact() as D;
+  D f = new C.fact2() as D;
+  D g = new C.nonFact();
+  //    ^^^^^^^^^^^^^^^
+  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  //        ^
+  // [cfe] A value of type 'C' can't be assigned to a variable of type 'D'.
+  D h = new C.nonFact2();
+  //    ^^^^^^^^^^^^^^^^
+  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  //        ^
+  // [cfe] A value of type 'C' can't be assigned to a variable of type 'D'.
+  void Function(Object) i = C.staticFunction;
+  //                        ^^^^^^^^^^^^^^^^
+  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  //                          ^
+  // [cfe] A value of type 'void Function(int)' can't be assigned to a variable of type 'void Function(Object)'.
+  void Function(Object) j = topLevelFunction;
+  //                        ^^^^^^^^^^^^^^^^
+  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  // [cfe] A value of type 'void Function(int)' can't be assigned to a variable of type 'void Function(Object)'.
+  void Function(Object) k = localFunction;
+  //                        ^^^^^^^^^^^^^
+  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  // [cfe] A value of type 'void Function(int)' can't be assigned to a variable of type 'void Function(Object)'.
+}
+
+main() {}
diff --git a/tests/language/unsorted/invalid_type_argument_count_runtime_test.dart b/tests/language/unsorted/invalid_type_argument_count_runtime_test.dart
new file mode 100644
index 0000000..a0959a8
--- /dev/null
+++ b/tests/language/unsorted/invalid_type_argument_count_runtime_test.dart
@@ -0,0 +1,44 @@
+// TODO(multitest): This was automatically migrated from a multitest and may
+// contain strange or dead code.
+
+// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// Test top level field.
+dynamic // Formatter shouldn't join this line.
+
+    x1 = 42;
+
+class Foo {
+  // Test class member.
+  dynamic // Formatter shouldn't join this line.
+
+      x2 = 42;
+
+  Foo() {
+    print(x2);
+  }
+}
+
+main() {
+  print(x1);
+
+  new Foo();
+
+  // Test local variable.
+  dynamic // Formatter shouldn't join this line.
+
+      x3 = 42;
+  print(x3);
+
+  foo(42);
+}
+
+// Test parameter.
+void foo(
+    dynamic // Formatter shouldn't join this line.
+
+        x4) {
+  print(x4);
+}
diff --git a/tests/language/unsorted/invalid_type_argument_count_test.dart b/tests/language/unsorted/invalid_type_argument_count_test.dart
new file mode 100644
index 0000000..3a93da2
--- /dev/null
+++ b/tests/language/unsorted/invalid_type_argument_count_test.dart
@@ -0,0 +1,44 @@
+// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// Test top level field.
+dynamic<int> x1 = 42;
+// [error line 6, column 1, length 12]
+// [analyzer] STATIC_TYPE_WARNING.WRONG_NUMBER_OF_TYPE_ARGUMENTS
+// [cfe] Expected 0 type arguments.
+
+class Foo {
+  // Test class member.
+  dynamic<int> x2 = 42;
+// [error line 13, column 3, length 12]
+// [analyzer] STATIC_TYPE_WARNING.WRONG_NUMBER_OF_TYPE_ARGUMENTS
+// [cfe] Expected 0 type arguments.
+
+  Foo() {
+    print(x2);
+  }
+}
+
+main() {
+  print(x1);
+
+  new Foo();
+
+  // Test local variable.
+  dynamic<int> x3 = 42;
+// [error line 29, column 3, length 12]
+// [analyzer] STATIC_TYPE_WARNING.WRONG_NUMBER_OF_TYPE_ARGUMENTS
+// [cfe] Expected 0 type arguments.
+  print(x3);
+
+  foo(42);
+}
+
+// Test parameter.
+void foo(dynamic<int> x4) {
+// [error line 39, column 10, length 12]
+// [analyzer] STATIC_TYPE_WARNING.WRONG_NUMBER_OF_TYPE_ARGUMENTS
+// [cfe] Expected 0 type arguments.
+  print(x4);
+}
diff --git a/tests/language/unsorted/invocation_mirror2_test.dart b/tests/language/unsorted/invocation_mirror2_test.dart
new file mode 100644
index 0000000..d9c6faf
--- /dev/null
+++ b/tests/language/unsorted/invocation_mirror2_test.dart
@@ -0,0 +1,18 @@
+// 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.
+
+import "package:expect/expect.dart";
+
+class C {
+  late Invocation im;
+  noSuchMethod(im) => this.im = im;
+  flif() {}
+}
+
+main() {
+  dynamic c = new C();
+  c.flif = 42;
+  Expect.equals(const Symbol("flif="), c.im.memberName);
+  Expect.equals(42, c.im.positionalArguments[0]);
+}
diff --git a/tests/language/unsorted/invocation_mirror_empty_arguments_test.dart b/tests/language/unsorted/invocation_mirror_empty_arguments_test.dart
new file mode 100644
index 0000000..4b8662a
--- /dev/null
+++ b/tests/language/unsorted/invocation_mirror_empty_arguments_test.dart
@@ -0,0 +1,66 @@
+// 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 "package:expect/expect.dart";
+
+// Validates that positional arguments are an empty immutable list.
+void expectEmptyPositionalArguments(Invocation invocation) {
+  Expect.isTrue(invocation.positionalArguments.isEmpty);
+  Expect.throwsUnsupportedError(() => invocation.positionalArguments.clear());
+}
+
+// Validates that positional arguments are an empty immutable map.
+void expectEmptyNamedArguments(Invocation invocation) {
+  Expect.isTrue(invocation.namedArguments.isEmpty);
+  Expect.throwsUnsupportedError(() => invocation.namedArguments.clear());
+}
+
+class Getter {
+  get getterThatDoesNotExist;
+
+  noSuchMethod(invocation) {
+    Expect.isTrue(invocation.isGetter);
+    expectEmptyPositionalArguments(invocation);
+    expectEmptyNamedArguments(invocation);
+  }
+}
+
+class Setter {
+  set setterThatDoesNotExist(value);
+
+  noSuchMethod(invocation) {
+    Expect.isTrue(invocation.isSetter);
+    expectEmptyNamedArguments(invocation);
+  }
+}
+
+class Method {
+  methodThatDoesNotExist();
+
+  noSuchMethod(invocation) {
+    Expect.isTrue(invocation.isMethod);
+    expectEmptyPositionalArguments(invocation);
+    expectEmptyNamedArguments(invocation);
+  }
+}
+
+class Operator {
+  operator +(other);
+
+  noSuchMethod(invocation) {
+    Expect.isTrue(invocation.isMethod);
+    expectEmptyNamedArguments(invocation);
+  }
+}
+
+main() {
+  var g = new Getter();
+  print(g.getterThatDoesNotExist);
+  var s = new Setter();
+  print(s.setterThatDoesNotExist = 42);
+  var m = new Method();
+  print(m.methodThatDoesNotExist());
+  var o = new Operator();
+  print(o + 42); // Operator that does not exist.
+}
diff --git a/tests/language/unsorted/invocation_mirror_test.dart b/tests/language/unsorted/invocation_mirror_test.dart
new file mode 100644
index 0000000..c02d33d
--- /dev/null
+++ b/tests/language/unsorted/invocation_mirror_test.dart
@@ -0,0 +1,317 @@
+// 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.
+
+import "package:expect/expect.dart";
+
+// Invocation and noSuchMethod testing.
+
+Map<Symbol, dynamic> listToNamedArguments(list) {
+  var iterator = list.iterator;
+  var result = new Map<Symbol, dynamic>();
+  while (iterator.moveNext()) {
+    Symbol key = iterator.current;
+    Expect.isTrue(iterator.moveNext());
+    result[key] = iterator.current;
+  }
+  return result;
+}
+
+/** Class with noSuchMethod that returns the mirror */
+class N {
+  // Storage for the last argument to noSuchMethod.
+  // Needed for setters, which don't evaluate to the return value.
+  var last;
+  noSuchMethod(Invocation m) => last = m;
+
+  flif(int x) {
+    Expect.fail("never get here");
+  }
+
+  flaf([int x = -1]) {
+    Expect.fail("never get here");
+  }
+
+  flof({int y = -1}) {
+    Expect.fail("never get here");
+  }
+
+  get wut => this;
+  final int plif = 99;
+  int get plaf {
+    Expect.fail("never get here");
+    return 0;
+  }
+}
+
+/** As [N] but also implements 'call', so we can call it with wrong arguments.*/
+class C extends N {
+  call(int x) {
+    Expect.fail("never get here");
+  }
+}
+
+/**
+ * Checks the data of an Invocation.
+ *
+ * Call without optionals for getters, with only positional for setters,
+ * and with both optionals for everything else.
+ */
+testInvocationMirror(Invocation im, Symbol name,
+    [List? positional, List? named, List? typeArgs]) {
+  Expect.isTrue(im is Invocation, "is Invocation");
+  Expect.equals(name, im.memberName, "name");
+  if (named == null) {
+    Expect.isTrue(im.isAccessor, "$name:isAccessor");
+    Expect.isFalse(im.isMethod, "$name:isMethod");
+    if (positional == null) {
+      Expect.isTrue(im.isGetter, "$name:isGetter");
+      Expect.isFalse(im.isSetter, "$name:isSetter");
+      Expect.equals(0, im.positionalArguments.length, "$name:#positional");
+      Expect.equals(0, im.namedArguments.length, "$name:#named");
+      return;
+    }
+    Expect.isTrue(im.isSetter, "$name:isSetter");
+    Expect.isFalse(im.isGetter, "$name:isGetter");
+    Expect.equals(1, im.positionalArguments.length, "$name:#positional");
+    Expect.equals(
+        positional[0], im.positionalArguments[0], "$name:positional[0]");
+    Expect.equals(0, im.namedArguments.length, "$name:#named");
+    return;
+  }
+  Map<Symbol, dynamic> namedArguments = listToNamedArguments(named);
+  Expect.isTrue(im.isMethod, "$name:isMethod");
+  Expect.isFalse(im.isAccessor, "$name:isAccessor");
+  Expect.isFalse(im.isSetter, "$name:isSetter");
+  Expect.isFalse(im.isGetter, "$name:isGetter");
+
+  Expect.listEquals(positional!, im.positionalArguments);
+
+  Expect.equals(
+      namedArguments.length, im.namedArguments.length, "$name:#named");
+  namedArguments.forEach((k, v) {
+    Expect.isTrue(
+        im.namedArguments.containsKey(k), "$name:?namedArguments[$k]");
+    Expect.equals(v, im.namedArguments[k], "$name:namedArguments[$k]");
+  });
+  var imTypeArgs = (im as dynamic).typeArguments as List<Type>;
+  Expect.listEquals(typeArgs ?? [], imTypeArgs);
+}
+
+// Test different ways that noSuchMethod can be called.
+testInvocationMirrors() {
+  dynamic n = new N();
+  dynamic c = new C();
+
+  // Missing property/method access.
+  testInvocationMirror(n.bar, const Symbol('bar'));
+  testInvocationMirror((n..bar = 42).last, const Symbol('bar='), [42]);
+  testInvocationMirror(n.bar(), const Symbol('bar'), [], []);
+  testInvocationMirror(n.bar(42), const Symbol('bar'), [42], []);
+  testInvocationMirror(
+      n.bar(x: 42), const Symbol('bar'), [], [const Symbol("x"), 42]);
+  testInvocationMirror(
+      n.bar(37, x: 42), const Symbol('bar'), [37], [const Symbol("x"), 42]);
+
+  // Missing operator access.
+  testInvocationMirror(n + 4, const Symbol('+'), [4], []);
+  testInvocationMirror(n - 4, const Symbol('-'), [4], []);
+  testInvocationMirror(-n, const Symbol('unary-'), [], []);
+  testInvocationMirror(n[42], const Symbol('[]'), [42], []);
+  testInvocationMirror((n..[37] = 42).last, const Symbol('[]='), [37, 42], []);
+
+  // Calling as function when it's not.
+  testInvocationMirror(n(), const Symbol('call'), [], []);
+  testInvocationMirror(n(42), const Symbol('call'), [42], []);
+  testInvocationMirror(
+      n(x: 42), const Symbol('call'), [], [const Symbol("x"), 42]);
+  testInvocationMirror(
+      n(37, x: 42), const Symbol('call'), [37], [const Symbol("x"), 42]);
+
+  // Calling with arguments not matching existing call method.
+  testInvocationMirror(c(), const Symbol('call'), [], []);
+  testInvocationMirror(c(37, 42), const Symbol('call'), [37, 42], []);
+  testInvocationMirror(
+      c(x: 42), const Symbol('call'), [], [const Symbol("x"), 42]);
+  testInvocationMirror(
+      c(37, x: 42), const Symbol('call'), [37], [const Symbol("x"), 42]);
+
+  // Wrong arguments to existing function.
+  testInvocationMirror(n.flif(), const Symbol("flif"), [], []);
+  testInvocationMirror(n.flif(37, 42), const Symbol("flif"), [37, 42], []);
+  testInvocationMirror(
+      n.flif(x: 42), const Symbol("flif"), [], [const Symbol("x"), 42]);
+  testInvocationMirror(
+      n.flif(37, x: 42), const Symbol("flif"), [37], [const Symbol("x"), 42]);
+  testInvocationMirror((n..flif = 42).last, const Symbol("flif="), [42]);
+
+  testInvocationMirror(n.flaf(37, 42), const Symbol("flaf"), [37, 42], []);
+  testInvocationMirror(
+      n.flaf(x: 42), const Symbol("flaf"), [], [const Symbol("x"), 42]);
+  testInvocationMirror(
+      n.flaf(37, x: 42), const Symbol("flaf"), [37], [const Symbol("x"), 42]);
+  testInvocationMirror((n..flaf = 42).last, const Symbol("flaf="), [42]);
+
+  testInvocationMirror(n.flof(37, 42), const Symbol("flof"), [37, 42], []);
+  testInvocationMirror(
+      n.flof(x: 42), const Symbol("flof"), [], [const Symbol("x"), 42]);
+  testInvocationMirror(
+      n.flof(37, y: 42), const Symbol("flof"), [37], [const Symbol("y"), 42]);
+  testInvocationMirror((n..flof = 42).last, const Symbol("flof="), [42]);
+
+  // Reading works.
+  Expect.isTrue(n.flif is Function);
+  Expect.isTrue(n.flaf is Function);
+  Expect.isTrue(n.flof is Function);
+
+  // Writing to read-only fields.
+  testInvocationMirror((n..wut = 42).last, const Symbol("wut="), [42]);
+  testInvocationMirror((n..plif = 42).last, const Symbol("plif="), [42]);
+  testInvocationMirror((n..plaf = 42).last, const Symbol("plaf="), [42]);
+
+  // Trick call to n.call - wut is a getter returning n again.
+  testInvocationMirror(n.wut(42), const Symbol("call"), [42], []);
+
+  // Calling noSuchMethod itself, badly.
+  testInvocationMirror(n.noSuchMethod(), const Symbol("noSuchMethod"), [], []);
+  testInvocationMirror(
+      n.noSuchMethod(37, 42), const Symbol("noSuchMethod"), [37, 42], []);
+  testInvocationMirror(n.noSuchMethod(37, x: 42), const Symbol("noSuchMethod"),
+      [37], [const Symbol("x"), 42]);
+  testInvocationMirror(n.noSuchMethod(x: 42), const Symbol("noSuchMethod"), [],
+      [const Symbol("x"), 42]);
+
+  // Closurizing a method means that calling it badly will not hit the
+  // original receivers noSuchMethod, only the one inherited from Object
+  // by the closure object.
+  Expect.throwsNoSuchMethodError(() {
+    var x = n.flif;
+    x(37, 42);
+  });
+  Expect.throwsNoSuchMethodError(() {
+    var x = c.call;
+    x(37, 42);
+  });
+}
+
+class M extends N {
+  testSelfCalls() {
+    // Missing property/method access.
+    dynamic self = this;
+    testInvocationMirror(self.bar, const Symbol('bar'));
+    testInvocationMirror(() {
+      self.bar = 42;
+      return last;
+    }(), const Symbol('bar='), [42]);
+    testInvocationMirror(self.bar(), const Symbol('bar'), [], []);
+    testInvocationMirror(self.bar(42), const Symbol('bar'), [42], []);
+    testInvocationMirror(
+        self.bar(x: 42), const Symbol('bar'), [], [const Symbol("x"), 42]);
+    testInvocationMirror(self.bar(37, x: 42), const Symbol('bar'), [37],
+        [const Symbol("x"), 42]);
+
+    // Missing operator access.
+    testInvocationMirror(self + 4, const Symbol('+'), [4], []);
+    testInvocationMirror(self - 4, const Symbol('-'), [4], []);
+    testInvocationMirror(-self, const Symbol('unary-'), [], []);
+    testInvocationMirror(self[42], const Symbol('[]'), [42], []);
+    testInvocationMirror(() {
+      self[37] = 42;
+      return last;
+    }(), const Symbol('[]='), [37, 42], []);
+
+    // Wrong arguments to existing function.
+    testInvocationMirror(self.flif(), const Symbol("flif"), [], []);
+    testInvocationMirror(self.flif(37, 42), const Symbol("flif"), [37, 42], []);
+    testInvocationMirror(
+        self.flif(x: 42), const Symbol("flif"), [], [const Symbol("x"), 42]);
+    testInvocationMirror(self.flif(37, x: 42), const Symbol("flif"), [37],
+        [const Symbol("x"), 42]);
+    testInvocationMirror(() {
+      self.flif = 42;
+      return last;
+    }(), const Symbol("flif="), [42]);
+
+    testInvocationMirror(self.flaf(37, 42), const Symbol("flaf"), [37, 42], []);
+    testInvocationMirror(
+        self.flaf(x: 42), const Symbol("flaf"), [], [const Symbol("x"), 42]);
+    testInvocationMirror(self.flaf(37, x: 42), const Symbol("flaf"), [37],
+        [const Symbol("x"), 42]);
+    testInvocationMirror(() {
+      self.flaf = 42;
+      return last;
+    }(), const Symbol("flaf="), [42]);
+
+    testInvocationMirror(self.flof(37, 42), const Symbol("flof"), [37, 42], []);
+    testInvocationMirror(
+        self.flof(x: 42), const Symbol("flof"), [], [const Symbol("x"), 42]);
+    testInvocationMirror(self.flof(37, y: 42), const Symbol("flof"), [37],
+        [const Symbol("y"), 42]);
+    testInvocationMirror(() {
+      self.flof = 42;
+      return last;
+    }(), const Symbol("flof="), [42]);
+
+    // Reading works.
+    Expect.isTrue(self.flif is Function);
+    Expect.isTrue(self.flaf is Function);
+    Expect.isTrue(self.flof is Function);
+
+    // Writing to read-only fields.
+    testInvocationMirror(() {
+      self.wut = 42;
+      return last;
+    }(), const Symbol("wut="), [42]);
+    testInvocationMirror(() {
+      self.plif = 42;
+      return last;
+    }(), const Symbol("plif="), [42]);
+    testInvocationMirror(() {
+      self.plaf = 42;
+      return last;
+    }(), const Symbol("plaf="), [42]);
+
+    // Calling noSuchMethod itself, badly.
+    testInvocationMirror(
+        self.noSuchMethod(), const Symbol("noSuchMethod"), [], []);
+    testInvocationMirror(
+        self.noSuchMethod(37, 42), const Symbol("noSuchMethod"), [37, 42], []);
+    testInvocationMirror(self.noSuchMethod(37, x: 42),
+        const Symbol("noSuchMethod"), [37], [const Symbol("x"), 42]);
+    testInvocationMirror(self.noSuchMethod(x: 42), const Symbol("noSuchMethod"),
+        [], [const Symbol("x"), 42]);
+
+    // Closurizing a method means that calling it badly will not hit the
+    // original receivers noSuchMethod, only the one inherited from Object
+    // by the closure object.
+    Expect.throwsNoSuchMethodError(() {
+      var x = self.flif;
+      x(37, 42);
+    });
+  }
+}
+
+// Test the NoSuchMethodError thrown by different incorrect calls.
+testNoSuchMethodErrors() {
+  dynamic n = new N();
+  dynamic o = new Object();
+  Expect.throwsNoSuchMethodError(() => o.bar);
+  Expect.throwsNoSuchMethodError(() => o.bar = 42);
+  Expect.throwsNoSuchMethodError(() => o.bar());
+  Expect.throwsNoSuchMethodError(() => o + 2);
+  Expect.throwsNoSuchMethodError(() => -o);
+  Expect.throwsNoSuchMethodError(() => o[0]);
+  Expect.throwsNoSuchMethodError(() => o[0] = 42);
+  Expect.throwsNoSuchMethodError(() => o());
+  Expect.throwsNoSuchMethodError(() => o.toString = 42);
+  Expect.throwsNoSuchMethodError(() => o.toString(42));
+  Expect.throwsNoSuchMethodError(() => o.toString(x: 37));
+  Expect.throwsNoSuchMethodError(() => o.hashCode = 42);
+  Expect.throwsNoSuchMethodError(() => (n.flif)()); // Extracted method has no noSuchMethod.
+}
+
+main() {
+  testInvocationMirrors();
+  testNoSuchMethodErrors();
+  new M().testSelfCalls();
+}
diff --git a/tests/language/unsorted/js_properties_test.dart b/tests/language/unsorted/js_properties_test.dart
new file mode 100644
index 0000000..b93a547
--- /dev/null
+++ b/tests/language/unsorted/js_properties_test.dart
@@ -0,0 +1,47 @@
+// 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 JavaScript properties on Object can still be classes in
+// Dart.
+
+import "package:expect/expect.dart";
+
+void main() {
+  Expect.equals(42, new __defineGetter__().hello());
+  Expect.equals(42, new __defineSetter__().hello());
+  Expect.equals(42, new __lookupGetter__().hello());
+  Expect.equals(42, new __lookupSetter__().hello());
+  Expect.equals(42, new constructor().hello());
+  Expect.equals(42, new hasOwnProperty().hello());
+  Expect.equals(42, new isPrototypeOf().hello());
+  Expect.equals(42, new propertyIsEnumerable().hello());
+  Expect.equals(42, new toLocaleString().hello());
+  Expect.equals(42, new toString().hello());
+  Expect.equals(42, new valueOf().hello());
+}
+
+class Hello {
+  int hello() => 42;
+}
+
+class __defineGetter__ extends Hello {}
+
+class __defineSetter__ extends Hello {}
+
+class __lookupGetter__ extends Hello {}
+
+class __lookupSetter__ extends Hello {}
+
+class constructor extends Hello {}
+
+class hasOwnProperty extends Hello {}
+
+class isPrototypeOf extends Hello {}
+
+class propertyIsEnumerable extends Hello {}
+
+class toLocaleString extends Hello {}
+
+class toString extends Hello {}
+
+class valueOf extends Hello {}
diff --git a/tests/language/unsorted/keyword_type_expression_test.dart b/tests/language/unsorted/keyword_type_expression_test.dart
new file mode 100644
index 0000000..5d981ef
--- /dev/null
+++ b/tests/language/unsorted/keyword_type_expression_test.dart
@@ -0,0 +1,15 @@
+// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// Test that a keyword can't be used as type.  Serves as regression test for
+// crashes in dart2js.
+
+in greeting = "fisk"; // //# 01: syntax error
+
+main(
+in greeting // //# 02: syntax error
+    ) {
+  in greeting = "fisk"; // //# 03: syntax error
+  print(greeting); // //# 01: continued
+}
diff --git a/tests/language/unsorted/large_implicit_getter_test.dart b/tests/language/unsorted/large_implicit_getter_test.dart
new file mode 100644
index 0000000..624a063
--- /dev/null
+++ b/tests/language/unsorted/large_implicit_getter_test.dart
@@ -0,0 +1,1375 @@
+// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+// Dart test program for testing compilation of large implicit getters.
+// VMOptions=--optimization-counter-threshold=10 --no-background-compilation
+
+List<List> panels = [
+  [6853.940039224797, 6050.837897021371],
+  [6953.240039224797, 6050.837897021371],
+  [7052.5400392247975, 5885.237897021371],
+  [7052.5400392247975, 5719.637897021372],
+  [7151.840039224798, 5885.237897021371],
+  [7052.5400392247975, 6050.837897021371],
+  [7052.5400392247975, 6216.43789702137],
+  [7052.5400392247975, 6382.03789702137],
+  [6953.240039224797, 6382.03789702137],
+  [6953.240039224797, 6216.43789702137],
+  [6853.940039224797, 6216.43789702137],
+  [6853.940039224797, 6382.03789702137],
+  [6754.640039224797, 6216.43789702137],
+  [6754.640039224797, 6382.03789702137],
+  [6754.640039224797, 6547.637897021369],
+  [6754.640039224797, 6713.237897021369],
+  [6655.340039224797, 6713.237897021369],
+  [6754.640039224797, 6878.837897021368],
+  [6853.940039224797, 6713.237897021369],
+  [6853.940039224797, 6878.837897021368],
+  [6953.240039224797, 6713.237897021369],
+  [7052.5400392247975, 6547.637897021369],
+  [7151.840039224798, 6713.237897021369],
+  [7151.840039224798, 6547.637897021369],
+  [7151.840039224798, 6382.03789702137],
+  [7251.140039224798, 6547.637897021369],
+  [7251.140039224798, 6713.237897021369],
+  [7350.440039224798, 6878.837897021368],
+  [7449.740039224798, 6878.837897021368],
+  [7449.740039224798, 6713.237897021369],
+  [7549.040039224798, 6547.637897021369],
+  [7449.740039224798, 6382.03789702137],
+  [7449.740039224798, 6216.43789702137],
+  [7549.040039224798, 6050.837897021371],
+  [7648.340039224799, 6216.43789702137],
+  [7549.040039224798, 6382.03789702137],
+  [7648.340039224799, 6382.03789702137],
+  [7747.640039224799, 6216.43789702137],
+  [7846.940039224799, 6382.03789702137],
+  [7946.240039224799, 6382.03789702137],
+  [7946.240039224799, 6547.637897021369],
+  [7846.940039224799, 6713.237897021369],
+  [7946.240039224799, 6713.237897021369],
+  [8045.540039224799, 6547.637897021369],
+  [8045.540039224799, 6713.237897021369],
+  [7946.240039224799, 6878.837897021368],
+  [7946.240039224799, 7044.4378970213675],
+  [8045.540039224799, 7210.037897021367],
+  [8144.8400392247995, 7375.637897021366],
+  [8144.8400392247995, 7541.237897021366],
+  [8045.540039224799, 7375.637897021366],
+  [8144.8400392247995, 7210.037897021367],
+  [8045.540039224799, 7044.4378970213675],
+  [7946.240039224799, 7210.037897021367],
+  [7846.940039224799, 7210.037897021367],
+  [7946.240039224799, 7375.637897021366],
+  [8045.540039224799, 7541.237897021366],
+  [8144.8400392247995, 7706.837897021365],
+  [8244.1400392248, 7541.237897021366],
+  [8343.4400392248, 7541.237897021366],
+  [8343.4400392248, 7706.837897021365],
+  [8244.1400392248, 7706.837897021365],
+  [4735.523842661975, 3503.497768214323],
+  [4636.223842661975, 3337.897768214323],
+  [4536.923842661975, 3337.897768214323],
+  [4437.623842661975, 3172.2977682143232],
+  [4338.323842661975, 3172.2977682143232],
+  [4239.023842661974, 3172.2977682143232],
+  [4338.323842661975, 3006.6977682143233],
+  [4437.623842661975, 2841.0977682143234],
+  [4338.323842661975, 2675.4977682143235],
+  [4338.323842661975, 2509.8977682143236],
+  [4239.023842661974, 2675.4977682143235],
+  [4139.723842661974, 2509.8977682143236],
+  [4040.4238426619745, 2344.2977682143237],
+  [4139.723842661974, 2178.697768214324],
+  [4239.023842661974, 2178.697768214324],
+  [4139.723842661974, 2344.2977682143237],
+  [4040.4238426619745, 2178.697768214324],
+  [4139.723842661974, 2013.0977682143237],
+  [4139.723842661974, 1847.4977682143235],
+  [4239.023842661974, 2013.0977682143237],
+  [4239.023842661974, 1847.4977682143235],
+  [4338.323842661975, 1847.4977682143235],
+  [4437.623842661975, 1847.4977682143235],
+  [4536.923842661975, 1681.8977682143234],
+  [4437.623842661975, 1516.2977682143232],
+  [4536.923842661975, 1516.2977682143232],
+  [4536.923842661975, 1350.697768214323],
+  [4437.623842661975, 1350.697768214323],
+  [4536.923842661975, 1185.097768214323],
+  [4636.223842661975, 1019.497768214323],
+  [4536.923842661975, 853.897768214323],
+  [4636.223842661975, 853.897768214323],
+  [4735.523842661975, 688.2977682143231],
+  [4636.223842661975, 522.6977682143232],
+  [4636.223842661975, 357.09776821432325],
+  [4735.523842661975, 357.09776821432325],
+  [4735.523842661975, 522.6977682143232],
+  [4636.223842661975, 688.2977682143231],
+  [4735.523842661975, 853.897768214323],
+  [4834.8238426619755, 853.897768214323],
+  [4735.523842661975, 1019.497768214323],
+  [4735.523842661975, 1185.097768214323],
+  [4735.523842661975, 1350.697768214323],
+  [4834.8238426619755, 1516.2977682143232],
+  [4735.523842661975, 1516.2977682143232],
+  [4834.8238426619755, 1350.697768214323],
+  [4834.8238426619755, 1185.097768214323],
+  [4934.123842661976, 1350.697768214323],
+  [5033.423842661976, 1185.097768214323],
+  [5033.423842661976, 1019.497768214323],
+  [5033.423842661976, 853.897768214323],
+  [4934.123842661976, 853.897768214323],
+  [4934.123842661976, 1019.497768214323],
+  [4834.8238426619755, 1019.497768214323],
+  [4934.123842661976, 1185.097768214323],
+  [5033.423842661976, 1350.697768214323],
+  [5132.723842661976, 1350.697768214323],
+  [5132.723842661976, 1185.097768214323],
+  [5232.023842661976, 1019.497768214323],
+  [5232.023842661976, 1185.097768214323],
+  [5331.323842661976, 1019.497768214323],
+  [5430.623842661977, 1019.497768214323],
+  [5529.923842661977, 1185.097768214323],
+  [5430.623842661977, 1350.697768214323],
+  [5430.623842661977, 1516.2977682143232],
+  [5529.923842661977, 1350.697768214323],
+  [5629.223842661977, 1350.697768214323],
+  [5728.523842661977, 1350.697768214323],
+  [5728.523842661977, 1516.2977682143232],
+  [5728.523842661977, 1681.8977682143234],
+  [5629.223842661977, 1516.2977682143232],
+  [5529.923842661977, 1516.2977682143232],
+  [5629.223842661977, 1681.8977682143234],
+  [5529.923842661977, 1681.8977682143234],
+  [5430.623842661977, 1847.4977682143235],
+  [5331.323842661976, 1847.4977682143235],
+  [5331.323842661976, 2013.0977682143237],
+  [5232.023842661976, 2178.697768214324],
+  [5132.723842661976, 2013.0977682143237],
+  [5132.723842661976, 2178.697768214324],
+  [5232.023842661976, 2013.0977682143237],
+  [5232.023842661976, 1847.4977682143235],
+  [5232.023842661976, 1681.8977682143234],
+  [5331.323842661976, 1681.8977682143234],
+  [5331.323842661976, 1516.2977682143232],
+  [5331.323842661976, 1350.697768214323],
+  [5232.023842661976, 1350.697768214323],
+  [5232.023842661976, 1516.2977682143232],
+  [5132.723842661976, 1516.2977682143232],
+  [5132.723842661976, 1681.8977682143234],
+  [5033.423842661976, 1847.4977682143235],
+  [5132.723842661976, 1847.4977682143235],
+  [5033.423842661976, 2013.0977682143237],
+  [4934.123842661976, 2178.697768214324],
+  [5033.423842661976, 2344.2977682143237],
+  [4934.123842661976, 2344.2977682143237],
+  [4834.8238426619755, 2178.697768214324],
+  [4834.8238426619755, 2344.2977682143237],
+  [4735.523842661975, 2344.2977682143237],
+  [4636.223842661975, 2344.2977682143237],
+  [4536.923842661975, 2178.697768214324],
+  [4437.623842661975, 2013.0977682143237],
+  [4338.323842661975, 2178.697768214324],
+  [4437.623842661975, 2344.2977682143237],
+  [4536.923842661975, 2509.8977682143236],
+  [4636.223842661975, 2675.4977682143235],
+  [4636.223842661975, 2509.8977682143236],
+  [4536.923842661975, 2675.4977682143235],
+  [4636.223842661975, 2841.0977682143234],
+  [4536.923842661975, 2841.0977682143234],
+  [4636.223842661975, 3006.6977682143233],
+  [4735.523842661975, 3172.2977682143232],
+  [4834.8238426619755, 3006.6977682143233],
+  [4735.523842661975, 2841.0977682143234],
+  [4735.523842661975, 3006.6977682143233],
+  [4636.223842661975, 3172.2977682143232],
+  [4735.523842661975, 3337.897768214323],
+  [4834.8238426619755, 3503.497768214323],
+  [4735.523842661975, 3669.097768214323],
+  [4834.8238426619755, 3834.697768214323],
+  [4834.8238426619755, 3669.097768214323],
+  [4934.123842661976, 3503.497768214323],
+  [5033.423842661976, 3503.497768214323],
+  [5033.423842661976, 3337.897768214323],
+  [4934.123842661976, 3337.897768214323],
+  [4834.8238426619755, 3172.2977682143232],
+  [4834.8238426619755, 3337.897768214323],
+  [4934.123842661976, 3172.2977682143232],
+  [5033.423842661976, 3006.6977682143233],
+  [5132.723842661976, 2841.0977682143234],
+  [5132.723842661976, 3006.6977682143233],
+  [5232.023842661976, 3172.2977682143232],
+  [5232.023842661976, 3337.897768214323],
+  [5132.723842661976, 3337.897768214323],
+  [5232.023842661976, 3503.497768214323],
+  [5331.323842661976, 3337.897768214323],
+  [5331.323842661976, 3503.497768214323],
+  [5430.623842661977, 3669.097768214323],
+  [5331.323842661976, 3669.097768214323],
+  [5430.623842661977, 3503.497768214323],
+  [5430.623842661977, 3337.897768214323],
+  [5529.923842661977, 3172.2977682143232],
+  [5529.923842661977, 3337.897768214323],
+  [5629.223842661977, 3337.897768214323],
+  [5728.523842661977, 3337.897768214323],
+  [5728.523842661977, 3503.497768214323],
+  [5827.823842661977, 3503.497768214323],
+  [5927.1238426619775, 3669.097768214323],
+  [6026.423842661978, 3669.097768214323],
+  [6125.723842661978, 3503.497768214323],
+  [6125.723842661978, 3669.097768214323],
+  [6225.023842661978, 3503.497768214323],
+  [6225.023842661978, 3337.897768214323],
+  [6324.323842661978, 3337.897768214323],
+  [6423.623842661978, 3503.497768214323],
+  [6324.323842661978, 3669.097768214323],
+  [6225.023842661978, 3669.097768214323],
+  [6324.323842661978, 3834.697768214323],
+  [6423.623842661978, 3834.697768214323],
+  [6324.323842661978, 4000.297768214323],
+  [6225.023842661978, 3834.697768214323],
+  [6125.723842661978, 3834.697768214323],
+  [6125.723842661978, 4000.297768214323],
+  [6225.023842661978, 4000.297768214323],
+  [6225.023842661978, 4165.897768214322],
+  [6225.023842661978, 4331.497768214322],
+  [6125.723842661978, 4165.897768214322],
+  [6026.423842661978, 4000.2977682143223],
+  [5927.1238426619775, 4165.897768214322],
+  [6026.423842661978, 4331.497768214322],
+  [6026.423842661978, 4497.097768214321],
+  [5927.1238426619775, 4497.097768214321],
+  [5827.823842661977, 4662.697768214321],
+  [5728.523842661977, 4828.29776821432],
+  [5827.823842661977, 4828.29776821432],
+  [5927.1238426619775, 4828.29776821432],
+  [5927.1238426619775, 4662.697768214321],
+  [5827.823842661977, 4497.097768214321],
+  [5927.1238426619775, 4331.497768214322],
+  [5827.823842661977, 4165.897768214322],
+  [5728.523842661977, 4331.497768214322],
+  [5728.523842661977, 4165.897768214322],
+  [5629.223842661977, 4000.2977682143223],
+  [5629.223842661977, 3834.6977682143224],
+  [5529.923842661977, 3669.0977682143225],
+  [5629.223842661977, 3503.4977682143226],
+  [5728.523842661977, 3669.0977682143225],
+  [5827.823842661977, 3669.0977682143225],
+  [5927.1238426619775, 3834.6977682143224],
+  [5927.1238426619775, 4000.2977682143223],
+  [6026.423842661978, 4165.897768214322],
+  [6125.723842661978, 4331.497768214322],
+  [6225.023842661978, 4497.097768214321],
+  [6225.023842661978, 4662.697768214321],
+  [6324.323842661978, 4662.697768214321],
+  [6225.023842661978, 4828.29776821432],
+  [6324.323842661978, 4828.29776821432],
+  [6423.623842661978, 4828.29776821432],
+  [6324.323842661978, 4993.8977682143195],
+  [6225.023842661978, 5159.497768214319],
+  [6125.723842661978, 5159.497768214319],
+  [6026.423842661978, 5325.097768214318],
+  [5927.1238426619775, 5490.697768214318],
+  [6026.423842661978, 5656.297768214317],
+  [5927.1238426619775, 5821.897768214317],
+  [5927.1238426619775, 5987.497768214316],
+  [6026.423842661978, 5987.497768214316],
+  [6026.423842661978, 5821.897768214317],
+  [5927.1238426619775, 5656.297768214317],
+  [5827.823842661977, 5656.297768214317],
+  [5827.823842661977, 5490.697768214318],
+  [5728.523842661977, 5490.697768214318],
+  [5629.223842661977, 5325.097768214318],
+  [5629.223842661977, 5159.497768214319],
+  [5529.923842661977, 4993.8977682143195],
+  [5529.923842661977, 5159.497768214319],
+  [5629.223842661977, 4993.8977682143195],
+  [5629.223842661977, 4828.29776821432],
+  [5529.923842661977, 4662.697768214321],
+  [5430.623842661977, 4828.29776821432],
+  [5529.923842661977, 4828.29776821432],
+  [5629.223842661977, 4662.697768214321],
+  [5728.523842661977, 4662.697768214321],
+  [5629.223842661977, 4497.097768214321],
+  [5728.523842661977, 4497.097768214321],
+  [5827.823842661977, 4331.497768214322],
+  [10216.161365168813, 2951.605409896135],
+  [10116.861365168812, 2951.605409896135],
+  [10017.56136516881, 3117.205409896135],
+  [9918.26136516881, 3117.205409896135],
+  [9818.961365168809, 3117.205409896135],
+  [9719.661365168808, 3282.8054098961347],
+  [9620.361365168807, 3282.8054098961347],
+  [9620.361365168807, 3117.205409896135],
+  [9521.061365168805, 2951.605409896135],
+  [9521.061365168805, 2786.005409896135],
+  [9620.361365168807, 2786.005409896135],
+  [9719.661365168808, 2786.005409896135],
+  [9818.961365168809, 2620.405409896135],
+  [9918.26136516881, 2786.005409896135],
+  [9818.961365168809, 2951.605409896135],
+  [9818.961365168809, 2786.005409896135],
+  [9719.661365168808, 2620.405409896135],
+  [9719.661365168808, 2454.805409896135],
+  [9620.361365168807, 2289.2054098961353],
+  [9521.061365168805, 2123.6054098961354],
+  [9620.361365168807, 1958.0054098961352],
+  [9719.661365168808, 2123.6054098961354],
+  [9818.961365168809, 2289.2054098961353],
+  [9818.961365168809, 2123.6054098961354],
+  [9818.961365168809, 1958.0054098961352],
+  [9719.661365168808, 1958.0054098961352],
+  [9620.361365168807, 1792.405409896135],
+  [9620.361365168807, 1626.805409896135],
+  [9521.061365168805, 1461.2054098961348],
+  [9421.761365168804, 1295.6054098961347],
+  [9521.061365168805, 1130.0054098961346],
+  [9521.061365168805, 964.4054098961345],
+  [9421.761365168804, 964.4054098961345],
+  [9521.061365168805, 798.8054098961346],
+  [9620.361365168807, 798.8054098961346],
+  [9620.361365168807, 964.4054098961345],
+  [9620.361365168807, 1130.0054098961346],
+  [9620.361365168807, 1295.6054098961347],
+  [9620.361365168807, 1461.2054098961348],
+  [9719.661365168808, 1295.6054098961347],
+  [9818.961365168809, 1130.0054098961346],
+  [9918.26136516881, 964.4054098961345],
+  [9818.961365168809, 964.4054098961345],
+  [9918.26136516881, 798.8054098961346],
+  [10017.56136516881, 633.2054098961347],
+  [9918.26136516881, 467.60540989613474],
+  [9918.26136516881, 302.0054098961348],
+  [10017.56136516881, 302.0054098961348],
+  [10116.861365168812, 136.40540989613478],
+  [10116.861365168812, 302.0054098961348],
+  [10116.861365168812, 467.60540989613474],
+  [10116.861365168812, 633.2054098961347],
+  [10216.161365168813, 633.2054098961347],
+  [10216.161365168813, 798.8054098961346],
+  [10315.461365168814, 633.2054098961347],
+  [10315.461365168814, 798.8054098961346],
+  [10414.761365168815, 798.8054098961346],
+  [10514.061365168816, 633.2054098961347],
+  [10514.061365168816, 798.8054098961346],
+  [10414.761365168815, 964.4054098961345],
+  [10315.461365168814, 964.4054098961345],
+  [10216.161365168813, 964.4054098961345],
+  [10116.861365168812, 798.8054098961346],
+  [10017.56136516881, 798.8054098961346],
+  [10116.861365168812, 964.4054098961345],
+  [10216.161365168813, 1130.0054098961346],
+  [10116.861365168812, 1130.0054098961346],
+  [10216.161365168813, 1295.6054098961347],
+  [10216.161365168813, 1461.2054098961348],
+  [10315.461365168814, 1626.805409896135],
+  [10315.461365168814, 1792.405409896135],
+  [10216.161365168813, 1958.0054098961352],
+  [10216.161365168813, 1792.405409896135],
+  [10116.861365168812, 1792.405409896135],
+  [10017.56136516881, 1958.0054098961352],
+  [9918.26136516881, 2123.6054098961354],
+  [9918.26136516881, 1958.0054098961352],
+  [10017.56136516881, 2123.6054098961354],
+  [10116.861365168812, 2123.6054098961354],
+  [10017.56136516881, 2289.2054098961353],
+  [10017.56136516881, 2454.805409896135],
+  [10116.861365168812, 2289.2054098961353],
+  [10216.161365168813, 2454.805409896135],
+  [10315.461365168814, 2620.405409896135],
+  [10315.461365168814, 2454.805409896135],
+  [10315.461365168814, 2289.2054098961353],
+  [10414.761365168815, 2454.805409896135],
+  [10514.061365168816, 2620.405409896135],
+  [10613.361365168817, 2786.005409896135],
+  [10514.061365168816, 2786.005409896135],
+  [10613.361365168817, 2620.405409896135],
+  [10514.061365168816, 2454.805409896135],
+  [10514.061365168816, 2289.2054098961353],
+  [10613.361365168817, 2289.2054098961353],
+  [10712.661365168819, 2289.2054098961353],
+  [10811.96136516882, 2454.805409896135],
+  [10911.26136516882, 2289.2054098961353],
+  [10811.96136516882, 2289.2054098961353],
+  [10712.661365168819, 2454.805409896135],
+  [10712.661365168819, 2620.405409896135],
+  [10811.96136516882, 2786.005409896135],
+  [10911.26136516882, 2620.405409896135],
+  [10911.26136516882, 2786.005409896135],
+  [11010.561365168822, 2620.405409896135],
+  [10911.26136516882, 2454.805409896135],
+  [10811.96136516882, 2620.405409896135],
+  [10712.661365168819, 2786.005409896135],
+  [10811.96136516882, 2951.605409896135],
+  [10911.26136516882, 2951.605409896135],
+  [10811.96136516882, 3117.205409896135],
+  [10712.661365168819, 2951.605409896135],
+  [10613.361365168817, 2951.605409896135],
+  [10514.061365168816, 2951.605409896135],
+  [10414.761365168815, 3117.205409896135],
+  [10414.761365168815, 2951.605409896135],
+  [10315.461365168814, 2786.005409896135],
+  [10216.161365168813, 2620.405409896135],
+  [10216.161365168813, 2786.005409896135],
+  [10315.461365168814, 2951.605409896135],
+  [10315.461365168814, 3117.205409896135],
+  [10216.161365168813, 3117.205409896135],
+  [10116.861365168812, 3117.205409896135],
+  [10017.56136516881, 3282.8054098961347],
+  [9918.26136516881, 3448.4054098961346],
+  [9818.961365168809, 3448.4054098961346],
+  [9818.961365168809, 3614.0054098961346],
+  [9719.661365168808, 3448.4054098961346],
+  [9818.961365168809, 3282.8054098961347],
+  [9719.661365168808, 3117.205409896135],
+  [9620.361365168807, 2951.605409896135],
+  [9521.061365168805, 3117.205409896135],
+  [9521.061365168805, 3282.8054098961347],
+  [9421.761365168804, 3117.205409896135],
+  [9421.761365168804, 3282.8054098961347],
+  [9322.461365168803, 3117.205409896135],
+  [9421.761365168804, 2951.605409896135],
+  [9322.461365168803, 2951.605409896135],
+  [9223.161365168802, 2786.005409896135],
+  [9322.461365168803, 2620.405409896135],
+  [9421.761365168804, 2454.805409896135],
+  [9521.061365168805, 2289.2054098961353],
+  [9421.761365168804, 2123.6054098961354],
+  [9421.761365168804, 1958.0054098961352],
+  [9421.761365168804, 1792.405409896135],
+  [9521.061365168805, 1626.805409896135],
+  [9421.761365168804, 1626.805409896135],
+  [9322.461365168803, 1792.405409896135],
+  [9322.461365168803, 1626.805409896135],
+  [9322.461365168803, 1461.2054098961348],
+  [9421.761365168804, 1461.2054098961348],
+  [9521.061365168805, 1295.6054098961347],
+  [9421.761365168804, 1130.0054098961346],
+  [9322.461365168803, 964.4054098961345],
+  [9223.161365168802, 964.4054098961345],
+  [9223.161365168802, 798.8054098961346],
+  [9322.461365168803, 633.2054098961347],
+  [9421.761365168804, 798.8054098961346],
+  [9421.761365168804, 633.2054098961347],
+  [9521.061365168805, 633.2054098961347],
+  [9421.761365168804, 467.60540989613474],
+  [9421.761365168804, 302.0054098961348],
+  [9322.461365168803, 136.40540989613478],
+  [9223.161365168802, 302.0054098961348],
+  [9123.861365168801, 302.0054098961348],
+  [9024.5613651688, 136.40540989613478],
+  [9123.861365168801, 136.40540989613478],
+  [9223.161365168802, 136.40540989613478],
+  [9322.461365168803, 302.0054098961348],
+  [9421.761365168804, 136.40540989613478],
+  [9521.061365168805, 136.40540989613478],
+  [9620.361365168807, 136.40540989613478],
+  [9620.361365168807, 302.0054098961348],
+  [9521.061365168805, 302.0054098961348],
+  [9521.061365168805, 467.60540989613474],
+  [9620.361365168807, 467.60540989613474],
+  [9719.661365168808, 302.0054098961348],
+  [9719.661365168808, 136.40540989613478],
+  [9818.961365168809, 136.40540989613478],
+  [9918.26136516881, 136.40540989613478],
+  [10017.56136516881, 136.40540989613478],
+  [366.07287160549004, 5394.185440937868],
+  [465.37287160549005, 5394.185440937868],
+  [465.37287160549005, 5559.785440937868],
+  [366.0728716054901, 5559.785440937868],
+  [366.0728716054901, 5725.385440937867],
+  [266.77287160549014, 5725.385440937867],
+  [167.47287160549016, 5559.785440937868],
+  [266.77287160549014, 5559.785440937868],
+  [266.77287160549014, 5394.185440937868],
+  [266.77287160549014, 5228.585440937869],
+  [167.47287160549016, 5394.185440937868],
+  [68.17287160549016, 5228.585440937869],
+  [167.47287160549013, 5062.9854409378695],
+  [68.17287160549013, 4897.38544093787],
+  [167.47287160549013, 4731.785440937871],
+  [266.77287160549014, 4731.785440937871],
+  [167.47287160549016, 4566.185440937871],
+  [68.17287160549016, 4566.185440937871],
+  [68.17287160549016, 4731.785440937871],
+  [167.47287160549013, 4897.38544093787],
+  [68.17287160549013, 5062.9854409378695],
+  [167.47287160549013, 5228.585440937869],
+  [266.77287160549014, 5062.9854409378695],
+  [366.0728716054901, 4897.38544093787],
+  [266.77287160549014, 4897.38544093787],
+  [366.0728716054901, 4731.785440937871],
+  [465.37287160549005, 4897.38544093787],
+  [366.0728716054901, 5062.9854409378695],
+  [465.37287160549005, 5062.9854409378695],
+  [366.0728716054901, 5228.585440937869],
+  [465.37287160549005, 5228.585440937869],
+  [564.6728716054901, 5394.185440937868],
+  [663.9728716054901, 5228.585440937869],
+  [564.6728716054901, 5062.9854409378695],
+  [663.9728716054901, 4897.38544093787],
+  [763.2728716054902, 4731.785440937871],
+  [862.5728716054903, 4566.185440937871],
+  [961.8728716054903, 4731.785440937871],
+  [862.5728716054903, 4731.785440937871],
+  [961.8728716054903, 4566.185440937871],
+  [862.5728716054903, 4400.585440937872],
+  [961.8728716054903, 4234.985440937872],
+  [1061.1728716054904, 4400.585440937872],
+  [1160.4728716054904, 4234.985440937872],
+  [1160.4728716054904, 4400.585440937872],
+  [1259.7728716054903, 4234.985440937872],
+  [1359.0728716054903, 4069.3854409378723],
+  [1458.3728716054902, 4069.3854409378723],
+  [1557.6728716054902, 4234.985440937872],
+  [1656.9728716054901, 4400.585440937872],
+  [1557.6728716054902, 4400.585440937872],
+  [1458.3728716054902, 4400.585440937872],
+  [1359.0728716054903, 4566.185440937871],
+  [1359.0728716054903, 4731.785440937871],
+  [1259.7728716054903, 4731.785440937871],
+  [1359.0728716054903, 4897.38544093787],
+  [1458.3728716054902, 4731.785440937871],
+  [1458.3728716054902, 4897.38544093787],
+  [1359.0728716054903, 5062.9854409378695],
+  [1259.7728716054903, 5228.585440937869],
+  [1259.7728716054903, 5062.9854409378695],
+  [1259.7728716054903, 4897.38544093787],
+  [1160.4728716054904, 5062.9854409378695],
+  [1160.4728716054904, 5228.585440937869],
+  [1061.1728716054904, 5228.585440937869],
+  [1061.1728716054904, 5062.9854409378695],
+  [961.8728716054903, 5228.585440937869],
+  [862.5728716054903, 5062.9854409378695],
+  [961.8728716054903, 5062.9854409378695],
+  [961.8728716054903, 4897.38544093787],
+  [1061.1728716054904, 4897.38544093787],
+  [1160.4728716054904, 4731.785440937871],
+  [1259.7728716054903, 4566.185440937871],
+  [1359.0728716054903, 4400.585440937872],
+  [1458.3728716054902, 4566.185440937871],
+  [1557.6728716054902, 4566.185440937871],
+  [1656.9728716054901, 4731.785440937871],
+  [1557.6728716054902, 4897.38544093787],
+  [1458.3728716054902, 5062.9854409378695],
+  [1557.6728716054902, 5228.585440937869],
+  [1656.9728716054901, 5062.9854409378695],
+  [1756.27287160549, 5062.9854409378695],
+  [1756.27287160549, 4897.38544093787],
+  [1855.57287160549, 5062.9854409378695],
+  [1954.87287160549, 4897.38544093787],
+  [2054.17287160549, 5062.9854409378695],
+  [1954.87287160549, 5062.9854409378695],
+  [2054.17287160549, 5228.585440937869],
+  [2153.4728716054897, 5228.585440937869],
+  [2252.7728716054894, 5062.9854409378695],
+  [2352.072871605489, 5228.585440937869],
+  [2451.372871605489, 5394.185440937868],
+  [2352.072871605489, 5394.185440937868],
+  [2252.7728716054894, 5228.585440937869],
+  [2153.4728716054897, 5062.9854409378695],
+  [2153.4728716054897, 4897.38544093787],
+  [2252.7728716054894, 4897.38544093787],
+  [2352.072871605489, 4731.785440937871],
+  [2252.7728716054894, 4731.785440937871],
+  [2153.4728716054897, 4731.785440937871],
+  [2054.17287160549, 4566.185440937871],
+  [1954.87287160549, 4731.785440937871],
+  [1855.57287160549, 4897.38544093787],
+  [1756.27287160549, 4731.785440937871],
+  [1855.57287160549, 4731.785440937871],
+  [1855.57287160549, 4566.185440937871],
+  [1756.27287160549, 4566.185440937871],
+  [1656.9728716054901, 4566.185440937871],
+  [1557.6728716054902, 4731.785440937871],
+  [1656.9728716054901, 4897.38544093787],
+  [1557.6728716054902, 5062.9854409378695],
+  [1458.3728716054902, 5228.585440937869],
+  [1359.0728716054903, 5228.585440937869],
+  [1259.7728716054903, 5394.185440937868],
+  [1259.7728716054903, 5559.785440937868],
+  [1160.4728716054904, 5559.785440937868],
+  [1061.1728716054904, 5559.785440937868],
+  [1160.4728716054904, 5725.385440937867],
+  [1259.7728716054903, 5725.385440937867],
+  [1359.0728716054903, 5559.785440937868],
+  [1458.3728716054902, 5725.385440937867],
+  [1458.3728716054902, 5559.785440937868],
+  [1359.0728716054903, 5725.385440937867],
+  [1259.7728716054903, 5890.985440937867],
+  [1359.0728716054903, 5890.985440937867],
+  [1259.7728716054903, 6056.585440937866],
+  [1359.0728716054903, 6222.185440937866],
+  [1458.3728716054902, 6222.185440937866],
+  [1458.3728716054902, 6387.785440937865],
+  [1557.6728716054902, 6222.185440937866],
+  [1557.6728716054902, 6387.785440937865],
+  [1656.9728716054901, 6222.185440937866],
+  [1756.27287160549, 6056.585440937866],
+  [1855.57287160549, 5890.985440937867],
+  [1756.27287160549, 5890.985440937867],
+  [1656.9728716054901, 6056.585440937866],
+  [1557.6728716054902, 5890.985440937867],
+  [1458.3728716054902, 5890.985440937867],
+  [1359.0728716054903, 6056.585440937866],
+  [1259.7728716054903, 6222.185440937866],
+  [1160.4728716054904, 6056.585440937866],
+  [1061.1728716054904, 5890.985440937867],
+  [1061.1728716054904, 6056.585440937866],
+  [1160.4728716054904, 6222.185440937866],
+  [1061.1728716054904, 6222.185440937866],
+  [961.8728716054903, 6222.185440937866],
+  [961.8728716054903, 6056.585440937866],
+  [961.8728716054903, 5890.985440937867],
+  [961.8728716054903, 5725.385440937867],
+  [862.5728716054903, 5559.785440937868],
+  [763.2728716054902, 5725.385440937867],
+  [862.5728716054903, 5725.385440937867],
+  [763.2728716054902, 5890.985440937867],
+  [663.9728716054901, 5725.385440937867],
+  [763.2728716054902, 5559.785440937868],
+  [763.2728716054902, 5394.185440937868],
+  [862.5728716054903, 5228.585440937869],
+  [961.8728716054903, 5394.185440937868],
+  [1061.1728716054904, 5394.185440937868],
+  [961.8728716054903, 5559.785440937868],
+  [862.5728716054903, 5394.185440937868],
+  [763.2728716054902, 5228.585440937869],
+  [663.9728716054901, 5062.9854409378695],
+  [763.2728716054902, 5062.9854409378695],
+  [763.2728716054902, 4897.38544093787],
+  [663.9728716054901, 4731.785440937871],
+  [564.6728716054901, 4731.785440937871],
+  [465.37287160549005, 4566.185440937871],
+  [366.0728716054901, 4566.185440937871],
+  [465.37287160549005, 4731.785440937871],
+  [564.6728716054901, 4566.185440937871],
+  [465.37287160549005, 4400.585440937872],
+  [366.0728716054901, 4400.585440937872],
+  [266.77287160549014, 4234.985440937872],
+  [167.47287160549016, 4234.985440937872],
+  [266.77287160549014, 4400.585440937872],
+  [266.77287160549014, 4566.185440937871],
+  [167.47287160549016, 4400.585440937872],
+  [68.17287160549016, 4234.985440937872],
+  [167.47287160549013, 4069.3854409378723],
+  [68.17287160549013, 3903.7854409378724],
+  [68.17287160549013, 4069.3854409378723],
+  [167.47287160549013, 3903.7854409378724],
+  [266.77287160549014, 3903.7854409378724],
+  [366.0728716054901, 3738.1854409378725],
+  [266.77287160549014, 3738.1854409378725],
+  [266.77287160549014, 3572.5854409378726],
+  [167.47287160549016, 3406.9854409378727],
+  [167.47287160549016, 3241.3854409378728],
+  [266.77287160549014, 3241.3854409378728],
+  [266.77287160549014, 3406.9854409378727],
+  [366.0728716054901, 3572.5854409378726],
+  [465.37287160549005, 3738.1854409378725],
+  [465.37287160549005, 3903.7854409378724],
+  [366.0728716054901, 4069.3854409378723],
+  [366.0728716054901, 4234.985440937872],
+  [465.37287160549005, 4234.985440937872],
+  [564.6728716054901, 4069.3854409378723],
+  [465.37287160549005, 4069.3854409378723],
+  [564.6728716054901, 4234.985440937872],
+  [663.9728716054901, 4069.3854409378723],
+  [663.9728716054901, 4234.985440937872],
+  [663.9728716054901, 4400.585440937872],
+  [763.2728716054902, 4566.185440937871],
+  [763.2728716054902, 4400.585440937872],
+  [663.9728716054901, 4566.185440937871],
+  [564.6728716054901, 4400.585440937872],
+  [19431.915041401327, 3495.506142643713],
+  [19332.61504140133, 3661.1061426437127],
+  [19431.915041401327, 3661.1061426437127],
+  [19531.215041401327, 3661.1061426437127],
+  [19630.515041401326, 3495.506142643713],
+  [19630.515041401326, 3661.1061426437127],
+  [19729.815041401325, 3826.7061426437126],
+  [19630.515041401326, 3826.7061426437126],
+  [19729.815041401325, 3992.3061426437125],
+  [19630.515041401326, 3992.3061426437125],
+  [19630.515041401326, 4157.906142643712],
+  [19630.515041401326, 4323.506142643711],
+  [19531.215041401327, 4157.906142643712],
+  [19431.915041401327, 4323.506142643711],
+  [19531.215041401327, 4489.106142643711],
+  [19431.915041401327, 4654.70614264371],
+  [19332.61504140133, 4654.70614264371],
+  [19332.61504140133, 4820.30614264371],
+  [19332.61504140133, 4985.906142643709],
+  [19233.31504140133, 4985.906142643709],
+  [19134.01504140133, 5151.506142643709],
+  [19034.71504140133, 5151.506142643709],
+  [19134.01504140133, 5317.106142643708],
+  [19034.71504140133, 5317.106142643708],
+  [19034.71504140133, 5482.706142643708],
+  [18935.41504140133, 5648.306142643707],
+  [18836.115041401332, 5813.9061426437065],
+  [18836.115041401332, 5979.506142643706],
+  [18935.41504140133, 5979.506142643706],
+  [19034.71504140133, 6145.106142643705],
+  [19034.71504140133, 5979.506142643706],
+  [19034.71504140133, 5813.9061426437065],
+  [19134.01504140133, 5648.306142643707],
+  [19233.31504140133, 5648.306142643707],
+  [19134.01504140133, 5813.9061426437065],
+  [19134.01504140133, 5979.506142643706],
+  [19233.31504140133, 5813.9061426437065],
+  [19233.31504140133, 5979.506142643706],
+  [19332.61504140133, 6145.106142643705],
+  [19332.61504140133, 6310.706142643705],
+  [19233.31504140133, 6310.706142643705],
+  [19233.31504140133, 6476.306142643704],
+  [19332.61504140133, 6476.306142643704],
+  [19431.915041401327, 6641.906142643704],
+  [19332.61504140133, 6807.506142643703],
+  [19332.61504140133, 6641.906142643704],
+  [19431.915041401327, 6476.306142643704],
+  [19431.915041401327, 6310.706142643705],
+  [19531.215041401327, 6145.106142643705],
+  [19431.915041401327, 5979.506142643706],
+  [19431.915041401327, 6145.106142643705],
+  [19531.215041401327, 5979.506142643706],
+  [19630.515041401326, 5813.9061426437065],
+  [19630.515041401326, 5979.506142643706],
+  [19729.815041401325, 5813.9061426437065],
+  [19829.115041401325, 5979.506142643706],
+  [19729.815041401325, 5979.506142643706],
+  [19729.815041401325, 6145.106142643705],
+  [19729.815041401325, 6310.706142643705],
+  [19630.515041401326, 6476.306142643704],
+  [19729.815041401325, 6476.306142643704],
+  [19630.515041401326, 6310.706142643705],
+  [19531.215041401327, 6310.706142643705],
+  [19531.215041401327, 6476.306142643704],
+  [19630.515041401326, 6641.906142643704],
+  [19729.815041401325, 6807.506142643703],
+  [19829.115041401325, 6973.106142643703],
+  [19928.415041401324, 6973.106142643703],
+  [19928.415041401324, 7138.706142643702],
+  [20027.715041401323, 7138.706142643702],
+  [20027.715041401323, 7304.306142643702],
+  [19928.415041401324, 7304.306142643702],
+  [19829.115041401325, 7304.306142643702],
+  [19829.115041401325, 7469.906142643701],
+  [19928.415041401324, 7469.906142643701],
+  [19928.415041401324, 7635.5061426437005],
+  [19928.415041401324, 7801.1061426437],
+  [20027.715041401323, 7635.5061426437005],
+  [20027.715041401323, 7801.1061426437],
+  [20127.015041401322, 7801.1061426437],
+  [20226.31504140132, 7801.1061426437],
+  [20325.61504140132, 7801.1061426437],
+  [20226.31504140132, 7635.5061426437005],
+  [20226.31504140132, 7469.906142643701],
+  [20226.31504140132, 7304.306142643702],
+  [20127.015041401322, 7304.306142643702],
+  [20027.715041401323, 7469.906142643701],
+  [20127.015041401322, 7469.906142643701],
+  [20127.015041401322, 7635.5061426437005],
+  [2748.790306732237, 2362.9553147492866],
+  [2848.0903067322365, 2528.5553147492865],
+  [2748.790306732237, 2694.1553147492864],
+  [2649.490306732237, 2859.7553147492863],
+  [2748.790306732237, 3025.355314749286],
+  [2848.0903067322365, 2859.7553147492863],
+  [2848.0903067322365, 2694.1553147492864],
+  [2947.3903067322362, 2694.1553147492864],
+  [3046.690306732236, 2859.7553147492863],
+  [3145.9903067322357, 2694.1553147492864],
+  [3145.9903067322357, 2528.5553147492865],
+  [3046.690306732236, 2694.1553147492864],
+  [3145.9903067322357, 2859.7553147492863],
+  [3046.690306732236, 3025.355314749286],
+  [3145.9903067322357, 3025.355314749286],
+  [3245.2903067322354, 3190.955314749286],
+  [3245.2903067322354, 3356.555314749286],
+  [3344.590306732235, 3522.155314749286],
+  [3443.890306732235, 3356.555314749286],
+  [3543.1903067322346, 3356.555314749286],
+  [3642.4903067322343, 3190.955314749286],
+  [3741.790306732234, 3025.355314749286],
+  [3741.790306732234, 2859.7553147492863],
+  [3841.090306732234, 3025.355314749286],
+  [3841.090306732234, 3190.955314749286],
+  [3741.790306732234, 3190.955314749286],
+  [3642.4903067322343, 3025.355314749286],
+  [3543.1903067322346, 3025.355314749286],
+  [3543.1903067322346, 2859.7553147492863],
+  [3443.890306732235, 3025.355314749286],
+  [3443.890306732235, 3190.955314749286],
+  [3543.1903067322346, 3190.955314749286],
+  [3642.4903067322343, 3356.555314749286],
+  [3543.1903067322346, 3522.155314749286],
+  [3443.890306732235, 3687.755314749286],
+  [3443.890306732235, 3853.3553147492858],
+  [3344.590306732235, 3687.755314749286],
+  [3245.2903067322354, 3853.3553147492858],
+  [3245.2903067322354, 3687.755314749286],
+  [3145.9903067322357, 3687.755314749286],
+  [3046.690306732236, 3853.3553147492858],
+  [3145.9903067322357, 4018.9553147492857],
+  [3145.9903067322357, 3853.3553147492858],
+  [3046.690306732236, 3687.755314749286],
+  [3145.9903067322357, 3522.155314749286],
+  [3145.9903067322357, 3356.555314749286],
+  [3145.9903067322357, 3190.955314749286],
+  [3046.690306732236, 3190.955314749286],
+  [3046.690306732236, 3356.555314749286],
+  [2947.3903067322362, 3356.555314749286],
+  [2848.0903067322365, 3190.955314749286],
+  [2947.3903067322362, 3025.355314749286],
+  [2848.0903067322365, 3025.355314749286],
+  [2748.790306732237, 2859.7553147492863],
+  [2649.490306732237, 2694.1553147492864],
+  [2748.790306732237, 2528.5553147492865],
+  [2848.0903067322365, 2362.9553147492866],
+  [2748.790306732237, 2197.3553147492867],
+  [2649.490306732237, 2362.9553147492866],
+  [2649.490306732237, 2197.3553147492867],
+  [2550.1903067322373, 2362.9553147492866],
+  [2450.8903067322376, 2362.9553147492866],
+  [2351.590306732238, 2528.5553147492865],
+  [2252.290306732238, 2528.5553147492865],
+  [2351.590306732238, 2362.9553147492866],
+  [2252.290306732238, 2197.3553147492867],
+  [2351.590306732238, 2197.3553147492867],
+  [2351.590306732238, 2031.7553147492865],
+  [2351.590306732238, 1866.1553147492864],
+  [2252.290306732238, 1866.1553147492864],
+  [2351.590306732238, 1700.5553147492863],
+  [2450.8903067322376, 1534.9553147492861],
+  [2351.590306732238, 1369.355314749286],
+  [2252.290306732238, 1203.7553147492858],
+  [2252.290306732238, 1369.355314749286],
+  [2252.290306732238, 1534.9553147492861],
+  [2152.9903067322384, 1369.355314749286],
+  [2053.6903067322387, 1369.355314749286],
+  [1954.3903067322387, 1203.7553147492858],
+  [1855.0903067322388, 1203.7553147492858],
+  [1755.7903067322388, 1038.1553147492857],
+  [1656.4903067322389, 1038.1553147492857],
+  [1557.190306732239, 872.5553147492857],
+  [1457.890306732239, 1038.1553147492857],
+  [1457.890306732239, 872.5553147492857],
+  [1457.890306732239, 706.9553147492858],
+  [1557.190306732239, 706.9553147492858],
+  [1656.4903067322389, 872.5553147492857],
+  [1656.4903067322389, 706.9553147492858],
+  [1755.7903067322388, 706.9553147492858],
+  [1656.4903067322389, 541.3553147492859],
+  [1557.190306732239, 375.7553147492859],
+  [1656.4903067322389, 210.1553147492859],
+  [1755.7903067322388, 44.55531474928592],
+  [1656.4903067322389, 44.55531474928592],
+  [1557.190306732239, 210.1553147492859],
+  [1457.890306732239, 210.1553147492859],
+  [1457.890306732239, 44.55531474928592],
+  [1358.590306732239, 210.1553147492859],
+  [1358.590306732239, 375.75531474928584],
+  [1259.290306732239, 210.15531474928585],
+  [1259.290306732239, 375.75531474928584],
+  [1259.290306732239, 541.3553147492859],
+  [1358.590306732239, 706.9553147492858],
+  [1358.590306732239, 872.5553147492857],
+  [1259.290306732239, 706.9553147492858],
+  [1259.290306732239, 872.5553147492857],
+  [1259.290306732239, 1038.1553147492857],
+  [1358.590306732239, 1203.7553147492858],
+  [1358.590306732239, 1038.1553147492857],
+  [1457.890306732239, 1203.7553147492858],
+  [1557.190306732239, 1369.355314749286],
+  [1656.4903067322389, 1203.7553147492858],
+  [1557.190306732239, 1203.7553147492858],
+  [1557.190306732239, 1038.1553147492857],
+  [17254.572515546668, 1460.5807801244923],
+  [17353.872515546667, 1626.1807801244925],
+  [17453.172515546667, 1791.7807801244926],
+  [17552.472515546666, 1791.7807801244926],
+  [17453.172515546667, 1626.1807801244925],
+  [17353.872515546667, 1791.7807801244926],
+  [17453.172515546667, 1957.3807801244927],
+  [17353.872515546667, 2122.980780124493],
+  [17453.172515546667, 2288.580780124493],
+  [17353.872515546667, 2454.1807801244927],
+  [17453.172515546667, 2619.7807801244926],
+  [17552.472515546666, 2619.7807801244926],
+  [17453.172515546667, 2785.3807801244925],
+  [17353.872515546667, 2619.7807801244926],
+  [17254.572515546668, 2454.1807801244927],
+  [17254.572515546668, 2288.580780124493],
+  [17353.872515546667, 2288.580780124493],
+  [17453.172515546667, 2122.980780124493],
+  [17552.472515546666, 2288.580780124493],
+  [17552.472515546666, 2454.1807801244927],
+  [17453.172515546667, 2454.1807801244927],
+  [4447.67624466283, 4761.1416826913],
+  [4546.97624466283, 4595.541682691301],
+  [4546.97624466283, 4429.941682691301],
+  [4447.67624466283, 4429.941682691301],
+  [4447.67624466283, 4595.541682691301],
+  [4348.37624466283, 4595.541682691301],
+  [4249.07624466283, 4595.541682691301],
+  [4348.37624466283, 4761.1416826913],
+  [4249.07624466283, 4761.1416826913],
+  [4348.37624466283, 4926.7416826912995],
+  [4348.37624466283, 5092.341682691299],
+  [4447.67624466283, 5257.941682691298],
+  [4546.97624466283, 5257.941682691298],
+  [4646.27624466283, 5092.341682691299],
+  [4546.97624466283, 5092.341682691299],
+  [4646.27624466283, 4926.7416826912995],
+  [4646.27624466283, 4761.1416826913],
+  [4546.97624466283, 4761.1416826913],
+  [4646.27624466283, 4595.541682691301],
+  [4745.5762446628305, 4595.541682691301],
+  [4646.27624466283, 4429.941682691301],
+  [4745.5762446628305, 4429.941682691301],
+  [4844.876244662831, 4595.541682691301],
+  [4745.5762446628305, 4761.1416826913],
+  [4745.5762446628305, 4926.7416826912995],
+  [4844.876244662831, 4761.1416826913],
+  [4944.176244662831, 4761.1416826913],
+  [5043.476244662831, 4926.7416826912995],
+  [5043.476244662831, 4761.1416826913],
+  [5142.776244662831, 4926.7416826912995],
+  [5142.776244662831, 4761.1416826913],
+  [5242.076244662831, 4595.541682691301],
+  [5142.776244662831, 4595.541682691301],
+  [5242.076244662831, 4429.941682691301],
+  [5242.076244662831, 4264.341682691302],
+  [5142.776244662831, 4429.941682691301],
+  [5043.476244662831, 4595.541682691301],
+  [5043.476244662831, 4429.941682691301],
+  [5043.476244662831, 4264.341682691302],
+  [5142.776244662831, 4098.741682691302],
+  [5043.476244662831, 4098.741682691302],
+  [4944.176244662831, 3933.1416826913023],
+  [4944.176244662831, 4098.741682691302],
+  [4944.176244662831, 4264.341682691302],
+  [4844.876244662831, 4098.741682691302],
+  [4745.5762446628305, 4264.341682691302],
+  [4646.27624466283, 4098.741682691302],
+  [4546.97624466283, 3933.1416826913023],
+  [4447.67624466283, 4098.741682691302],
+  [4546.97624466283, 4264.341682691302],
+  [4447.67624466283, 4264.341682691302],
+  [4546.97624466283, 4098.741682691302],
+  [4646.27624466283, 3933.1416826913023],
+  [4546.97624466283, 3767.5416826913024],
+  [4447.67624466283, 3601.9416826913025],
+  [4447.67624466283, 3767.5416826913024],
+  [4348.37624466283, 3767.5416826913024],
+  [4348.37624466283, 3933.1416826913023],
+  [4249.07624466283, 3767.5416826913024],
+  [4249.07624466283, 3933.1416826913023],
+  [4149.776244662829, 3933.1416826913023],
+  [4050.4762446628297, 4098.741682691302],
+  [4050.4762446628297, 3933.1416826913023],
+  [3951.17624466283, 3933.1416826913023],
+  [3951.17624466283, 4098.741682691302],
+  [3851.8762446628302, 4264.341682691302],
+  [3851.8762446628302, 4098.741682691302],
+  [3752.5762446628305, 4098.741682691302],
+  [3653.276244662831, 4264.341682691302],
+  [3553.976244662831, 4429.941682691301],
+  [3553.976244662831, 4595.541682691301],
+  [3454.6762446628313, 4429.941682691301],
+  [3553.976244662831, 4264.341682691302],
+  [3653.276244662831, 4429.941682691301],
+  [3752.5762446628305, 4264.341682691302],
+  [3752.5762446628305, 4429.941682691301],
+  [3851.8762446628302, 4595.541682691301],
+  [3851.8762446628302, 4429.941682691301],
+  [3951.17624466283, 4429.941682691301],
+  [4050.4762446628297, 4264.341682691302],
+  [4149.776244662829, 4098.741682691302],
+  [4249.07624466283, 4264.341682691302],
+  [4348.37624466283, 4098.741682691302],
+  [4447.67624466283, 3933.1416826913023],
+  [9574.088902135607, 7352.26293905581],
+  [9474.788902135606, 7352.26293905581],
+  [9375.488902135605, 7186.662939055811],
+  [9474.788902135606, 7021.0629390558115],
+  [9574.088902135607, 7021.0629390558115],
+  [9474.788902135606, 7186.662939055811],
+  [9574.088902135607, 7186.662939055811],
+  [9673.388902135608, 7021.0629390558115],
+  [9673.388902135608, 6855.462939055812],
+  [9772.68890213561, 6689.862939055813],
+  [9673.388902135608, 6689.862939055813],
+  [9772.68890213561, 6524.262939055813],
+  [9871.98890213561, 6358.662939055814],
+  [9971.288902135611, 6524.262939055813],
+  [10070.588902135612, 6358.662939055814],
+  [10070.588902135612, 6193.062939055814],
+  [9971.288902135611, 6027.462939055815],
+  [9971.288902135611, 5861.862939055815],
+  [9871.98890213561, 5861.862939055815],
+  [9871.98890213561, 5696.262939055816],
+  [9971.288902135611, 5530.662939055816],
+  [10070.588902135612, 5530.662939055816],
+  [10070.588902135612, 5696.262939055816],
+  [10169.888902135614, 5861.862939055815],
+  [10169.888902135614, 5696.262939055816],
+  [10070.588902135612, 5861.862939055815],
+  [10169.888902135614, 6027.462939055815],
+  [10169.888902135614, 6193.062939055814],
+  [10269.188902135615, 6027.462939055815],
+  [10269.188902135615, 5861.862939055815],
+  [10368.488902135616, 6027.462939055815],
+  [10269.188902135615, 6193.062939055814],
+  [10269.188902135615, 6358.662939055814],
+  [10169.888902135614, 6358.662939055814],
+  [10070.588902135612, 6524.262939055813],
+  [10070.588902135612, 6689.862939055813],
+  [9971.288902135611, 6855.462939055812],
+  [9971.288902135611, 7021.0629390558115],
+  [10070.588902135612, 7186.662939055811],
+  [10169.888902135614, 7186.662939055811],
+  [10269.188902135615, 7186.662939055811],
+  [10169.888902135614, 7352.26293905581],
+  [10070.588902135612, 7352.26293905581],
+  [10169.888902135614, 7517.86293905581],
+  [10169.888902135614, 7683.462939055809],
+  [10269.188902135615, 7517.86293905581],
+  [10368.488902135616, 7683.462939055809],
+  [10467.788902135617, 7683.462939055809],
+  [10368.488902135616, 7517.86293905581],
+  [10269.188902135615, 7352.26293905581],
+  [10368.488902135616, 7352.26293905581],
+  [10368.488902135616, 7186.662939055811],
+  [10368.488902135616, 7021.0629390558115],
+  [10368.488902135616, 6855.462939055812],
+  [10269.188902135615, 6855.462939055812],
+  [10169.888902135614, 6855.462939055812],
+  [10169.888902135614, 7021.0629390558115],
+  [10070.588902135612, 7021.0629390558115],
+  [10070.588902135612, 6855.462939055812],
+  [10169.888902135614, 6689.862939055813],
+  [10269.188902135615, 6689.862939055813],
+  [10169.888902135614, 6524.262939055813],
+  [10269.188902135615, 6524.262939055813],
+  [10368.488902135616, 6524.262939055813],
+  [10368.488902135616, 6358.662939055814],
+  [10467.788902135617, 6358.662939055814],
+  [10467.788902135617, 6193.062939055814],
+  [10567.088902135618, 6358.662939055814],
+  [10567.088902135618, 6193.062939055814],
+  [10666.388902135619, 6193.062939055814],
+  [10666.388902135619, 6358.662939055814],
+  [10567.088902135618, 6524.262939055813],
+  [10467.788902135617, 6524.262939055813],
+  [10567.088902135618, 6689.862939055813],
+  [10467.788902135617, 6855.462939055812],
+  [10567.088902135618, 7021.0629390558115],
+  [10467.788902135617, 7021.0629390558115],
+  [10567.088902135618, 6855.462939055812],
+  [10467.788902135617, 6689.862939055813],
+  [10368.488902135616, 6689.862939055813],
+  [1073.6944354374714, 1154.3681204032646],
+  [974.3944354374713, 1319.9681204032647],
+  [875.0944354374712, 1319.9681204032647],
+  [775.7944354374712, 1154.3681204032646],
+  [775.7944354374712, 988.7681204032646],
+  [875.0944354374712, 823.1681204032647],
+  [875.0944354374712, 657.5681204032647],
+  [775.7944354374712, 823.1681204032647],
+  [676.4944354374711, 657.5681204032647],
+  [676.4944354374711, 491.9681204032648],
+  [775.7944354374712, 657.5681204032647],
+  [676.4944354374711, 823.1681204032647],
+  [676.4944354374711, 988.7681204032646],
+  [577.194435437471, 823.1681204032647],
+  [577.194435437471, 988.7681204032646],
+  [577.194435437471, 1154.3681204032646],
+  [676.4944354374711, 1319.9681204032647],
+  [577.194435437471, 1319.9681204032647],
+  [477.89443543747103, 1319.9681204032647],
+  [577.194435437471, 1485.5681204032649],
+  [477.89443543747103, 1651.168120403265],
+  [577.194435437471, 1816.7681204032651],
+  [477.89443543747103, 1816.7681204032651],
+  [378.5944354374711, 1982.3681204032653],
+  [378.5944354374711, 2147.9681204032654],
+  [279.2944354374711, 2313.5681204032653],
+  [179.99443543747114, 2147.9681204032654],
+  [80.69443543747114, 2313.5681204032653],
+  [80.69443543747114, 2479.168120403265],
+  [179.9944354374711, 2644.768120403265],
+  [179.9944354374711, 2479.168120403265],
+  [179.9944354374711, 2313.5681204032653],
+  [80.69443543747111, 2147.9681204032654],
+  [80.69443543747111, 1982.3681204032653],
+  [179.9944354374711, 1982.3681204032653],
+  [179.9944354374711, 1816.7681204032651],
+  [80.69443543747111, 1816.7681204032651],
+  [179.9944354374711, 1651.168120403265],
+  [80.69443543747111, 1485.5681204032649],
+  [80.69443543747111, 1319.9681204032647],
+  [179.9944354374711, 1154.3681204032646],
+  [80.69443543747111, 1154.3681204032646],
+  [179.9944354374711, 988.7681204032646],
+  [279.2944354374711, 823.1681204032647],
+  [378.5944354374711, 657.5681204032647],
+  [378.5944354374711, 823.1681204032647],
+  [477.89443543747103, 823.1681204032647],
+  [477.89443543747103, 657.5681204032647],
+  [378.5944354374711, 491.9681204032648],
+  [477.89443543747103, 326.3681204032648],
+  [477.89443543747103, 160.76812040326482],
+  [378.5944354374711, 160.76812040326482],
+  [279.2944354374711, 326.3681204032648],
+  [179.99443543747114, 491.9681204032648],
+  [179.99443543747114, 326.3681204032648],
+  [279.2944354374711, 491.9681204032648],
+  [279.2944354374711, 657.5681204032647],
+  [179.99443543747114, 823.1681204032647],
+  [279.2944354374711, 988.7681204032646],
+  [279.2944354374711, 1154.3681204032646],
+  [378.5944354374711, 1319.9681204032647],
+  [477.89443543747103, 1485.5681204032649],
+  [577.194435437471, 1651.168120403265],
+  [676.4944354374711, 1651.168120403265],
+  [775.7944354374712, 1816.7681204032651],
+  [676.4944354374711, 1816.7681204032651],
+  [775.7944354374712, 1651.168120403265],
+  [875.0944354374712, 1651.168120403265],
+  [974.3944354374713, 1651.168120403265],
+  [875.0944354374712, 1485.5681204032649],
+  [775.7944354374712, 1485.5681204032649],
+  [676.4944354374711, 1485.5681204032649],
+  [775.7944354374712, 1319.9681204032647],
+  [676.4944354374711, 1154.3681204032646],
+  [3138.413562431697, 2355.845602060523],
+  [3039.113562431697, 2521.445602060523],
+  [3039.113562431697, 2355.845602060523],
+  [3039.113562431697, 2190.245602060523],
+  [3138.413562431697, 2024.645602060523],
+  [3237.7135624316966, 1859.045602060523],
+  [3237.7135624316966, 2024.645602060523],
+  [3337.0135624316963, 1859.045602060523],
+  [3337.0135624316963, 1693.4456020605228],
+  [3436.313562431696, 1527.8456020605227],
+  [3535.6135624316958, 1693.4456020605228],
+  [3535.6135624316958, 1859.045602060523],
+  [3634.9135624316955, 2024.645602060523],
+  [3734.213562431695, 2190.245602060523],
+  [3634.9135624316955, 2190.245602060523],
+  [3535.6135624316958, 2190.245602060523],
+  [3535.6135624316958, 2355.845602060523],
+  [3535.6135624316958, 2521.445602060523],
+  [3436.313562431696, 2687.045602060523],
+  [3436.313562431696, 2852.645602060523],
+  [3535.6135624316958, 2687.045602060523],
+  [3634.9135624316955, 2521.445602060523],
+  [3634.9135624316955, 2355.845602060523],
+  [3734.213562431695, 2355.845602060523],
+  [3833.513562431695, 2190.245602060523],
+  [3932.8135624316947, 2024.645602060523],
+  [3833.513562431695, 1859.045602060523],
+  [3833.513562431695, 1693.4456020605228],
+  [3734.213562431695, 1859.045602060523],
+  [3734.213562431695, 1693.4456020605228],
+  [3734.213562431695, 1527.8456020605227],
+  [3634.9135624316955, 1527.8456020605227],
+  [3634.9135624316955, 1693.4456020605228],
+  [3535.6135624316958, 1527.8456020605227],
+  [3634.9135624316955, 1362.2456020605225],
+  [3535.6135624316958, 1362.2456020605225],
+  [3436.313562431696, 1196.6456020605224],
+  [3535.6135624316958, 1196.6456020605224],
+  [3535.6135624316958, 1031.0456020605222],
+  [3436.313562431696, 1031.0456020605222],
+  [3535.6135624316958, 865.4456020605222],
+  [3436.313562431696, 865.4456020605222],
+  [3535.6135624316958, 699.8456020605223],
+  [3634.9135624316955, 699.8456020605223],
+  [3535.6135624316958, 534.2456020605224],
+  [3436.313562431696, 368.64560206052244],
+  [3436.313562431696, 203.04560206052244],
+  [3337.0135624316963, 37.445602060522454],
+  [3436.313562431696, 37.445602060522454],
+  [3337.0135624316963, 203.04560206052244],
+  [3237.7135624316966, 37.445602060522454],
+  [3138.413562431697, 37.445602060522454],
+  [3237.7135624316966, 203.04560206052244],
+  [3337.0135624316963, 368.6456020605224],
+  [3436.313562431696, 534.2456020605224],
+  [3337.0135624316963, 699.8456020605223],
+  [3237.7135624316966, 534.2456020605224],
+  [3337.0135624316963, 534.2456020605224],
+  [3436.313562431696, 699.8456020605223],
+  [3337.0135624316963, 865.4456020605222],
+  [3237.7135624316966, 865.4456020605222],
+  [3337.0135624316963, 1031.0456020605222],
+  [3237.7135624316966, 1196.6456020605224],
+  [3138.413562431697, 1362.2456020605225],
+  [3039.113562431697, 1527.8456020605227],
+  [3138.413562431697, 1527.8456020605227],
+  [3039.113562431697, 1693.4456020605228],
+  [2939.8135624316974, 1527.8456020605227],
+  [2840.5135624316977, 1362.2456020605225],
+  [2840.5135624316977, 1527.8456020605227],
+  [2840.5135624316977, 1693.4456020605228],
+  [2939.8135624316974, 1859.045602060523],
+  [2840.5135624316977, 2024.645602060523],
+  [2840.5135624316977, 1859.045602060523],
+  [2939.8135624316974, 1693.4456020605228],
+  [3039.113562431697, 1859.045602060523],
+  [3039.113562431697, 2024.645602060523],
+  [2939.8135624316974, 2190.245602060523],
+  [2939.8135624316974, 2024.645602060523],
+  [16388.412117675925, 1839.818884803299],
+  [16289.112117675924, 1839.818884803299],
+  [16388.412117675925, 1674.2188848032988],
+  [16487.712117675925, 1508.6188848032987],
+  [16487.712117675925, 1674.2188848032988],
+  [16388.412117675925, 1508.6188848032987],
+  [16289.112117675924, 1343.0188848032985],
+  [16289.112117675924, 1508.6188848032987],
+  [16189.812117675923, 1674.2188848032988],
+  [16090.512117675922, 1839.818884803299],
+  [16090.512117675922, 2005.418884803299],
+  [15991.212117675921, 2171.018884803299],
+  [16090.512117675922, 2336.618884803299],
+  [16090.512117675922, 2502.218884803299],
+  [16090.512117675922, 2667.8188848032987],
+  [15991.212117675921, 2833.4188848032986],
+  [15991.212117675921, 2999.0188848032985],
+  [15891.91211767592, 3164.6188848032984],
+  [15891.91211767592, 3330.2188848032984],
+  [15991.212117675921, 3330.2188848032984],
+  [16090.512117675922, 3330.2188848032984],
+  [16189.812117675923, 3495.8188848032983],
+  [16289.112117675924, 3495.8188848032983],
+  [16189.812117675923, 3330.2188848032984],
+  [16189.812117675923, 3164.6188848032984],
+  [16289.112117675924, 3164.6188848032984],
+  [16388.412117675925, 3164.6188848032984],
+  [16388.412117675925, 3330.2188848032984],
+  [16487.712117675925, 3330.2188848032984],
+  [16587.012117675924, 3495.8188848032983],
+  [16587.012117675924, 3661.418884803298],
+  [16686.312117675923, 3661.418884803298],
+  [16785.612117675922, 3661.418884803298],
+  [16884.91211767592, 3661.418884803298],
+  [16984.21211767592, 3661.418884803298],
+  [16884.91211767592, 3827.018884803298],
+  [16884.91211767592, 3992.618884803298],
+  [16984.21211767592, 3827.018884803298],
+  [17083.51211767592, 3661.418884803298],
+  [17182.81211767592, 3495.8188848032983],
+  [17182.81211767592, 3330.2188848032984],
+  [17282.11211767592, 3164.6188848032984],
+  [17282.11211767592, 3330.2188848032984],
+  [17182.81211767592, 3164.6188848032984],
+  [17083.51211767592, 3164.6188848032984],
+  [16984.21211767592, 3330.2188848032984],
+  [16984.21211767592, 3495.8188848032983],
+  [17083.51211767592, 3330.2188848032984],
+  [16984.21211767592, 3164.6188848032984],
+  [16984.21211767592, 2999.0188848032985],
+  [17083.51211767592, 2833.4188848032986],
+  [17083.51211767592, 2667.8188848032987],
+  [17182.81211767592, 2667.8188848032987],
+  [17182.81211767592, 2833.4188848032986],
+  [17083.51211767592, 2999.0188848032985],
+  [16984.21211767592, 2833.4188848032986],
+  [16884.91211767592, 2833.4188848032986],
+  [16884.91211767592, 2999.0188848032985],
+  [16785.612117675922, 2999.0188848032985],
+  [16884.91211767592, 3164.6188848032984],
+  [16785.612117675922, 3164.6188848032984],
+  [16686.312117675923, 3164.6188848032984],
+  [16587.012117675924, 3164.6188848032984],
+  [16587.012117675924, 2999.0188848032985],
+  [16487.712117675925, 3164.6188848032984],
+  [16587.012117675924, 3330.2188848032984],
+  [16686.312117675923, 3495.8188848032983],
+  [16686.312117675923, 3330.2188848032984],
+  [16785.612117675922, 3330.2188848032984],
+  [16884.91211767592, 3495.8188848032983],
+  [16785.612117675922, 3495.8188848032983],
+  [16884.91211767592, 3330.2188848032984],
+  [1272.175991128079, 3842.7700224365044],
+  [1371.475991128079, 3842.7700224365044],
+  [1272.175991128079, 3677.1700224365045],
+  [1172.875991128079, 3511.5700224365046],
+  [1272.175991128079, 3511.5700224365046],
+  [1172.875991128079, 3345.9700224365047],
+  [1073.575991128079, 3180.3700224365048],
+  [1073.575991128079, 3014.770022436505],
+  [974.275991128079, 3014.770022436505],
+  [874.9759911280789, 3014.770022436505],
+  [775.6759911280789, 2849.170022436505],
+  [775.6759911280789, 3014.770022436505],
+  [775.6759911280789, 3180.3700224365048],
+  [676.3759911280788, 3345.9700224365047],
+  [676.3759911280788, 3511.5700224365046],
+  [775.6759911280789, 3677.1700224365045],
+  [676.3759911280788, 3842.7700224365044],
+  [577.0759911280787, 3842.7700224365044],
+  [577.0759911280787, 3677.1700224365045],
+  [676.3759911280788, 3677.1700224365045],
+  [775.6759911280789, 3511.5700224365046],
+  [775.6759911280789, 3345.9700224365047],
+  [874.9759911280789, 3345.9700224365047],
+  [874.9759911280789, 3180.3700224365048],
+  [974.275991128079, 3180.3700224365048],
+  [974.275991128079, 3345.9700224365047],
+  [1073.575991128079, 3511.5700224365046],
+  [1073.575991128079, 3677.1700224365045],
+  [1172.875991128079, 3677.1700224365045],
+  [1172.875991128079, 3842.7700224365044],
+  [1073.575991128079, 3842.7700224365044],
+  [1172.875991128079, 4008.3700224365043],
+  [1073.575991128079, 4008.3700224365043],
+  [974.275991128079, 3842.7700224365044],
+  [974.275991128079, 4008.3700224365043],
+  [874.9759911280789, 4008.3700224365043],
+  [775.6759911280789, 4008.3700224365043],
+  [874.9759911280789, 3842.7700224365044],
+  [974.275991128079, 3677.1700224365045],
+  [974.275991128079, 3511.5700224365046],
+  [1073.575991128079, 3345.9700224365047],
+  [1172.875991128079, 3180.3700224365048],
+  [1272.175991128079, 3180.3700224365048],
+  [1272.175991128079, 3345.9700224365047],
+  [1371.475991128079, 3180.3700224365048],
+  [1470.7759911280789, 3345.9700224365047],
+  [1371.475991128079, 3345.9700224365047],
+  [1371.475991128079, 3511.5700224365046],
+  [1470.7759911280789, 3511.5700224365046],
+  [1570.0759911280788, 3677.1700224365045],
+  [1470.7759911280789, 3677.1700224365045],
+  [1570.0759911280788, 3511.5700224365046],
+  [1669.3759911280788, 3511.5700224365046],
+  [1669.3759911280788, 3677.1700224365045],
+  [1768.6759911280787, 3842.7700224365044],
+  [1669.3759911280788, 3842.7700224365044],
+  [1768.6759911280787, 4008.3700224365043],
+  [1867.9759911280787, 3842.7700224365044],
+  [1967.2759911280787, 3677.1700224365045],
+  [2066.5759911280784, 3842.7700224365044],
+  [2165.875991128078, 3677.1700224365045],
+  [2066.5759911280784, 3511.5700224365046],
+  [2165.875991128078, 3511.5700224365046],
+  [2066.5759911280784, 3677.1700224365045],
+  [2165.875991128078, 3842.7700224365044],
+  [2265.175991128078, 4008.3700224365043],
+  [2364.4759911280776, 4008.3700224365043],
+  [2265.175991128078, 3842.7700224365044],
+  [2364.4759911280776, 3677.1700224365045],
+  [2463.7759911280773, 3842.7700224365044],
+  [2463.7759911280773, 4008.3700224365043],
+  [2364.4759911280776, 3842.7700224365044]
+];
+
+main() {
+  for (int i = 0; i < 20; i++) {
+    var y = panels.length;
+  }
+}
diff --git a/tests/language/unsorted/larger_implicit_getter_test.dart b/tests/language/unsorted/larger_implicit_getter_test.dart
new file mode 100644
index 0000000..cfadc00
--- /dev/null
+++ b/tests/language/unsorted/larger_implicit_getter_test.dart
@@ -0,0 +1,4100 @@
+// 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.
+// Dart test program for testing compilation of large implicit getters.
+
+import 'package:expect/expect.dart';
+
+List<List> panels = [
+  [6853.940039224797, 6050.837897021371],
+  [6953.240039224797, 6050.837897021371],
+  [7052.5400392247975, 5885.237897021371],
+  [7052.5400392247975, 5719.637897021372],
+  [7151.840039224798, 5885.237897021371],
+  [7052.5400392247975, 6050.837897021371],
+  [7052.5400392247975, 6216.43789702137],
+  [7052.5400392247975, 6382.03789702137],
+  [6953.240039224797, 6382.03789702137],
+  [6953.240039224797, 6216.43789702137],
+  [6853.940039224797, 6216.43789702137],
+  [6853.940039224797, 6382.03789702137],
+  [6754.640039224797, 6216.43789702137],
+  [6754.640039224797, 6382.03789702137],
+  [6754.640039224797, 6547.637897021369],
+  [6754.640039224797, 6713.237897021369],
+  [6655.340039224797, 6713.237897021369],
+  [6754.640039224797, 6878.837897021368],
+  [6853.940039224797, 6713.237897021369],
+  [6853.940039224797, 6878.837897021368],
+  [6953.240039224797, 6713.237897021369],
+  [7052.5400392247975, 6547.637897021369],
+  [7151.840039224798, 6713.237897021369],
+  [7151.840039224798, 6547.637897021369],
+  [7151.840039224798, 6382.03789702137],
+  [7251.140039224798, 6547.637897021369],
+  [7251.140039224798, 6713.237897021369],
+  [7350.440039224798, 6878.837897021368],
+  [7449.740039224798, 6878.837897021368],
+  [7449.740039224798, 6713.237897021369],
+  [7549.040039224798, 6547.637897021369],
+  [7449.740039224798, 6382.03789702137],
+  [7449.740039224798, 6216.43789702137],
+  [7549.040039224798, 6050.837897021371],
+  [7648.340039224799, 6216.43789702137],
+  [7549.040039224798, 6382.03789702137],
+  [7648.340039224799, 6382.03789702137],
+  [7747.640039224799, 6216.43789702137],
+  [7846.940039224799, 6382.03789702137],
+  [7946.240039224799, 6382.03789702137],
+  [7946.240039224799, 6547.637897021369],
+  [7846.940039224799, 6713.237897021369],
+  [7946.240039224799, 6713.237897021369],
+  [8045.540039224799, 6547.637897021369],
+  [8045.540039224799, 6713.237897021369],
+  [7946.240039224799, 6878.837897021368],
+  [7946.240039224799, 7044.4378970213675],
+  [8045.540039224799, 7210.037897021367],
+  [8144.8400392247995, 7375.637897021366],
+  [8144.8400392247995, 7541.237897021366],
+  [8045.540039224799, 7375.637897021366],
+  [8144.8400392247995, 7210.037897021367],
+  [8045.540039224799, 7044.4378970213675],
+  [7946.240039224799, 7210.037897021367],
+  [7846.940039224799, 7210.037897021367],
+  [7946.240039224799, 7375.637897021366],
+  [8045.540039224799, 7541.237897021366],
+  [8144.8400392247995, 7706.837897021365],
+  [8244.1400392248, 7541.237897021366],
+  [8343.4400392248, 7541.237897021366],
+  [8343.4400392248, 7706.837897021365],
+  [8244.1400392248, 7706.837897021365],
+  [4735.523842661975, 3503.497768214323],
+  [4636.223842661975, 3337.897768214323],
+  [4536.923842661975, 3337.897768214323],
+  [4437.623842661975, 3172.2977682143232],
+  [4338.323842661975, 3172.2977682143232],
+  [4239.023842661974, 3172.2977682143232],
+  [4338.323842661975, 3006.6977682143233],
+  [4437.623842661975, 2841.0977682143234],
+  [4338.323842661975, 2675.4977682143235],
+  [4338.323842661975, 2509.8977682143236],
+  [4239.023842661974, 2675.4977682143235],
+  [4139.723842661974, 2509.8977682143236],
+  [4040.4238426619745, 2344.2977682143237],
+  [4139.723842661974, 2178.697768214324],
+  [4239.023842661974, 2178.697768214324],
+  [4139.723842661974, 2344.2977682143237],
+  [4040.4238426619745, 2178.697768214324],
+  [4139.723842661974, 2013.0977682143237],
+  [4139.723842661974, 1847.4977682143235],
+  [4239.023842661974, 2013.0977682143237],
+  [4239.023842661974, 1847.4977682143235],
+  [4338.323842661975, 1847.4977682143235],
+  [4437.623842661975, 1847.4977682143235],
+  [4536.923842661975, 1681.8977682143234],
+  [4437.623842661975, 1516.2977682143232],
+  [4536.923842661975, 1516.2977682143232],
+  [4536.923842661975, 1350.697768214323],
+  [4437.623842661975, 1350.697768214323],
+  [4536.923842661975, 1185.097768214323],
+  [4636.223842661975, 1019.497768214323],
+  [4536.923842661975, 853.897768214323],
+  [4636.223842661975, 853.897768214323],
+  [4735.523842661975, 688.2977682143231],
+  [4636.223842661975, 522.6977682143232],
+  [4636.223842661975, 357.09776821432325],
+  [4735.523842661975, 357.09776821432325],
+  [4735.523842661975, 522.6977682143232],
+  [4636.223842661975, 688.2977682143231],
+  [4735.523842661975, 853.897768214323],
+  [4834.8238426619755, 853.897768214323],
+  [4735.523842661975, 1019.497768214323],
+  [4735.523842661975, 1185.097768214323],
+  [4735.523842661975, 1350.697768214323],
+  [4834.8238426619755, 1516.2977682143232],
+  [4735.523842661975, 1516.2977682143232],
+  [4834.8238426619755, 1350.697768214323],
+  [4834.8238426619755, 1185.097768214323],
+  [4934.123842661976, 1350.697768214323],
+  [5033.423842661976, 1185.097768214323],
+  [5033.423842661976, 1019.497768214323],
+  [5033.423842661976, 853.897768214323],
+  [4934.123842661976, 853.897768214323],
+  [4934.123842661976, 1019.497768214323],
+  [4834.8238426619755, 1019.497768214323],
+  [4934.123842661976, 1185.097768214323],
+  [5033.423842661976, 1350.697768214323],
+  [5132.723842661976, 1350.697768214323],
+  [5132.723842661976, 1185.097768214323],
+  [5232.023842661976, 1019.497768214323],
+  [5232.023842661976, 1185.097768214323],
+  [5331.323842661976, 1019.497768214323],
+  [5430.623842661977, 1019.497768214323],
+  [5529.923842661977, 1185.097768214323],
+  [5430.623842661977, 1350.697768214323],
+  [5430.623842661977, 1516.2977682143232],
+  [5529.923842661977, 1350.697768214323],
+  [5629.223842661977, 1350.697768214323],
+  [5728.523842661977, 1350.697768214323],
+  [5728.523842661977, 1516.2977682143232],
+  [5728.523842661977, 1681.8977682143234],
+  [5629.223842661977, 1516.2977682143232],
+  [5529.923842661977, 1516.2977682143232],
+  [5629.223842661977, 1681.8977682143234],
+  [5529.923842661977, 1681.8977682143234],
+  [5430.623842661977, 1847.4977682143235],
+  [5331.323842661976, 1847.4977682143235],
+  [5331.323842661976, 2013.0977682143237],
+  [5232.023842661976, 2178.697768214324],
+  [5132.723842661976, 2013.0977682143237],
+  [5132.723842661976, 2178.697768214324],
+  [5232.023842661976, 2013.0977682143237],
+  [5232.023842661976, 1847.4977682143235],
+  [5232.023842661976, 1681.8977682143234],
+  [5331.323842661976, 1681.8977682143234],
+  [5331.323842661976, 1516.2977682143232],
+  [5331.323842661976, 1350.697768214323],
+  [5232.023842661976, 1350.697768214323],
+  [5232.023842661976, 1516.2977682143232],
+  [5132.723842661976, 1516.2977682143232],
+  [5132.723842661976, 1681.8977682143234],
+  [5033.423842661976, 1847.4977682143235],
+  [5132.723842661976, 1847.4977682143235],
+  [5033.423842661976, 2013.0977682143237],
+  [4934.123842661976, 2178.697768214324],
+  [5033.423842661976, 2344.2977682143237],
+  [4934.123842661976, 2344.2977682143237],
+  [4834.8238426619755, 2178.697768214324],
+  [4834.8238426619755, 2344.2977682143237],
+  [4735.523842661975, 2344.2977682143237],
+  [4636.223842661975, 2344.2977682143237],
+  [4536.923842661975, 2178.697768214324],
+  [4437.623842661975, 2013.0977682143237],
+  [4338.323842661975, 2178.697768214324],
+  [4437.623842661975, 2344.2977682143237],
+  [4536.923842661975, 2509.8977682143236],
+  [4636.223842661975, 2675.4977682143235],
+  [4636.223842661975, 2509.8977682143236],
+  [4536.923842661975, 2675.4977682143235],
+  [4636.223842661975, 2841.0977682143234],
+  [4536.923842661975, 2841.0977682143234],
+  [4636.223842661975, 3006.6977682143233],
+  [4735.523842661975, 3172.2977682143232],
+  [4834.8238426619755, 3006.6977682143233],
+  [4735.523842661975, 2841.0977682143234],
+  [4735.523842661975, 3006.6977682143233],
+  [4636.223842661975, 3172.2977682143232],
+  [4735.523842661975, 3337.897768214323],
+  [4834.8238426619755, 3503.497768214323],
+  [4735.523842661975, 3669.097768214323],
+  [4834.8238426619755, 3834.697768214323],
+  [4834.8238426619755, 3669.097768214323],
+  [4934.123842661976, 3503.497768214323],
+  [5033.423842661976, 3503.497768214323],
+  [5033.423842661976, 3337.897768214323],
+  [4934.123842661976, 3337.897768214323],
+  [4834.8238426619755, 3172.2977682143232],
+  [4834.8238426619755, 3337.897768214323],
+  [4934.123842661976, 3172.2977682143232],
+  [5033.423842661976, 3006.6977682143233],
+  [5132.723842661976, 2841.0977682143234],
+  [5132.723842661976, 3006.6977682143233],
+  [5232.023842661976, 3172.2977682143232],
+  [5232.023842661976, 3337.897768214323],
+  [5132.723842661976, 3337.897768214323],
+  [5232.023842661976, 3503.497768214323],
+  [5331.323842661976, 3337.897768214323],
+  [5331.323842661976, 3503.497768214323],
+  [5430.623842661977, 3669.097768214323],
+  [5331.323842661976, 3669.097768214323],
+  [5430.623842661977, 3503.497768214323],
+  [5430.623842661977, 3337.897768214323],
+  [5529.923842661977, 3172.2977682143232],
+  [5529.923842661977, 3337.897768214323],
+  [5629.223842661977, 3337.897768214323],
+  [5728.523842661977, 3337.897768214323],
+  [5728.523842661977, 3503.497768214323],
+  [5827.823842661977, 3503.497768214323],
+  [5927.1238426619775, 3669.097768214323],
+  [6026.423842661978, 3669.097768214323],
+  [6125.723842661978, 3503.497768214323],
+  [6125.723842661978, 3669.097768214323],
+  [6225.023842661978, 3503.497768214323],
+  [6225.023842661978, 3337.897768214323],
+  [6324.323842661978, 3337.897768214323],
+  [6423.623842661978, 3503.497768214323],
+  [6324.323842661978, 3669.097768214323],
+  [6225.023842661978, 3669.097768214323],
+  [6324.323842661978, 3834.697768214323],
+  [6423.623842661978, 3834.697768214323],
+  [6324.323842661978, 4000.297768214323],
+  [6225.023842661978, 3834.697768214323],
+  [6125.723842661978, 3834.697768214323],
+  [6125.723842661978, 4000.297768214323],
+  [6225.023842661978, 4000.297768214323],
+  [6225.023842661978, 4165.897768214322],
+  [6225.023842661978, 4331.497768214322],
+  [6125.723842661978, 4165.897768214322],
+  [6026.423842661978, 4000.2977682143223],
+  [5927.1238426619775, 4165.897768214322],
+  [6026.423842661978, 4331.497768214322],
+  [6026.423842661978, 4497.097768214321],
+  [5927.1238426619775, 4497.097768214321],
+  [5827.823842661977, 4662.697768214321],
+  [5728.523842661977, 4828.29776821432],
+  [5827.823842661977, 4828.29776821432],
+  [5927.1238426619775, 4828.29776821432],
+  [5927.1238426619775, 4662.697768214321],
+  [5827.823842661977, 4497.097768214321],
+  [5927.1238426619775, 4331.497768214322],
+  [5827.823842661977, 4165.897768214322],
+  [5728.523842661977, 4331.497768214322],
+  [5728.523842661977, 4165.897768214322],
+  [5629.223842661977, 4000.2977682143223],
+  [5629.223842661977, 3834.6977682143224],
+  [5529.923842661977, 3669.0977682143225],
+  [5629.223842661977, 3503.4977682143226],
+  [5728.523842661977, 3669.0977682143225],
+  [5827.823842661977, 3669.0977682143225],
+  [5927.1238426619775, 3834.6977682143224],
+  [5927.1238426619775, 4000.2977682143223],
+  [6026.423842661978, 4165.897768214322],
+  [6125.723842661978, 4331.497768214322],
+  [6225.023842661978, 4497.097768214321],
+  [6225.023842661978, 4662.697768214321],
+  [6324.323842661978, 4662.697768214321],
+  [6225.023842661978, 4828.29776821432],
+  [6324.323842661978, 4828.29776821432],
+  [6423.623842661978, 4828.29776821432],
+  [6324.323842661978, 4993.8977682143195],
+  [6225.023842661978, 5159.497768214319],
+  [6125.723842661978, 5159.497768214319],
+  [6026.423842661978, 5325.097768214318],
+  [5927.1238426619775, 5490.697768214318],
+  [6026.423842661978, 5656.297768214317],
+  [5927.1238426619775, 5821.897768214317],
+  [5927.1238426619775, 5987.497768214316],
+  [6026.423842661978, 5987.497768214316],
+  [6026.423842661978, 5821.897768214317],
+  [5927.1238426619775, 5656.297768214317],
+  [5827.823842661977, 5656.297768214317],
+  [5827.823842661977, 5490.697768214318],
+  [5728.523842661977, 5490.697768214318],
+  [5629.223842661977, 5325.097768214318],
+  [5629.223842661977, 5159.497768214319],
+  [5529.923842661977, 4993.8977682143195],
+  [5529.923842661977, 5159.497768214319],
+  [5629.223842661977, 4993.8977682143195],
+  [5629.223842661977, 4828.29776821432],
+  [5529.923842661977, 4662.697768214321],
+  [5430.623842661977, 4828.29776821432],
+  [5529.923842661977, 4828.29776821432],
+  [5629.223842661977, 4662.697768214321],
+  [5728.523842661977, 4662.697768214321],
+  [5629.223842661977, 4497.097768214321],
+  [5728.523842661977, 4497.097768214321],
+  [5827.823842661977, 4331.497768214322],
+  [10216.161365168813, 2951.605409896135],
+  [10116.861365168812, 2951.605409896135],
+  [10017.56136516881, 3117.205409896135],
+  [9918.26136516881, 3117.205409896135],
+  [9818.961365168809, 3117.205409896135],
+  [9719.661365168808, 3282.8054098961347],
+  [9620.361365168807, 3282.8054098961347],
+  [9620.361365168807, 3117.205409896135],
+  [9521.061365168805, 2951.605409896135],
+  [9521.061365168805, 2786.005409896135],
+  [9620.361365168807, 2786.005409896135],
+  [9719.661365168808, 2786.005409896135],
+  [9818.961365168809, 2620.405409896135],
+  [9918.26136516881, 2786.005409896135],
+  [9818.961365168809, 2951.605409896135],
+  [9818.961365168809, 2786.005409896135],
+  [9719.661365168808, 2620.405409896135],
+  [9719.661365168808, 2454.805409896135],
+  [9620.361365168807, 2289.2054098961353],
+  [9521.061365168805, 2123.6054098961354],
+  [9620.361365168807, 1958.0054098961352],
+  [9719.661365168808, 2123.6054098961354],
+  [9818.961365168809, 2289.2054098961353],
+  [9818.961365168809, 2123.6054098961354],
+  [9818.961365168809, 1958.0054098961352],
+  [9719.661365168808, 1958.0054098961352],
+  [9620.361365168807, 1792.405409896135],
+  [9620.361365168807, 1626.805409896135],
+  [9521.061365168805, 1461.2054098961348],
+  [9421.761365168804, 1295.6054098961347],
+  [9521.061365168805, 1130.0054098961346],
+  [9521.061365168805, 964.4054098961345],
+  [9421.761365168804, 964.4054098961345],
+  [9521.061365168805, 798.8054098961346],
+  [9620.361365168807, 798.8054098961346],
+  [9620.361365168807, 964.4054098961345],
+  [9620.361365168807, 1130.0054098961346],
+  [9620.361365168807, 1295.6054098961347],
+  [9620.361365168807, 1461.2054098961348],
+  [9719.661365168808, 1295.6054098961347],
+  [9818.961365168809, 1130.0054098961346],
+  [9918.26136516881, 964.4054098961345],
+  [9818.961365168809, 964.4054098961345],
+  [9918.26136516881, 798.8054098961346],
+  [10017.56136516881, 633.2054098961347],
+  [9918.26136516881, 467.60540989613474],
+  [9918.26136516881, 302.0054098961348],
+  [10017.56136516881, 302.0054098961348],
+  [10116.861365168812, 136.40540989613478],
+  [10116.861365168812, 302.0054098961348],
+  [10116.861365168812, 467.60540989613474],
+  [10116.861365168812, 633.2054098961347],
+  [10216.161365168813, 633.2054098961347],
+  [10216.161365168813, 798.8054098961346],
+  [10315.461365168814, 633.2054098961347],
+  [10315.461365168814, 798.8054098961346],
+  [10414.761365168815, 798.8054098961346],
+  [10514.061365168816, 633.2054098961347],
+  [10514.061365168816, 798.8054098961346],
+  [10414.761365168815, 964.4054098961345],
+  [10315.461365168814, 964.4054098961345],
+  [10216.161365168813, 964.4054098961345],
+  [10116.861365168812, 798.8054098961346],
+  [10017.56136516881, 798.8054098961346],
+  [10116.861365168812, 964.4054098961345],
+  [10216.161365168813, 1130.0054098961346],
+  [10116.861365168812, 1130.0054098961346],
+  [10216.161365168813, 1295.6054098961347],
+  [10216.161365168813, 1461.2054098961348],
+  [10315.461365168814, 1626.805409896135],
+  [10315.461365168814, 1792.405409896135],
+  [10216.161365168813, 1958.0054098961352],
+  [10216.161365168813, 1792.405409896135],
+  [10116.861365168812, 1792.405409896135],
+  [10017.56136516881, 1958.0054098961352],
+  [9918.26136516881, 2123.6054098961354],
+  [9918.26136516881, 1958.0054098961352],
+  [10017.56136516881, 2123.6054098961354],
+  [10116.861365168812, 2123.6054098961354],
+  [10017.56136516881, 2289.2054098961353],
+  [10017.56136516881, 2454.805409896135],
+  [10116.861365168812, 2289.2054098961353],
+  [10216.161365168813, 2454.805409896135],
+  [10315.461365168814, 2620.405409896135],
+  [10315.461365168814, 2454.805409896135],
+  [10315.461365168814, 2289.2054098961353],
+  [10414.761365168815, 2454.805409896135],
+  [10514.061365168816, 2620.405409896135],
+  [10613.361365168817, 2786.005409896135],
+  [10514.061365168816, 2786.005409896135],
+  [10613.361365168817, 2620.405409896135],
+  [10514.061365168816, 2454.805409896135],
+  [10514.061365168816, 2289.2054098961353],
+  [10613.361365168817, 2289.2054098961353],
+  [10712.661365168819, 2289.2054098961353],
+  [10811.96136516882, 2454.805409896135],
+  [10911.26136516882, 2289.2054098961353],
+  [10811.96136516882, 2289.2054098961353],
+  [10712.661365168819, 2454.805409896135],
+  [10712.661365168819, 2620.405409896135],
+  [10811.96136516882, 2786.005409896135],
+  [10911.26136516882, 2620.405409896135],
+  [10911.26136516882, 2786.005409896135],
+  [11010.561365168822, 2620.405409896135],
+  [10911.26136516882, 2454.805409896135],
+  [10811.96136516882, 2620.405409896135],
+  [10712.661365168819, 2786.005409896135],
+  [10811.96136516882, 2951.605409896135],
+  [10911.26136516882, 2951.605409896135],
+  [10811.96136516882, 3117.205409896135],
+  [10712.661365168819, 2951.605409896135],
+  [10613.361365168817, 2951.605409896135],
+  [10514.061365168816, 2951.605409896135],
+  [10414.761365168815, 3117.205409896135],
+  [10414.761365168815, 2951.605409896135],
+  [10315.461365168814, 2786.005409896135],
+  [10216.161365168813, 2620.405409896135],
+  [10216.161365168813, 2786.005409896135],
+  [10315.461365168814, 2951.605409896135],
+  [10315.461365168814, 3117.205409896135],
+  [10216.161365168813, 3117.205409896135],
+  [10116.861365168812, 3117.205409896135],
+  [10017.56136516881, 3282.8054098961347],
+  [9918.26136516881, 3448.4054098961346],
+  [9818.961365168809, 3448.4054098961346],
+  [9818.961365168809, 3614.0054098961346],
+  [9719.661365168808, 3448.4054098961346],
+  [9818.961365168809, 3282.8054098961347],
+  [9719.661365168808, 3117.205409896135],
+  [9620.361365168807, 2951.605409896135],
+  [9521.061365168805, 3117.205409896135],
+  [9521.061365168805, 3282.8054098961347],
+  [9421.761365168804, 3117.205409896135],
+  [9421.761365168804, 3282.8054098961347],
+  [9322.461365168803, 3117.205409896135],
+  [9421.761365168804, 2951.605409896135],
+  [9322.461365168803, 2951.605409896135],
+  [9223.161365168802, 2786.005409896135],
+  [9322.461365168803, 2620.405409896135],
+  [9421.761365168804, 2454.805409896135],
+  [9521.061365168805, 2289.2054098961353],
+  [9421.761365168804, 2123.6054098961354],
+  [9421.761365168804, 1958.0054098961352],
+  [9421.761365168804, 1792.405409896135],
+  [9521.061365168805, 1626.805409896135],
+  [9421.761365168804, 1626.805409896135],
+  [9322.461365168803, 1792.405409896135],
+  [9322.461365168803, 1626.805409896135],
+  [9322.461365168803, 1461.2054098961348],
+  [9421.761365168804, 1461.2054098961348],
+  [9521.061365168805, 1295.6054098961347],
+  [9421.761365168804, 1130.0054098961346],
+  [9322.461365168803, 964.4054098961345],
+  [9223.161365168802, 964.4054098961345],
+  [9223.161365168802, 798.8054098961346],
+  [9322.461365168803, 633.2054098961347],
+  [9421.761365168804, 798.8054098961346],
+  [9421.761365168804, 633.2054098961347],
+  [9521.061365168805, 633.2054098961347],
+  [9421.761365168804, 467.60540989613474],
+  [9421.761365168804, 302.0054098961348],
+  [9322.461365168803, 136.40540989613478],
+  [9223.161365168802, 302.0054098961348],
+  [9123.861365168801, 302.0054098961348],
+  [9024.5613651688, 136.40540989613478],
+  [9123.861365168801, 136.40540989613478],
+  [9223.161365168802, 136.40540989613478],
+  [9322.461365168803, 302.0054098961348],
+  [9421.761365168804, 136.40540989613478],
+  [9521.061365168805, 136.40540989613478],
+  [9620.361365168807, 136.40540989613478],
+  [9620.361365168807, 302.0054098961348],
+  [9521.061365168805, 302.0054098961348],
+  [9521.061365168805, 467.60540989613474],
+  [9620.361365168807, 467.60540989613474],
+  [9719.661365168808, 302.0054098961348],
+  [9719.661365168808, 136.40540989613478],
+  [9818.961365168809, 136.40540989613478],
+  [9918.26136516881, 136.40540989613478],
+  [10017.56136516881, 136.40540989613478],
+  [366.07287160549004, 5394.185440937868],
+  [465.37287160549005, 5394.185440937868],
+  [465.37287160549005, 5559.785440937868],
+  [366.0728716054901, 5559.785440937868],
+  [366.0728716054901, 5725.385440937867],
+  [266.77287160549014, 5725.385440937867],
+  [167.47287160549016, 5559.785440937868],
+  [266.77287160549014, 5559.785440937868],
+  [266.77287160549014, 5394.185440937868],
+  [266.77287160549014, 5228.585440937869],
+  [167.47287160549016, 5394.185440937868],
+  [68.17287160549016, 5228.585440937869],
+  [167.47287160549013, 5062.9854409378695],
+  [68.17287160549013, 4897.38544093787],
+  [167.47287160549013, 4731.785440937871],
+  [266.77287160549014, 4731.785440937871],
+  [167.47287160549016, 4566.185440937871],
+  [68.17287160549016, 4566.185440937871],
+  [68.17287160549016, 4731.785440937871],
+  [167.47287160549013, 4897.38544093787],
+  [68.17287160549013, 5062.9854409378695],
+  [167.47287160549013, 5228.585440937869],
+  [266.77287160549014, 5062.9854409378695],
+  [366.0728716054901, 4897.38544093787],
+  [266.77287160549014, 4897.38544093787],
+  [366.0728716054901, 4731.785440937871],
+  [465.37287160549005, 4897.38544093787],
+  [366.0728716054901, 5062.9854409378695],
+  [465.37287160549005, 5062.9854409378695],
+  [366.0728716054901, 5228.585440937869],
+  [465.37287160549005, 5228.585440937869],
+  [564.6728716054901, 5394.185440937868],
+  [663.9728716054901, 5228.585440937869],
+  [564.6728716054901, 5062.9854409378695],
+  [663.9728716054901, 4897.38544093787],
+  [763.2728716054902, 4731.785440937871],
+  [862.5728716054903, 4566.185440937871],
+  [961.8728716054903, 4731.785440937871],
+  [862.5728716054903, 4731.785440937871],
+  [961.8728716054903, 4566.185440937871],
+  [862.5728716054903, 4400.585440937872],
+  [961.8728716054903, 4234.985440937872],
+  [1061.1728716054904, 4400.585440937872],
+  [1160.4728716054904, 4234.985440937872],
+  [1160.4728716054904, 4400.585440937872],
+  [1259.7728716054903, 4234.985440937872],
+  [1359.0728716054903, 4069.3854409378723],
+  [1458.3728716054902, 4069.3854409378723],
+  [1557.6728716054902, 4234.985440937872],
+  [1656.9728716054901, 4400.585440937872],
+  [1557.6728716054902, 4400.585440937872],
+  [1458.3728716054902, 4400.585440937872],
+  [1359.0728716054903, 4566.185440937871],
+  [1359.0728716054903, 4731.785440937871],
+  [1259.7728716054903, 4731.785440937871],
+  [1359.0728716054903, 4897.38544093787],
+  [1458.3728716054902, 4731.785440937871],
+  [1458.3728716054902, 4897.38544093787],
+  [1359.0728716054903, 5062.9854409378695],
+  [1259.7728716054903, 5228.585440937869],
+  [1259.7728716054903, 5062.9854409378695],
+  [1259.7728716054903, 4897.38544093787],
+  [1160.4728716054904, 5062.9854409378695],
+  [1160.4728716054904, 5228.585440937869],
+  [1061.1728716054904, 5228.585440937869],
+  [1061.1728716054904, 5062.9854409378695],
+  [961.8728716054903, 5228.585440937869],
+  [862.5728716054903, 5062.9854409378695],
+  [961.8728716054903, 5062.9854409378695],
+  [961.8728716054903, 4897.38544093787],
+  [1061.1728716054904, 4897.38544093787],
+  [1160.4728716054904, 4731.785440937871],
+  [1259.7728716054903, 4566.185440937871],
+  [1359.0728716054903, 4400.585440937872],
+  [1458.3728716054902, 4566.185440937871],
+  [1557.6728716054902, 4566.185440937871],
+  [1656.9728716054901, 4731.785440937871],
+  [1557.6728716054902, 4897.38544093787],
+  [1458.3728716054902, 5062.9854409378695],
+  [1557.6728716054902, 5228.585440937869],
+  [1656.9728716054901, 5062.9854409378695],
+  [1756.27287160549, 5062.9854409378695],
+  [1756.27287160549, 4897.38544093787],
+  [1855.57287160549, 5062.9854409378695],
+  [1954.87287160549, 4897.38544093787],
+  [2054.17287160549, 5062.9854409378695],
+  [1954.87287160549, 5062.9854409378695],
+  [2054.17287160549, 5228.585440937869],
+  [2153.4728716054897, 5228.585440937869],
+  [2252.7728716054894, 5062.9854409378695],
+  [2352.072871605489, 5228.585440937869],
+  [2451.372871605489, 5394.185440937868],
+  [2352.072871605489, 5394.185440937868],
+  [2252.7728716054894, 5228.585440937869],
+  [2153.4728716054897, 5062.9854409378695],
+  [2153.4728716054897, 4897.38544093787],
+  [2252.7728716054894, 4897.38544093787],
+  [2352.072871605489, 4731.785440937871],
+  [2252.7728716054894, 4731.785440937871],
+  [2153.4728716054897, 4731.785440937871],
+  [2054.17287160549, 4566.185440937871],
+  [1954.87287160549, 4731.785440937871],
+  [1855.57287160549, 4897.38544093787],
+  [1756.27287160549, 4731.785440937871],
+  [1855.57287160549, 4731.785440937871],
+  [1855.57287160549, 4566.185440937871],
+  [1756.27287160549, 4566.185440937871],
+  [1656.9728716054901, 4566.185440937871],
+  [1557.6728716054902, 4731.785440937871],
+  [1656.9728716054901, 4897.38544093787],
+  [1557.6728716054902, 5062.9854409378695],
+  [1458.3728716054902, 5228.585440937869],
+  [1359.0728716054903, 5228.585440937869],
+  [1259.7728716054903, 5394.185440937868],
+  [1259.7728716054903, 5559.785440937868],
+  [1160.4728716054904, 5559.785440937868],
+  [1061.1728716054904, 5559.785440937868],
+  [1160.4728716054904, 5725.385440937867],
+  [1259.7728716054903, 5725.385440937867],
+  [1359.0728716054903, 5559.785440937868],
+  [1458.3728716054902, 5725.385440937867],
+  [1458.3728716054902, 5559.785440937868],
+  [1359.0728716054903, 5725.385440937867],
+  [1259.7728716054903, 5890.985440937867],
+  [1359.0728716054903, 5890.985440937867],
+  [1259.7728716054903, 6056.585440937866],
+  [1359.0728716054903, 6222.185440937866],
+  [1458.3728716054902, 6222.185440937866],
+  [1458.3728716054902, 6387.785440937865],
+  [1557.6728716054902, 6222.185440937866],
+  [1557.6728716054902, 6387.785440937865],
+  [1656.9728716054901, 6222.185440937866],
+  [1756.27287160549, 6056.585440937866],
+  [1855.57287160549, 5890.985440937867],
+  [1756.27287160549, 5890.985440937867],
+  [1656.9728716054901, 6056.585440937866],
+  [1557.6728716054902, 5890.985440937867],
+  [1458.3728716054902, 5890.985440937867],
+  [1359.0728716054903, 6056.585440937866],
+  [1259.7728716054903, 6222.185440937866],
+  [1160.4728716054904, 6056.585440937866],
+  [1061.1728716054904, 5890.985440937867],
+  [1061.1728716054904, 6056.585440937866],
+  [1160.4728716054904, 6222.185440937866],
+  [1061.1728716054904, 6222.185440937866],
+  [961.8728716054903, 6222.185440937866],
+  [961.8728716054903, 6056.585440937866],
+  [961.8728716054903, 5890.985440937867],
+  [961.8728716054903, 5725.385440937867],
+  [862.5728716054903, 5559.785440937868],
+  [763.2728716054902, 5725.385440937867],
+  [862.5728716054903, 5725.385440937867],
+  [763.2728716054902, 5890.985440937867],
+  [663.9728716054901, 5725.385440937867],
+  [763.2728716054902, 5559.785440937868],
+  [763.2728716054902, 5394.185440937868],
+  [862.5728716054903, 5228.585440937869],
+  [961.8728716054903, 5394.185440937868],
+  [1061.1728716054904, 5394.185440937868],
+  [961.8728716054903, 5559.785440937868],
+  [862.5728716054903, 5394.185440937868],
+  [763.2728716054902, 5228.585440937869],
+  [663.9728716054901, 5062.9854409378695],
+  [763.2728716054902, 5062.9854409378695],
+  [763.2728716054902, 4897.38544093787],
+  [663.9728716054901, 4731.785440937871],
+  [564.6728716054901, 4731.785440937871],
+  [465.37287160549005, 4566.185440937871],
+  [366.0728716054901, 4566.185440937871],
+  [465.37287160549005, 4731.785440937871],
+  [564.6728716054901, 4566.185440937871],
+  [465.37287160549005, 4400.585440937872],
+  [366.0728716054901, 4400.585440937872],
+  [266.77287160549014, 4234.985440937872],
+  [167.47287160549016, 4234.985440937872],
+  [266.77287160549014, 4400.585440937872],
+  [266.77287160549014, 4566.185440937871],
+  [167.47287160549016, 4400.585440937872],
+  [68.17287160549016, 4234.985440937872],
+  [167.47287160549013, 4069.3854409378723],
+  [68.17287160549013, 3903.7854409378724],
+  [68.17287160549013, 4069.3854409378723],
+  [167.47287160549013, 3903.7854409378724],
+  [266.77287160549014, 3903.7854409378724],
+  [366.0728716054901, 3738.1854409378725],
+  [266.77287160549014, 3738.1854409378725],
+  [266.77287160549014, 3572.5854409378726],
+  [167.47287160549016, 3406.9854409378727],
+  [167.47287160549016, 3241.3854409378728],
+  [266.77287160549014, 3241.3854409378728],
+  [266.77287160549014, 3406.9854409378727],
+  [366.0728716054901, 3572.5854409378726],
+  [465.37287160549005, 3738.1854409378725],
+  [465.37287160549005, 3903.7854409378724],
+  [366.0728716054901, 4069.3854409378723],
+  [366.0728716054901, 4234.985440937872],
+  [465.37287160549005, 4234.985440937872],
+  [564.6728716054901, 4069.3854409378723],
+  [465.37287160549005, 4069.3854409378723],
+  [564.6728716054901, 4234.985440937872],
+  [663.9728716054901, 4069.3854409378723],
+  [663.9728716054901, 4234.985440937872],
+  [663.9728716054901, 4400.585440937872],
+  [763.2728716054902, 4566.185440937871],
+  [763.2728716054902, 4400.585440937872],
+  [663.9728716054901, 4566.185440937871],
+  [564.6728716054901, 4400.585440937872],
+  [19431.915041401327, 3495.506142643713],
+  [19332.61504140133, 3661.1061426437127],
+  [19431.915041401327, 3661.1061426437127],
+  [19531.215041401327, 3661.1061426437127],
+  [19630.515041401326, 3495.506142643713],
+  [19630.515041401326, 3661.1061426437127],
+  [19729.815041401325, 3826.7061426437126],
+  [19630.515041401326, 3826.7061426437126],
+  [19729.815041401325, 3992.3061426437125],
+  [19630.515041401326, 3992.3061426437125],
+  [19630.515041401326, 4157.906142643712],
+  [19630.515041401326, 4323.506142643711],
+  [19531.215041401327, 4157.906142643712],
+  [19431.915041401327, 4323.506142643711],
+  [19531.215041401327, 4489.106142643711],
+  [19431.915041401327, 4654.70614264371],
+  [19332.61504140133, 4654.70614264371],
+  [19332.61504140133, 4820.30614264371],
+  [19332.61504140133, 4985.906142643709],
+  [19233.31504140133, 4985.906142643709],
+  [19134.01504140133, 5151.506142643709],
+  [19034.71504140133, 5151.506142643709],
+  [19134.01504140133, 5317.106142643708],
+  [19034.71504140133, 5317.106142643708],
+  [19034.71504140133, 5482.706142643708],
+  [18935.41504140133, 5648.306142643707],
+  [18836.115041401332, 5813.9061426437065],
+  [18836.115041401332, 5979.506142643706],
+  [18935.41504140133, 5979.506142643706],
+  [19034.71504140133, 6145.106142643705],
+  [19034.71504140133, 5979.506142643706],
+  [19034.71504140133, 5813.9061426437065],
+  [19134.01504140133, 5648.306142643707],
+  [19233.31504140133, 5648.306142643707],
+  [19134.01504140133, 5813.9061426437065],
+  [19134.01504140133, 5979.506142643706],
+  [19233.31504140133, 5813.9061426437065],
+  [19233.31504140133, 5979.506142643706],
+  [19332.61504140133, 6145.106142643705],
+  [19332.61504140133, 6310.706142643705],
+  [19233.31504140133, 6310.706142643705],
+  [19233.31504140133, 6476.306142643704],
+  [19332.61504140133, 6476.306142643704],
+  [19431.915041401327, 6641.906142643704],
+  [19332.61504140133, 6807.506142643703],
+  [19332.61504140133, 6641.906142643704],
+  [19431.915041401327, 6476.306142643704],
+  [19431.915041401327, 6310.706142643705],
+  [19531.215041401327, 6145.106142643705],
+  [19431.915041401327, 5979.506142643706],
+  [19431.915041401327, 6145.106142643705],
+  [19531.215041401327, 5979.506142643706],
+  [19630.515041401326, 5813.9061426437065],
+  [19630.515041401326, 5979.506142643706],
+  [19729.815041401325, 5813.9061426437065],
+  [19829.115041401325, 5979.506142643706],
+  [19729.815041401325, 5979.506142643706],
+  [19729.815041401325, 6145.106142643705],
+  [19729.815041401325, 6310.706142643705],
+  [19630.515041401326, 6476.306142643704],
+  [19729.815041401325, 6476.306142643704],
+  [19630.515041401326, 6310.706142643705],
+  [19531.215041401327, 6310.706142643705],
+  [19531.215041401327, 6476.306142643704],
+  [19630.515041401326, 6641.906142643704],
+  [19729.815041401325, 6807.506142643703],
+  [19829.115041401325, 6973.106142643703],
+  [19928.415041401324, 6973.106142643703],
+  [19928.415041401324, 7138.706142643702],
+  [20027.715041401323, 7138.706142643702],
+  [20027.715041401323, 7304.306142643702],
+  [19928.415041401324, 7304.306142643702],
+  [19829.115041401325, 7304.306142643702],
+  [19829.115041401325, 7469.906142643701],
+  [19928.415041401324, 7469.906142643701],
+  [19928.415041401324, 7635.5061426437005],
+  [19928.415041401324, 7801.1061426437],
+  [20027.715041401323, 7635.5061426437005],
+  [20027.715041401323, 7801.1061426437],
+  [20127.015041401322, 7801.1061426437],
+  [20226.31504140132, 7801.1061426437],
+  [20325.61504140132, 7801.1061426437],
+  [20226.31504140132, 7635.5061426437005],
+  [20226.31504140132, 7469.906142643701],
+  [20226.31504140132, 7304.306142643702],
+  [20127.015041401322, 7304.306142643702],
+  [20027.715041401323, 7469.906142643701],
+  [20127.015041401322, 7469.906142643701],
+  [20127.015041401322, 7635.5061426437005],
+  [2748.790306732237, 2362.9553147492866],
+  [2848.0903067322365, 2528.5553147492865],
+  [2748.790306732237, 2694.1553147492864],
+  [2649.490306732237, 2859.7553147492863],
+  [2748.790306732237, 3025.355314749286],
+  [2848.0903067322365, 2859.7553147492863],
+  [2848.0903067322365, 2694.1553147492864],
+  [2947.3903067322362, 2694.1553147492864],
+  [3046.690306732236, 2859.7553147492863],
+  [3145.9903067322357, 2694.1553147492864],
+  [3145.9903067322357, 2528.5553147492865],
+  [3046.690306732236, 2694.1553147492864],
+  [3145.9903067322357, 2859.7553147492863],
+  [3046.690306732236, 3025.355314749286],
+  [3145.9903067322357, 3025.355314749286],
+  [3245.2903067322354, 3190.955314749286],
+  [3245.2903067322354, 3356.555314749286],
+  [3344.590306732235, 3522.155314749286],
+  [3443.890306732235, 3356.555314749286],
+  [3543.1903067322346, 3356.555314749286],
+  [3642.4903067322343, 3190.955314749286],
+  [3741.790306732234, 3025.355314749286],
+  [3741.790306732234, 2859.7553147492863],
+  [3841.090306732234, 3025.355314749286],
+  [3841.090306732234, 3190.955314749286],
+  [3741.790306732234, 3190.955314749286],
+  [3642.4903067322343, 3025.355314749286],
+  [3543.1903067322346, 3025.355314749286],
+  [3543.1903067322346, 2859.7553147492863],
+  [3443.890306732235, 3025.355314749286],
+  [3443.890306732235, 3190.955314749286],
+  [3543.1903067322346, 3190.955314749286],
+  [3642.4903067322343, 3356.555314749286],
+  [3543.1903067322346, 3522.155314749286],
+  [3443.890306732235, 3687.755314749286],
+  [3443.890306732235, 3853.3553147492858],
+  [3344.590306732235, 3687.755314749286],
+  [3245.2903067322354, 3853.3553147492858],
+  [3245.2903067322354, 3687.755314749286],
+  [3145.9903067322357, 3687.755314749286],
+  [3046.690306732236, 3853.3553147492858],
+  [3145.9903067322357, 4018.9553147492857],
+  [3145.9903067322357, 3853.3553147492858],
+  [3046.690306732236, 3687.755314749286],
+  [3145.9903067322357, 3522.155314749286],
+  [3145.9903067322357, 3356.555314749286],
+  [3145.9903067322357, 3190.955314749286],
+  [3046.690306732236, 3190.955314749286],
+  [3046.690306732236, 3356.555314749286],
+  [2947.3903067322362, 3356.555314749286],
+  [2848.0903067322365, 3190.955314749286],
+  [2947.3903067322362, 3025.355314749286],
+  [2848.0903067322365, 3025.355314749286],
+  [2748.790306732237, 2859.7553147492863],
+  [2649.490306732237, 2694.1553147492864],
+  [2748.790306732237, 2528.5553147492865],
+  [2848.0903067322365, 2362.9553147492866],
+  [2748.790306732237, 2197.3553147492867],
+  [2649.490306732237, 2362.9553147492866],
+  [2649.490306732237, 2197.3553147492867],
+  [2550.1903067322373, 2362.9553147492866],
+  [2450.8903067322376, 2362.9553147492866],
+  [2351.590306732238, 2528.5553147492865],
+  [2252.290306732238, 2528.5553147492865],
+  [2351.590306732238, 2362.9553147492866],
+  [2252.290306732238, 2197.3553147492867],
+  [2351.590306732238, 2197.3553147492867],
+  [2351.590306732238, 2031.7553147492865],
+  [2351.590306732238, 1866.1553147492864],
+  [2252.290306732238, 1866.1553147492864],
+  [2351.590306732238, 1700.5553147492863],
+  [2450.8903067322376, 1534.9553147492861],
+  [2351.590306732238, 1369.355314749286],
+  [2252.290306732238, 1203.7553147492858],
+  [2252.290306732238, 1369.355314749286],
+  [2252.290306732238, 1534.9553147492861],
+  [2152.9903067322384, 1369.355314749286],
+  [2053.6903067322387, 1369.355314749286],
+  [1954.3903067322387, 1203.7553147492858],
+  [1855.0903067322388, 1203.7553147492858],
+  [1755.7903067322388, 1038.1553147492857],
+  [1656.4903067322389, 1038.1553147492857],
+  [1557.190306732239, 872.5553147492857],
+  [1457.890306732239, 1038.1553147492857],
+  [1457.890306732239, 872.5553147492857],
+  [1457.890306732239, 706.9553147492858],
+  [1557.190306732239, 706.9553147492858],
+  [1656.4903067322389, 872.5553147492857],
+  [1656.4903067322389, 706.9553147492858],
+  [1755.7903067322388, 706.9553147492858],
+  [1656.4903067322389, 541.3553147492859],
+  [1557.190306732239, 375.7553147492859],
+  [1656.4903067322389, 210.1553147492859],
+  [1755.7903067322388, 44.55531474928592],
+  [1656.4903067322389, 44.55531474928592],
+  [1557.190306732239, 210.1553147492859],
+  [1457.890306732239, 210.1553147492859],
+  [1457.890306732239, 44.55531474928592],
+  [1358.590306732239, 210.1553147492859],
+  [1358.590306732239, 375.75531474928584],
+  [1259.290306732239, 210.15531474928585],
+  [1259.290306732239, 375.75531474928584],
+  [1259.290306732239, 541.3553147492859],
+  [1358.590306732239, 706.9553147492858],
+  [1358.590306732239, 872.5553147492857],
+  [1259.290306732239, 706.9553147492858],
+  [1259.290306732239, 872.5553147492857],
+  [1259.290306732239, 1038.1553147492857],
+  [1358.590306732239, 1203.7553147492858],
+  [1358.590306732239, 1038.1553147492857],
+  [1457.890306732239, 1203.7553147492858],
+  [1557.190306732239, 1369.355314749286],
+  [1656.4903067322389, 1203.7553147492858],
+  [1557.190306732239, 1203.7553147492858],
+  [1557.190306732239, 1038.1553147492857],
+  [17254.572515546668, 1460.5807801244923],
+  [17353.872515546667, 1626.1807801244925],
+  [17453.172515546667, 1791.7807801244926],
+  [17552.472515546666, 1791.7807801244926],
+  [17453.172515546667, 1626.1807801244925],
+  [17353.872515546667, 1791.7807801244926],
+  [17453.172515546667, 1957.3807801244927],
+  [17353.872515546667, 2122.980780124493],
+  [17453.172515546667, 2288.580780124493],
+  [17353.872515546667, 2454.1807801244927],
+  [17453.172515546667, 2619.7807801244926],
+  [17552.472515546666, 2619.7807801244926],
+  [17453.172515546667, 2785.3807801244925],
+  [17353.872515546667, 2619.7807801244926],
+  [17254.572515546668, 2454.1807801244927],
+  [17254.572515546668, 2288.580780124493],
+  [17353.872515546667, 2288.580780124493],
+  [17453.172515546667, 2122.980780124493],
+  [17552.472515546666, 2288.580780124493],
+  [17552.472515546666, 2454.1807801244927],
+  [17453.172515546667, 2454.1807801244927],
+  [4447.67624466283, 4761.1416826913],
+  [4546.97624466283, 4595.541682691301],
+  [4546.97624466283, 4429.941682691301],
+  [4447.67624466283, 4429.941682691301],
+  [4447.67624466283, 4595.541682691301],
+  [4348.37624466283, 4595.541682691301],
+  [4249.07624466283, 4595.541682691301],
+  [4348.37624466283, 4761.1416826913],
+  [4249.07624466283, 4761.1416826913],
+  [4348.37624466283, 4926.7416826912995],
+  [4348.37624466283, 5092.341682691299],
+  [4447.67624466283, 5257.941682691298],
+  [4546.97624466283, 5257.941682691298],
+  [4646.27624466283, 5092.341682691299],
+  [4546.97624466283, 5092.341682691299],
+  [4646.27624466283, 4926.7416826912995],
+  [4646.27624466283, 4761.1416826913],
+  [4546.97624466283, 4761.1416826913],
+  [4646.27624466283, 4595.541682691301],
+  [4745.5762446628305, 4595.541682691301],
+  [4646.27624466283, 4429.941682691301],
+  [4745.5762446628305, 4429.941682691301],
+  [4844.876244662831, 4595.541682691301],
+  [4745.5762446628305, 4761.1416826913],
+  [4745.5762446628305, 4926.7416826912995],
+  [4844.876244662831, 4761.1416826913],
+  [4944.176244662831, 4761.1416826913],
+  [5043.476244662831, 4926.7416826912995],
+  [5043.476244662831, 4761.1416826913],
+  [5142.776244662831, 4926.7416826912995],
+  [5142.776244662831, 4761.1416826913],
+  [5242.076244662831, 4595.541682691301],
+  [5142.776244662831, 4595.541682691301],
+  [5242.076244662831, 4429.941682691301],
+  [5242.076244662831, 4264.341682691302],
+  [5142.776244662831, 4429.941682691301],
+  [5043.476244662831, 4595.541682691301],
+  [5043.476244662831, 4429.941682691301],
+  [5043.476244662831, 4264.341682691302],
+  [5142.776244662831, 4098.741682691302],
+  [5043.476244662831, 4098.741682691302],
+  [4944.176244662831, 3933.1416826913023],
+  [4944.176244662831, 4098.741682691302],
+  [4944.176244662831, 4264.341682691302],
+  [4844.876244662831, 4098.741682691302],
+  [4745.5762446628305, 4264.341682691302],
+  [4646.27624466283, 4098.741682691302],
+  [4546.97624466283, 3933.1416826913023],
+  [4447.67624466283, 4098.741682691302],
+  [4546.97624466283, 4264.341682691302],
+  [4447.67624466283, 4264.341682691302],
+  [4546.97624466283, 4098.741682691302],
+  [4646.27624466283, 3933.1416826913023],
+  [4546.97624466283, 3767.5416826913024],
+  [4447.67624466283, 3601.9416826913025],
+  [4447.67624466283, 3767.5416826913024],
+  [4348.37624466283, 3767.5416826913024],
+  [4348.37624466283, 3933.1416826913023],
+  [4249.07624466283, 3767.5416826913024],
+  [4249.07624466283, 3933.1416826913023],
+  [4149.776244662829, 3933.1416826913023],
+  [4050.4762446628297, 4098.741682691302],
+  [4050.4762446628297, 3933.1416826913023],
+  [3951.17624466283, 3933.1416826913023],
+  [3951.17624466283, 4098.741682691302],
+  [3851.8762446628302, 4264.341682691302],
+  [3851.8762446628302, 4098.741682691302],
+  [3752.5762446628305, 4098.741682691302],
+  [3653.276244662831, 4264.341682691302],
+  [3553.976244662831, 4429.941682691301],
+  [3553.976244662831, 4595.541682691301],
+  [3454.6762446628313, 4429.941682691301],
+  [3553.976244662831, 4264.341682691302],
+  [3653.276244662831, 4429.941682691301],
+  [3752.5762446628305, 4264.341682691302],
+  [3752.5762446628305, 4429.941682691301],
+  [3851.8762446628302, 4595.541682691301],
+  [3851.8762446628302, 4429.941682691301],
+  [3951.17624466283, 4429.941682691301],
+  [4050.4762446628297, 4264.341682691302],
+  [4149.776244662829, 4098.741682691302],
+  [4249.07624466283, 4264.341682691302],
+  [4348.37624466283, 4098.741682691302],
+  [4447.67624466283, 3933.1416826913023],
+  [9574.088902135607, 7352.26293905581],
+  [9474.788902135606, 7352.26293905581],
+  [9375.488902135605, 7186.662939055811],
+  [9474.788902135606, 7021.0629390558115],
+  [9574.088902135607, 7021.0629390558115],
+  [9474.788902135606, 7186.662939055811],
+  [9574.088902135607, 7186.662939055811],
+  [9673.388902135608, 7021.0629390558115],
+  [9673.388902135608, 6855.462939055812],
+  [9772.68890213561, 6689.862939055813],
+  [9673.388902135608, 6689.862939055813],
+  [9772.68890213561, 6524.262939055813],
+  [9871.98890213561, 6358.662939055814],
+  [9971.288902135611, 6524.262939055813],
+  [10070.588902135612, 6358.662939055814],
+  [10070.588902135612, 6193.062939055814],
+  [9971.288902135611, 6027.462939055815],
+  [9971.288902135611, 5861.862939055815],
+  [9871.98890213561, 5861.862939055815],
+  [9871.98890213561, 5696.262939055816],
+  [9971.288902135611, 5530.662939055816],
+  [10070.588902135612, 5530.662939055816],
+  [10070.588902135612, 5696.262939055816],
+  [10169.888902135614, 5861.862939055815],
+  [10169.888902135614, 5696.262939055816],
+  [10070.588902135612, 5861.862939055815],
+  [10169.888902135614, 6027.462939055815],
+  [10169.888902135614, 6193.062939055814],
+  [10269.188902135615, 6027.462939055815],
+  [10269.188902135615, 5861.862939055815],
+  [10368.488902135616, 6027.462939055815],
+  [10269.188902135615, 6193.062939055814],
+  [10269.188902135615, 6358.662939055814],
+  [10169.888902135614, 6358.662939055814],
+  [10070.588902135612, 6524.262939055813],
+  [10070.588902135612, 6689.862939055813],
+  [9971.288902135611, 6855.462939055812],
+  [9971.288902135611, 7021.0629390558115],
+  [10070.588902135612, 7186.662939055811],
+  [10169.888902135614, 7186.662939055811],
+  [10269.188902135615, 7186.662939055811],
+  [10169.888902135614, 7352.26293905581],
+  [10070.588902135612, 7352.26293905581],
+  [10169.888902135614, 7517.86293905581],
+  [10169.888902135614, 7683.462939055809],
+  [10269.188902135615, 7517.86293905581],
+  [10368.488902135616, 7683.462939055809],
+  [10467.788902135617, 7683.462939055809],
+  [10368.488902135616, 7517.86293905581],
+  [10269.188902135615, 7352.26293905581],
+  [10368.488902135616, 7352.26293905581],
+  [10368.488902135616, 7186.662939055811],
+  [10368.488902135616, 7021.0629390558115],
+  [10368.488902135616, 6855.462939055812],
+  [10269.188902135615, 6855.462939055812],
+  [10169.888902135614, 6855.462939055812],
+  [10169.888902135614, 7021.0629390558115],
+  [10070.588902135612, 7021.0629390558115],
+  [10070.588902135612, 6855.462939055812],
+  [10169.888902135614, 6689.862939055813],
+  [10269.188902135615, 6689.862939055813],
+  [10169.888902135614, 6524.262939055813],
+  [10269.188902135615, 6524.262939055813],
+  [10368.488902135616, 6524.262939055813],
+  [10368.488902135616, 6358.662939055814],
+  [10467.788902135617, 6358.662939055814],
+  [10467.788902135617, 6193.062939055814],
+  [10567.088902135618, 6358.662939055814],
+  [10567.088902135618, 6193.062939055814],
+  [10666.388902135619, 6193.062939055814],
+  [10666.388902135619, 6358.662939055814],
+  [10567.088902135618, 6524.262939055813],
+  [10467.788902135617, 6524.262939055813],
+  [10567.088902135618, 6689.862939055813],
+  [10467.788902135617, 6855.462939055812],
+  [10567.088902135618, 7021.0629390558115],
+  [10467.788902135617, 7021.0629390558115],
+  [10567.088902135618, 6855.462939055812],
+  [10467.788902135617, 6689.862939055813],
+  [10368.488902135616, 6689.862939055813],
+  [1073.6944354374714, 1154.3681204032646],
+  [974.3944354374713, 1319.9681204032647],
+  [875.0944354374712, 1319.9681204032647],
+  [775.7944354374712, 1154.3681204032646],
+  [775.7944354374712, 988.7681204032646],
+  [875.0944354374712, 823.1681204032647],
+  [875.0944354374712, 657.5681204032647],
+  [775.7944354374712, 823.1681204032647],
+  [676.4944354374711, 657.5681204032647],
+  [676.4944354374711, 491.9681204032648],
+  [775.7944354374712, 657.5681204032647],
+  [676.4944354374711, 823.1681204032647],
+  [676.4944354374711, 988.7681204032646],
+  [577.194435437471, 823.1681204032647],
+  [577.194435437471, 988.7681204032646],
+  [577.194435437471, 1154.3681204032646],
+  [676.4944354374711, 1319.9681204032647],
+  [577.194435437471, 1319.9681204032647],
+  [477.89443543747103, 1319.9681204032647],
+  [577.194435437471, 1485.5681204032649],
+  [477.89443543747103, 1651.168120403265],
+  [577.194435437471, 1816.7681204032651],
+  [477.89443543747103, 1816.7681204032651],
+  [378.5944354374711, 1982.3681204032653],
+  [378.5944354374711, 2147.9681204032654],
+  [279.2944354374711, 2313.5681204032653],
+  [179.99443543747114, 2147.9681204032654],
+  [80.69443543747114, 2313.5681204032653],
+  [80.69443543747114, 2479.168120403265],
+  [179.9944354374711, 2644.768120403265],
+  [179.9944354374711, 2479.168120403265],
+  [179.9944354374711, 2313.5681204032653],
+  [80.69443543747111, 2147.9681204032654],
+  [80.69443543747111, 1982.3681204032653],
+  [179.9944354374711, 1982.3681204032653],
+  [179.9944354374711, 1816.7681204032651],
+  [80.69443543747111, 1816.7681204032651],
+  [179.9944354374711, 1651.168120403265],
+  [80.69443543747111, 1485.5681204032649],
+  [80.69443543747111, 1319.9681204032647],
+  [179.9944354374711, 1154.3681204032646],
+  [80.69443543747111, 1154.3681204032646],
+  [179.9944354374711, 988.7681204032646],
+  [279.2944354374711, 823.1681204032647],
+  [378.5944354374711, 657.5681204032647],
+  [378.5944354374711, 823.1681204032647],
+  [477.89443543747103, 823.1681204032647],
+  [477.89443543747103, 657.5681204032647],
+  [378.5944354374711, 491.9681204032648],
+  [477.89443543747103, 326.3681204032648],
+  [477.89443543747103, 160.76812040326482],
+  [378.5944354374711, 160.76812040326482],
+  [279.2944354374711, 326.3681204032648],
+  [179.99443543747114, 491.9681204032648],
+  [179.99443543747114, 326.3681204032648],
+  [279.2944354374711, 491.9681204032648],
+  [279.2944354374711, 657.5681204032647],
+  [179.99443543747114, 823.1681204032647],
+  [279.2944354374711, 988.7681204032646],
+  [279.2944354374711, 1154.3681204032646],
+  [378.5944354374711, 1319.9681204032647],
+  [477.89443543747103, 1485.5681204032649],
+  [577.194435437471, 1651.168120403265],
+  [676.4944354374711, 1651.168120403265],
+  [775.7944354374712, 1816.7681204032651],
+  [676.4944354374711, 1816.7681204032651],
+  [775.7944354374712, 1651.168120403265],
+  [875.0944354374712, 1651.168120403265],
+  [974.3944354374713, 1651.168120403265],
+  [875.0944354374712, 1485.5681204032649],
+  [775.7944354374712, 1485.5681204032649],
+  [676.4944354374711, 1485.5681204032649],
+  [775.7944354374712, 1319.9681204032647],
+  [676.4944354374711, 1154.3681204032646],
+  [3138.413562431697, 2355.845602060523],
+  [3039.113562431697, 2521.445602060523],
+  [3039.113562431697, 2355.845602060523],
+  [3039.113562431697, 2190.245602060523],
+  [3138.413562431697, 2024.645602060523],
+  [3237.7135624316966, 1859.045602060523],
+  [3237.7135624316966, 2024.645602060523],
+  [3337.0135624316963, 1859.045602060523],
+  [3337.0135624316963, 1693.4456020605228],
+  [3436.313562431696, 1527.8456020605227],
+  [3535.6135624316958, 1693.4456020605228],
+  [3535.6135624316958, 1859.045602060523],
+  [3634.9135624316955, 2024.645602060523],
+  [3734.213562431695, 2190.245602060523],
+  [3634.9135624316955, 2190.245602060523],
+  [3535.6135624316958, 2190.245602060523],
+  [3535.6135624316958, 2355.845602060523],
+  [3535.6135624316958, 2521.445602060523],
+  [3436.313562431696, 2687.045602060523],
+  [3436.313562431696, 2852.645602060523],
+  [3535.6135624316958, 2687.045602060523],
+  [3634.9135624316955, 2521.445602060523],
+  [3634.9135624316955, 2355.845602060523],
+  [3734.213562431695, 2355.845602060523],
+  [3833.513562431695, 2190.245602060523],
+  [3932.8135624316947, 2024.645602060523],
+  [3833.513562431695, 1859.045602060523],
+  [3833.513562431695, 1693.4456020605228],
+  [3734.213562431695, 1859.045602060523],
+  [3734.213562431695, 1693.4456020605228],
+  [3734.213562431695, 1527.8456020605227],
+  [3634.9135624316955, 1527.8456020605227],
+  [3634.9135624316955, 1693.4456020605228],
+  [3535.6135624316958, 1527.8456020605227],
+  [3634.9135624316955, 1362.2456020605225],
+  [3535.6135624316958, 1362.2456020605225],
+  [3436.313562431696, 1196.6456020605224],
+  [3535.6135624316958, 1196.6456020605224],
+  [3535.6135624316958, 1031.0456020605222],
+  [3436.313562431696, 1031.0456020605222],
+  [3535.6135624316958, 865.4456020605222],
+  [3436.313562431696, 865.4456020605222],
+  [3535.6135624316958, 699.8456020605223],
+  [3634.9135624316955, 699.8456020605223],
+  [3535.6135624316958, 534.2456020605224],
+  [3436.313562431696, 368.64560206052244],
+  [3436.313562431696, 203.04560206052244],
+  [3337.0135624316963, 37.445602060522454],
+  [3436.313562431696, 37.445602060522454],
+  [3337.0135624316963, 203.04560206052244],
+  [3237.7135624316966, 37.445602060522454],
+  [3138.413562431697, 37.445602060522454],
+  [3237.7135624316966, 203.04560206052244],
+  [3337.0135624316963, 368.6456020605224],
+  [3436.313562431696, 534.2456020605224],
+  [3337.0135624316963, 699.8456020605223],
+  [3237.7135624316966, 534.2456020605224],
+  [3337.0135624316963, 534.2456020605224],
+  [3436.313562431696, 699.8456020605223],
+  [3337.0135624316963, 865.4456020605222],
+  [3237.7135624316966, 865.4456020605222],
+  [3337.0135624316963, 1031.0456020605222],
+  [3237.7135624316966, 1196.6456020605224],
+  [3138.413562431697, 1362.2456020605225],
+  [3039.113562431697, 1527.8456020605227],
+  [3138.413562431697, 1527.8456020605227],
+  [3039.113562431697, 1693.4456020605228],
+  [2939.8135624316974, 1527.8456020605227],
+  [2840.5135624316977, 1362.2456020605225],
+  [2840.5135624316977, 1527.8456020605227],
+  [2840.5135624316977, 1693.4456020605228],
+  [2939.8135624316974, 1859.045602060523],
+  [2840.5135624316977, 2024.645602060523],
+  [2840.5135624316977, 1859.045602060523],
+  [2939.8135624316974, 1693.4456020605228],
+  [3039.113562431697, 1859.045602060523],
+  [3039.113562431697, 2024.645602060523],
+  [2939.8135624316974, 2190.245602060523],
+  [2939.8135624316974, 2024.645602060523],
+  [16388.412117675925, 1839.818884803299],
+  [16289.112117675924, 1839.818884803299],
+  [16388.412117675925, 1674.2188848032988],
+  [16487.712117675925, 1508.6188848032987],
+  [16487.712117675925, 1674.2188848032988],
+  [16388.412117675925, 1508.6188848032987],
+  [16289.112117675924, 1343.0188848032985],
+  [16289.112117675924, 1508.6188848032987],
+  [16189.812117675923, 1674.2188848032988],
+  [16090.512117675922, 1839.818884803299],
+  [16090.512117675922, 2005.418884803299],
+  [15991.212117675921, 2171.018884803299],
+  [16090.512117675922, 2336.618884803299],
+  [16090.512117675922, 2502.218884803299],
+  [16090.512117675922, 2667.8188848032987],
+  [15991.212117675921, 2833.4188848032986],
+  [15991.212117675921, 2999.0188848032985],
+  [15891.91211767592, 3164.6188848032984],
+  [15891.91211767592, 3330.2188848032984],
+  [15991.212117675921, 3330.2188848032984],
+  [16090.512117675922, 3330.2188848032984],
+  [16189.812117675923, 3495.8188848032983],
+  [16289.112117675924, 3495.8188848032983],
+  [16189.812117675923, 3330.2188848032984],
+  [16189.812117675923, 3164.6188848032984],
+  [16289.112117675924, 3164.6188848032984],
+  [16388.412117675925, 3164.6188848032984],
+  [16388.412117675925, 3330.2188848032984],
+  [16487.712117675925, 3330.2188848032984],
+  [16587.012117675924, 3495.8188848032983],
+  [16587.012117675924, 3661.418884803298],
+  [16686.312117675923, 3661.418884803298],
+  [16785.612117675922, 3661.418884803298],
+  [16884.91211767592, 3661.418884803298],
+  [16984.21211767592, 3661.418884803298],
+  [16884.91211767592, 3827.018884803298],
+  [16884.91211767592, 3992.618884803298],
+  [16984.21211767592, 3827.018884803298],
+  [17083.51211767592, 3661.418884803298],
+  [17182.81211767592, 3495.8188848032983],
+  [17182.81211767592, 3330.2188848032984],
+  [17282.11211767592, 3164.6188848032984],
+  [17282.11211767592, 3330.2188848032984],
+  [17182.81211767592, 3164.6188848032984],
+  [17083.51211767592, 3164.6188848032984],
+  [16984.21211767592, 3330.2188848032984],
+  [16984.21211767592, 3495.8188848032983],
+  [17083.51211767592, 3330.2188848032984],
+  [16984.21211767592, 3164.6188848032984],
+  [16984.21211767592, 2999.0188848032985],
+  [17083.51211767592, 2833.4188848032986],
+  [17083.51211767592, 2667.8188848032987],
+  [17182.81211767592, 2667.8188848032987],
+  [17182.81211767592, 2833.4188848032986],
+  [17083.51211767592, 2999.0188848032985],
+  [16984.21211767592, 2833.4188848032986],
+  [16884.91211767592, 2833.4188848032986],
+  [16884.91211767592, 2999.0188848032985],
+  [16785.612117675922, 2999.0188848032985],
+  [16884.91211767592, 3164.6188848032984],
+  [16785.612117675922, 3164.6188848032984],
+  [16686.312117675923, 3164.6188848032984],
+  [16587.012117675924, 3164.6188848032984],
+  [16587.012117675924, 2999.0188848032985],
+  [16487.712117675925, 3164.6188848032984],
+  [16587.012117675924, 3330.2188848032984],
+  [16686.312117675923, 3495.8188848032983],
+  [16686.312117675923, 3330.2188848032984],
+  [16785.612117675922, 3330.2188848032984],
+  [16884.91211767592, 3495.8188848032983],
+  [16785.612117675922, 3495.8188848032983],
+  [16884.91211767592, 3330.2188848032984],
+  [1272.175991128079, 3842.7700224365044],
+  [1371.475991128079, 3842.7700224365044],
+  [1272.175991128079, 3677.1700224365045],
+  [1172.875991128079, 3511.5700224365046],
+  [1272.175991128079, 3511.5700224365046],
+  [1172.875991128079, 3345.9700224365047],
+  [1073.575991128079, 3180.3700224365048],
+  [1073.575991128079, 3014.770022436505],
+  [974.275991128079, 3014.770022436505],
+  [874.9759911280789, 3014.770022436505],
+  [775.6759911280789, 2849.170022436505],
+  [775.6759911280789, 3014.770022436505],
+  [775.6759911280789, 3180.3700224365048],
+  [676.3759911280788, 3345.9700224365047],
+  [676.3759911280788, 3511.5700224365046],
+  [775.6759911280789, 3677.1700224365045],
+  [676.3759911280788, 3842.7700224365044],
+  [577.0759911280787, 3842.7700224365044],
+  [577.0759911280787, 3677.1700224365045],
+  [676.3759911280788, 3677.1700224365045],
+  [775.6759911280789, 3511.5700224365046],
+  [775.6759911280789, 3345.9700224365047],
+  [874.9759911280789, 3345.9700224365047],
+  [874.9759911280789, 3180.3700224365048],
+  [974.275991128079, 3180.3700224365048],
+  [974.275991128079, 3345.9700224365047],
+  [1073.575991128079, 3511.5700224365046],
+  [1073.575991128079, 3677.1700224365045],
+  [1172.875991128079, 3677.1700224365045],
+  [1172.875991128079, 3842.7700224365044],
+  [1073.575991128079, 3842.7700224365044],
+  [1172.875991128079, 4008.3700224365043],
+  [1073.575991128079, 4008.3700224365043],
+  [974.275991128079, 3842.7700224365044],
+  [974.275991128079, 4008.3700224365043],
+  [874.9759911280789, 4008.3700224365043],
+  [775.6759911280789, 4008.3700224365043],
+  [874.9759911280789, 3842.7700224365044],
+  [974.275991128079, 3677.1700224365045],
+  [974.275991128079, 3511.5700224365046],
+  [1073.575991128079, 3345.9700224365047],
+  [1172.875991128079, 3180.3700224365048],
+  [1272.175991128079, 3180.3700224365048],
+  [1272.175991128079, 3345.9700224365047],
+  [1371.475991128079, 3180.3700224365048],
+  [1470.7759911280789, 3345.9700224365047],
+  [1371.475991128079, 3345.9700224365047],
+  [1371.475991128079, 3511.5700224365046],
+  [1470.7759911280789, 3511.5700224365046],
+  [1570.0759911280788, 3677.1700224365045],
+  [1470.7759911280789, 3677.1700224365045],
+  [1570.0759911280788, 3511.5700224365046],
+  [1669.3759911280788, 3511.5700224365046],
+  [1669.3759911280788, 3677.1700224365045],
+  [1768.6759911280787, 3842.7700224365044],
+  [1669.3759911280788, 3842.7700224365044],
+  [1768.6759911280787, 4008.3700224365043],
+  [1867.9759911280787, 3842.7700224365044],
+  [1967.2759911280787, 3677.1700224365045],
+  [2066.5759911280784, 3842.7700224365044],
+  [2165.875991128078, 3677.1700224365045],
+  [2066.5759911280784, 3511.5700224365046],
+  [2165.875991128078, 3511.5700224365046],
+  [2066.5759911280784, 3677.1700224365045],
+  [2165.875991128078, 3842.7700224365044],
+  [2265.175991128078, 4008.3700224365043],
+  [2364.4759911280776, 4008.3700224365043],
+  [2265.175991128078, 3842.7700224365044],
+  [2364.4759911280776, 3677.1700224365045],
+  [2463.7759911280773, 3842.7700224365044],
+  [2463.7759911280773, 4008.3700224365043],
+  [2364.4759911280776, 3842.7700224365044],
+  [6853.940039224797, 6050.837897021371],
+  [6953.240039224797, 6050.837897021371],
+  [7052.5400392247975, 5885.237897021371],
+  [7052.5400392247975, 5719.637897021372],
+  [7151.840039224798, 5885.237897021371],
+  [7052.5400392247975, 6050.837897021371],
+  [7052.5400392247975, 6216.43789702137],
+  [7052.5400392247975, 6382.03789702137],
+  [6953.240039224797, 6382.03789702137],
+  [6953.240039224797, 6216.43789702137],
+  [6853.940039224797, 6216.43789702137],
+  [6853.940039224797, 6382.03789702137],
+  [6754.640039224797, 6216.43789702137],
+  [6754.640039224797, 6382.03789702137],
+  [6754.640039224797, 6547.637897021369],
+  [6754.640039224797, 6713.237897021369],
+  [6655.340039224797, 6713.237897021369],
+  [6754.640039224797, 6878.837897021368],
+  [6853.940039224797, 6713.237897021369],
+  [6853.940039224797, 6878.837897021368],
+  [6953.240039224797, 6713.237897021369],
+  [7052.5400392247975, 6547.637897021369],
+  [7151.840039224798, 6713.237897021369],
+  [7151.840039224798, 6547.637897021369],
+  [7151.840039224798, 6382.03789702137],
+  [7251.140039224798, 6547.637897021369],
+  [7251.140039224798, 6713.237897021369],
+  [7350.440039224798, 6878.837897021368],
+  [7449.740039224798, 6878.837897021368],
+  [7449.740039224798, 6713.237897021369],
+  [7549.040039224798, 6547.637897021369],
+  [7449.740039224798, 6382.03789702137],
+  [7449.740039224798, 6216.43789702137],
+  [7549.040039224798, 6050.837897021371],
+  [7648.340039224799, 6216.43789702137],
+  [7549.040039224798, 6382.03789702137],
+  [7648.340039224799, 6382.03789702137],
+  [7747.640039224799, 6216.43789702137],
+  [7846.940039224799, 6382.03789702137],
+  [7946.240039224799, 6382.03789702137],
+  [7946.240039224799, 6547.637897021369],
+  [7846.940039224799, 6713.237897021369],
+  [7946.240039224799, 6713.237897021369],
+  [8045.540039224799, 6547.637897021369],
+  [8045.540039224799, 6713.237897021369],
+  [7946.240039224799, 6878.837897021368],
+  [7946.240039224799, 7044.4378970213675],
+  [8045.540039224799, 7210.037897021367],
+  [8144.8400392247995, 7375.637897021366],
+  [8144.8400392247995, 7541.237897021366],
+  [8045.540039224799, 7375.637897021366],
+  [8144.8400392247995, 7210.037897021367],
+  [8045.540039224799, 7044.4378970213675],
+  [7946.240039224799, 7210.037897021367],
+  [7846.940039224799, 7210.037897021367],
+  [7946.240039224799, 7375.637897021366],
+  [8045.540039224799, 7541.237897021366],
+  [8144.8400392247995, 7706.837897021365],
+  [8244.1400392248, 7541.237897021366],
+  [8343.4400392248, 7541.237897021366],
+  [8343.4400392248, 7706.837897021365],
+  [8244.1400392248, 7706.837897021365],
+  [4735.523842661975, 3503.497768214323],
+  [4636.223842661975, 3337.897768214323],
+  [4536.923842661975, 3337.897768214323],
+  [4437.623842661975, 3172.2977682143232],
+  [4338.323842661975, 3172.2977682143232],
+  [4239.023842661974, 3172.2977682143232],
+  [4338.323842661975, 3006.6977682143233],
+  [4437.623842661975, 2841.0977682143234],
+  [4338.323842661975, 2675.4977682143235],
+  [4338.323842661975, 2509.8977682143236],
+  [4239.023842661974, 2675.4977682143235],
+  [4139.723842661974, 2509.8977682143236],
+  [4040.4238426619745, 2344.2977682143237],
+  [4139.723842661974, 2178.697768214324],
+  [4239.023842661974, 2178.697768214324],
+  [4139.723842661974, 2344.2977682143237],
+  [4040.4238426619745, 2178.697768214324],
+  [4139.723842661974, 2013.0977682143237],
+  [4139.723842661974, 1847.4977682143235],
+  [4239.023842661974, 2013.0977682143237],
+  [4239.023842661974, 1847.4977682143235],
+  [4338.323842661975, 1847.4977682143235],
+  [4437.623842661975, 1847.4977682143235],
+  [4536.923842661975, 1681.8977682143234],
+  [4437.623842661975, 1516.2977682143232],
+  [4536.923842661975, 1516.2977682143232],
+  [4536.923842661975, 1350.697768214323],
+  [4437.623842661975, 1350.697768214323],
+  [4536.923842661975, 1185.097768214323],
+  [4636.223842661975, 1019.497768214323],
+  [4536.923842661975, 853.897768214323],
+  [4636.223842661975, 853.897768214323],
+  [4735.523842661975, 688.2977682143231],
+  [4636.223842661975, 522.6977682143232],
+  [4636.223842661975, 357.09776821432325],
+  [4735.523842661975, 357.09776821432325],
+  [4735.523842661975, 522.6977682143232],
+  [4636.223842661975, 688.2977682143231],
+  [4735.523842661975, 853.897768214323],
+  [4834.8238426619755, 853.897768214323],
+  [4735.523842661975, 1019.497768214323],
+  [4735.523842661975, 1185.097768214323],
+  [4735.523842661975, 1350.697768214323],
+  [4834.8238426619755, 1516.2977682143232],
+  [4735.523842661975, 1516.2977682143232],
+  [4834.8238426619755, 1350.697768214323],
+  [4834.8238426619755, 1185.097768214323],
+  [4934.123842661976, 1350.697768214323],
+  [5033.423842661976, 1185.097768214323],
+  [5033.423842661976, 1019.497768214323],
+  [5033.423842661976, 853.897768214323],
+  [4934.123842661976, 853.897768214323],
+  [4934.123842661976, 1019.497768214323],
+  [4834.8238426619755, 1019.497768214323],
+  [4934.123842661976, 1185.097768214323],
+  [5033.423842661976, 1350.697768214323],
+  [5132.723842661976, 1350.697768214323],
+  [5132.723842661976, 1185.097768214323],
+  [5232.023842661976, 1019.497768214323],
+  [5232.023842661976, 1185.097768214323],
+  [5331.323842661976, 1019.497768214323],
+  [5430.623842661977, 1019.497768214323],
+  [5529.923842661977, 1185.097768214323],
+  [5430.623842661977, 1350.697768214323],
+  [5430.623842661977, 1516.2977682143232],
+  [5529.923842661977, 1350.697768214323],
+  [5629.223842661977, 1350.697768214323],
+  [5728.523842661977, 1350.697768214323],
+  [5728.523842661977, 1516.2977682143232],
+  [5728.523842661977, 1681.8977682143234],
+  [5629.223842661977, 1516.2977682143232],
+  [5529.923842661977, 1516.2977682143232],
+  [5629.223842661977, 1681.8977682143234],
+  [5529.923842661977, 1681.8977682143234],
+  [5430.623842661977, 1847.4977682143235],
+  [5331.323842661976, 1847.4977682143235],
+  [5331.323842661976, 2013.0977682143237],
+  [5232.023842661976, 2178.697768214324],
+  [5132.723842661976, 2013.0977682143237],
+  [5132.723842661976, 2178.697768214324],
+  [5232.023842661976, 2013.0977682143237],
+  [5232.023842661976, 1847.4977682143235],
+  [5232.023842661976, 1681.8977682143234],
+  [5331.323842661976, 1681.8977682143234],
+  [5331.323842661976, 1516.2977682143232],
+  [5331.323842661976, 1350.697768214323],
+  [5232.023842661976, 1350.697768214323],
+  [5232.023842661976, 1516.2977682143232],
+  [5132.723842661976, 1516.2977682143232],
+  [5132.723842661976, 1681.8977682143234],
+  [5033.423842661976, 1847.4977682143235],
+  [5132.723842661976, 1847.4977682143235],
+  [5033.423842661976, 2013.0977682143237],
+  [4934.123842661976, 2178.697768214324],
+  [5033.423842661976, 2344.2977682143237],
+  [4934.123842661976, 2344.2977682143237],
+  [4834.8238426619755, 2178.697768214324],
+  [4834.8238426619755, 2344.2977682143237],
+  [4735.523842661975, 2344.2977682143237],
+  [4636.223842661975, 2344.2977682143237],
+  [4536.923842661975, 2178.697768214324],
+  [4437.623842661975, 2013.0977682143237],
+  [4338.323842661975, 2178.697768214324],
+  [4437.623842661975, 2344.2977682143237],
+  [4536.923842661975, 2509.8977682143236],
+  [4636.223842661975, 2675.4977682143235],
+  [4636.223842661975, 2509.8977682143236],
+  [4536.923842661975, 2675.4977682143235],
+  [4636.223842661975, 2841.0977682143234],
+  [4536.923842661975, 2841.0977682143234],
+  [4636.223842661975, 3006.6977682143233],
+  [4735.523842661975, 3172.2977682143232],
+  [4834.8238426619755, 3006.6977682143233],
+  [4735.523842661975, 2841.0977682143234],
+  [4735.523842661975, 3006.6977682143233],
+  [4636.223842661975, 3172.2977682143232],
+  [4735.523842661975, 3337.897768214323],
+  [4834.8238426619755, 3503.497768214323],
+  [4735.523842661975, 3669.097768214323],
+  [4834.8238426619755, 3834.697768214323],
+  [4834.8238426619755, 3669.097768214323],
+  [4934.123842661976, 3503.497768214323],
+  [5033.423842661976, 3503.497768214323],
+  [5033.423842661976, 3337.897768214323],
+  [4934.123842661976, 3337.897768214323],
+  [4834.8238426619755, 3172.2977682143232],
+  [4834.8238426619755, 3337.897768214323],
+  [4934.123842661976, 3172.2977682143232],
+  [5033.423842661976, 3006.6977682143233],
+  [5132.723842661976, 2841.0977682143234],
+  [5132.723842661976, 3006.6977682143233],
+  [5232.023842661976, 3172.2977682143232],
+  [5232.023842661976, 3337.897768214323],
+  [5132.723842661976, 3337.897768214323],
+  [5232.023842661976, 3503.497768214323],
+  [5331.323842661976, 3337.897768214323],
+  [5331.323842661976, 3503.497768214323],
+  [5430.623842661977, 3669.097768214323],
+  [5331.323842661976, 3669.097768214323],
+  [5430.623842661977, 3503.497768214323],
+  [5430.623842661977, 3337.897768214323],
+  [5529.923842661977, 3172.2977682143232],
+  [5529.923842661977, 3337.897768214323],
+  [5629.223842661977, 3337.897768214323],
+  [5728.523842661977, 3337.897768214323],
+  [5728.523842661977, 3503.497768214323],
+  [5827.823842661977, 3503.497768214323],
+  [5927.1238426619775, 3669.097768214323],
+  [6026.423842661978, 3669.097768214323],
+  [6125.723842661978, 3503.497768214323],
+  [6125.723842661978, 3669.097768214323],
+  [6225.023842661978, 3503.497768214323],
+  [6225.023842661978, 3337.897768214323],
+  [6324.323842661978, 3337.897768214323],
+  [6423.623842661978, 3503.497768214323],
+  [6324.323842661978, 3669.097768214323],
+  [6225.023842661978, 3669.097768214323],
+  [6324.323842661978, 3834.697768214323],
+  [6423.623842661978, 3834.697768214323],
+  [6324.323842661978, 4000.297768214323],
+  [6225.023842661978, 3834.697768214323],
+  [6125.723842661978, 3834.697768214323],
+  [6125.723842661978, 4000.297768214323],
+  [6225.023842661978, 4000.297768214323],
+  [6225.023842661978, 4165.897768214322],
+  [6225.023842661978, 4331.497768214322],
+  [6125.723842661978, 4165.897768214322],
+  [6026.423842661978, 4000.2977682143223],
+  [5927.1238426619775, 4165.897768214322],
+  [6026.423842661978, 4331.497768214322],
+  [6026.423842661978, 4497.097768214321],
+  [5927.1238426619775, 4497.097768214321],
+  [5827.823842661977, 4662.697768214321],
+  [5728.523842661977, 4828.29776821432],
+  [5827.823842661977, 4828.29776821432],
+  [5927.1238426619775, 4828.29776821432],
+  [5927.1238426619775, 4662.697768214321],
+  [5827.823842661977, 4497.097768214321],
+  [5927.1238426619775, 4331.497768214322],
+  [5827.823842661977, 4165.897768214322],
+  [5728.523842661977, 4331.497768214322],
+  [5728.523842661977, 4165.897768214322],
+  [5629.223842661977, 4000.2977682143223],
+  [5629.223842661977, 3834.6977682143224],
+  [5529.923842661977, 3669.0977682143225],
+  [5629.223842661977, 3503.4977682143226],
+  [5728.523842661977, 3669.0977682143225],
+  [5827.823842661977, 3669.0977682143225],
+  [5927.1238426619775, 3834.6977682143224],
+  [5927.1238426619775, 4000.2977682143223],
+  [6026.423842661978, 4165.897768214322],
+  [6125.723842661978, 4331.497768214322],
+  [6225.023842661978, 4497.097768214321],
+  [6225.023842661978, 4662.697768214321],
+  [6324.323842661978, 4662.697768214321],
+  [6225.023842661978, 4828.29776821432],
+  [6324.323842661978, 4828.29776821432],
+  [6423.623842661978, 4828.29776821432],
+  [6324.323842661978, 4993.8977682143195],
+  [6225.023842661978, 5159.497768214319],
+  [6125.723842661978, 5159.497768214319],
+  [6026.423842661978, 5325.097768214318],
+  [5927.1238426619775, 5490.697768214318],
+  [6026.423842661978, 5656.297768214317],
+  [5927.1238426619775, 5821.897768214317],
+  [5927.1238426619775, 5987.497768214316],
+  [6026.423842661978, 5987.497768214316],
+  [6026.423842661978, 5821.897768214317],
+  [5927.1238426619775, 5656.297768214317],
+  [5827.823842661977, 5656.297768214317],
+  [5827.823842661977, 5490.697768214318],
+  [5728.523842661977, 5490.697768214318],
+  [5629.223842661977, 5325.097768214318],
+  [5629.223842661977, 5159.497768214319],
+  [5529.923842661977, 4993.8977682143195],
+  [5529.923842661977, 5159.497768214319],
+  [5629.223842661977, 4993.8977682143195],
+  [5629.223842661977, 4828.29776821432],
+  [5529.923842661977, 4662.697768214321],
+  [5430.623842661977, 4828.29776821432],
+  [5529.923842661977, 4828.29776821432],
+  [5629.223842661977, 4662.697768214321],
+  [5728.523842661977, 4662.697768214321],
+  [5629.223842661977, 4497.097768214321],
+  [5728.523842661977, 4497.097768214321],
+  [5827.823842661977, 4331.497768214322],
+  [10216.161365168813, 2951.605409896135],
+  [10116.861365168812, 2951.605409896135],
+  [10017.56136516881, 3117.205409896135],
+  [9918.26136516881, 3117.205409896135],
+  [9818.961365168809, 3117.205409896135],
+  [9719.661365168808, 3282.8054098961347],
+  [9620.361365168807, 3282.8054098961347],
+  [9620.361365168807, 3117.205409896135],
+  [9521.061365168805, 2951.605409896135],
+  [9521.061365168805, 2786.005409896135],
+  [9620.361365168807, 2786.005409896135],
+  [9719.661365168808, 2786.005409896135],
+  [9818.961365168809, 2620.405409896135],
+  [9918.26136516881, 2786.005409896135],
+  [9818.961365168809, 2951.605409896135],
+  [9818.961365168809, 2786.005409896135],
+  [9719.661365168808, 2620.405409896135],
+  [9719.661365168808, 2454.805409896135],
+  [9620.361365168807, 2289.2054098961353],
+  [9521.061365168805, 2123.6054098961354],
+  [9620.361365168807, 1958.0054098961352],
+  [9719.661365168808, 2123.6054098961354],
+  [9818.961365168809, 2289.2054098961353],
+  [9818.961365168809, 2123.6054098961354],
+  [9818.961365168809, 1958.0054098961352],
+  [9719.661365168808, 1958.0054098961352],
+  [9620.361365168807, 1792.405409896135],
+  [9620.361365168807, 1626.805409896135],
+  [9521.061365168805, 1461.2054098961348],
+  [9421.761365168804, 1295.6054098961347],
+  [9521.061365168805, 1130.0054098961346],
+  [9521.061365168805, 964.4054098961345],
+  [9421.761365168804, 964.4054098961345],
+  [9521.061365168805, 798.8054098961346],
+  [9620.361365168807, 798.8054098961346],
+  [9620.361365168807, 964.4054098961345],
+  [9620.361365168807, 1130.0054098961346],
+  [9620.361365168807, 1295.6054098961347],
+  [9620.361365168807, 1461.2054098961348],
+  [9719.661365168808, 1295.6054098961347],
+  [9818.961365168809, 1130.0054098961346],
+  [9918.26136516881, 964.4054098961345],
+  [9818.961365168809, 964.4054098961345],
+  [9918.26136516881, 798.8054098961346],
+  [10017.56136516881, 633.2054098961347],
+  [9918.26136516881, 467.60540989613474],
+  [9918.26136516881, 302.0054098961348],
+  [10017.56136516881, 302.0054098961348],
+  [10116.861365168812, 136.40540989613478],
+  [10116.861365168812, 302.0054098961348],
+  [10116.861365168812, 467.60540989613474],
+  [10116.861365168812, 633.2054098961347],
+  [10216.161365168813, 633.2054098961347],
+  [10216.161365168813, 798.8054098961346],
+  [10315.461365168814, 633.2054098961347],
+  [10315.461365168814, 798.8054098961346],
+  [10414.761365168815, 798.8054098961346],
+  [10514.061365168816, 633.2054098961347],
+  [10514.061365168816, 798.8054098961346],
+  [10414.761365168815, 964.4054098961345],
+  [10315.461365168814, 964.4054098961345],
+  [10216.161365168813, 964.4054098961345],
+  [10116.861365168812, 798.8054098961346],
+  [10017.56136516881, 798.8054098961346],
+  [10116.861365168812, 964.4054098961345],
+  [10216.161365168813, 1130.0054098961346],
+  [10116.861365168812, 1130.0054098961346],
+  [10216.161365168813, 1295.6054098961347],
+  [10216.161365168813, 1461.2054098961348],
+  [10315.461365168814, 1626.805409896135],
+  [10315.461365168814, 1792.405409896135],
+  [10216.161365168813, 1958.0054098961352],
+  [10216.161365168813, 1792.405409896135],
+  [10116.861365168812, 1792.405409896135],
+  [10017.56136516881, 1958.0054098961352],
+  [9918.26136516881, 2123.6054098961354],
+  [9918.26136516881, 1958.0054098961352],
+  [10017.56136516881, 2123.6054098961354],
+  [10116.861365168812, 2123.6054098961354],
+  [10017.56136516881, 2289.2054098961353],
+  [10017.56136516881, 2454.805409896135],
+  [10116.861365168812, 2289.2054098961353],
+  [10216.161365168813, 2454.805409896135],
+  [10315.461365168814, 2620.405409896135],
+  [10315.461365168814, 2454.805409896135],
+  [10315.461365168814, 2289.2054098961353],
+  [10414.761365168815, 2454.805409896135],
+  [10514.061365168816, 2620.405409896135],
+  [10613.361365168817, 2786.005409896135],
+  [10514.061365168816, 2786.005409896135],
+  [10613.361365168817, 2620.405409896135],
+  [10514.061365168816, 2454.805409896135],
+  [10514.061365168816, 2289.2054098961353],
+  [10613.361365168817, 2289.2054098961353],
+  [10712.661365168819, 2289.2054098961353],
+  [10811.96136516882, 2454.805409896135],
+  [10911.26136516882, 2289.2054098961353],
+  [10811.96136516882, 2289.2054098961353],
+  [10712.661365168819, 2454.805409896135],
+  [10712.661365168819, 2620.405409896135],
+  [10811.96136516882, 2786.005409896135],
+  [10911.26136516882, 2620.405409896135],
+  [10911.26136516882, 2786.005409896135],
+  [11010.561365168822, 2620.405409896135],
+  [10911.26136516882, 2454.805409896135],
+  [10811.96136516882, 2620.405409896135],
+  [10712.661365168819, 2786.005409896135],
+  [10811.96136516882, 2951.605409896135],
+  [10911.26136516882, 2951.605409896135],
+  [10811.96136516882, 3117.205409896135],
+  [10712.661365168819, 2951.605409896135],
+  [10613.361365168817, 2951.605409896135],
+  [10514.061365168816, 2951.605409896135],
+  [10414.761365168815, 3117.205409896135],
+  [10414.761365168815, 2951.605409896135],
+  [10315.461365168814, 2786.005409896135],
+  [10216.161365168813, 2620.405409896135],
+  [10216.161365168813, 2786.005409896135],
+  [10315.461365168814, 2951.605409896135],
+  [10315.461365168814, 3117.205409896135],
+  [10216.161365168813, 3117.205409896135],
+  [10116.861365168812, 3117.205409896135],
+  [10017.56136516881, 3282.8054098961347],
+  [9918.26136516881, 3448.4054098961346],
+  [9818.961365168809, 3448.4054098961346],
+  [9818.961365168809, 3614.0054098961346],
+  [9719.661365168808, 3448.4054098961346],
+  [9818.961365168809, 3282.8054098961347],
+  [9719.661365168808, 3117.205409896135],
+  [9620.361365168807, 2951.605409896135],
+  [9521.061365168805, 3117.205409896135],
+  [9521.061365168805, 3282.8054098961347],
+  [9421.761365168804, 3117.205409896135],
+  [9421.761365168804, 3282.8054098961347],
+  [9322.461365168803, 3117.205409896135],
+  [9421.761365168804, 2951.605409896135],
+  [9322.461365168803, 2951.605409896135],
+  [9223.161365168802, 2786.005409896135],
+  [9322.461365168803, 2620.405409896135],
+  [9421.761365168804, 2454.805409896135],
+  [9521.061365168805, 2289.2054098961353],
+  [9421.761365168804, 2123.6054098961354],
+  [9421.761365168804, 1958.0054098961352],
+  [9421.761365168804, 1792.405409896135],
+  [9521.061365168805, 1626.805409896135],
+  [9421.761365168804, 1626.805409896135],
+  [9322.461365168803, 1792.405409896135],
+  [9322.461365168803, 1626.805409896135],
+  [9322.461365168803, 1461.2054098961348],
+  [9421.761365168804, 1461.2054098961348],
+  [9521.061365168805, 1295.6054098961347],
+  [9421.761365168804, 1130.0054098961346],
+  [9322.461365168803, 964.4054098961345],
+  [9223.161365168802, 964.4054098961345],
+  [9223.161365168802, 798.8054098961346],
+  [9322.461365168803, 633.2054098961347],
+  [9421.761365168804, 798.8054098961346],
+  [9421.761365168804, 633.2054098961347],
+  [9521.061365168805, 633.2054098961347],
+  [9421.761365168804, 467.60540989613474],
+  [9421.761365168804, 302.0054098961348],
+  [9322.461365168803, 136.40540989613478],
+  [9223.161365168802, 302.0054098961348],
+  [9123.861365168801, 302.0054098961348],
+  [9024.5613651688, 136.40540989613478],
+  [9123.861365168801, 136.40540989613478],
+  [9223.161365168802, 136.40540989613478],
+  [9322.461365168803, 302.0054098961348],
+  [9421.761365168804, 136.40540989613478],
+  [9521.061365168805, 136.40540989613478],
+  [9620.361365168807, 136.40540989613478],
+  [9620.361365168807, 302.0054098961348],
+  [9521.061365168805, 302.0054098961348],
+  [9521.061365168805, 467.60540989613474],
+  [9620.361365168807, 467.60540989613474],
+  [9719.661365168808, 302.0054098961348],
+  [9719.661365168808, 136.40540989613478],
+  [9818.961365168809, 136.40540989613478],
+  [9918.26136516881, 136.40540989613478],
+  [10017.56136516881, 136.40540989613478],
+  [366.07287160549004, 5394.185440937868],
+  [465.37287160549005, 5394.185440937868],
+  [465.37287160549005, 5559.785440937868],
+  [366.0728716054901, 5559.785440937868],
+  [366.0728716054901, 5725.385440937867],
+  [266.77287160549014, 5725.385440937867],
+  [167.47287160549016, 5559.785440937868],
+  [266.77287160549014, 5559.785440937868],
+  [266.77287160549014, 5394.185440937868],
+  [266.77287160549014, 5228.585440937869],
+  [167.47287160549016, 5394.185440937868],
+  [68.17287160549016, 5228.585440937869],
+  [167.47287160549013, 5062.9854409378695],
+  [68.17287160549013, 4897.38544093787],
+  [167.47287160549013, 4731.785440937871],
+  [266.77287160549014, 4731.785440937871],
+  [167.47287160549016, 4566.185440937871],
+  [68.17287160549016, 4566.185440937871],
+  [68.17287160549016, 4731.785440937871],
+  [167.47287160549013, 4897.38544093787],
+  [68.17287160549013, 5062.9854409378695],
+  [167.47287160549013, 5228.585440937869],
+  [266.77287160549014, 5062.9854409378695],
+  [366.0728716054901, 4897.38544093787],
+  [266.77287160549014, 4897.38544093787],
+  [366.0728716054901, 4731.785440937871],
+  [465.37287160549005, 4897.38544093787],
+  [366.0728716054901, 5062.9854409378695],
+  [465.37287160549005, 5062.9854409378695],
+  [366.0728716054901, 5228.585440937869],
+  [465.37287160549005, 5228.585440937869],
+  [564.6728716054901, 5394.185440937868],
+  [663.9728716054901, 5228.585440937869],
+  [564.6728716054901, 5062.9854409378695],
+  [663.9728716054901, 4897.38544093787],
+  [763.2728716054902, 4731.785440937871],
+  [862.5728716054903, 4566.185440937871],
+  [961.8728716054903, 4731.785440937871],
+  [862.5728716054903, 4731.785440937871],
+  [961.8728716054903, 4566.185440937871],
+  [862.5728716054903, 4400.585440937872],
+  [961.8728716054903, 4234.985440937872],
+  [1061.1728716054904, 4400.585440937872],
+  [1160.4728716054904, 4234.985440937872],
+  [1160.4728716054904, 4400.585440937872],
+  [1259.7728716054903, 4234.985440937872],
+  [1359.0728716054903, 4069.3854409378723],
+  [1458.3728716054902, 4069.3854409378723],
+  [1557.6728716054902, 4234.985440937872],
+  [1656.9728716054901, 4400.585440937872],
+  [1557.6728716054902, 4400.585440937872],
+  [1458.3728716054902, 4400.585440937872],
+  [1359.0728716054903, 4566.185440937871],
+  [1359.0728716054903, 4731.785440937871],
+  [1259.7728716054903, 4731.785440937871],
+  [1359.0728716054903, 4897.38544093787],
+  [1458.3728716054902, 4731.785440937871],
+  [1458.3728716054902, 4897.38544093787],
+  [1359.0728716054903, 5062.9854409378695],
+  [1259.7728716054903, 5228.585440937869],
+  [1259.7728716054903, 5062.9854409378695],
+  [1259.7728716054903, 4897.38544093787],
+  [1160.4728716054904, 5062.9854409378695],
+  [1160.4728716054904, 5228.585440937869],
+  [1061.1728716054904, 5228.585440937869],
+  [1061.1728716054904, 5062.9854409378695],
+  [961.8728716054903, 5228.585440937869],
+  [862.5728716054903, 5062.9854409378695],
+  [961.8728716054903, 5062.9854409378695],
+  [961.8728716054903, 4897.38544093787],
+  [1061.1728716054904, 4897.38544093787],
+  [1160.4728716054904, 4731.785440937871],
+  [1259.7728716054903, 4566.185440937871],
+  [1359.0728716054903, 4400.585440937872],
+  [1458.3728716054902, 4566.185440937871],
+  [1557.6728716054902, 4566.185440937871],
+  [1656.9728716054901, 4731.785440937871],
+  [1557.6728716054902, 4897.38544093787],
+  [1458.3728716054902, 5062.9854409378695],
+  [1557.6728716054902, 5228.585440937869],
+  [1656.9728716054901, 5062.9854409378695],
+  [1756.27287160549, 5062.9854409378695],
+  [1756.27287160549, 4897.38544093787],
+  [1855.57287160549, 5062.9854409378695],
+  [1954.87287160549, 4897.38544093787],
+  [2054.17287160549, 5062.9854409378695],
+  [1954.87287160549, 5062.9854409378695],
+  [2054.17287160549, 5228.585440937869],
+  [2153.4728716054897, 5228.585440937869],
+  [2252.7728716054894, 5062.9854409378695],
+  [2352.072871605489, 5228.585440937869],
+  [2451.372871605489, 5394.185440937868],
+  [2352.072871605489, 5394.185440937868],
+  [2252.7728716054894, 5228.585440937869],
+  [2153.4728716054897, 5062.9854409378695],
+  [2153.4728716054897, 4897.38544093787],
+  [2252.7728716054894, 4897.38544093787],
+  [2352.072871605489, 4731.785440937871],
+  [2252.7728716054894, 4731.785440937871],
+  [2153.4728716054897, 4731.785440937871],
+  [2054.17287160549, 4566.185440937871],
+  [1954.87287160549, 4731.785440937871],
+  [1855.57287160549, 4897.38544093787],
+  [1756.27287160549, 4731.785440937871],
+  [1855.57287160549, 4731.785440937871],
+  [1855.57287160549, 4566.185440937871],
+  [1756.27287160549, 4566.185440937871],
+  [1656.9728716054901, 4566.185440937871],
+  [1557.6728716054902, 4731.785440937871],
+  [1656.9728716054901, 4897.38544093787],
+  [1557.6728716054902, 5062.9854409378695],
+  [1458.3728716054902, 5228.585440937869],
+  [1359.0728716054903, 5228.585440937869],
+  [1259.7728716054903, 5394.185440937868],
+  [1259.7728716054903, 5559.785440937868],
+  [1160.4728716054904, 5559.785440937868],
+  [1061.1728716054904, 5559.785440937868],
+  [1160.4728716054904, 5725.385440937867],
+  [1259.7728716054903, 5725.385440937867],
+  [1359.0728716054903, 5559.785440937868],
+  [1458.3728716054902, 5725.385440937867],
+  [1458.3728716054902, 5559.785440937868],
+  [1359.0728716054903, 5725.385440937867],
+  [1259.7728716054903, 5890.985440937867],
+  [1359.0728716054903, 5890.985440937867],
+  [1259.7728716054903, 6056.585440937866],
+  [1359.0728716054903, 6222.185440937866],
+  [1458.3728716054902, 6222.185440937866],
+  [1458.3728716054902, 6387.785440937865],
+  [1557.6728716054902, 6222.185440937866],
+  [1557.6728716054902, 6387.785440937865],
+  [1656.9728716054901, 6222.185440937866],
+  [1756.27287160549, 6056.585440937866],
+  [1855.57287160549, 5890.985440937867],
+  [1756.27287160549, 5890.985440937867],
+  [1656.9728716054901, 6056.585440937866],
+  [1557.6728716054902, 5890.985440937867],
+  [1458.3728716054902, 5890.985440937867],
+  [1359.0728716054903, 6056.585440937866],
+  [1259.7728716054903, 6222.185440937866],
+  [1160.4728716054904, 6056.585440937866],
+  [1061.1728716054904, 5890.985440937867],
+  [1061.1728716054904, 6056.585440937866],
+  [1160.4728716054904, 6222.185440937866],
+  [1061.1728716054904, 6222.185440937866],
+  [961.8728716054903, 6222.185440937866],
+  [961.8728716054903, 6056.585440937866],
+  [961.8728716054903, 5890.985440937867],
+  [961.8728716054903, 5725.385440937867],
+  [862.5728716054903, 5559.785440937868],
+  [763.2728716054902, 5725.385440937867],
+  [862.5728716054903, 5725.385440937867],
+  [763.2728716054902, 5890.985440937867],
+  [663.9728716054901, 5725.385440937867],
+  [763.2728716054902, 5559.785440937868],
+  [763.2728716054902, 5394.185440937868],
+  [862.5728716054903, 5228.585440937869],
+  [961.8728716054903, 5394.185440937868],
+  [1061.1728716054904, 5394.185440937868],
+  [961.8728716054903, 5559.785440937868],
+  [862.5728716054903, 5394.185440937868],
+  [763.2728716054902, 5228.585440937869],
+  [663.9728716054901, 5062.9854409378695],
+  [763.2728716054902, 5062.9854409378695],
+  [763.2728716054902, 4897.38544093787],
+  [663.9728716054901, 4731.785440937871],
+  [564.6728716054901, 4731.785440937871],
+  [465.37287160549005, 4566.185440937871],
+  [366.0728716054901, 4566.185440937871],
+  [465.37287160549005, 4731.785440937871],
+  [564.6728716054901, 4566.185440937871],
+  [465.37287160549005, 4400.585440937872],
+  [366.0728716054901, 4400.585440937872],
+  [266.77287160549014, 4234.985440937872],
+  [167.47287160549016, 4234.985440937872],
+  [266.77287160549014, 4400.585440937872],
+  [266.77287160549014, 4566.185440937871],
+  [167.47287160549016, 4400.585440937872],
+  [68.17287160549016, 4234.985440937872],
+  [167.47287160549013, 4069.3854409378723],
+  [68.17287160549013, 3903.7854409378724],
+  [68.17287160549013, 4069.3854409378723],
+  [167.47287160549013, 3903.7854409378724],
+  [266.77287160549014, 3903.7854409378724],
+  [366.0728716054901, 3738.1854409378725],
+  [266.77287160549014, 3738.1854409378725],
+  [266.77287160549014, 3572.5854409378726],
+  [167.47287160549016, 3406.9854409378727],
+  [167.47287160549016, 3241.3854409378728],
+  [266.77287160549014, 3241.3854409378728],
+  [266.77287160549014, 3406.9854409378727],
+  [366.0728716054901, 3572.5854409378726],
+  [465.37287160549005, 3738.1854409378725],
+  [465.37287160549005, 3903.7854409378724],
+  [366.0728716054901, 4069.3854409378723],
+  [366.0728716054901, 4234.985440937872],
+  [465.37287160549005, 4234.985440937872],
+  [564.6728716054901, 4069.3854409378723],
+  [465.37287160549005, 4069.3854409378723],
+  [564.6728716054901, 4234.985440937872],
+  [663.9728716054901, 4069.3854409378723],
+  [663.9728716054901, 4234.985440937872],
+  [663.9728716054901, 4400.585440937872],
+  [763.2728716054902, 4566.185440937871],
+  [763.2728716054902, 4400.585440937872],
+  [663.9728716054901, 4566.185440937871],
+  [564.6728716054901, 4400.585440937872],
+  [19431.915041401327, 3495.506142643713],
+  [19332.61504140133, 3661.1061426437127],
+  [19431.915041401327, 3661.1061426437127],
+  [19531.215041401327, 3661.1061426437127],
+  [19630.515041401326, 3495.506142643713],
+  [19630.515041401326, 3661.1061426437127],
+  [19729.815041401325, 3826.7061426437126],
+  [19630.515041401326, 3826.7061426437126],
+  [19729.815041401325, 3992.3061426437125],
+  [19630.515041401326, 3992.3061426437125],
+  [19630.515041401326, 4157.906142643712],
+  [19630.515041401326, 4323.506142643711],
+  [19531.215041401327, 4157.906142643712],
+  [19431.915041401327, 4323.506142643711],
+  [19531.215041401327, 4489.106142643711],
+  [19431.915041401327, 4654.70614264371],
+  [19332.61504140133, 4654.70614264371],
+  [19332.61504140133, 4820.30614264371],
+  [19332.61504140133, 4985.906142643709],
+  [19233.31504140133, 4985.906142643709],
+  [19134.01504140133, 5151.506142643709],
+  [19034.71504140133, 5151.506142643709],
+  [19134.01504140133, 5317.106142643708],
+  [19034.71504140133, 5317.106142643708],
+  [19034.71504140133, 5482.706142643708],
+  [18935.41504140133, 5648.306142643707],
+  [18836.115041401332, 5813.9061426437065],
+  [18836.115041401332, 5979.506142643706],
+  [18935.41504140133, 5979.506142643706],
+  [19034.71504140133, 6145.106142643705],
+  [19034.71504140133, 5979.506142643706],
+  [19034.71504140133, 5813.9061426437065],
+  [19134.01504140133, 5648.306142643707],
+  [19233.31504140133, 5648.306142643707],
+  [19134.01504140133, 5813.9061426437065],
+  [19134.01504140133, 5979.506142643706],
+  [19233.31504140133, 5813.9061426437065],
+  [19233.31504140133, 5979.506142643706],
+  [19332.61504140133, 6145.106142643705],
+  [19332.61504140133, 6310.706142643705],
+  [19233.31504140133, 6310.706142643705],
+  [19233.31504140133, 6476.306142643704],
+  [19332.61504140133, 6476.306142643704],
+  [19431.915041401327, 6641.906142643704],
+  [19332.61504140133, 6807.506142643703],
+  [19332.61504140133, 6641.906142643704],
+  [19431.915041401327, 6476.306142643704],
+  [19431.915041401327, 6310.706142643705],
+  [19531.215041401327, 6145.106142643705],
+  [19431.915041401327, 5979.506142643706],
+  [19431.915041401327, 6145.106142643705],
+  [19531.215041401327, 5979.506142643706],
+  [19630.515041401326, 5813.9061426437065],
+  [19630.515041401326, 5979.506142643706],
+  [19729.815041401325, 5813.9061426437065],
+  [19829.115041401325, 5979.506142643706],
+  [19729.815041401325, 5979.506142643706],
+  [19729.815041401325, 6145.106142643705],
+  [19729.815041401325, 6310.706142643705],
+  [19630.515041401326, 6476.306142643704],
+  [19729.815041401325, 6476.306142643704],
+  [19630.515041401326, 6310.706142643705],
+  [19531.215041401327, 6310.706142643705],
+  [19531.215041401327, 6476.306142643704],
+  [19630.515041401326, 6641.906142643704],
+  [19729.815041401325, 6807.506142643703],
+  [19829.115041401325, 6973.106142643703],
+  [19928.415041401324, 6973.106142643703],
+  [19928.415041401324, 7138.706142643702],
+  [20027.715041401323, 7138.706142643702],
+  [20027.715041401323, 7304.306142643702],
+  [19928.415041401324, 7304.306142643702],
+  [19829.115041401325, 7304.306142643702],
+  [19829.115041401325, 7469.906142643701],
+  [19928.415041401324, 7469.906142643701],
+  [19928.415041401324, 7635.5061426437005],
+  [19928.415041401324, 7801.1061426437],
+  [20027.715041401323, 7635.5061426437005],
+  [20027.715041401323, 7801.1061426437],
+  [20127.015041401322, 7801.1061426437],
+  [20226.31504140132, 7801.1061426437],
+  [20325.61504140132, 7801.1061426437],
+  [20226.31504140132, 7635.5061426437005],
+  [20226.31504140132, 7469.906142643701],
+  [20226.31504140132, 7304.306142643702],
+  [20127.015041401322, 7304.306142643702],
+  [20027.715041401323, 7469.906142643701],
+  [20127.015041401322, 7469.906142643701],
+  [20127.015041401322, 7635.5061426437005],
+  [2748.790306732237, 2362.9553147492866],
+  [2848.0903067322365, 2528.5553147492865],
+  [2748.790306732237, 2694.1553147492864],
+  [2649.490306732237, 2859.7553147492863],
+  [2748.790306732237, 3025.355314749286],
+  [2848.0903067322365, 2859.7553147492863],
+  [2848.0903067322365, 2694.1553147492864],
+  [2947.3903067322362, 2694.1553147492864],
+  [3046.690306732236, 2859.7553147492863],
+  [3145.9903067322357, 2694.1553147492864],
+  [3145.9903067322357, 2528.5553147492865],
+  [3046.690306732236, 2694.1553147492864],
+  [3145.9903067322357, 2859.7553147492863],
+  [3046.690306732236, 3025.355314749286],
+  [3145.9903067322357, 3025.355314749286],
+  [3245.2903067322354, 3190.955314749286],
+  [3245.2903067322354, 3356.555314749286],
+  [3344.590306732235, 3522.155314749286],
+  [3443.890306732235, 3356.555314749286],
+  [3543.1903067322346, 3356.555314749286],
+  [3642.4903067322343, 3190.955314749286],
+  [3741.790306732234, 3025.355314749286],
+  [3741.790306732234, 2859.7553147492863],
+  [3841.090306732234, 3025.355314749286],
+  [3841.090306732234, 3190.955314749286],
+  [3741.790306732234, 3190.955314749286],
+  [3642.4903067322343, 3025.355314749286],
+  [3543.1903067322346, 3025.355314749286],
+  [3543.1903067322346, 2859.7553147492863],
+  [3443.890306732235, 3025.355314749286],
+  [3443.890306732235, 3190.955314749286],
+  [3543.1903067322346, 3190.955314749286],
+  [3642.4903067322343, 3356.555314749286],
+  [3543.1903067322346, 3522.155314749286],
+  [3443.890306732235, 3687.755314749286],
+  [3443.890306732235, 3853.3553147492858],
+  [3344.590306732235, 3687.755314749286],
+  [3245.2903067322354, 3853.3553147492858],
+  [3245.2903067322354, 3687.755314749286],
+  [3145.9903067322357, 3687.755314749286],
+  [3046.690306732236, 3853.3553147492858],
+  [3145.9903067322357, 4018.9553147492857],
+  [3145.9903067322357, 3853.3553147492858],
+  [3046.690306732236, 3687.755314749286],
+  [3145.9903067322357, 3522.155314749286],
+  [3145.9903067322357, 3356.555314749286],
+  [3145.9903067322357, 3190.955314749286],
+  [3046.690306732236, 3190.955314749286],
+  [3046.690306732236, 3356.555314749286],
+  [2947.3903067322362, 3356.555314749286],
+  [2848.0903067322365, 3190.955314749286],
+  [2947.3903067322362, 3025.355314749286],
+  [2848.0903067322365, 3025.355314749286],
+  [2748.790306732237, 2859.7553147492863],
+  [2649.490306732237, 2694.1553147492864],
+  [2748.790306732237, 2528.5553147492865],
+  [2848.0903067322365, 2362.9553147492866],
+  [2748.790306732237, 2197.3553147492867],
+  [2649.490306732237, 2362.9553147492866],
+  [2649.490306732237, 2197.3553147492867],
+  [2550.1903067322373, 2362.9553147492866],
+  [2450.8903067322376, 2362.9553147492866],
+  [2351.590306732238, 2528.5553147492865],
+  [2252.290306732238, 2528.5553147492865],
+  [2351.590306732238, 2362.9553147492866],
+  [2252.290306732238, 2197.3553147492867],
+  [2351.590306732238, 2197.3553147492867],
+  [2351.590306732238, 2031.7553147492865],
+  [2351.590306732238, 1866.1553147492864],
+  [2252.290306732238, 1866.1553147492864],
+  [2351.590306732238, 1700.5553147492863],
+  [2450.8903067322376, 1534.9553147492861],
+  [2351.590306732238, 1369.355314749286],
+  [2252.290306732238, 1203.7553147492858],
+  [2252.290306732238, 1369.355314749286],
+  [2252.290306732238, 1534.9553147492861],
+  [2152.9903067322384, 1369.355314749286],
+  [2053.6903067322387, 1369.355314749286],
+  [1954.3903067322387, 1203.7553147492858],
+  [1855.0903067322388, 1203.7553147492858],
+  [1755.7903067322388, 1038.1553147492857],
+  [1656.4903067322389, 1038.1553147492857],
+  [1557.190306732239, 872.5553147492857],
+  [1457.890306732239, 1038.1553147492857],
+  [1457.890306732239, 872.5553147492857],
+  [1457.890306732239, 706.9553147492858],
+  [1557.190306732239, 706.9553147492858],
+  [1656.4903067322389, 872.5553147492857],
+  [1656.4903067322389, 706.9553147492858],
+  [1755.7903067322388, 706.9553147492858],
+  [1656.4903067322389, 541.3553147492859],
+  [1557.190306732239, 375.7553147492859],
+  [1656.4903067322389, 210.1553147492859],
+  [1755.7903067322388, 44.55531474928592],
+  [1656.4903067322389, 44.55531474928592],
+  [1557.190306732239, 210.1553147492859],
+  [1457.890306732239, 210.1553147492859],
+  [1457.890306732239, 44.55531474928592],
+  [1358.590306732239, 210.1553147492859],
+  [1358.590306732239, 375.75531474928584],
+  [1259.290306732239, 210.15531474928585],
+  [1259.290306732239, 375.75531474928584],
+  [1259.290306732239, 541.3553147492859],
+  [1358.590306732239, 706.9553147492858],
+  [1358.590306732239, 872.5553147492857],
+  [1259.290306732239, 706.9553147492858],
+  [1259.290306732239, 872.5553147492857],
+  [1259.290306732239, 1038.1553147492857],
+  [1358.590306732239, 1203.7553147492858],
+  [1358.590306732239, 1038.1553147492857],
+  [1457.890306732239, 1203.7553147492858],
+  [1557.190306732239, 1369.355314749286],
+  [1656.4903067322389, 1203.7553147492858],
+  [1557.190306732239, 1203.7553147492858],
+  [1557.190306732239, 1038.1553147492857],
+  [17254.572515546668, 1460.5807801244923],
+  [17353.872515546667, 1626.1807801244925],
+  [17453.172515546667, 1791.7807801244926],
+  [17552.472515546666, 1791.7807801244926],
+  [17453.172515546667, 1626.1807801244925],
+  [17353.872515546667, 1791.7807801244926],
+  [17453.172515546667, 1957.3807801244927],
+  [17353.872515546667, 2122.980780124493],
+  [17453.172515546667, 2288.580780124493],
+  [17353.872515546667, 2454.1807801244927],
+  [17453.172515546667, 2619.7807801244926],
+  [17552.472515546666, 2619.7807801244926],
+  [17453.172515546667, 2785.3807801244925],
+  [17353.872515546667, 2619.7807801244926],
+  [17254.572515546668, 2454.1807801244927],
+  [17254.572515546668, 2288.580780124493],
+  [17353.872515546667, 2288.580780124493],
+  [17453.172515546667, 2122.980780124493],
+  [17552.472515546666, 2288.580780124493],
+  [17552.472515546666, 2454.1807801244927],
+  [17453.172515546667, 2454.1807801244927],
+  [4447.67624466283, 4761.1416826913],
+  [4546.97624466283, 4595.541682691301],
+  [4546.97624466283, 4429.941682691301],
+  [4447.67624466283, 4429.941682691301],
+  [4447.67624466283, 4595.541682691301],
+  [4348.37624466283, 4595.541682691301],
+  [4249.07624466283, 4595.541682691301],
+  [4348.37624466283, 4761.1416826913],
+  [4249.07624466283, 4761.1416826913],
+  [4348.37624466283, 4926.7416826912995],
+  [4348.37624466283, 5092.341682691299],
+  [4447.67624466283, 5257.941682691298],
+  [4546.97624466283, 5257.941682691298],
+  [4646.27624466283, 5092.341682691299],
+  [4546.97624466283, 5092.341682691299],
+  [4646.27624466283, 4926.7416826912995],
+  [4646.27624466283, 4761.1416826913],
+  [4546.97624466283, 4761.1416826913],
+  [4646.27624466283, 4595.541682691301],
+  [4745.5762446628305, 4595.541682691301],
+  [4646.27624466283, 4429.941682691301],
+  [4745.5762446628305, 4429.941682691301],
+  [4844.876244662831, 4595.541682691301],
+  [4745.5762446628305, 4761.1416826913],
+  [4745.5762446628305, 4926.7416826912995],
+  [4844.876244662831, 4761.1416826913],
+  [4944.176244662831, 4761.1416826913],
+  [5043.476244662831, 4926.7416826912995],
+  [5043.476244662831, 4761.1416826913],
+  [5142.776244662831, 4926.7416826912995],
+  [5142.776244662831, 4761.1416826913],
+  [5242.076244662831, 4595.541682691301],
+  [5142.776244662831, 4595.541682691301],
+  [5242.076244662831, 4429.941682691301],
+  [5242.076244662831, 4264.341682691302],
+  [5142.776244662831, 4429.941682691301],
+  [5043.476244662831, 4595.541682691301],
+  [5043.476244662831, 4429.941682691301],
+  [5043.476244662831, 4264.341682691302],
+  [5142.776244662831, 4098.741682691302],
+  [5043.476244662831, 4098.741682691302],
+  [4944.176244662831, 3933.1416826913023],
+  [4944.176244662831, 4098.741682691302],
+  [4944.176244662831, 4264.341682691302],
+  [4844.876244662831, 4098.741682691302],
+  [4745.5762446628305, 4264.341682691302],
+  [4646.27624466283, 4098.741682691302],
+  [4546.97624466283, 3933.1416826913023],
+  [4447.67624466283, 4098.741682691302],
+  [4546.97624466283, 4264.341682691302],
+  [4447.67624466283, 4264.341682691302],
+  [4546.97624466283, 4098.741682691302],
+  [4646.27624466283, 3933.1416826913023],
+  [4546.97624466283, 3767.5416826913024],
+  [4447.67624466283, 3601.9416826913025],
+  [4447.67624466283, 3767.5416826913024],
+  [4348.37624466283, 3767.5416826913024],
+  [4348.37624466283, 3933.1416826913023],
+  [4249.07624466283, 3767.5416826913024],
+  [4249.07624466283, 3933.1416826913023],
+  [4149.776244662829, 3933.1416826913023],
+  [4050.4762446628297, 4098.741682691302],
+  [4050.4762446628297, 3933.1416826913023],
+  [3951.17624466283, 3933.1416826913023],
+  [3951.17624466283, 4098.741682691302],
+  [3851.8762446628302, 4264.341682691302],
+  [3851.8762446628302, 4098.741682691302],
+  [3752.5762446628305, 4098.741682691302],
+  [3653.276244662831, 4264.341682691302],
+  [3553.976244662831, 4429.941682691301],
+  [3553.976244662831, 4595.541682691301],
+  [3454.6762446628313, 4429.941682691301],
+  [3553.976244662831, 4264.341682691302],
+  [3653.276244662831, 4429.941682691301],
+  [3752.5762446628305, 4264.341682691302],
+  [3752.5762446628305, 4429.941682691301],
+  [3851.8762446628302, 4595.541682691301],
+  [3851.8762446628302, 4429.941682691301],
+  [3951.17624466283, 4429.941682691301],
+  [4050.4762446628297, 4264.341682691302],
+  [4149.776244662829, 4098.741682691302],
+  [4249.07624466283, 4264.341682691302],
+  [4348.37624466283, 4098.741682691302],
+  [4447.67624466283, 3933.1416826913023],
+  [9574.088902135607, 7352.26293905581],
+  [9474.788902135606, 7352.26293905581],
+  [9375.488902135605, 7186.662939055811],
+  [9474.788902135606, 7021.0629390558115],
+  [9574.088902135607, 7021.0629390558115],
+  [9474.788902135606, 7186.662939055811],
+  [9574.088902135607, 7186.662939055811],
+  [9673.388902135608, 7021.0629390558115],
+  [9673.388902135608, 6855.462939055812],
+  [9772.68890213561, 6689.862939055813],
+  [9673.388902135608, 6689.862939055813],
+  [9772.68890213561, 6524.262939055813],
+  [9871.98890213561, 6358.662939055814],
+  [9971.288902135611, 6524.262939055813],
+  [10070.588902135612, 6358.662939055814],
+  [10070.588902135612, 6193.062939055814],
+  [9971.288902135611, 6027.462939055815],
+  [9971.288902135611, 5861.862939055815],
+  [9871.98890213561, 5861.862939055815],
+  [9871.98890213561, 5696.262939055816],
+  [9971.288902135611, 5530.662939055816],
+  [10070.588902135612, 5530.662939055816],
+  [10070.588902135612, 5696.262939055816],
+  [10169.888902135614, 5861.862939055815],
+  [10169.888902135614, 5696.262939055816],
+  [10070.588902135612, 5861.862939055815],
+  [10169.888902135614, 6027.462939055815],
+  [10169.888902135614, 6193.062939055814],
+  [10269.188902135615, 6027.462939055815],
+  [10269.188902135615, 5861.862939055815],
+  [10368.488902135616, 6027.462939055815],
+  [10269.188902135615, 6193.062939055814],
+  [10269.188902135615, 6358.662939055814],
+  [10169.888902135614, 6358.662939055814],
+  [10070.588902135612, 6524.262939055813],
+  [10070.588902135612, 6689.862939055813],
+  [9971.288902135611, 6855.462939055812],
+  [9971.288902135611, 7021.0629390558115],
+  [10070.588902135612, 7186.662939055811],
+  [10169.888902135614, 7186.662939055811],
+  [10269.188902135615, 7186.662939055811],
+  [10169.888902135614, 7352.26293905581],
+  [10070.588902135612, 7352.26293905581],
+  [10169.888902135614, 7517.86293905581],
+  [10169.888902135614, 7683.462939055809],
+  [10269.188902135615, 7517.86293905581],
+  [10368.488902135616, 7683.462939055809],
+  [10467.788902135617, 7683.462939055809],
+  [10368.488902135616, 7517.86293905581],
+  [10269.188902135615, 7352.26293905581],
+  [10368.488902135616, 7352.26293905581],
+  [10368.488902135616, 7186.662939055811],
+  [10368.488902135616, 7021.0629390558115],
+  [10368.488902135616, 6855.462939055812],
+  [10269.188902135615, 6855.462939055812],
+  [10169.888902135614, 6855.462939055812],
+  [10169.888902135614, 7021.0629390558115],
+  [10070.588902135612, 7021.0629390558115],
+  [10070.588902135612, 6855.462939055812],
+  [10169.888902135614, 6689.862939055813],
+  [10269.188902135615, 6689.862939055813],
+  [10169.888902135614, 6524.262939055813],
+  [10269.188902135615, 6524.262939055813],
+  [10368.488902135616, 6524.262939055813],
+  [10368.488902135616, 6358.662939055814],
+  [10467.788902135617, 6358.662939055814],
+  [10467.788902135617, 6193.062939055814],
+  [10567.088902135618, 6358.662939055814],
+  [10567.088902135618, 6193.062939055814],
+  [10666.388902135619, 6193.062939055814],
+  [10666.388902135619, 6358.662939055814],
+  [10567.088902135618, 6524.262939055813],
+  [10467.788902135617, 6524.262939055813],
+  [10567.088902135618, 6689.862939055813],
+  [10467.788902135617, 6855.462939055812],
+  [10567.088902135618, 7021.0629390558115],
+  [10467.788902135617, 7021.0629390558115],
+  [10567.088902135618, 6855.462939055812],
+  [10467.788902135617, 6689.862939055813],
+  [10368.488902135616, 6689.862939055813],
+  [1073.6944354374714, 1154.3681204032646],
+  [974.3944354374713, 1319.9681204032647],
+  [875.0944354374712, 1319.9681204032647],
+  [775.7944354374712, 1154.3681204032646],
+  [775.7944354374712, 988.7681204032646],
+  [875.0944354374712, 823.1681204032647],
+  [875.0944354374712, 657.5681204032647],
+  [775.7944354374712, 823.1681204032647],
+  [676.4944354374711, 657.5681204032647],
+  [676.4944354374711, 491.9681204032648],
+  [775.7944354374712, 657.5681204032647],
+  [676.4944354374711, 823.1681204032647],
+  [676.4944354374711, 988.7681204032646],
+  [577.194435437471, 823.1681204032647],
+  [577.194435437471, 988.7681204032646],
+  [577.194435437471, 1154.3681204032646],
+  [676.4944354374711, 1319.9681204032647],
+  [577.194435437471, 1319.9681204032647],
+  [477.89443543747103, 1319.9681204032647],
+  [577.194435437471, 1485.5681204032649],
+  [477.89443543747103, 1651.168120403265],
+  [577.194435437471, 1816.7681204032651],
+  [477.89443543747103, 1816.7681204032651],
+  [378.5944354374711, 1982.3681204032653],
+  [378.5944354374711, 2147.9681204032654],
+  [279.2944354374711, 2313.5681204032653],
+  [179.99443543747114, 2147.9681204032654],
+  [80.69443543747114, 2313.5681204032653],
+  [80.69443543747114, 2479.168120403265],
+  [179.9944354374711, 2644.768120403265],
+  [179.9944354374711, 2479.168120403265],
+  [179.9944354374711, 2313.5681204032653],
+  [80.69443543747111, 2147.9681204032654],
+  [80.69443543747111, 1982.3681204032653],
+  [179.9944354374711, 1982.3681204032653],
+  [179.9944354374711, 1816.7681204032651],
+  [80.69443543747111, 1816.7681204032651],
+  [179.9944354374711, 1651.168120403265],
+  [80.69443543747111, 1485.5681204032649],
+  [80.69443543747111, 1319.9681204032647],
+  [179.9944354374711, 1154.3681204032646],
+  [80.69443543747111, 1154.3681204032646],
+  [179.9944354374711, 988.7681204032646],
+  [279.2944354374711, 823.1681204032647],
+  [378.5944354374711, 657.5681204032647],
+  [378.5944354374711, 823.1681204032647],
+  [477.89443543747103, 823.1681204032647],
+  [477.89443543747103, 657.5681204032647],
+  [378.5944354374711, 491.9681204032648],
+  [477.89443543747103, 326.3681204032648],
+  [477.89443543747103, 160.76812040326482],
+  [378.5944354374711, 160.76812040326482],
+  [279.2944354374711, 326.3681204032648],
+  [179.99443543747114, 491.9681204032648],
+  [179.99443543747114, 326.3681204032648],
+  [279.2944354374711, 491.9681204032648],
+  [279.2944354374711, 657.5681204032647],
+  [179.99443543747114, 823.1681204032647],
+  [279.2944354374711, 988.7681204032646],
+  [279.2944354374711, 1154.3681204032646],
+  [378.5944354374711, 1319.9681204032647],
+  [477.89443543747103, 1485.5681204032649],
+  [577.194435437471, 1651.168120403265],
+  [676.4944354374711, 1651.168120403265],
+  [775.7944354374712, 1816.7681204032651],
+  [676.4944354374711, 1816.7681204032651],
+  [775.7944354374712, 1651.168120403265],
+  [875.0944354374712, 1651.168120403265],
+  [974.3944354374713, 1651.168120403265],
+  [875.0944354374712, 1485.5681204032649],
+  [775.7944354374712, 1485.5681204032649],
+  [676.4944354374711, 1485.5681204032649],
+  [775.7944354374712, 1319.9681204032647],
+  [676.4944354374711, 1154.3681204032646],
+  [3138.413562431697, 2355.845602060523],
+  [3039.113562431697, 2521.445602060523],
+  [3039.113562431697, 2355.845602060523],
+  [3039.113562431697, 2190.245602060523],
+  [3138.413562431697, 2024.645602060523],
+  [3237.7135624316966, 1859.045602060523],
+  [3237.7135624316966, 2024.645602060523],
+  [3337.0135624316963, 1859.045602060523],
+  [3337.0135624316963, 1693.4456020605228],
+  [3436.313562431696, 1527.8456020605227],
+  [3535.6135624316958, 1693.4456020605228],
+  [3535.6135624316958, 1859.045602060523],
+  [3634.9135624316955, 2024.645602060523],
+  [3734.213562431695, 2190.245602060523],
+  [3634.9135624316955, 2190.245602060523],
+  [3535.6135624316958, 2190.245602060523],
+  [3535.6135624316958, 2355.845602060523],
+  [3535.6135624316958, 2521.445602060523],
+  [3436.313562431696, 2687.045602060523],
+  [3436.313562431696, 2852.645602060523],
+  [3535.6135624316958, 2687.045602060523],
+  [3634.9135624316955, 2521.445602060523],
+  [3634.9135624316955, 2355.845602060523],
+  [3734.213562431695, 2355.845602060523],
+  [3833.513562431695, 2190.245602060523],
+  [3932.8135624316947, 2024.645602060523],
+  [3833.513562431695, 1859.045602060523],
+  [3833.513562431695, 1693.4456020605228],
+  [3734.213562431695, 1859.045602060523],
+  [3734.213562431695, 1693.4456020605228],
+  [3734.213562431695, 1527.8456020605227],
+  [3634.9135624316955, 1527.8456020605227],
+  [3634.9135624316955, 1693.4456020605228],
+  [3535.6135624316958, 1527.8456020605227],
+  [3634.9135624316955, 1362.2456020605225],
+  [3535.6135624316958, 1362.2456020605225],
+  [3436.313562431696, 1196.6456020605224],
+  [3535.6135624316958, 1196.6456020605224],
+  [3535.6135624316958, 1031.0456020605222],
+  [3436.313562431696, 1031.0456020605222],
+  [3535.6135624316958, 865.4456020605222],
+  [3436.313562431696, 865.4456020605222],
+  [3535.6135624316958, 699.8456020605223],
+  [3634.9135624316955, 699.8456020605223],
+  [3535.6135624316958, 534.2456020605224],
+  [3436.313562431696, 368.64560206052244],
+  [3436.313562431696, 203.04560206052244],
+  [3337.0135624316963, 37.445602060522454],
+  [3436.313562431696, 37.445602060522454],
+  [3337.0135624316963, 203.04560206052244],
+  [3237.7135624316966, 37.445602060522454],
+  [3138.413562431697, 37.445602060522454],
+  [3237.7135624316966, 203.04560206052244],
+  [3337.0135624316963, 368.6456020605224],
+  [3436.313562431696, 534.2456020605224],
+  [3337.0135624316963, 699.8456020605223],
+  [3237.7135624316966, 534.2456020605224],
+  [3337.0135624316963, 534.2456020605224],
+  [3436.313562431696, 699.8456020605223],
+  [3337.0135624316963, 865.4456020605222],
+  [3237.7135624316966, 865.4456020605222],
+  [3337.0135624316963, 1031.0456020605222],
+  [3237.7135624316966, 1196.6456020605224],
+  [3138.413562431697, 1362.2456020605225],
+  [3039.113562431697, 1527.8456020605227],
+  [3138.413562431697, 1527.8456020605227],
+  [3039.113562431697, 1693.4456020605228],
+  [2939.8135624316974, 1527.8456020605227],
+  [2840.5135624316977, 1362.2456020605225],
+  [2840.5135624316977, 1527.8456020605227],
+  [2840.5135624316977, 1693.4456020605228],
+  [2939.8135624316974, 1859.045602060523],
+  [2840.5135624316977, 2024.645602060523],
+  [2840.5135624316977, 1859.045602060523],
+  [2939.8135624316974, 1693.4456020605228],
+  [3039.113562431697, 1859.045602060523],
+  [3039.113562431697, 2024.645602060523],
+  [2939.8135624316974, 2190.245602060523],
+  [2939.8135624316974, 2024.645602060523],
+  [16388.412117675925, 1839.818884803299],
+  [16289.112117675924, 1839.818884803299],
+  [16388.412117675925, 1674.2188848032988],
+  [16487.712117675925, 1508.6188848032987],
+  [16487.712117675925, 1674.2188848032988],
+  [16388.412117675925, 1508.6188848032987],
+  [16289.112117675924, 1343.0188848032985],
+  [16289.112117675924, 1508.6188848032987],
+  [16189.812117675923, 1674.2188848032988],
+  [16090.512117675922, 1839.818884803299],
+  [16090.512117675922, 2005.418884803299],
+  [15991.212117675921, 2171.018884803299],
+  [16090.512117675922, 2336.618884803299],
+  [16090.512117675922, 2502.218884803299],
+  [16090.512117675922, 2667.8188848032987],
+  [15991.212117675921, 2833.4188848032986],
+  [15991.212117675921, 2999.0188848032985],
+  [15891.91211767592, 3164.6188848032984],
+  [15891.91211767592, 3330.2188848032984],
+  [15991.212117675921, 3330.2188848032984],
+  [16090.512117675922, 3330.2188848032984],
+  [16189.812117675923, 3495.8188848032983],
+  [16289.112117675924, 3495.8188848032983],
+  [16189.812117675923, 3330.2188848032984],
+  [16189.812117675923, 3164.6188848032984],
+  [16289.112117675924, 3164.6188848032984],
+  [16388.412117675925, 3164.6188848032984],
+  [16388.412117675925, 3330.2188848032984],
+  [16487.712117675925, 3330.2188848032984],
+  [16587.012117675924, 3495.8188848032983],
+  [16587.012117675924, 3661.418884803298],
+  [16686.312117675923, 3661.418884803298],
+  [16785.612117675922, 3661.418884803298],
+  [16884.91211767592, 3661.418884803298],
+  [16984.21211767592, 3661.418884803298],
+  [16884.91211767592, 3827.018884803298],
+  [16884.91211767592, 3992.618884803298],
+  [16984.21211767592, 3827.018884803298],
+  [17083.51211767592, 3661.418884803298],
+  [17182.81211767592, 3495.8188848032983],
+  [17182.81211767592, 3330.2188848032984],
+  [17282.11211767592, 3164.6188848032984],
+  [17282.11211767592, 3330.2188848032984],
+  [17182.81211767592, 3164.6188848032984],
+  [17083.51211767592, 3164.6188848032984],
+  [16984.21211767592, 3330.2188848032984],
+  [16984.21211767592, 3495.8188848032983],
+  [17083.51211767592, 3330.2188848032984],
+  [16984.21211767592, 3164.6188848032984],
+  [16984.21211767592, 2999.0188848032985],
+  [17083.51211767592, 2833.4188848032986],
+  [17083.51211767592, 2667.8188848032987],
+  [17182.81211767592, 2667.8188848032987],
+  [17182.81211767592, 2833.4188848032986],
+  [17083.51211767592, 2999.0188848032985],
+  [16984.21211767592, 2833.4188848032986],
+  [16884.91211767592, 2833.4188848032986],
+  [16884.91211767592, 2999.0188848032985],
+  [16785.612117675922, 2999.0188848032985],
+  [16884.91211767592, 3164.6188848032984],
+  [16785.612117675922, 3164.6188848032984],
+  [16686.312117675923, 3164.6188848032984],
+  [16587.012117675924, 3164.6188848032984],
+  [16587.012117675924, 2999.0188848032985],
+  [16487.712117675925, 3164.6188848032984],
+  [16587.012117675924, 3330.2188848032984],
+  [16686.312117675923, 3495.8188848032983],
+  [16686.312117675923, 3330.2188848032984],
+  [16785.612117675922, 3330.2188848032984],
+  [16884.91211767592, 3495.8188848032983],
+  [16785.612117675922, 3495.8188848032983],
+  [16884.91211767592, 3330.2188848032984],
+  [1272.175991128079, 3842.7700224365044],
+  [1371.475991128079, 3842.7700224365044],
+  [1272.175991128079, 3677.1700224365045],
+  [1172.875991128079, 3511.5700224365046],
+  [1272.175991128079, 3511.5700224365046],
+  [1172.875991128079, 3345.9700224365047],
+  [1073.575991128079, 3180.3700224365048],
+  [1073.575991128079, 3014.770022436505],
+  [974.275991128079, 3014.770022436505],
+  [874.9759911280789, 3014.770022436505],
+  [775.6759911280789, 2849.170022436505],
+  [775.6759911280789, 3014.770022436505],
+  [775.6759911280789, 3180.3700224365048],
+  [676.3759911280788, 3345.9700224365047],
+  [676.3759911280788, 3511.5700224365046],
+  [775.6759911280789, 3677.1700224365045],
+  [676.3759911280788, 3842.7700224365044],
+  [577.0759911280787, 3842.7700224365044],
+  [577.0759911280787, 3677.1700224365045],
+  [676.3759911280788, 3677.1700224365045],
+  [775.6759911280789, 3511.5700224365046],
+  [775.6759911280789, 3345.9700224365047],
+  [874.9759911280789, 3345.9700224365047],
+  [874.9759911280789, 3180.3700224365048],
+  [974.275991128079, 3180.3700224365048],
+  [974.275991128079, 3345.9700224365047],
+  [1073.575991128079, 3511.5700224365046],
+  [1073.575991128079, 3677.1700224365045],
+  [1172.875991128079, 3677.1700224365045],
+  [1172.875991128079, 3842.7700224365044],
+  [1073.575991128079, 3842.7700224365044],
+  [1172.875991128079, 4008.3700224365043],
+  [1073.575991128079, 4008.3700224365043],
+  [974.275991128079, 3842.7700224365044],
+  [974.275991128079, 4008.3700224365043],
+  [874.9759911280789, 4008.3700224365043],
+  [775.6759911280789, 4008.3700224365043],
+  [874.9759911280789, 3842.7700224365044],
+  [974.275991128079, 3677.1700224365045],
+  [974.275991128079, 3511.5700224365046],
+  [1073.575991128079, 3345.9700224365047],
+  [1172.875991128079, 3180.3700224365048],
+  [1272.175991128079, 3180.3700224365048],
+  [1272.175991128079, 3345.9700224365047],
+  [1371.475991128079, 3180.3700224365048],
+  [1470.7759911280789, 3345.9700224365047],
+  [1371.475991128079, 3345.9700224365047],
+  [1371.475991128079, 3511.5700224365046],
+  [1470.7759911280789, 3511.5700224365046],
+  [1570.0759911280788, 3677.1700224365045],
+  [1470.7759911280789, 3677.1700224365045],
+  [1570.0759911280788, 3511.5700224365046],
+  [1669.3759911280788, 3511.5700224365046],
+  [1669.3759911280788, 3677.1700224365045],
+  [1768.6759911280787, 3842.7700224365044],
+  [1669.3759911280788, 3842.7700224365044],
+  [1768.6759911280787, 4008.3700224365043],
+  [1867.9759911280787, 3842.7700224365044],
+  [1967.2759911280787, 3677.1700224365045],
+  [2066.5759911280784, 3842.7700224365044],
+  [2165.875991128078, 3677.1700224365045],
+  [2066.5759911280784, 3511.5700224365046],
+  [2165.875991128078, 3511.5700224365046],
+  [2066.5759911280784, 3677.1700224365045],
+  [2165.875991128078, 3842.7700224365044],
+  [2265.175991128078, 4008.3700224365043],
+  [2364.4759911280776, 4008.3700224365043],
+  [2265.175991128078, 3842.7700224365044],
+  [2364.4759911280776, 3677.1700224365045],
+  [2463.7759911280773, 3842.7700224365044],
+  [2463.7759911280773, 4008.3700224365043],
+  [2364.4759911280776, 3842.7700224365044],
+  [6853.940039224797, 6050.837897021371],
+  [6953.240039224797, 6050.837897021371],
+  [7052.5400392247975, 5885.237897021371],
+  [7052.5400392247975, 5719.637897021372],
+  [7151.840039224798, 5885.237897021371],
+  [7052.5400392247975, 6050.837897021371],
+  [7052.5400392247975, 6216.43789702137],
+  [7052.5400392247975, 6382.03789702137],
+  [6953.240039224797, 6382.03789702137],
+  [6953.240039224797, 6216.43789702137],
+  [6853.940039224797, 6216.43789702137],
+  [6853.940039224797, 6382.03789702137],
+  [6754.640039224797, 6216.43789702137],
+  [6754.640039224797, 6382.03789702137],
+  [6754.640039224797, 6547.637897021369],
+  [6754.640039224797, 6713.237897021369],
+  [6655.340039224797, 6713.237897021369],
+  [6754.640039224797, 6878.837897021368],
+  [6853.940039224797, 6713.237897021369],
+  [6853.940039224797, 6878.837897021368],
+  [6953.240039224797, 6713.237897021369],
+  [7052.5400392247975, 6547.637897021369],
+  [7151.840039224798, 6713.237897021369],
+  [7151.840039224798, 6547.637897021369],
+  [7151.840039224798, 6382.03789702137],
+  [7251.140039224798, 6547.637897021369],
+  [7251.140039224798, 6713.237897021369],
+  [7350.440039224798, 6878.837897021368],
+  [7449.740039224798, 6878.837897021368],
+  [7449.740039224798, 6713.237897021369],
+  [7549.040039224798, 6547.637897021369],
+  [7449.740039224798, 6382.03789702137],
+  [7449.740039224798, 6216.43789702137],
+  [7549.040039224798, 6050.837897021371],
+  [7648.340039224799, 6216.43789702137],
+  [7549.040039224798, 6382.03789702137],
+  [7648.340039224799, 6382.03789702137],
+  [7747.640039224799, 6216.43789702137],
+  [7846.940039224799, 6382.03789702137],
+  [7946.240039224799, 6382.03789702137],
+  [7946.240039224799, 6547.637897021369],
+  [7846.940039224799, 6713.237897021369],
+  [7946.240039224799, 6713.237897021369],
+  [8045.540039224799, 6547.637897021369],
+  [8045.540039224799, 6713.237897021369],
+  [7946.240039224799, 6878.837897021368],
+  [7946.240039224799, 7044.4378970213675],
+  [8045.540039224799, 7210.037897021367],
+  [8144.8400392247995, 7375.637897021366],
+  [8144.8400392247995, 7541.237897021366],
+  [8045.540039224799, 7375.637897021366],
+  [8144.8400392247995, 7210.037897021367],
+  [8045.540039224799, 7044.4378970213675],
+  [7946.240039224799, 7210.037897021367],
+  [7846.940039224799, 7210.037897021367],
+  [7946.240039224799, 7375.637897021366],
+  [8045.540039224799, 7541.237897021366],
+  [8144.8400392247995, 7706.837897021365],
+  [8244.1400392248, 7541.237897021366],
+  [8343.4400392248, 7541.237897021366],
+  [8343.4400392248, 7706.837897021365],
+  [8244.1400392248, 7706.837897021365],
+  [4735.523842661975, 3503.497768214323],
+  [4636.223842661975, 3337.897768214323],
+  [4536.923842661975, 3337.897768214323],
+  [4437.623842661975, 3172.2977682143232],
+  [4338.323842661975, 3172.2977682143232],
+  [4239.023842661974, 3172.2977682143232],
+  [4338.323842661975, 3006.6977682143233],
+  [4437.623842661975, 2841.0977682143234],
+  [4338.323842661975, 2675.4977682143235],
+  [4338.323842661975, 2509.8977682143236],
+  [4239.023842661974, 2675.4977682143235],
+  [4139.723842661974, 2509.8977682143236],
+  [4040.4238426619745, 2344.2977682143237],
+  [4139.723842661974, 2178.697768214324],
+  [4239.023842661974, 2178.697768214324],
+  [4139.723842661974, 2344.2977682143237],
+  [4040.4238426619745, 2178.697768214324],
+  [4139.723842661974, 2013.0977682143237],
+  [4139.723842661974, 1847.4977682143235],
+  [4239.023842661974, 2013.0977682143237],
+  [4239.023842661974, 1847.4977682143235],
+  [4338.323842661975, 1847.4977682143235],
+  [4437.623842661975, 1847.4977682143235],
+  [4536.923842661975, 1681.8977682143234],
+  [4437.623842661975, 1516.2977682143232],
+  [4536.923842661975, 1516.2977682143232],
+  [4536.923842661975, 1350.697768214323],
+  [4437.623842661975, 1350.697768214323],
+  [4536.923842661975, 1185.097768214323],
+  [4636.223842661975, 1019.497768214323],
+  [4536.923842661975, 853.897768214323],
+  [4636.223842661975, 853.897768214323],
+  [4735.523842661975, 688.2977682143231],
+  [4636.223842661975, 522.6977682143232],
+  [4636.223842661975, 357.09776821432325],
+  [4735.523842661975, 357.09776821432325],
+  [4735.523842661975, 522.6977682143232],
+  [4636.223842661975, 688.2977682143231],
+  [4735.523842661975, 853.897768214323],
+  [4834.8238426619755, 853.897768214323],
+  [4735.523842661975, 1019.497768214323],
+  [4735.523842661975, 1185.097768214323],
+  [4735.523842661975, 1350.697768214323],
+  [4834.8238426619755, 1516.2977682143232],
+  [4735.523842661975, 1516.2977682143232],
+  [4834.8238426619755, 1350.697768214323],
+  [4834.8238426619755, 1185.097768214323],
+  [4934.123842661976, 1350.697768214323],
+  [5033.423842661976, 1185.097768214323],
+  [5033.423842661976, 1019.497768214323],
+  [5033.423842661976, 853.897768214323],
+  [4934.123842661976, 853.897768214323],
+  [4934.123842661976, 1019.497768214323],
+  [4834.8238426619755, 1019.497768214323],
+  [4934.123842661976, 1185.097768214323],
+  [5033.423842661976, 1350.697768214323],
+  [5132.723842661976, 1350.697768214323],
+  [5132.723842661976, 1185.097768214323],
+  [5232.023842661976, 1019.497768214323],
+  [5232.023842661976, 1185.097768214323],
+  [5331.323842661976, 1019.497768214323],
+  [5430.623842661977, 1019.497768214323],
+  [5529.923842661977, 1185.097768214323],
+  [5430.623842661977, 1350.697768214323],
+  [5430.623842661977, 1516.2977682143232],
+  [5529.923842661977, 1350.697768214323],
+  [5629.223842661977, 1350.697768214323],
+  [5728.523842661977, 1350.697768214323],
+  [5728.523842661977, 1516.2977682143232],
+  [5728.523842661977, 1681.8977682143234],
+  [5629.223842661977, 1516.2977682143232],
+  [5529.923842661977, 1516.2977682143232],
+  [5629.223842661977, 1681.8977682143234],
+  [5529.923842661977, 1681.8977682143234],
+  [5430.623842661977, 1847.4977682143235],
+  [5331.323842661976, 1847.4977682143235],
+  [5331.323842661976, 2013.0977682143237],
+  [5232.023842661976, 2178.697768214324],
+  [5132.723842661976, 2013.0977682143237],
+  [5132.723842661976, 2178.697768214324],
+  [5232.023842661976, 2013.0977682143237],
+  [5232.023842661976, 1847.4977682143235],
+  [5232.023842661976, 1681.8977682143234],
+  [5331.323842661976, 1681.8977682143234],
+  [5331.323842661976, 1516.2977682143232],
+  [5331.323842661976, 1350.697768214323],
+  [5232.023842661976, 1350.697768214323],
+  [5232.023842661976, 1516.2977682143232],
+  [5132.723842661976, 1516.2977682143232],
+  [5132.723842661976, 1681.8977682143234],
+  [5033.423842661976, 1847.4977682143235],
+  [5132.723842661976, 1847.4977682143235],
+  [5033.423842661976, 2013.0977682143237],
+  [4934.123842661976, 2178.697768214324],
+  [5033.423842661976, 2344.2977682143237],
+  [4934.123842661976, 2344.2977682143237],
+  [4834.8238426619755, 2178.697768214324],
+  [4834.8238426619755, 2344.2977682143237],
+  [4735.523842661975, 2344.2977682143237],
+  [4636.223842661975, 2344.2977682143237],
+  [4536.923842661975, 2178.697768214324],
+  [4437.623842661975, 2013.0977682143237],
+  [4338.323842661975, 2178.697768214324],
+  [4437.623842661975, 2344.2977682143237],
+  [4536.923842661975, 2509.8977682143236],
+  [4636.223842661975, 2675.4977682143235],
+  [4636.223842661975, 2509.8977682143236],
+  [4536.923842661975, 2675.4977682143235],
+  [4636.223842661975, 2841.0977682143234],
+  [4536.923842661975, 2841.0977682143234],
+  [4636.223842661975, 3006.6977682143233],
+  [4735.523842661975, 3172.2977682143232],
+  [4834.8238426619755, 3006.6977682143233],
+  [4735.523842661975, 2841.0977682143234],
+  [4735.523842661975, 3006.6977682143233],
+  [4636.223842661975, 3172.2977682143232],
+  [4735.523842661975, 3337.897768214323],
+  [4834.8238426619755, 3503.497768214323],
+  [4735.523842661975, 3669.097768214323],
+  [4834.8238426619755, 3834.697768214323],
+  [4834.8238426619755, 3669.097768214323],
+  [4934.123842661976, 3503.497768214323],
+  [5033.423842661976, 3503.497768214323],
+  [5033.423842661976, 3337.897768214323],
+  [4934.123842661976, 3337.897768214323],
+  [4834.8238426619755, 3172.2977682143232],
+  [4834.8238426619755, 3337.897768214323],
+  [4934.123842661976, 3172.2977682143232],
+  [5033.423842661976, 3006.6977682143233],
+  [5132.723842661976, 2841.0977682143234],
+  [5132.723842661976, 3006.6977682143233],
+  [5232.023842661976, 3172.2977682143232],
+  [5232.023842661976, 3337.897768214323],
+  [5132.723842661976, 3337.897768214323],
+  [5232.023842661976, 3503.497768214323],
+  [5331.323842661976, 3337.897768214323],
+  [5331.323842661976, 3503.497768214323],
+  [5430.623842661977, 3669.097768214323],
+  [5331.323842661976, 3669.097768214323],
+  [5430.623842661977, 3503.497768214323],
+  [5430.623842661977, 3337.897768214323],
+  [5529.923842661977, 3172.2977682143232],
+  [5529.923842661977, 3337.897768214323],
+  [5629.223842661977, 3337.897768214323],
+  [5728.523842661977, 3337.897768214323],
+  [5728.523842661977, 3503.497768214323],
+  [5827.823842661977, 3503.497768214323],
+  [5927.1238426619775, 3669.097768214323],
+  [6026.423842661978, 3669.097768214323],
+  [6125.723842661978, 3503.497768214323],
+  [6125.723842661978, 3669.097768214323],
+  [6225.023842661978, 3503.497768214323],
+  [6225.023842661978, 3337.897768214323],
+  [6324.323842661978, 3337.897768214323],
+  [6423.623842661978, 3503.497768214323],
+  [6324.323842661978, 3669.097768214323],
+  [6225.023842661978, 3669.097768214323],
+  [6324.323842661978, 3834.697768214323],
+  [6423.623842661978, 3834.697768214323],
+  [6324.323842661978, 4000.297768214323],
+  [6225.023842661978, 3834.697768214323],
+  [6125.723842661978, 3834.697768214323],
+  [6125.723842661978, 4000.297768214323],
+  [6225.023842661978, 4000.297768214323],
+  [6225.023842661978, 4165.897768214322],
+  [6225.023842661978, 4331.497768214322],
+  [6125.723842661978, 4165.897768214322],
+  [6026.423842661978, 4000.2977682143223],
+  [5927.1238426619775, 4165.897768214322],
+  [6026.423842661978, 4331.497768214322],
+  [6026.423842661978, 4497.097768214321],
+  [5927.1238426619775, 4497.097768214321],
+  [5827.823842661977, 4662.697768214321],
+  [5728.523842661977, 4828.29776821432],
+  [5827.823842661977, 4828.29776821432],
+  [5927.1238426619775, 4828.29776821432],
+  [5927.1238426619775, 4662.697768214321],
+  [5827.823842661977, 4497.097768214321],
+  [5927.1238426619775, 4331.497768214322],
+  [5827.823842661977, 4165.897768214322],
+  [5728.523842661977, 4331.497768214322],
+  [5728.523842661977, 4165.897768214322],
+  [5629.223842661977, 4000.2977682143223],
+  [5629.223842661977, 3834.6977682143224],
+  [5529.923842661977, 3669.0977682143225],
+  [5629.223842661977, 3503.4977682143226],
+  [5728.523842661977, 3669.0977682143225],
+  [5827.823842661977, 3669.0977682143225],
+  [5927.1238426619775, 3834.6977682143224],
+  [5927.1238426619775, 4000.2977682143223],
+  [6026.423842661978, 4165.897768214322],
+  [6125.723842661978, 4331.497768214322],
+  [6225.023842661978, 4497.097768214321],
+  [6225.023842661978, 4662.697768214321],
+  [6324.323842661978, 4662.697768214321],
+  [6225.023842661978, 4828.29776821432],
+  [6324.323842661978, 4828.29776821432],
+  [6423.623842661978, 4828.29776821432],
+  [6324.323842661978, 4993.8977682143195],
+  [6225.023842661978, 5159.497768214319],
+  [6125.723842661978, 5159.497768214319],
+  [6026.423842661978, 5325.097768214318],
+  [5927.1238426619775, 5490.697768214318],
+  [6026.423842661978, 5656.297768214317],
+  [5927.1238426619775, 5821.897768214317],
+  [5927.1238426619775, 5987.497768214316],
+  [6026.423842661978, 5987.497768214316],
+  [6026.423842661978, 5821.897768214317],
+  [5927.1238426619775, 5656.297768214317],
+  [5827.823842661977, 5656.297768214317],
+  [5827.823842661977, 5490.697768214318],
+  [5728.523842661977, 5490.697768214318],
+  [5629.223842661977, 5325.097768214318],
+  [5629.223842661977, 5159.497768214319],
+  [5529.923842661977, 4993.8977682143195],
+  [5529.923842661977, 5159.497768214319],
+  [5629.223842661977, 4993.8977682143195],
+  [5629.223842661977, 4828.29776821432],
+  [5529.923842661977, 4662.697768214321],
+  [5430.623842661977, 4828.29776821432],
+  [5529.923842661977, 4828.29776821432],
+  [5629.223842661977, 4662.697768214321],
+  [5728.523842661977, 4662.697768214321],
+  [5629.223842661977, 4497.097768214321],
+  [5728.523842661977, 4497.097768214321],
+  [5827.823842661977, 4331.497768214322],
+  [10216.161365168813, 2951.605409896135],
+  [10116.861365168812, 2951.605409896135],
+  [10017.56136516881, 3117.205409896135],
+  [9918.26136516881, 3117.205409896135],
+  [9818.961365168809, 3117.205409896135],
+  [9719.661365168808, 3282.8054098961347],
+  [9620.361365168807, 3282.8054098961347],
+  [9620.361365168807, 3117.205409896135],
+  [9521.061365168805, 2951.605409896135],
+  [9521.061365168805, 2786.005409896135],
+  [9620.361365168807, 2786.005409896135],
+  [9719.661365168808, 2786.005409896135],
+  [9818.961365168809, 2620.405409896135],
+  [9918.26136516881, 2786.005409896135],
+  [9818.961365168809, 2951.605409896135],
+  [9818.961365168809, 2786.005409896135],
+  [9719.661365168808, 2620.405409896135],
+  [9719.661365168808, 2454.805409896135],
+  [9620.361365168807, 2289.2054098961353],
+  [9521.061365168805, 2123.6054098961354],
+  [9620.361365168807, 1958.0054098961352],
+  [9719.661365168808, 2123.6054098961354],
+  [9818.961365168809, 2289.2054098961353],
+  [9818.961365168809, 2123.6054098961354],
+  [9818.961365168809, 1958.0054098961352],
+  [9719.661365168808, 1958.0054098961352],
+  [9620.361365168807, 1792.405409896135],
+  [9620.361365168807, 1626.805409896135],
+  [9521.061365168805, 1461.2054098961348],
+  [9421.761365168804, 1295.6054098961347],
+  [9521.061365168805, 1130.0054098961346],
+  [9521.061365168805, 964.4054098961345],
+  [9421.761365168804, 964.4054098961345],
+  [9521.061365168805, 798.8054098961346],
+  [9620.361365168807, 798.8054098961346],
+  [9620.361365168807, 964.4054098961345],
+  [9620.361365168807, 1130.0054098961346],
+  [9620.361365168807, 1295.6054098961347],
+  [9620.361365168807, 1461.2054098961348],
+  [9719.661365168808, 1295.6054098961347],
+  [9818.961365168809, 1130.0054098961346],
+  [9918.26136516881, 964.4054098961345],
+  [9818.961365168809, 964.4054098961345],
+  [9918.26136516881, 798.8054098961346],
+  [10017.56136516881, 633.2054098961347],
+  [9918.26136516881, 467.60540989613474],
+  [9918.26136516881, 302.0054098961348],
+  [10017.56136516881, 302.0054098961348],
+  [10116.861365168812, 136.40540989613478],
+  [10116.861365168812, 302.0054098961348],
+  [10116.861365168812, 467.60540989613474],
+  [10116.861365168812, 633.2054098961347],
+  [10216.161365168813, 633.2054098961347],
+  [10216.161365168813, 798.8054098961346],
+  [10315.461365168814, 633.2054098961347],
+  [10315.461365168814, 798.8054098961346],
+  [10414.761365168815, 798.8054098961346],
+  [10514.061365168816, 633.2054098961347],
+  [10514.061365168816, 798.8054098961346],
+  [10414.761365168815, 964.4054098961345],
+  [10315.461365168814, 964.4054098961345],
+  [10216.161365168813, 964.4054098961345],
+  [10116.861365168812, 798.8054098961346],
+  [10017.56136516881, 798.8054098961346],
+  [10116.861365168812, 964.4054098961345],
+  [10216.161365168813, 1130.0054098961346],
+  [10116.861365168812, 1130.0054098961346],
+  [10216.161365168813, 1295.6054098961347],
+  [10216.161365168813, 1461.2054098961348],
+  [10315.461365168814, 1626.805409896135],
+  [10315.461365168814, 1792.405409896135],
+  [10216.161365168813, 1958.0054098961352],
+  [10216.161365168813, 1792.405409896135],
+  [10116.861365168812, 1792.405409896135],
+  [10017.56136516881, 1958.0054098961352],
+  [9918.26136516881, 2123.6054098961354],
+  [9918.26136516881, 1958.0054098961352],
+  [10017.56136516881, 2123.6054098961354],
+  [10116.861365168812, 2123.6054098961354],
+  [10017.56136516881, 2289.2054098961353],
+  [10017.56136516881, 2454.805409896135],
+  [10116.861365168812, 2289.2054098961353],
+  [10216.161365168813, 2454.805409896135],
+  [10315.461365168814, 2620.405409896135],
+  [10315.461365168814, 2454.805409896135],
+  [10315.461365168814, 2289.2054098961353],
+  [10414.761365168815, 2454.805409896135],
+  [10514.061365168816, 2620.405409896135],
+  [10613.361365168817, 2786.005409896135],
+  [10514.061365168816, 2786.005409896135],
+  [10613.361365168817, 2620.405409896135],
+  [10514.061365168816, 2454.805409896135],
+  [10514.061365168816, 2289.2054098961353],
+  [10613.361365168817, 2289.2054098961353],
+  [10712.661365168819, 2289.2054098961353],
+  [10811.96136516882, 2454.805409896135],
+  [10911.26136516882, 2289.2054098961353],
+  [10811.96136516882, 2289.2054098961353],
+  [10712.661365168819, 2454.805409896135],
+  [10712.661365168819, 2620.405409896135],
+  [10811.96136516882, 2786.005409896135],
+  [10911.26136516882, 2620.405409896135],
+  [10911.26136516882, 2786.005409896135],
+  [11010.561365168822, 2620.405409896135],
+  [10911.26136516882, 2454.805409896135],
+  [10811.96136516882, 2620.405409896135],
+  [10712.661365168819, 2786.005409896135],
+  [10811.96136516882, 2951.605409896135],
+  [10911.26136516882, 2951.605409896135],
+  [10811.96136516882, 3117.205409896135],
+  [10712.661365168819, 2951.605409896135],
+  [10613.361365168817, 2951.605409896135],
+  [10514.061365168816, 2951.605409896135],
+  [10414.761365168815, 3117.205409896135],
+  [10414.761365168815, 2951.605409896135],
+  [10315.461365168814, 2786.005409896135],
+  [10216.161365168813, 2620.405409896135],
+  [10216.161365168813, 2786.005409896135],
+  [10315.461365168814, 2951.605409896135],
+  [10315.461365168814, 3117.205409896135],
+  [10216.161365168813, 3117.205409896135],
+  [10116.861365168812, 3117.205409896135],
+  [10017.56136516881, 3282.8054098961347],
+  [9918.26136516881, 3448.4054098961346],
+  [9818.961365168809, 3448.4054098961346],
+  [9818.961365168809, 3614.0054098961346],
+  [9719.661365168808, 3448.4054098961346],
+  [9818.961365168809, 3282.8054098961347],
+  [9719.661365168808, 3117.205409896135],
+  [9620.361365168807, 2951.605409896135],
+  [9521.061365168805, 3117.205409896135],
+  [9521.061365168805, 3282.8054098961347],
+  [9421.761365168804, 3117.205409896135],
+  [9421.761365168804, 3282.8054098961347],
+  [9322.461365168803, 3117.205409896135],
+  [9421.761365168804, 2951.605409896135],
+  [9322.461365168803, 2951.605409896135],
+  [9223.161365168802, 2786.005409896135],
+  [9322.461365168803, 2620.405409896135],
+  [9421.761365168804, 2454.805409896135],
+  [9521.061365168805, 2289.2054098961353],
+  [9421.761365168804, 2123.6054098961354],
+  [9421.761365168804, 1958.0054098961352],
+  [9421.761365168804, 1792.405409896135],
+  [9521.061365168805, 1626.805409896135],
+  [9421.761365168804, 1626.805409896135],
+  [9322.461365168803, 1792.405409896135],
+  [9322.461365168803, 1626.805409896135],
+  [9322.461365168803, 1461.2054098961348],
+  [9421.761365168804, 1461.2054098961348],
+  [9521.061365168805, 1295.6054098961347],
+  [9421.761365168804, 1130.0054098961346],
+  [9322.461365168803, 964.4054098961345],
+  [9223.161365168802, 964.4054098961345],
+  [9223.161365168802, 798.8054098961346],
+  [9322.461365168803, 633.2054098961347],
+  [9421.761365168804, 798.8054098961346],
+  [9421.761365168804, 633.2054098961347],
+  [9521.061365168805, 633.2054098961347],
+  [9421.761365168804, 467.60540989613474],
+  [9421.761365168804, 302.0054098961348],
+  [9322.461365168803, 136.40540989613478],
+  [9223.161365168802, 302.0054098961348],
+  [9123.861365168801, 302.0054098961348],
+  [9024.5613651688, 136.40540989613478],
+  [9123.861365168801, 136.40540989613478],
+  [9223.161365168802, 136.40540989613478],
+  [9322.461365168803, 302.0054098961348],
+  [9421.761365168804, 136.40540989613478],
+  [9521.061365168805, 136.40540989613478],
+  [9620.361365168807, 136.40540989613478],
+  [9620.361365168807, 302.0054098961348],
+  [9521.061365168805, 302.0054098961348],
+  [9521.061365168805, 467.60540989613474],
+  [9620.361365168807, 467.60540989613474],
+  [9719.661365168808, 302.0054098961348],
+  [9719.661365168808, 136.40540989613478],
+  [9818.961365168809, 136.40540989613478],
+  [9918.26136516881, 136.40540989613478],
+  [10017.56136516881, 136.40540989613478],
+  [366.07287160549004, 5394.185440937868],
+  [465.37287160549005, 5394.185440937868],
+  [465.37287160549005, 5559.785440937868],
+  [366.0728716054901, 5559.785440937868],
+  [366.0728716054901, 5725.385440937867],
+  [266.77287160549014, 5725.385440937867],
+  [167.47287160549016, 5559.785440937868],
+  [266.77287160549014, 5559.785440937868],
+  [266.77287160549014, 5394.185440937868],
+  [266.77287160549014, 5228.585440937869],
+  [167.47287160549016, 5394.185440937868],
+  [68.17287160549016, 5228.585440937869],
+  [167.47287160549013, 5062.9854409378695],
+  [68.17287160549013, 4897.38544093787],
+  [167.47287160549013, 4731.785440937871],
+  [266.77287160549014, 4731.785440937871],
+  [167.47287160549016, 4566.185440937871],
+  [68.17287160549016, 4566.185440937871],
+  [68.17287160549016, 4731.785440937871],
+  [167.47287160549013, 4897.38544093787],
+  [68.17287160549013, 5062.9854409378695],
+  [167.47287160549013, 5228.585440937869],
+  [266.77287160549014, 5062.9854409378695],
+  [366.0728716054901, 4897.38544093787],
+  [266.77287160549014, 4897.38544093787],
+  [366.0728716054901, 4731.785440937871],
+  [465.37287160549005, 4897.38544093787],
+  [366.0728716054901, 5062.9854409378695],
+  [465.37287160549005, 5062.9854409378695],
+  [366.0728716054901, 5228.585440937869],
+  [465.37287160549005, 5228.585440937869],
+  [564.6728716054901, 5394.185440937868],
+  [663.9728716054901, 5228.585440937869],
+  [564.6728716054901, 5062.9854409378695],
+  [663.9728716054901, 4897.38544093787],
+  [763.2728716054902, 4731.785440937871],
+  [862.5728716054903, 4566.185440937871],
+  [961.8728716054903, 4731.785440937871],
+  [862.5728716054903, 4731.785440937871],
+  [961.8728716054903, 4566.185440937871],
+  [862.5728716054903, 4400.585440937872],
+  [961.8728716054903, 4234.985440937872],
+  [1061.1728716054904, 4400.585440937872],
+  [1160.4728716054904, 4234.985440937872],
+  [1160.4728716054904, 4400.585440937872],
+  [1259.7728716054903, 4234.985440937872],
+  [1359.0728716054903, 4069.3854409378723],
+  [1458.3728716054902, 4069.3854409378723],
+  [1557.6728716054902, 4234.985440937872],
+  [1656.9728716054901, 4400.585440937872],
+  [1557.6728716054902, 4400.585440937872],
+  [1458.3728716054902, 4400.585440937872],
+  [1359.0728716054903, 4566.185440937871],
+  [1359.0728716054903, 4731.785440937871],
+  [1259.7728716054903, 4731.785440937871],
+  [1359.0728716054903, 4897.38544093787],
+  [1458.3728716054902, 4731.785440937871],
+  [1458.3728716054902, 4897.38544093787],
+  [1359.0728716054903, 5062.9854409378695],
+  [1259.7728716054903, 5228.585440937869],
+  [1259.7728716054903, 5062.9854409378695],
+  [1259.7728716054903, 4897.38544093787],
+  [1160.4728716054904, 5062.9854409378695],
+  [1160.4728716054904, 5228.585440937869],
+  [1061.1728716054904, 5228.585440937869],
+  [1061.1728716054904, 5062.9854409378695],
+  [961.8728716054903, 5228.585440937869],
+  [862.5728716054903, 5062.9854409378695],
+  [961.8728716054903, 5062.9854409378695],
+  [961.8728716054903, 4897.38544093787],
+  [1061.1728716054904, 4897.38544093787],
+  [1160.4728716054904, 4731.785440937871],
+  [1259.7728716054903, 4566.185440937871],
+  [1359.0728716054903, 4400.585440937872],
+  [1458.3728716054902, 4566.185440937871],
+  [1557.6728716054902, 4566.185440937871],
+  [1656.9728716054901, 4731.785440937871],
+  [1557.6728716054902, 4897.38544093787],
+  [1458.3728716054902, 5062.9854409378695],
+  [1557.6728716054902, 5228.585440937869],
+  [1656.9728716054901, 5062.9854409378695],
+  [1756.27287160549, 5062.9854409378695],
+  [1756.27287160549, 4897.38544093787],
+  [1855.57287160549, 5062.9854409378695],
+  [1954.87287160549, 4897.38544093787],
+  [2054.17287160549, 5062.9854409378695],
+  [1954.87287160549, 5062.9854409378695],
+  [2054.17287160549, 5228.585440937869],
+  [2153.4728716054897, 5228.585440937869],
+  [2252.7728716054894, 5062.9854409378695],
+  [2352.072871605489, 5228.585440937869],
+  [2451.372871605489, 5394.185440937868],
+  [2352.072871605489, 5394.185440937868],
+  [2252.7728716054894, 5228.585440937869],
+  [2153.4728716054897, 5062.9854409378695],
+  [2153.4728716054897, 4897.38544093787],
+  [2252.7728716054894, 4897.38544093787],
+  [2352.072871605489, 4731.785440937871],
+  [2252.7728716054894, 4731.785440937871],
+  [2153.4728716054897, 4731.785440937871],
+  [2054.17287160549, 4566.185440937871],
+  [1954.87287160549, 4731.785440937871],
+  [1855.57287160549, 4897.38544093787],
+  [1756.27287160549, 4731.785440937871],
+  [1855.57287160549, 4731.785440937871],
+  [1855.57287160549, 4566.185440937871],
+  [1756.27287160549, 4566.185440937871],
+  [1656.9728716054901, 4566.185440937871],
+  [1557.6728716054902, 4731.785440937871],
+  [1656.9728716054901, 4897.38544093787],
+  [1557.6728716054902, 5062.9854409378695],
+  [1458.3728716054902, 5228.585440937869],
+  [1359.0728716054903, 5228.585440937869],
+  [1259.7728716054903, 5394.185440937868],
+  [1259.7728716054903, 5559.785440937868],
+  [1160.4728716054904, 5559.785440937868],
+  [1061.1728716054904, 5559.785440937868],
+  [1160.4728716054904, 5725.385440937867],
+  [1259.7728716054903, 5725.385440937867],
+  [1359.0728716054903, 5559.785440937868],
+  [1458.3728716054902, 5725.385440937867],
+  [1458.3728716054902, 5559.785440937868],
+  [1359.0728716054903, 5725.385440937867],
+  [1259.7728716054903, 5890.985440937867],
+  [1359.0728716054903, 5890.985440937867],
+  [1259.7728716054903, 6056.585440937866],
+  [1359.0728716054903, 6222.185440937866],
+  [1458.3728716054902, 6222.185440937866],
+  [1458.3728716054902, 6387.785440937865],
+  [1557.6728716054902, 6222.185440937866],
+  [1557.6728716054902, 6387.785440937865],
+  [1656.9728716054901, 6222.185440937866],
+  [1756.27287160549, 6056.585440937866],
+  [1855.57287160549, 5890.985440937867],
+  [1756.27287160549, 5890.985440937867],
+  [1656.9728716054901, 6056.585440937866],
+  [1557.6728716054902, 5890.985440937867],
+  [1458.3728716054902, 5890.985440937867],
+  [1359.0728716054903, 6056.585440937866],
+  [1259.7728716054903, 6222.185440937866],
+  [1160.4728716054904, 6056.585440937866],
+  [1061.1728716054904, 5890.985440937867],
+  [1061.1728716054904, 6056.585440937866],
+  [1160.4728716054904, 6222.185440937866],
+  [1061.1728716054904, 6222.185440937866],
+  [961.8728716054903, 6222.185440937866],
+  [961.8728716054903, 6056.585440937866],
+  [961.8728716054903, 5890.985440937867],
+  [961.8728716054903, 5725.385440937867],
+  [862.5728716054903, 5559.785440937868],
+  [763.2728716054902, 5725.385440937867],
+  [862.5728716054903, 5725.385440937867],
+  [763.2728716054902, 5890.985440937867],
+  [663.9728716054901, 5725.385440937867],
+  [763.2728716054902, 5559.785440937868],
+  [763.2728716054902, 5394.185440937868],
+  [862.5728716054903, 5228.585440937869],
+  [961.8728716054903, 5394.185440937868],
+  [1061.1728716054904, 5394.185440937868],
+  [961.8728716054903, 5559.785440937868],
+  [862.5728716054903, 5394.185440937868],
+  [763.2728716054902, 5228.585440937869],
+  [663.9728716054901, 5062.9854409378695],
+  [763.2728716054902, 5062.9854409378695],
+  [763.2728716054902, 4897.38544093787],
+  [663.9728716054901, 4731.785440937871],
+  [564.6728716054901, 4731.785440937871],
+  [465.37287160549005, 4566.185440937871],
+  [366.0728716054901, 4566.185440937871],
+  [465.37287160549005, 4731.785440937871],
+  [564.6728716054901, 4566.185440937871],
+  [465.37287160549005, 4400.585440937872],
+  [366.0728716054901, 4400.585440937872],
+  [266.77287160549014, 4234.985440937872],
+  [167.47287160549016, 4234.985440937872],
+  [266.77287160549014, 4400.585440937872],
+  [266.77287160549014, 4566.185440937871],
+  [167.47287160549016, 4400.585440937872],
+  [68.17287160549016, 4234.985440937872],
+  [167.47287160549013, 4069.3854409378723],
+  [68.17287160549013, 3903.7854409378724],
+  [68.17287160549013, 4069.3854409378723],
+  [167.47287160549013, 3903.7854409378724],
+  [266.77287160549014, 3903.7854409378724],
+  [366.0728716054901, 3738.1854409378725],
+  [266.77287160549014, 3738.1854409378725],
+  [266.77287160549014, 3572.5854409378726],
+  [167.47287160549016, 3406.9854409378727],
+  [167.47287160549016, 3241.3854409378728],
+  [266.77287160549014, 3241.3854409378728],
+  [266.77287160549014, 3406.9854409378727],
+  [366.0728716054901, 3572.5854409378726],
+  [465.37287160549005, 3738.1854409378725],
+  [465.37287160549005, 3903.7854409378724],
+  [366.0728716054901, 4069.3854409378723],
+  [366.0728716054901, 4234.985440937872],
+  [465.37287160549005, 4234.985440937872],
+  [564.6728716054901, 4069.3854409378723],
+  [465.37287160549005, 4069.3854409378723],
+  [564.6728716054901, 4234.985440937872],
+  [663.9728716054901, 4069.3854409378723],
+  [663.9728716054901, 4234.985440937872],
+  [663.9728716054901, 4400.585440937872],
+  [763.2728716054902, 4566.185440937871],
+  [763.2728716054902, 4400.585440937872],
+  [663.9728716054901, 4566.185440937871],
+  [564.6728716054901, 4400.585440937872],
+  [19431.915041401327, 3495.506142643713],
+  [19332.61504140133, 3661.1061426437127],
+  [19431.915041401327, 3661.1061426437127],
+  [19531.215041401327, 3661.1061426437127],
+  [19630.515041401326, 3495.506142643713],
+  [19630.515041401326, 3661.1061426437127],
+  [19729.815041401325, 3826.7061426437126],
+  [19630.515041401326, 3826.7061426437126],
+  [19729.815041401325, 3992.3061426437125],
+  [19630.515041401326, 3992.3061426437125],
+  [19630.515041401326, 4157.906142643712],
+  [19630.515041401326, 4323.506142643711],
+  [19531.215041401327, 4157.906142643712],
+  [19431.915041401327, 4323.506142643711],
+  [19531.215041401327, 4489.106142643711],
+  [19431.915041401327, 4654.70614264371],
+  [19332.61504140133, 4654.70614264371],
+  [19332.61504140133, 4820.30614264371],
+  [19332.61504140133, 4985.906142643709],
+  [19233.31504140133, 4985.906142643709],
+  [19134.01504140133, 5151.506142643709],
+  [19034.71504140133, 5151.506142643709],
+  [19134.01504140133, 5317.106142643708],
+  [19034.71504140133, 5317.106142643708],
+  [19034.71504140133, 5482.706142643708],
+  [18935.41504140133, 5648.306142643707],
+  [18836.115041401332, 5813.9061426437065],
+  [18836.115041401332, 5979.506142643706],
+  [18935.41504140133, 5979.506142643706],
+  [19034.71504140133, 6145.106142643705],
+  [19034.71504140133, 5979.506142643706],
+  [19034.71504140133, 5813.9061426437065],
+  [19134.01504140133, 5648.306142643707],
+  [19233.31504140133, 5648.306142643707],
+  [19134.01504140133, 5813.9061426437065],
+  [19134.01504140133, 5979.506142643706],
+  [19233.31504140133, 5813.9061426437065],
+  [19233.31504140133, 5979.506142643706],
+  [19332.61504140133, 6145.106142643705],
+  [19332.61504140133, 6310.706142643705],
+  [19233.31504140133, 6310.706142643705],
+  [19233.31504140133, 6476.306142643704],
+  [19332.61504140133, 6476.306142643704],
+  [19431.915041401327, 6641.906142643704],
+  [19332.61504140133, 6807.506142643703],
+  [19332.61504140133, 6641.906142643704],
+  [19431.915041401327, 6476.306142643704],
+  [19431.915041401327, 6310.706142643705],
+  [19531.215041401327, 6145.106142643705],
+  [19431.915041401327, 5979.506142643706],
+  [19431.915041401327, 6145.106142643705],
+  [19531.215041401327, 5979.506142643706],
+  [19630.515041401326, 5813.9061426437065],
+  [19630.515041401326, 5979.506142643706],
+  [19729.815041401325, 5813.9061426437065],
+  [19829.115041401325, 5979.506142643706],
+  [19729.815041401325, 5979.506142643706],
+  [19729.815041401325, 6145.106142643705],
+  [19729.815041401325, 6310.706142643705],
+  [19630.515041401326, 6476.306142643704],
+  [19729.815041401325, 6476.306142643704],
+  [19630.515041401326, 6310.706142643705],
+  [19531.215041401327, 6310.706142643705],
+  [19531.215041401327, 6476.306142643704],
+  [19630.515041401326, 6641.906142643704],
+  [19729.815041401325, 6807.506142643703],
+  [19829.115041401325, 6973.106142643703],
+  [19928.415041401324, 6973.106142643703],
+  [19928.415041401324, 7138.706142643702],
+  [20027.715041401323, 7138.706142643702],
+  [20027.715041401323, 7304.306142643702],
+  [19928.415041401324, 7304.306142643702],
+  [19829.115041401325, 7304.306142643702],
+  [19829.115041401325, 7469.906142643701],
+  [19928.415041401324, 7469.906142643701],
+  [19928.415041401324, 7635.5061426437005],
+  [19928.415041401324, 7801.1061426437],
+  [20027.715041401323, 7635.5061426437005],
+  [20027.715041401323, 7801.1061426437],
+  [20127.015041401322, 7801.1061426437],
+  [20226.31504140132, 7801.1061426437],
+  [20325.61504140132, 7801.1061426437],
+  [20226.31504140132, 7635.5061426437005],
+  [20226.31504140132, 7469.906142643701],
+  [20226.31504140132, 7304.306142643702],
+  [20127.015041401322, 7304.306142643702],
+  [20027.715041401323, 7469.906142643701],
+  [20127.015041401322, 7469.906142643701],
+  [20127.015041401322, 7635.5061426437005],
+  [2748.790306732237, 2362.9553147492866],
+  [2848.0903067322365, 2528.5553147492865],
+  [2748.790306732237, 2694.1553147492864],
+  [2649.490306732237, 2859.7553147492863],
+  [2748.790306732237, 3025.355314749286],
+  [2848.0903067322365, 2859.7553147492863],
+  [2848.0903067322365, 2694.1553147492864],
+  [2947.3903067322362, 2694.1553147492864],
+  [3046.690306732236, 2859.7553147492863],
+  [3145.9903067322357, 2694.1553147492864],
+  [3145.9903067322357, 2528.5553147492865],
+  [3046.690306732236, 2694.1553147492864],
+  [3145.9903067322357, 2859.7553147492863],
+  [3046.690306732236, 3025.355314749286],
+  [3145.9903067322357, 3025.355314749286],
+  [3245.2903067322354, 3190.955314749286],
+  [3245.2903067322354, 3356.555314749286],
+  [3344.590306732235, 3522.155314749286],
+  [3443.890306732235, 3356.555314749286],
+  [3543.1903067322346, 3356.555314749286],
+  [3642.4903067322343, 3190.955314749286],
+  [3741.790306732234, 3025.355314749286],
+  [3741.790306732234, 2859.7553147492863],
+  [3841.090306732234, 3025.355314749286],
+  [3841.090306732234, 3190.955314749286],
+  [3741.790306732234, 3190.955314749286],
+  [3642.4903067322343, 3025.355314749286],
+  [3543.1903067322346, 3025.355314749286],
+  [3543.1903067322346, 2859.7553147492863],
+  [3443.890306732235, 3025.355314749286],
+  [3443.890306732235, 3190.955314749286],
+  [3543.1903067322346, 3190.955314749286],
+  [3642.4903067322343, 3356.555314749286],
+  [3543.1903067322346, 3522.155314749286],
+  [3443.890306732235, 3687.755314749286],
+  [3443.890306732235, 3853.3553147492858],
+  [3344.590306732235, 3687.755314749286],
+  [3245.2903067322354, 3853.3553147492858],
+  [3245.2903067322354, 3687.755314749286],
+  [3145.9903067322357, 3687.755314749286],
+  [3046.690306732236, 3853.3553147492858],
+  [3145.9903067322357, 4018.9553147492857],
+  [3145.9903067322357, 3853.3553147492858],
+  [3046.690306732236, 3687.755314749286],
+  [3145.9903067322357, 3522.155314749286],
+  [3145.9903067322357, 3356.555314749286],
+  [3145.9903067322357, 3190.955314749286],
+  [3046.690306732236, 3190.955314749286],
+  [3046.690306732236, 3356.555314749286],
+  [2947.3903067322362, 3356.555314749286],
+  [2848.0903067322365, 3190.955314749286],
+  [2947.3903067322362, 3025.355314749286],
+  [2848.0903067322365, 3025.355314749286],
+  [2748.790306732237, 2859.7553147492863],
+  [2649.490306732237, 2694.1553147492864],
+  [2748.790306732237, 2528.5553147492865],
+  [2848.0903067322365, 2362.9553147492866],
+  [2748.790306732237, 2197.3553147492867],
+  [2649.490306732237, 2362.9553147492866],
+  [2649.490306732237, 2197.3553147492867],
+  [2550.1903067322373, 2362.9553147492866],
+  [2450.8903067322376, 2362.9553147492866],
+  [2351.590306732238, 2528.5553147492865],
+  [2252.290306732238, 2528.5553147492865],
+  [2351.590306732238, 2362.9553147492866],
+  [2252.290306732238, 2197.3553147492867],
+  [2351.590306732238, 2197.3553147492867],
+  [2351.590306732238, 2031.7553147492865],
+  [2351.590306732238, 1866.1553147492864],
+  [2252.290306732238, 1866.1553147492864],
+  [2351.590306732238, 1700.5553147492863],
+  [2450.8903067322376, 1534.9553147492861],
+  [2351.590306732238, 1369.355314749286],
+  [2252.290306732238, 1203.7553147492858],
+  [2252.290306732238, 1369.355314749286],
+  [2252.290306732238, 1534.9553147492861],
+  [2152.9903067322384, 1369.355314749286],
+  [2053.6903067322387, 1369.355314749286],
+  [1954.3903067322387, 1203.7553147492858],
+  [1855.0903067322388, 1203.7553147492858],
+  [1755.7903067322388, 1038.1553147492857],
+  [1656.4903067322389, 1038.1553147492857],
+  [1557.190306732239, 872.5553147492857],
+  [1457.890306732239, 1038.1553147492857],
+  [1457.890306732239, 872.5553147492857],
+  [1457.890306732239, 706.9553147492858],
+  [1557.190306732239, 706.9553147492858],
+  [1656.4903067322389, 872.5553147492857],
+  [1656.4903067322389, 706.9553147492858],
+  [1755.7903067322388, 706.9553147492858],
+  [1656.4903067322389, 541.3553147492859],
+  [1557.190306732239, 375.7553147492859],
+  [1656.4903067322389, 210.1553147492859],
+  [1755.7903067322388, 44.55531474928592],
+  [1656.4903067322389, 44.55531474928592],
+  [1557.190306732239, 210.1553147492859],
+  [1457.890306732239, 210.1553147492859],
+  [1457.890306732239, 44.55531474928592],
+  [1358.590306732239, 210.1553147492859],
+  [1358.590306732239, 375.75531474928584],
+  [1259.290306732239, 210.15531474928585],
+  [1259.290306732239, 375.75531474928584],
+  [1259.290306732239, 541.3553147492859],
+  [1358.590306732239, 706.9553147492858],
+  [1358.590306732239, 872.5553147492857],
+  [1259.290306732239, 706.9553147492858],
+  [1259.290306732239, 872.5553147492857],
+  [1259.290306732239, 1038.1553147492857],
+  [1358.590306732239, 1203.7553147492858],
+  [1358.590306732239, 1038.1553147492857],
+  [1457.890306732239, 1203.7553147492858],
+  [1557.190306732239, 1369.355314749286],
+  [1656.4903067322389, 1203.7553147492858],
+  [1557.190306732239, 1203.7553147492858],
+  [1557.190306732239, 1038.1553147492857],
+  [17254.572515546668, 1460.5807801244923],
+  [17353.872515546667, 1626.1807801244925],
+  [17453.172515546667, 1791.7807801244926],
+  [17552.472515546666, 1791.7807801244926],
+  [17453.172515546667, 1626.1807801244925],
+  [17353.872515546667, 1791.7807801244926],
+  [17453.172515546667, 1957.3807801244927],
+  [17353.872515546667, 2122.980780124493],
+  [17453.172515546667, 2288.580780124493],
+  [17353.872515546667, 2454.1807801244927],
+  [17453.172515546667, 2619.7807801244926],
+  [17552.472515546666, 2619.7807801244926],
+  [17453.172515546667, 2785.3807801244925],
+  [17353.872515546667, 2619.7807801244926],
+  [17254.572515546668, 2454.1807801244927],
+  [17254.572515546668, 2288.580780124493],
+  [17353.872515546667, 2288.580780124493],
+  [17453.172515546667, 2122.980780124493],
+  [17552.472515546666, 2288.580780124493],
+  [17552.472515546666, 2454.1807801244927],
+  [17453.172515546667, 2454.1807801244927],
+  [4447.67624466283, 4761.1416826913],
+  [4546.97624466283, 4595.541682691301],
+  [4546.97624466283, 4429.941682691301],
+  [4447.67624466283, 4429.941682691301],
+  [4447.67624466283, 4595.541682691301],
+  [4348.37624466283, 4595.541682691301],
+  [4249.07624466283, 4595.541682691301],
+  [4348.37624466283, 4761.1416826913],
+  [4249.07624466283, 4761.1416826913],
+  [4348.37624466283, 4926.7416826912995],
+  [4348.37624466283, 5092.341682691299],
+  [4447.67624466283, 5257.941682691298],
+  [4546.97624466283, 5257.941682691298],
+  [4646.27624466283, 5092.341682691299],
+  [4546.97624466283, 5092.341682691299],
+  [4646.27624466283, 4926.7416826912995],
+  [4646.27624466283, 4761.1416826913],
+  [4546.97624466283, 4761.1416826913],
+  [4646.27624466283, 4595.541682691301],
+  [4745.5762446628305, 4595.541682691301],
+  [4646.27624466283, 4429.941682691301],
+  [4745.5762446628305, 4429.941682691301],
+  [4844.876244662831, 4595.541682691301],
+  [4745.5762446628305, 4761.1416826913],
+  [4745.5762446628305, 4926.7416826912995],
+  [4844.876244662831, 4761.1416826913],
+  [4944.176244662831, 4761.1416826913],
+  [5043.476244662831, 4926.7416826912995],
+  [5043.476244662831, 4761.1416826913],
+  [5142.776244662831, 4926.7416826912995],
+  [5142.776244662831, 4761.1416826913],
+  [5242.076244662831, 4595.541682691301],
+  [5142.776244662831, 4595.541682691301],
+  [5242.076244662831, 4429.941682691301],
+  [5242.076244662831, 4264.341682691302],
+  [5142.776244662831, 4429.941682691301],
+  [5043.476244662831, 4595.541682691301],
+  [5043.476244662831, 4429.941682691301],
+  [5043.476244662831, 4264.341682691302],
+  [5142.776244662831, 4098.741682691302],
+  [5043.476244662831, 4098.741682691302],
+  [4944.176244662831, 3933.1416826913023],
+  [4944.176244662831, 4098.741682691302],
+  [4944.176244662831, 4264.341682691302],
+  [4844.876244662831, 4098.741682691302],
+  [4745.5762446628305, 4264.341682691302],
+  [4646.27624466283, 4098.741682691302],
+  [4546.97624466283, 3933.1416826913023],
+  [4447.67624466283, 4098.741682691302],
+  [4546.97624466283, 4264.341682691302],
+  [4447.67624466283, 4264.341682691302],
+  [4546.97624466283, 4098.741682691302],
+  [4646.27624466283, 3933.1416826913023],
+  [4546.97624466283, 3767.5416826913024],
+  [4447.67624466283, 3601.9416826913025],
+  [4447.67624466283, 3767.5416826913024],
+  [4348.37624466283, 3767.5416826913024],
+  [4348.37624466283, 3933.1416826913023],
+  [4249.07624466283, 3767.5416826913024],
+  [4249.07624466283, 3933.1416826913023],
+  [4149.776244662829, 3933.1416826913023],
+  [4050.4762446628297, 4098.741682691302],
+  [4050.4762446628297, 3933.1416826913023],
+  [3951.17624466283, 3933.1416826913023],
+  [3951.17624466283, 4098.741682691302],
+  [3851.8762446628302, 4264.341682691302],
+  [3851.8762446628302, 4098.741682691302],
+  [3752.5762446628305, 4098.741682691302],
+  [3653.276244662831, 4264.341682691302],
+  [3553.976244662831, 4429.941682691301],
+  [3553.976244662831, 4595.541682691301],
+  [3454.6762446628313, 4429.941682691301],
+  [3553.976244662831, 4264.341682691302],
+  [3653.276244662831, 4429.941682691301],
+  [3752.5762446628305, 4264.341682691302],
+  [3752.5762446628305, 4429.941682691301],
+  [3851.8762446628302, 4595.541682691301],
+  [3851.8762446628302, 4429.941682691301],
+  [3951.17624466283, 4429.941682691301],
+  [4050.4762446628297, 4264.341682691302],
+  [4149.776244662829, 4098.741682691302],
+  [4249.07624466283, 4264.341682691302],
+  [4348.37624466283, 4098.741682691302],
+  [4447.67624466283, 3933.1416826913023],
+  [9574.088902135607, 7352.26293905581],
+  [9474.788902135606, 7352.26293905581],
+  [9375.488902135605, 7186.662939055811],
+  [9474.788902135606, 7021.0629390558115],
+  [9574.088902135607, 7021.0629390558115],
+  [9474.788902135606, 7186.662939055811],
+  [9574.088902135607, 7186.662939055811],
+  [9673.388902135608, 7021.0629390558115],
+  [9673.388902135608, 6855.462939055812],
+  [9772.68890213561, 6689.862939055813],
+  [9673.388902135608, 6689.862939055813],
+  [9772.68890213561, 6524.262939055813],
+  [9871.98890213561, 6358.662939055814],
+  [9971.288902135611, 6524.262939055813],
+  [10070.588902135612, 6358.662939055814],
+  [10070.588902135612, 6193.062939055814],
+  [9971.288902135611, 6027.462939055815],
+  [9971.288902135611, 5861.862939055815],
+  [9871.98890213561, 5861.862939055815],
+  [9871.98890213561, 5696.262939055816],
+  [9971.288902135611, 5530.662939055816],
+  [10070.588902135612, 5530.662939055816],
+  [10070.588902135612, 5696.262939055816],
+  [10169.888902135614, 5861.862939055815],
+  [10169.888902135614, 5696.262939055816],
+  [10070.588902135612, 5861.862939055815],
+  [10169.888902135614, 6027.462939055815],
+  [10169.888902135614, 6193.062939055814],
+  [10269.188902135615, 6027.462939055815],
+  [10269.188902135615, 5861.862939055815],
+  [10368.488902135616, 6027.462939055815],
+  [10269.188902135615, 6193.062939055814],
+  [10269.188902135615, 6358.662939055814],
+  [10169.888902135614, 6358.662939055814],
+  [10070.588902135612, 6524.262939055813],
+  [10070.588902135612, 6689.862939055813],
+  [9971.288902135611, 6855.462939055812],
+  [9971.288902135611, 7021.0629390558115],
+  [10070.588902135612, 7186.662939055811],
+  [10169.888902135614, 7186.662939055811],
+  [10269.188902135615, 7186.662939055811],
+  [10169.888902135614, 7352.26293905581],
+  [10070.588902135612, 7352.26293905581],
+  [10169.888902135614, 7517.86293905581],
+  [10169.888902135614, 7683.462939055809],
+  [10269.188902135615, 7517.86293905581],
+  [10368.488902135616, 7683.462939055809],
+  [10467.788902135617, 7683.462939055809],
+  [10368.488902135616, 7517.86293905581],
+  [10269.188902135615, 7352.26293905581],
+  [10368.488902135616, 7352.26293905581],
+  [10368.488902135616, 7186.662939055811],
+  [10368.488902135616, 7021.0629390558115],
+  [10368.488902135616, 6855.462939055812],
+  [10269.188902135615, 6855.462939055812],
+  [10169.888902135614, 6855.462939055812],
+  [10169.888902135614, 7021.0629390558115],
+  [10070.588902135612, 7021.0629390558115],
+  [10070.588902135612, 6855.462939055812],
+  [10169.888902135614, 6689.862939055813],
+  [10269.188902135615, 6689.862939055813],
+  [10169.888902135614, 6524.262939055813],
+  [10269.188902135615, 6524.262939055813],
+  [10368.488902135616, 6524.262939055813],
+  [10368.488902135616, 6358.662939055814],
+  [10467.788902135617, 6358.662939055814],
+  [10467.788902135617, 6193.062939055814],
+  [10567.088902135618, 6358.662939055814],
+  [10567.088902135618, 6193.062939055814],
+  [10666.388902135619, 6193.062939055814],
+  [10666.388902135619, 6358.662939055814],
+  [10567.088902135618, 6524.262939055813],
+  [10467.788902135617, 6524.262939055813],
+  [10567.088902135618, 6689.862939055813],
+  [10467.788902135617, 6855.462939055812],
+  [10567.088902135618, 7021.0629390558115],
+  [10467.788902135617, 7021.0629390558115],
+  [10567.088902135618, 6855.462939055812],
+  [10467.788902135617, 6689.862939055813],
+  [10368.488902135616, 6689.862939055813],
+  [1073.6944354374714, 1154.3681204032646],
+  [974.3944354374713, 1319.9681204032647],
+  [875.0944354374712, 1319.9681204032647],
+  [775.7944354374712, 1154.3681204032646],
+  [775.7944354374712, 988.7681204032646],
+  [875.0944354374712, 823.1681204032647],
+  [875.0944354374712, 657.5681204032647],
+  [775.7944354374712, 823.1681204032647],
+  [676.4944354374711, 657.5681204032647],
+  [676.4944354374711, 491.9681204032648],
+  [775.7944354374712, 657.5681204032647],
+  [676.4944354374711, 823.1681204032647],
+  [676.4944354374711, 988.7681204032646],
+  [577.194435437471, 823.1681204032647],
+  [577.194435437471, 988.7681204032646],
+  [577.194435437471, 1154.3681204032646],
+  [676.4944354374711, 1319.9681204032647],
+  [577.194435437471, 1319.9681204032647],
+  [477.89443543747103, 1319.9681204032647],
+  [577.194435437471, 1485.5681204032649],
+  [477.89443543747103, 1651.168120403265],
+  [577.194435437471, 1816.7681204032651],
+  [477.89443543747103, 1816.7681204032651],
+  [378.5944354374711, 1982.3681204032653],
+  [378.5944354374711, 2147.9681204032654],
+  [279.2944354374711, 2313.5681204032653],
+  [179.99443543747114, 2147.9681204032654],
+  [80.69443543747114, 2313.5681204032653],
+  [80.69443543747114, 2479.168120403265],
+  [179.9944354374711, 2644.768120403265],
+  [179.9944354374711, 2479.168120403265],
+  [179.9944354374711, 2313.5681204032653],
+  [80.69443543747111, 2147.9681204032654],
+  [80.69443543747111, 1982.3681204032653],
+  [179.9944354374711, 1982.3681204032653],
+  [179.9944354374711, 1816.7681204032651],
+  [80.69443543747111, 1816.7681204032651],
+  [179.9944354374711, 1651.168120403265],
+  [80.69443543747111, 1485.5681204032649],
+  [80.69443543747111, 1319.9681204032647],
+  [179.9944354374711, 1154.3681204032646],
+  [80.69443543747111, 1154.3681204032646],
+  [179.9944354374711, 988.7681204032646],
+  [279.2944354374711, 823.1681204032647],
+  [378.5944354374711, 657.5681204032647],
+  [378.5944354374711, 823.1681204032647],
+  [477.89443543747103, 823.1681204032647],
+  [477.89443543747103, 657.5681204032647],
+  [378.5944354374711, 491.9681204032648],
+  [477.89443543747103, 326.3681204032648],
+  [477.89443543747103, 160.76812040326482],
+  [378.5944354374711, 160.76812040326482],
+  [279.2944354374711, 326.3681204032648],
+  [179.99443543747114, 491.9681204032648],
+  [179.99443543747114, 326.3681204032648],
+  [279.2944354374711, 491.9681204032648],
+  [279.2944354374711, 657.5681204032647],
+  [179.99443543747114, 823.1681204032647],
+  [279.2944354374711, 988.7681204032646],
+  [279.2944354374711, 1154.3681204032646],
+  [378.5944354374711, 1319.9681204032647],
+  [477.89443543747103, 1485.5681204032649],
+  [577.194435437471, 1651.168120403265],
+  [676.4944354374711, 1651.168120403265],
+  [775.7944354374712, 1816.7681204032651],
+  [676.4944354374711, 1816.7681204032651],
+  [775.7944354374712, 1651.168120403265],
+  [875.0944354374712, 1651.168120403265],
+  [974.3944354374713, 1651.168120403265],
+  [875.0944354374712, 1485.5681204032649],
+  [775.7944354374712, 1485.5681204032649],
+  [676.4944354374711, 1485.5681204032649],
+  [775.7944354374712, 1319.9681204032647],
+  [676.4944354374711, 1154.3681204032646],
+  [3138.413562431697, 2355.845602060523],
+  [3039.113562431697, 2521.445602060523],
+  [3039.113562431697, 2355.845602060523],
+  [3039.113562431697, 2190.245602060523],
+  [3138.413562431697, 2024.645602060523],
+  [3237.7135624316966, 1859.045602060523],
+  [3237.7135624316966, 2024.645602060523],
+  [3337.0135624316963, 1859.045602060523],
+  [3337.0135624316963, 1693.4456020605228],
+  [3436.313562431696, 1527.8456020605227],
+  [3535.6135624316958, 1693.4456020605228],
+  [3535.6135624316958, 1859.045602060523],
+  [3634.9135624316955, 2024.645602060523],
+  [3734.213562431695, 2190.245602060523],
+  [3634.9135624316955, 2190.245602060523],
+  [3535.6135624316958, 2190.245602060523],
+  [3535.6135624316958, 2355.845602060523],
+  [3535.6135624316958, 2521.445602060523],
+  [3436.313562431696, 2687.045602060523],
+  [3436.313562431696, 2852.645602060523],
+  [3535.6135624316958, 2687.045602060523],
+  [3634.9135624316955, 2521.445602060523],
+  [3634.9135624316955, 2355.845602060523],
+  [3734.213562431695, 2355.845602060523],
+  [3833.513562431695, 2190.245602060523],
+  [3932.8135624316947, 2024.645602060523],
+  [3833.513562431695, 1859.045602060523],
+  [3833.513562431695, 1693.4456020605228],
+  [3734.213562431695, 1859.045602060523],
+  [3734.213562431695, 1693.4456020605228],
+  [3734.213562431695, 1527.8456020605227],
+  [3634.9135624316955, 1527.8456020605227],
+  [3634.9135624316955, 1693.4456020605228],
+  [3535.6135624316958, 1527.8456020605227],
+  [3634.9135624316955, 1362.2456020605225],
+  [3535.6135624316958, 1362.2456020605225],
+  [3436.313562431696, 1196.6456020605224],
+  [3535.6135624316958, 1196.6456020605224],
+  [3535.6135624316958, 1031.0456020605222],
+  [3436.313562431696, 1031.0456020605222],
+  [3535.6135624316958, 865.4456020605222],
+  [3436.313562431696, 865.4456020605222],
+  [3535.6135624316958, 699.8456020605223],
+  [3634.9135624316955, 699.8456020605223],
+  [3535.6135624316958, 534.2456020605224],
+  [3436.313562431696, 368.64560206052244],
+  [3436.313562431696, 203.04560206052244],
+  [3337.0135624316963, 37.445602060522454],
+  [3436.313562431696, 37.445602060522454],
+  [3337.0135624316963, 203.04560206052244],
+  [3237.7135624316966, 37.445602060522454],
+  [3138.413562431697, 37.445602060522454],
+  [3237.7135624316966, 203.04560206052244],
+  [3337.0135624316963, 368.6456020605224],
+  [3436.313562431696, 534.2456020605224],
+  [3337.0135624316963, 699.8456020605223],
+  [3237.7135624316966, 534.2456020605224],
+  [3337.0135624316963, 534.2456020605224],
+  [3436.313562431696, 699.8456020605223],
+  [3337.0135624316963, 865.4456020605222],
+  [3237.7135624316966, 865.4456020605222],
+  [3337.0135624316963, 1031.0456020605222],
+  [3237.7135624316966, 1196.6456020605224],
+  [3138.413562431697, 1362.2456020605225],
+  [3039.113562431697, 1527.8456020605227],
+  [3138.413562431697, 1527.8456020605227],
+  [3039.113562431697, 1693.4456020605228],
+  [2939.8135624316974, 1527.8456020605227],
+  [2840.5135624316977, 1362.2456020605225],
+  [2840.5135624316977, 1527.8456020605227],
+  [2840.5135624316977, 1693.4456020605228],
+  [2939.8135624316974, 1859.045602060523],
+  [2840.5135624316977, 2024.645602060523],
+  [2840.5135624316977, 1859.045602060523],
+  [2939.8135624316974, 1693.4456020605228],
+  [3039.113562431697, 1859.045602060523],
+  [3039.113562431697, 2024.645602060523],
+  [2939.8135624316974, 2190.245602060523],
+  [2939.8135624316974, 2024.645602060523],
+  [16388.412117675925, 1839.818884803299],
+  [16289.112117675924, 1839.818884803299],
+  [16388.412117675925, 1674.2188848032988],
+  [16487.712117675925, 1508.6188848032987],
+  [16487.712117675925, 1674.2188848032988],
+  [16388.412117675925, 1508.6188848032987],
+  [16289.112117675924, 1343.0188848032985],
+  [16289.112117675924, 1508.6188848032987],
+  [16189.812117675923, 1674.2188848032988],
+  [16090.512117675922, 1839.818884803299],
+  [16090.512117675922, 2005.418884803299],
+  [15991.212117675921, 2171.018884803299],
+  [16090.512117675922, 2336.618884803299],
+  [16090.512117675922, 2502.218884803299],
+  [16090.512117675922, 2667.8188848032987],
+  [15991.212117675921, 2833.4188848032986],
+  [15991.212117675921, 2999.0188848032985],
+  [15891.91211767592, 3164.6188848032984],
+  [15891.91211767592, 3330.2188848032984],
+  [15991.212117675921, 3330.2188848032984],
+  [16090.512117675922, 3330.2188848032984],
+  [16189.812117675923, 3495.8188848032983],
+  [16289.112117675924, 3495.8188848032983],
+  [16189.812117675923, 3330.2188848032984],
+  [16189.812117675923, 3164.6188848032984],
+  [16289.112117675924, 3164.6188848032984],
+  [16388.412117675925, 3164.6188848032984],
+  [16388.412117675925, 3330.2188848032984],
+  [16487.712117675925, 3330.2188848032984],
+  [16587.012117675924, 3495.8188848032983],
+  [16587.012117675924, 3661.418884803298],
+  [16686.312117675923, 3661.418884803298],
+  [16785.612117675922, 3661.418884803298],
+  [16884.91211767592, 3661.418884803298],
+  [16984.21211767592, 3661.418884803298],
+  [16884.91211767592, 3827.018884803298],
+  [16884.91211767592, 3992.618884803298],
+  [16984.21211767592, 3827.018884803298],
+  [17083.51211767592, 3661.418884803298],
+  [17182.81211767592, 3495.8188848032983],
+  [17182.81211767592, 3330.2188848032984],
+  [17282.11211767592, 3164.6188848032984],
+  [17282.11211767592, 3330.2188848032984],
+  [17182.81211767592, 3164.6188848032984],
+  [17083.51211767592, 3164.6188848032984],
+  [16984.21211767592, 3330.2188848032984],
+  [16984.21211767592, 3495.8188848032983],
+  [17083.51211767592, 3330.2188848032984],
+  [16984.21211767592, 3164.6188848032984],
+  [16984.21211767592, 2999.0188848032985],
+  [17083.51211767592, 2833.4188848032986],
+  [17083.51211767592, 2667.8188848032987],
+  [17182.81211767592, 2667.8188848032987],
+  [17182.81211767592, 2833.4188848032986],
+  [17083.51211767592, 2999.0188848032985],
+  [16984.21211767592, 2833.4188848032986],
+  [16884.91211767592, 2833.4188848032986],
+  [16884.91211767592, 2999.0188848032985],
+  [16785.612117675922, 2999.0188848032985],
+  [16884.91211767592, 3164.6188848032984],
+  [16785.612117675922, 3164.6188848032984],
+  [16686.312117675923, 3164.6188848032984],
+  [16587.012117675924, 3164.6188848032984],
+  [16587.012117675924, 2999.0188848032985],
+  [16487.712117675925, 3164.6188848032984],
+  [16587.012117675924, 3330.2188848032984],
+  [16686.312117675923, 3495.8188848032983],
+  [16686.312117675923, 3330.2188848032984],
+  [16785.612117675922, 3330.2188848032984],
+  [16884.91211767592, 3495.8188848032983],
+  [16785.612117675922, 3495.8188848032983],
+  [16884.91211767592, 3330.2188848032984],
+  [1272.175991128079, 3842.7700224365044],
+  [1371.475991128079, 3842.7700224365044],
+  [1272.175991128079, 3677.1700224365045],
+  [1172.875991128079, 3511.5700224365046],
+  [1272.175991128079, 3511.5700224365046],
+  [1172.875991128079, 3345.9700224365047],
+  [1073.575991128079, 3180.3700224365048],
+  [1073.575991128079, 3014.770022436505],
+  [974.275991128079, 3014.770022436505],
+  [874.9759911280789, 3014.770022436505],
+  [775.6759911280789, 2849.170022436505],
+  [775.6759911280789, 3014.770022436505],
+  [775.6759911280789, 3180.3700224365048],
+  [676.3759911280788, 3345.9700224365047],
+  [676.3759911280788, 3511.5700224365046],
+  [775.6759911280789, 3677.1700224365045],
+  [676.3759911280788, 3842.7700224365044],
+  [577.0759911280787, 3842.7700224365044],
+  [577.0759911280787, 3677.1700224365045],
+  [676.3759911280788, 3677.1700224365045],
+  [775.6759911280789, 3511.5700224365046],
+  [775.6759911280789, 3345.9700224365047],
+  [874.9759911280789, 3345.9700224365047],
+  [874.9759911280789, 3180.3700224365048],
+  [974.275991128079, 3180.3700224365048],
+  [974.275991128079, 3345.9700224365047],
+  [1073.575991128079, 3511.5700224365046],
+  [1073.575991128079, 3677.1700224365045],
+  [1172.875991128079, 3677.1700224365045],
+  [1172.875991128079, 3842.7700224365044],
+  [1073.575991128079, 3842.7700224365044],
+  [1172.875991128079, 4008.3700224365043],
+  [1073.575991128079, 4008.3700224365043],
+  [974.275991128079, 3842.7700224365044],
+  [974.275991128079, 4008.3700224365043],
+  [874.9759911280789, 4008.3700224365043],
+  [775.6759911280789, 4008.3700224365043],
+  [874.9759911280789, 3842.7700224365044],
+  [974.275991128079, 3677.1700224365045],
+  [974.275991128079, 3511.5700224365046],
+  [1073.575991128079, 3345.9700224365047],
+  [1172.875991128079, 3180.3700224365048],
+  [1272.175991128079, 3180.3700224365048],
+  [1272.175991128079, 3345.9700224365047],
+  [1371.475991128079, 3180.3700224365048],
+  [1470.7759911280789, 3345.9700224365047],
+  [1371.475991128079, 3345.9700224365047],
+  [1371.475991128079, 3511.5700224365046],
+  [1470.7759911280789, 3511.5700224365046],
+  [1570.0759911280788, 3677.1700224365045],
+  [1470.7759911280789, 3677.1700224365045],
+  [1570.0759911280788, 3511.5700224365046],
+  [1669.3759911280788, 3511.5700224365046],
+  [1669.3759911280788, 3677.1700224365045],
+  [1768.6759911280787, 3842.7700224365044],
+  [1669.3759911280788, 3842.7700224365044],
+  [1768.6759911280787, 4008.3700224365043],
+  [1867.9759911280787, 3842.7700224365044],
+  [1967.2759911280787, 3677.1700224365045],
+  [2066.5759911280784, 3842.7700224365044],
+  [2165.875991128078, 3677.1700224365045],
+  [2066.5759911280784, 3511.5700224365046],
+  [2165.875991128078, 3511.5700224365046],
+  [2066.5759911280784, 3677.1700224365045],
+  [2165.875991128078, 3842.7700224365044],
+  [2265.175991128078, 4008.3700224365043],
+  [2364.4759911280776, 4008.3700224365043],
+  [2265.175991128078, 3842.7700224365044],
+  [2364.4759911280776, 3677.1700224365045],
+  [2463.7759911280773, 3842.7700224365044],
+  [2463.7759911280773, 4008.3700224365043],
+  [2364.4759911280776, 3842.7700224365044]
+];
+
+@pragma('dart2js:assumeDynamic')
+@pragma('dart2js:noInline')
+confuse(x) => x;
+
+main() {
+  print(confuse(panels).length);
+}
diff --git a/tests/language/unsorted/liveness_test.dart b/tests/language/unsorted/liveness_test.dart
new file mode 100644
index 0000000..61e6284
--- /dev/null
+++ b/tests/language/unsorted/liveness_test.dart
@@ -0,0 +1,16 @@
+// 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 testing closures.
+
+import "package:expect/expect.dart";
+
+foo(x) {
+  var y = x;
+  for (int i = 0; i < 10; i++) x++;
+  return y;
+}
+
+main() {
+  Expect.equals(499, foo(499));
+}
diff --git a/tests/language/unsorted/load_indexed_constant_test.dart b/tests/language/unsorted/load_indexed_constant_test.dart
new file mode 100644
index 0000000..d7ccee4
--- /dev/null
+++ b/tests/language/unsorted/load_indexed_constant_test.dart
@@ -0,0 +1,21 @@
+// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+// Test constant propagation of load-indexed operations
+// VMOptions=--optimization-counter-threshold=10
+
+import "package:expect/expect.dart";
+
+main() {
+  Expect.equals(101, stringIndexedLoad());
+  Expect.equals(102, arrayIndexedLoad());
+  for (int i = 0; i < 20; i++) {
+    stringIndexedLoad();
+    arrayIndexedLoad();
+  }
+  Expect.equals(101, stringIndexedLoad());
+  Expect.equals(102, arrayIndexedLoad());
+}
+
+stringIndexedLoad() => ("Hello").codeUnitAt(1);
+arrayIndexedLoad() => (const [101, 102, 103])[1];
diff --git a/tests/language/unsorted/local_var_in_annotation_test.dart b/tests/language/unsorted/local_var_in_annotation_test.dart
new file mode 100644
index 0000000..f6474f8
--- /dev/null
+++ b/tests/language/unsorted/local_var_in_annotation_test.dart
@@ -0,0 +1,12 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// Regression test for https://github.com/dart-lang/sdk/issues/37065
+
+const x = 0;
+main(@x args) {
+  const z = 0;
+  foo(@z args) {}
+  bar(@x args) {}
+}
diff --git a/tests/language/unsorted/many_calls_test.dart b/tests/language/unsorted/many_calls_test.dart
new file mode 100644
index 0000000..8f29d1a
--- /dev/null
+++ b/tests/language/unsorted/many_calls_test.dart
@@ -0,0 +1,223 @@
+// Copyright (c) 2011, the Dart project authors.  Please see the AUTHORS file
+// for 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 megamorphic calls.
+
+import "package:expect/expect.dart";
+
+class A {
+  A() {}
+  f1() {
+    return 1;
+  }
+
+  f2() {
+    return 2;
+  }
+
+  f3() {
+    return 3;
+  }
+
+  f4() {
+    return 4;
+  }
+
+  f5() {
+    return 5;
+  }
+
+  f6() {
+    return 6;
+  }
+
+  f7() {
+    return 7;
+  }
+
+  f8() {
+    return 8;
+  }
+
+  f9() {
+    return 9;
+  }
+
+  f11() {
+    return 11;
+  }
+
+  f12() {
+    return 12;
+  }
+
+  f13() {
+    return 13;
+  }
+
+  f14() {
+    return 14;
+  }
+
+  f15() {
+    return 15;
+  }
+
+  f16() {
+    return 16;
+  }
+
+  f17() {
+    return 17;
+  }
+
+  f18() {
+    return 18;
+  }
+
+  f19() {
+    return 19;
+  }
+
+  f20() {
+    return 20;
+  }
+
+  f21() {
+    return 21;
+  }
+
+  f22() {
+    return 22;
+  }
+
+  f23() {
+    return 23;
+  }
+
+  f24() {
+    return 24;
+  }
+
+  f25() {
+    return 25;
+  }
+
+  f26() {
+    return 26;
+  }
+
+  f27() {
+    return 27;
+  }
+
+  f28() {
+    return 28;
+  }
+
+  f29() {
+    return 29;
+  }
+
+  f30() {
+    return 30;
+  }
+
+  f31() {
+    return 31;
+  }
+
+  f32() {
+    return 32;
+  }
+
+  f33() {
+    return 33;
+  }
+
+  f34() {
+    return 34;
+  }
+
+  f35() {
+    return 35;
+  }
+
+  f36() {
+    return 36;
+  }
+
+  f37() {
+    return 37;
+  }
+
+  f38() {
+    return 38;
+  }
+
+  f39() {
+    return 39;
+  }
+}
+
+class B extends A {
+  B() : super() {}
+}
+
+class ManyCallsTest {
+  static testMain() {
+    var list = new List<dynamic>.filled(10, null);
+    for (int i = 0; i < (list.length ~/ 2); i++) {
+      list[i] = new A();
+    }
+    for (int i = (list.length ~/ 2); i < list.length; i++) {
+      list[i] = new B();
+    }
+    for (int loop = 0; loop < 7; loop++) {
+      for (int i = 0; i < list.length; i++) {
+        Expect.equals(1, list[i].f1());
+        Expect.equals(2, list[i].f2());
+        Expect.equals(3, list[i].f3());
+        Expect.equals(4, list[i].f4());
+        Expect.equals(5, list[i].f5());
+        Expect.equals(6, list[i].f6());
+        Expect.equals(7, list[i].f7());
+        Expect.equals(8, list[i].f8());
+        Expect.equals(9, list[i].f9());
+        Expect.equals(11, list[i].f11());
+        Expect.equals(12, list[i].f12());
+        Expect.equals(13, list[i].f13());
+        Expect.equals(14, list[i].f14());
+        Expect.equals(15, list[i].f15());
+        Expect.equals(16, list[i].f16());
+        Expect.equals(17, list[i].f17());
+        Expect.equals(18, list[i].f18());
+        Expect.equals(19, list[i].f19());
+        Expect.equals(20, list[i].f20());
+        Expect.equals(21, list[i].f21());
+        Expect.equals(22, list[i].f22());
+        Expect.equals(23, list[i].f23());
+        Expect.equals(24, list[i].f24());
+        Expect.equals(25, list[i].f25());
+        Expect.equals(26, list[i].f26());
+        Expect.equals(27, list[i].f27());
+        Expect.equals(28, list[i].f28());
+        Expect.equals(29, list[i].f29());
+        Expect.equals(30, list[i].f30());
+        Expect.equals(31, list[i].f31());
+        Expect.equals(32, list[i].f32());
+        Expect.equals(33, list[i].f33());
+        Expect.equals(34, list[i].f34());
+        Expect.equals(35, list[i].f35());
+        Expect.equals(36, list[i].f36());
+        Expect.equals(37, list[i].f37());
+        Expect.equals(38, list[i].f38());
+        Expect.equals(39, list[i].f39());
+      }
+    }
+  }
+}
+
+main() {
+  ManyCallsTest.testMain();
+}
diff --git a/tests/language/unsorted/many_method_calls_test.dart b/tests/language/unsorted/many_method_calls_test.dart
new file mode 100644
index 0000000..f16aa9a
--- /dev/null
+++ b/tests/language/unsorted/many_method_calls_test.dart
@@ -0,0 +1,6644 @@
+// 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.
+
+// Test that compiler does not crash for very long chains of method calls.
+
+var field = false;
+
+foo() {
+  if (field) {
+    print('foo');
+  }
+}
+
+main() {
+  manyMethodCalls();
+  field = true;
+}
+
+manyMethodCalls() {
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+  foo();
+}
diff --git a/tests/language/unsorted/many_named_arguments_test.dart b/tests/language/unsorted/many_named_arguments_test.dart
new file mode 100644
index 0000000..015a137
--- /dev/null
+++ b/tests/language/unsorted/many_named_arguments_test.dart
@@ -0,0 +1,126 @@
+// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:expect/expect.dart';
+
+class Fisk {
+  method(
+      {a: 'a',
+      b: 'b',
+      c: 'c',
+      d: 'd',
+      e: 'e',
+      f: 'f',
+      g: 'g',
+      h: 'h',
+      i: 'i',
+      j: 'j',
+      k: 'k',
+      l: 'l',
+      m: 'm',
+      n: 'n',
+      o: 'o',
+      p: 'p',
+      q: 'q',
+      r: 'r',
+      s: 's',
+      t: 't',
+      u: 'u',
+      v: 'v',
+      w: 'w',
+      x: 'x',
+      y: 'y',
+      z: 'z'}) {
+    return 'a: $a, '
+        'b: $b, '
+        'c: $c, '
+        'd: $d, '
+        'e: $e, '
+        'f: $f, '
+        'g: $g, '
+        'h: $h, '
+        'i: $i, '
+        'j: $j, '
+        'k: $k, '
+        'l: $l, '
+        'm: $m, '
+        'n: $n, '
+        'o: $o, '
+        'p: $p, '
+        'q: $q, '
+        'r: $r, '
+        's: $s, '
+        't: $t, '
+        'u: $u, '
+        'v: $v, '
+        'w: $w, '
+        'x: $x, '
+        'y: $y, '
+        'z: $z';
+  }
+}
+
+main() {
+  var method = new Fisk().method;
+  var namedArguments = new Map<Symbol, dynamic>();
+  namedArguments[const Symbol('a')] = 'a';
+  Expect.stringEquals(
+      EXPECTED_RESULT, Function.apply(method, [], namedArguments));
+  Expect.stringEquals(
+      EXPECTED_RESULT,
+      new Fisk().method(
+          a: 'a',
+          b: 'b',
+          c: 'c',
+          d: 'd',
+          e: 'e',
+          f: 'f',
+          g: 'g',
+          h: 'h',
+          i: 'i',
+          j: 'j',
+          k: 'k',
+          l: 'l',
+          m: 'm',
+          n: 'n',
+          o: 'o',
+          p: 'p',
+          q: 'q',
+          r: 'r',
+          s: 's',
+          t: 't',
+          u: 'u',
+          v: 'v',
+          w: 'w',
+          x: 'x',
+          y: 'y',
+          z: 'z'));
+}
+
+const String EXPECTED_RESULT = 'a: a, '
+    'b: b, '
+    'c: c, '
+    'd: d, '
+    'e: e, '
+    'f: f, '
+    'g: g, '
+    'h: h, '
+    'i: i, '
+    'j: j, '
+    'k: k, '
+    'l: l, '
+    'm: m, '
+    'n: n, '
+    'o: o, '
+    'p: p, '
+    'q: q, '
+    'r: r, '
+    's: s, '
+    't: t, '
+    'u: u, '
+    'v: v, '
+    'w: w, '
+    'x: x, '
+    'y: y, '
+    'z: z';
diff --git a/tests/language/unsorted/mega_load_test.dart b/tests/language/unsorted/mega_load_test.dart
new file mode 100644
index 0000000..29790a6
--- /dev/null
+++ b/tests/language/unsorted/mega_load_test.dart
@@ -0,0 +1,208 @@
+// 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 megamorphic, but single target field load.
+// VMOptions=--optimization-counter-threshold=10
+
+import "package:expect/expect.dart";
+
+class Base {
+  var f;
+}
+
+class A extends Base {
+  A() {
+    this.f = 0;
+  }
+}
+
+class B extends Base {
+  B() {
+    this.f = 1;
+  }
+}
+
+class C extends Base {
+  C() {
+    this.f = 2;
+  }
+}
+
+class D extends Base {
+  D() {
+    this.f = 3;
+  }
+}
+
+class E extends Base {
+  E() {
+    this.f = 4;
+  }
+}
+
+class F extends Base {
+  F() {
+    this.f = 5;
+  }
+}
+
+class G extends Base {
+  G() {
+    this.f = 6;
+  }
+}
+
+class H extends Base {
+  H() {
+    this.f = 7;
+  }
+}
+
+class I extends Base {
+  I() {
+    this.f = 8;
+  }
+}
+
+class J extends Base {
+  J() {
+    this.f = 9;
+  }
+}
+
+class K extends Base {
+  K() {
+    this.f = 10;
+  }
+}
+
+class L extends Base {
+  L() {
+    this.f = 11;
+  }
+}
+
+class M extends Base {
+  M() {
+    this.f = 12;
+  }
+}
+
+class N extends Base {
+  N() {
+    this.f = 13;
+  }
+}
+
+class O extends Base {
+  O() {
+    this.f = 14;
+  }
+}
+
+class P extends Base {
+  P() {
+    this.f = 15;
+  }
+}
+
+class Q extends Base {
+  Q() {
+    this.f = 16;
+  }
+}
+
+class R extends Base {
+  R() {
+    this.f = 17;
+  }
+}
+
+class S extends Base {
+  S() {
+    this.f = 18;
+  }
+}
+
+class T extends Base {
+  T() {
+    this.f = 19;
+  }
+}
+
+class U extends Base {
+  U() {
+    this.f = 20;
+  }
+}
+
+class V extends Base {
+  V() {
+    this.f = 21;
+  }
+}
+
+class W extends Base {
+  V() {
+    this.f = 22;
+  }
+}
+
+class X extends Base {
+  V() {
+    this.f = 21;
+  }
+}
+
+class Y extends Base {
+  V() {
+    this.f = 24;
+  }
+}
+
+class Z extends Base {
+  V() {
+    this.f = 21;
+  }
+}
+
+allocateObjects() {
+  var list = [];
+  list.add(new A());
+  list.add(new B());
+  list.add(new C());
+  list.add(new D());
+  list.add(new E());
+  list.add(new F());
+  list.add(new G());
+  list.add(new H());
+  list.add(new I());
+  list.add(new J());
+  list.add(new K());
+  list.add(new L());
+  list.add(new M());
+  list.add(new N());
+  list.add(new O());
+  list.add(new P());
+  list.add(new Q());
+  list.add(new R());
+  list.add(new S());
+  list.add(new T());
+  list.add(new U());
+  list.add(new V());
+  return list;
+}
+
+callThemAll(var list) {
+  for (var i = 0; i < list.length; i++) {
+    Expect.equals(i, list[i].f);
+  }
+}
+
+main() {
+  var list = allocateObjects();
+  // Make sure the optimizer triggers the compilation of callThemAll.
+  for (var i = 0; i < 20; i++) {
+    callThemAll(list);
+  }
+}
diff --git a/tests/language/unsorted/memory_swap_test.dart b/tests/language/unsorted/memory_swap_test.dart
new file mode 100644
index 0000000..b8d093e
--- /dev/null
+++ b/tests/language/unsorted/memory_swap_test.dart
@@ -0,0 +1,90 @@
+// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// Test that the ParalleMoveResolver in the VM uses valid registers
+// when requiring scratch registers.
+
+main() {
+  // Iterate enough to ensure optimizing `spillingMethod`.
+  for (int i = 0; i < 100000; i++) {
+    spillingMethod(i, () => 0);
+  }
+}
+
+spillingMethod(what, obfuscate) {
+  // Define lots of variables to get a few in stack.
+  var a = obfuscate();
+  var b = obfuscate();
+  var c = obfuscate();
+  var d = obfuscate();
+  var e = obfuscate();
+  var f = obfuscate();
+  var g = obfuscate();
+  var h = obfuscate();
+  var i = obfuscate();
+  var j = obfuscate();
+  var k = obfuscate();
+  var l = obfuscate();
+  var m = obfuscate();
+  var n = obfuscate();
+  var o = obfuscate();
+  var p = obfuscate();
+  var q = obfuscate();
+  var r = obfuscate();
+  var s = obfuscate();
+  var t = obfuscate();
+  var u = obfuscate();
+  var v = obfuscate();
+
+  // Swap all variables, in the hope of a memory <-> memory swap operation.
+  while (what == 42) {
+    a = b;
+    b = a;
+    c = d;
+    d = c;
+    e = f;
+    f = e;
+    g = h;
+    h = g;
+    i = j;
+    j = i;
+    k = l;
+    l = k;
+    m = n;
+    n = m;
+    o = p;
+    p = o;
+    q = r;
+    r = q;
+    s = t;
+    t = s;
+    u = v;
+    v = u;
+    what++;
+  }
+
+  // Keep all variables alive.
+  return a +
+      b +
+      c +
+      d +
+      e +
+      f +
+      g +
+      h +
+      i +
+      j +
+      k +
+      l +
+      m +
+      n +
+      o +
+      p +
+      q +
+      r +
+      s +
+      t +
+      u +
+      v;
+}
diff --git a/tests/language/unsorted/mint_compares_test.dart b/tests/language/unsorted/mint_compares_test.dart
new file mode 100644
index 0000000..ef37d9a
--- /dev/null
+++ b/tests/language/unsorted/mint_compares_test.dart
@@ -0,0 +1,153 @@
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+// VMOptions=--optimization-counter-threshold=10
+
+import "package:expect/expect.dart";
+
+// Test compares on 64-bit integers.
+
+compareTest() {
+  Expect.isFalse(4294967296 < 6);
+  Expect.isFalse(4294967296 < 4294967296);
+  Expect.isFalse(4294967296 <= 6);
+  Expect.isTrue(4294967296 <= 4294967296);
+  Expect.isFalse(4294967296 < 4294967295);
+
+  Expect.isTrue(-4294967296 < 6);
+  Expect.isTrue(-4294967296 < 4294967296);
+  Expect.isTrue(-4294967296 <= 6);
+  Expect.isTrue(-4294967296 <= 4294967296);
+  Expect.isTrue(-4294967296 < 4294967295);
+
+  Expect.isFalse(4294967296 < -6);
+  Expect.isFalse(4294967296 <= -6);
+  Expect.isFalse(4294967296 < -4294967295);
+
+  Expect.isTrue(-4294967296 < -6);
+  Expect.isTrue(-4294967296 <= -6);
+  Expect.isTrue(-4294967296 < -4294967295);
+
+  Expect.isTrue(4294967296 > 6);
+  Expect.isFalse(4294967296 > 4294967296);
+  Expect.isTrue(4294967296 >= 6);
+  Expect.isTrue(4294967296 >= 4294967296);
+  Expect.isTrue(4294967296 > 4294967295);
+
+  Expect.isFalse(-4294967296 > 6);
+  Expect.isFalse(-4294967296 > 4294967296);
+  Expect.isFalse(-4294967296 >= 6);
+  Expect.isFalse(-4294967296 >= 4294967296);
+  Expect.isFalse(-4294967296 > 4294967295);
+
+  Expect.isTrue(4294967296 > -6);
+  Expect.isTrue(4294967296 >= -6);
+  Expect.isTrue(4294967296 > -4294967295);
+
+  Expect.isFalse(-4294967296 > -6);
+  Expect.isFalse(-4294967296 >= -6);
+  Expect.isFalse(-4294967296 > -4294967295);
+
+  Expect.isTrue(4294967296 < 9223372036854775807);
+  Expect.isTrue(-4294967296 < 9223372036854775807);
+  Expect.isFalse(4294967296 < -9223372036854775808);
+  Expect.isFalse(-4294967296 < -9223372036854775808);
+}
+
+compareTest2(lt, lte, gt, gte) {
+  Expect.isFalse(lt(4294967296, 6));
+  Expect.isFalse(lte(4294967296, 6));
+  Expect.isTrue(gt(4294967296, 6));
+  Expect.isTrue(gte(4294967296, 6));
+
+  Expect.isTrue(lte(-1, -1));
+  Expect.isTrue(gte(-1, -1));
+  Expect.isTrue(lte(-2, -1));
+  Expect.isFalse(gte(-2, -1));
+  Expect.isTrue(lte(-4294967296, -1));
+  Expect.isFalse(gte(-4294967296, -1));
+
+  Expect.isTrue(lt(-2, -1));
+  Expect.isFalse(gt(-2, -1));
+  Expect.isTrue(lt(-4294967296, -1));
+  Expect.isFalse(gt(-4294967296, -1));
+
+  Expect.isFalse(lt(-1, -4294967296));
+  Expect.isTrue(gt(-1, -4294967296));
+  Expect.isFalse(lt(2, -2));
+  Expect.isTrue(gt(2, -2));
+  Expect.isFalse(lt(4294967296, -1));
+  Expect.isTrue(gt(4294967296, -1));
+}
+
+compareTestWithZero(lt, lte, gt, gte, eq, ne) {
+  Expect.isFalse(lt(4294967296));
+  Expect.isFalse(lte(4294967296));
+  Expect.isTrue(gt(4294967296));
+  Expect.isTrue(gte(4294967296));
+  Expect.isFalse(eq(4294967296));
+  Expect.isTrue(ne(4294967296));
+
+  Expect.isTrue(lt(-1));
+  Expect.isTrue(lte(-1));
+  Expect.isFalse(gt(-1));
+  Expect.isFalse(gte(-1));
+  Expect.isFalse(eq(-1));
+  Expect.isTrue(ne(-1));
+
+  Expect.isTrue(lt(-2));
+  Expect.isTrue(lte(-2));
+  Expect.isFalse(gt(-2));
+  Expect.isFalse(gte(-2));
+  Expect.isFalse(eq(-2));
+  Expect.isTrue(ne(-2));
+
+  Expect.isTrue(lt(-4294967296));
+  Expect.isTrue(lte(-4294967296));
+  Expect.isFalse(gt(-4294967296));
+  Expect.isFalse(gte(-4294967296));
+  Expect.isFalse(eq(-4294967296));
+  Expect.isTrue(ne(-4294967296));
+
+  Expect.isFalse(lt(0));
+  Expect.isTrue(lte(0));
+  Expect.isFalse(gt(0));
+  Expect.isTrue(gte(0));
+  Expect.isTrue(eq(0));
+  Expect.isFalse(ne(0));
+}
+
+bool lt1(a, b) => a < b;
+bool lte1(a, b) => a <= b;
+bool gt1(a, b) => a > b;
+bool gte1(a, b) => a >= b;
+
+bool lt2(a, b) => a < b ? true : false;
+bool lte2(a, b) => a <= b ? true : false;
+bool gt2(a, b) => a > b ? true : false;
+bool gte2(a, b) => a >= b ? true : false;
+
+bool int_lt1(int a) => a < 0;
+bool int_lte1(int a) => a <= 0;
+bool int_gt1(int a) => a > 0;
+bool int_gte1(int a) => a >= 0;
+bool int_eq1(int a) => a == 0;
+bool int_ne1(int a) => a != 0;
+
+bool int_lt2(int a) => a < 0 ? true : false;
+bool int_lte2(int a) => a <= 0 ? true : false;
+bool int_gt2(int a) => a > 0 ? true : false;
+bool int_gte2(int a) => a >= 0 ? true : false;
+bool int_eq2(int a) => a == 0 ? true : false;
+bool int_ne2(int a) => a != 0 ? true : false;
+
+main() {
+  for (var i = 0; i < 20; i++) {
+    compareTest();
+    compareTest2(lt1, lte1, gt1, gte1);
+    compareTest2(lt2, lte2, gt2, gte2);
+
+    compareTestWithZero(int_lt1, int_lte1, int_gt1, int_gte1, int_eq1, int_ne1);
+    compareTestWithZero(int_lt2, int_lte2, int_gt2, int_gte2, int_eq2, int_ne2);
+  }
+}
diff --git a/tests/language/unsorted/mock_writable_final_field_test.dart b/tests/language/unsorted/mock_writable_final_field_test.dart
new file mode 100644
index 0000000..2a82a56
--- /dev/null
+++ b/tests/language/unsorted/mock_writable_final_field_test.dart
@@ -0,0 +1,61 @@
+// Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:expect/expect.dart';
+
+final values = <int>[];
+
+class Mock {
+  noSuchMethod(Invocation i) {
+    var expected = i.isGetter ? #x : const Symbol("x=");
+    Expect.equals(expected.toString(), i.memberName.toString());
+    values.add(i.positionalArguments[0]);
+  }
+}
+
+class Foo {
+  // Prevent obfuscation of 'x'.
+  @pragma("vm:entry-point")
+  int x = -1;
+}
+
+class Bar extends Mock implements Foo {
+  final int x = 42;
+}
+
+class _Baz implements Foo {
+  final int x = 42;
+
+  noSuchMethod(Invocation i) {
+    var expected = i.isGetter ? #x : const Symbol("x=");
+    Expect.equals(expected.toString(), i.memberName.toString());
+    values.add(i.positionalArguments[0]);
+  }
+}
+
+void main() {
+  {
+    Bar b = new Bar();
+    Expect.equals(b.x, 42);
+    b.x = 123;
+    Expect.listEquals([123], values);
+    values.clear();
+  }
+  {
+    // It works the same if called statically through the Foo interface.
+    Foo b = new Bar();
+    Expect.equals(b.x, 42);
+    b.x = 123;
+    Expect.listEquals([123], values);
+    values.clear();
+  }
+  {
+    // It works the same if the noSuchMethod is defined directly in the class.
+    Foo b = new _Baz();
+    Expect.equals(b.x, 42);
+    b.x = 123;
+    Expect.listEquals([123], values);
+    values.clear();
+  }
+}
diff --git a/tests/language/unsorted/multi_pass2_test.dart b/tests/language/unsorted/multi_pass2_test.dart
new file mode 100644
index 0000000..e75d2d6
--- /dev/null
+++ b/tests/language/unsorted/multi_pass2_test.dart
@@ -0,0 +1,27 @@
+// Copyright (c) 2011, the Dart project authors.  Please see the AUTHORS file
+// for 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 for loading several dart files and resolving superclasses lazily.
+// Same as MultiPassTest, except that the file order is reversed.
+
+library MultiPassTest.dart;
+
+import "package:expect/expect.dart";
+part "multi_pass_a.dart";
+part "multi_pass_b.dart";
+
+class Base {
+  Base(this.value) {}
+  var value;
+}
+
+class MultiPass2Test {
+  static testMain() {
+    var a = new B(5);
+    Expect.equals(5, a.value);
+  }
+}
+
+main() {
+  MultiPass2Test.testMain();
+}
diff --git a/tests/language/unsorted/multi_pass_a.dart b/tests/language/unsorted/multi_pass_a.dart
new file mode 100644
index 0000000..5b2863f
--- /dev/null
+++ b/tests/language/unsorted/multi_pass_a.dart
@@ -0,0 +1,10 @@
+// Copyright (c) 2011, the Dart project authors.  Please see the AUTHORS file
+// for 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 for loading several dart files and resolving superclasses lazily.
+
+part of MultiPassTest.dart;
+
+class A extends Base {
+  A(v) : super(v) {}
+}
diff --git a/tests/language/unsorted/multi_pass_b.dart b/tests/language/unsorted/multi_pass_b.dart
new file mode 100644
index 0000000..ed99b83
--- /dev/null
+++ b/tests/language/unsorted/multi_pass_b.dart
@@ -0,0 +1,10 @@
+// Copyright (c) 2011, the Dart project authors.  Please see the AUTHORS file
+// for 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 for loading several dart files and resolving superclasses lazily.
+
+part of MultiPassTest.dart;
+
+class B extends A {
+  B(v) : super(v) {}
+}
diff --git a/tests/language/unsorted/multi_pass_test.dart b/tests/language/unsorted/multi_pass_test.dart
new file mode 100644
index 0000000..a7f9059
--- /dev/null
+++ b/tests/language/unsorted/multi_pass_test.dart
@@ -0,0 +1,26 @@
+// Copyright (c) 2011, the Dart project authors.  Please see the AUTHORS file
+// for 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 for loading several dart files and resolving superclasses lazily.
+
+library MultiPassTest.dart;
+
+import "package:expect/expect.dart";
+part "multi_pass_a.dart";
+part "multi_pass_b.dart";
+
+class Base {
+  Base(this.value) {}
+  var value;
+}
+
+class MultiPassTest {
+  static testMain() {
+    var a = new B(5);
+    Expect.equals(5, a.value);
+  }
+}
+
+main() {
+  MultiPassTest.testMain();
+}
diff --git a/tests/language/unsorted/namer2_test.dart b/tests/language/unsorted/namer2_test.dart
new file mode 100644
index 0000000..3d7d2bc
--- /dev/null
+++ b/tests/language/unsorted/namer2_test.dart
@@ -0,0 +1,24 @@
+// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import "package:expect/expect.dart";
+
+// Test that user field names cannot clash with internal names of the
+// dart2js compiler.
+
+class A<T> {
+  var $isA;
+  var $eq;
+  var $builtinTypeInfo;
+}
+
+main() {
+  var c = [new A()];
+  Expect.isTrue(c[0] is A);
+  Expect.isTrue(c[0] == c[0]);
+
+  c = [new A<int>()];
+  c[0].$builtinTypeInfo = 42;
+  Expect.isTrue(c[0] is! A<String>);
+}
diff --git a/tests/language/unsorted/namer_test.dart b/tests/language/unsorted/namer_test.dart
new file mode 100644
index 0000000..d9ad7d8
--- /dev/null
+++ b/tests/language/unsorted/namer_test.dart
@@ -0,0 +1,65 @@
+// 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.
+
+import "package:expect/expect.dart";
+
+// Regression test for a bug in dart2js where global names could
+// collide.
+
+var i = 'top level';
+
+var i0 = 'top level zero';
+
+var i00 = 'top level zero zero';
+
+var i2 = 'top level too';
+
+class A {
+  static var i = 'A';
+}
+
+var j = 'top level';
+
+var j0 = 'top level zero';
+
+var j00 = 'top level zero zero';
+
+var j2 = 'top level too';
+
+class B {
+  static var j = 'B';
+}
+
+var k = 'top level';
+
+var k0 = 'top level zero';
+
+var k00 = 'top level zero zero';
+
+var k2 = 'top level too';
+
+class C {
+  static var k = 'C';
+}
+
+main() {
+  // Order matters. This sequence triggered the bug.
+  Expect.equals('top level', i);
+  Expect.equals('A', A.i);
+  Expect.equals('top level too', i2);
+  Expect.equals('top level zero zero', i00);
+  Expect.equals('top level zero', i0);
+
+  Expect.equals('top level zero zero', j00);
+  Expect.equals('top level', j);
+  Expect.equals('top level too', j2);
+  Expect.equals('top level zero', j0);
+  Expect.equals('B', B.j);
+
+  Expect.equals('top level too', k2);
+  Expect.equals('top level zero', k0);
+  Expect.equals('top level', k);
+  Expect.equals('C', C.k);
+  Expect.equals('top level zero zero', k00);
+}
diff --git a/tests/language/unsorted/native_test.dart b/tests/language/unsorted/native_test.dart
new file mode 100644
index 0000000..c3401d3
--- /dev/null
+++ b/tests/language/unsorted/native_test.dart
@@ -0,0 +1,27 @@
+// Copyright (c) 2011, the Dart project authors.  Please see the AUTHORS file
+// for 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 which shows how to write self verifying tests
+// and how to print dart objects if needed.
+
+import "package:expect/expect.dart";
+
+class Helper {
+  static int foo(int i) {
+    return i + 10;
+  }
+}
+
+class NativeTest {
+  static testMain() {
+    int i = 10;
+    int result = 10 + 10 + 10;
+    i = Helper.foo(i + 10);
+    print("$i is result.");
+    Expect.equals(i, result);
+  }
+}
+
+main() {
+  NativeTest.testMain();
+}
diff --git a/tests/language/unsorted/parse_types_test.dart b/tests/language/unsorted/parse_types_test.dart
new file mode 100644
index 0000000..665759d
--- /dev/null
+++ b/tests/language/unsorted/parse_types_test.dart
@@ -0,0 +1,40 @@
+// Copyright (c) 2011, the Dart project authors.  Please see the AUTHORS file
+// for 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 for testing parsing of "standard" types.
+
+import "package:expect/expect.dart";
+
+class ParseTypesTest {
+  static bool callBool1() {
+    return true;
+  }
+
+  static bool callBool2() {
+    return false;
+  }
+
+  static int callInt() {
+    return 2;
+  }
+
+  static String callString() {
+    return "Hey";
+  }
+
+  static double callDouble() {
+    return 4.0;
+  }
+
+  static void testMain() {
+    Expect.equals(true, ParseTypesTest.callBool1());
+    Expect.equals(false, ParseTypesTest.callBool2());
+    Expect.equals(2, ParseTypesTest.callInt());
+    Expect.equals("Hey", ParseTypesTest.callString());
+    Expect.equals(4.0, ParseTypesTest.callDouble());
+  }
+}
+
+main() {
+  ParseTypesTest.testMain();
+}
diff --git a/tests/language/unsorted/partial_min_test.dart b/tests/language/unsorted/partial_min_test.dart
new file mode 100644
index 0000000..bf80169
--- /dev/null
+++ b/tests/language/unsorted/partial_min_test.dart
@@ -0,0 +1,30 @@
+// 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.
+
+import "package:expect/expect.dart";
+
+// This test triggered an NPE in dart2js.
+// The bug needed:
+// - double usage of the same variable in one expression ("b != b").
+// - replacement of "b" with "typechecked b".
+// - ...
+// The example below is minimal (as far as I was able to do).
+
+num foo(num a, num b) {
+  if (a > b) return b;
+  if (b is double) {
+    if (true) {
+      if (true) {
+        return (a + b) * a * b;
+      }
+    }
+    // Check for NaN and b == -0.0.
+    if (a == 0 && b == 0 || b != b) return b;
+  }
+  return -1;
+}
+
+main() {
+  Expect.equals(1, foo(2, 1));
+}
diff --git a/tests/language/unsorted/patch_test.dart b/tests/language/unsorted/patch_test.dart
new file mode 100644
index 0000000..2815cbf
--- /dev/null
+++ b/tests/language/unsorted/patch_test.dart
@@ -0,0 +1,14 @@
+// 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.
+
+import "package:expect/expect.dart";
+
+patch() {
+  return 12;
+}
+
+main() {
+  var x = patch();
+  Expect.equals(12, x);
+}
diff --git a/tests/language/unsorted/property_field_override_test.dart b/tests/language/unsorted/property_field_override_test.dart
new file mode 100644
index 0000000..1e7b853
--- /dev/null
+++ b/tests/language/unsorted/property_field_override_test.dart
@@ -0,0 +1,29 @@
+// Copyright (c) 2011, the Dart project authors.  Please see the AUTHORS file
+// for 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";
+
+// Test overriding a getter property with a field.
+abstract class A {
+  int get v; // Abstract.
+
+  int a() {
+    return v - 1;
+  }
+}
+
+class B extends A {
+  int v = 3;
+
+  int b() {
+    return ++v;
+  }
+}
+
+main() {
+  var x = new B();
+  Expect.equals(3, x.v);
+  Expect.equals(2, x.a());
+  Expect.equals(4, x.b());
+}
diff --git a/tests/language/unsorted/range_analysis2_test.dart b/tests/language/unsorted/range_analysis2_test.dart
new file mode 100644
index 0000000..9443995
--- /dev/null
+++ b/tests/language/unsorted/range_analysis2_test.dart
@@ -0,0 +1,15 @@
+// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// Regression test for dart2js that used to remove bounds checks on
+// boxed variables.
+
+import "package:expect/expect.dart";
+
+main() {
+  var a = 0;
+  var b = [1];
+  foo() => b[a--] + b[a];
+  Expect.throwsRangeError(foo);
+}
diff --git a/tests/language/unsorted/range_analysis3_test.dart b/tests/language/unsorted/range_analysis3_test.dart
new file mode 100644
index 0000000..8fa0edd
--- /dev/null
+++ b/tests/language/unsorted/range_analysis3_test.dart
@@ -0,0 +1,210 @@
+// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import "package:expect/expect.dart";
+
+confuse(x) {
+  if (new DateTime.now().millisecondsSinceEpoch == 0) {
+    return confuse(x + 1);
+  } else if (new DateTime.now().millisecondsSinceEpoch == 0) {
+    return confuse(x - 1);
+  }
+  return x;
+}
+
+test1() {
+  int x = 0;
+  // Give x a range of -1 to 0.
+  if (confuse(0) == 1) x = -1;
+
+  int y = 0;
+  // Give y a range of 0 to 1.
+  if (confuse(0) == 1) y = 1;
+
+  var zero = 0;
+
+  var status = "bad";
+  if (x < zero) {
+    Expect.fail("unreachable");
+  } else {
+    // Dart2js must not conclude that zero has a range of [-1, 0].
+    if (y <= zero) {
+      status = "good";
+    }
+  }
+  Expect.equals("good", status);
+}
+
+test2() {
+  int x = 0;
+  // Give x a range of -1 to 0.
+  if (confuse(0) == 1) x = -1;
+
+  int y = 0;
+  // Give y a range of -1 to 1.
+  if (confuse(0) == 1) y = 1;
+  if (confuse(1) == 2) y = -1;
+
+  var status = "good";
+  if (x < y) {
+    Expect.fail("unreachable");
+  } else {
+    // Dart2js must not conclude that y has a range of [-1, -1].
+    if (y == -1) {
+      status = "bad";
+    }
+  }
+  Expect.equals("good", status);
+}
+
+test3a() {
+  int x = 0;
+  // Give x a range of -1 to 1.
+  if (confuse(0) == 1) x = -1;
+  if (confuse(1) == 2) x = 1;
+
+  int y = 0;
+  // Give y a range of -1 to 1.
+  if (confuse(0) == 1) y = 1;
+  if (confuse(1) == 2) y = -1;
+
+  var status = "good";
+  if (x < y) {
+    Expect.fail("unreachable");
+  } else {
+    // Test that the range-analysis does not lose a value.
+    if (x <= -1) status = "bad";
+    if (x >= 1) status = "bad";
+    if (x < 0) status = "bad";
+    if (x > 0) status = "bad";
+    if (-1 >= x) status = "bad";
+    if (1 <= x) status = "bad";
+    if (0 > x) status = "bad";
+    if (0 < x) status = "bad";
+    if (y <= -1) status = "bad";
+    if (y >= 1) status = "bad";
+    if (y < 0) status = "bad";
+    if (y > 0) status = "bad";
+    if (-1 >= y) status = "bad";
+    if (1 <= y) status = "bad";
+    if (0 > y) status = "bad";
+    if (0 < y) status = "bad";
+  }
+  Expect.equals("good", status);
+}
+
+test3b() {
+  int x = 0;
+  // Give x a range of -2 to 0.
+  if (confuse(0) == 1) x = -2;
+
+  int y = 0;
+  // Give y a range of -1 to 1.
+  if (confuse(0) == 1) y = 1;
+  if (confuse(1) == 2) y = -1;
+
+  var status = "good";
+  if (x < y) {
+    Expect.fail("unreachable");
+  } else {
+    // Test that the range-analysis does not lose a value.
+    if (x <= -1) status = "bad";
+    if (x >= 1) status = "bad";
+    if (x < 0) status = "bad";
+    if (x > 0) status = "bad";
+    if (-1 >= x) status = "bad";
+    if (1 <= x) status = "bad";
+    if (0 > x) status = "bad";
+    if (0 < x) status = "bad";
+    if (y <= -1) status = "bad";
+    if (y >= 1) status = "bad";
+    if (y < 0) status = "bad";
+    if (y > 0) status = "bad";
+    if (-1 >= y) status = "bad";
+    if (1 <= y) status = "bad";
+    if (0 > y) status = "bad";
+    if (0 < y) status = "bad";
+  }
+  Expect.equals("good", status);
+}
+
+test4a() {
+  int x = -1;
+  // Give x a range of -1 to 1.
+  if (confuse(0) == 1) x = 1;
+
+  int y = 0;
+  // Give y a range of -1 to 1.
+  if (confuse(0) == 1) y = 1;
+  if (confuse(1) == 2) y = -1;
+
+  var status = "good";
+  if (x < y) {
+    // Test that the range-analysis does not lose a value.
+    if (x <= -2) status = "bad";
+    if (x >= 0) status = "bad";
+    if (x < -1) status = "bad";
+    if (x > -1) status = "bad";
+    if (-2 >= x) status = "bad";
+    if (0 <= x) status = "bad";
+    if (-1 > x) status = "bad";
+    if (-1 < x) status = "bad";
+    if (y <= -1) status = "bad";
+    if (y >= 1) status = "bad";
+    if (y < 0) status = "bad";
+    if (y > 0) status = "bad";
+    if (-1 >= y) status = "bad";
+    if (1 <= y) status = "bad";
+    if (0 > y) status = "bad";
+    if (0 < y) status = "bad";
+  } else {
+    Expect.fail("unreachable");
+  }
+  Expect.equals("good", status);
+}
+
+test4b() {
+  int x = -1;
+  // Give x a range of -2 to 0.
+  if (confuse(0) == 1) x = -2;
+  if (confuse(1) == 2) x = 0;
+
+  int y = 0;
+  // Give y a range of -1 to 1.
+  if (confuse(0) == 1) y = 1;
+  if (confuse(1) == 2) y = -1;
+
+  var status = "good";
+  if (x < y) {
+    // Test that the range-analysis does not lose a value.
+    if (x <= -2) status = "bad";
+    if (x >= 0) status = "bad";
+    if (x < -1) status = "bad";
+    if (x > -1) status = "bad";
+    if (-2 >= x) status = "bad";
+    if (0 <= x) status = "bad";
+    if (-1 > x) status = "bad";
+    if (-1 < x) status = "bad";
+    if (y <= -1) status = "bad";
+    if (y >= 1) status = "bad";
+    if (y < 0) status = "bad";
+    if (y > 0) status = "bad";
+    if (-1 >= y) status = "bad";
+    if (1 <= y) status = "bad";
+    if (0 > y) status = "bad";
+    if (0 < y) status = "bad";
+  } else {
+    Expect.fail("unreachable");
+  }
+  Expect.equals("good", status);
+}
+
+main() {
+  test1();
+  test2();
+  test3a();
+  test3b();
+  test4a();
+  test4b();
+}
diff --git a/tests/language/unsorted/range_analysis_test.dart b/tests/language/unsorted/range_analysis_test.dart
new file mode 100644
index 0000000..c07b2bf
--- /dev/null
+++ b/tests/language/unsorted/range_analysis_test.dart
@@ -0,0 +1,118 @@
+// 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 constructors and initializers.
+// VMOptions=--optimization-counter-threshold=10 --no-use-osr
+
+import "package:expect/expect.dart";
+
+// Check that range analysis does not enter infinite loop trying to propagate
+// ranges through dependant phis.
+bar() {
+  var sum = 0;
+  for (var i = 0; i < 10; i++) {
+    for (var j = i - 1; j >= 0; j--) {
+      for (var k = j; k < i; k++) {
+        sum += (i + j + k);
+      }
+    }
+  }
+  return sum;
+}
+
+test1() {
+  for (var i = 0; i < 20; i++) bar();
+}
+
+// Check that range analysis does not erroneously remove overflow check.
+test2() {
+  var width = 1073741823;
+  Expect.equals(width - 1, foo(width - 5000, width - 1));
+  Expect.equals(width, foo(width - 5000, width));
+}
+
+foo(n, w) {
+  var x = 0;
+  for (var i = n; i <= w; i++) {
+    Expect.isTrue(i > 0);
+    x = i;
+  }
+  return x;
+}
+
+// Test detection of unsatisfiable constraints.
+f(a, b) {
+  if (a < b) {
+    if (a > b) {
+      throw "unreachable";
+    }
+    return 2;
+  }
+  return 3;
+}
+
+f1(a, b) {
+  if (a < b) {
+    if (a > b - 1) {
+      throw "unreachable";
+    }
+    return 2;
+  }
+  return 3;
+}
+
+f2(a, b) {
+  if (a < b) {
+    if (a > b - 2) {
+      return 2;
+    }
+    throw "unreachable";
+  }
+  return 3;
+}
+
+g() {
+  var i;
+  for (i = 0; i < 10; i++) {
+    if (i < 0) throw "unreachable";
+  }
+  return i;
+}
+
+h(n) {
+  var i;
+  for (i = 0; i < n; i++) {
+    if (i < 0) throw "unreachable";
+    var j = i - 1;
+    if (j >= n - 1) throw "unreachable";
+  }
+  return i;
+}
+
+test3() {
+  test_fun(fun) {
+    Expect.equals(2, fun(0, 1));
+    Expect.equals(3, fun(0, 0));
+    for (var i = 0; i < 20; i++) fun(0, 1);
+    Expect.equals(2, fun(0, 1));
+    Expect.equals(3, fun(0, 0));
+  }
+
+  test_fun(f);
+  test_fun(f1);
+  test_fun(f2);
+
+  Expect.equals(10, g());
+  for (var i = 0; i < 20; i++) g();
+  Expect.equals(10, g());
+
+  Expect.equals(10, h(10));
+  for (var i = 0; i < 20; i++) h(10);
+  Expect.equals(10, h(10));
+}
+
+main() {
+  test1();
+  test2();
+  test3();
+}
diff --git a/tests/language/unsorted/recursive_calls_test.dart b/tests/language/unsorted/recursive_calls_test.dart
new file mode 100644
index 0000000..21bc53d
--- /dev/null
+++ b/tests/language/unsorted/recursive_calls_test.dart
@@ -0,0 +1,12 @@
+// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import "package:expect/expect.dart";
+
+int bar(x) => foo(x + 1);
+int foo(x) => x > 9 ? x : bar(x);
+
+main() {
+  Expect.equals(foo(int.parse("1")), 10);
+}
diff --git a/tests/language/unsorted/recursive_loop_phis_test.dart b/tests/language/unsorted/recursive_loop_phis_test.dart
new file mode 100644
index 0000000..f01aa0a
--- /dev/null
+++ b/tests/language/unsorted/recursive_loop_phis_test.dart
@@ -0,0 +1,22 @@
+// 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.
+
+import "package:expect/expect.dart";
+
+// This program tripped dart2js.
+
+foo(bool b) {
+  var x = 499;
+  // If the loop-phi is not declared it will assign to a global and the
+  // recursive call will screw up the methods "local" state.
+  for (int i = 0; i < 3; i++) {
+    if (i == 0 && b) x = 42;
+    if (!b) foo(true);
+  }
+  return x;
+}
+
+main() {
+  Expect.equals(499, foo(false));
+}
diff --git a/tests/language/unsorted/refine_receiver_null_test.dart b/tests/language/unsorted/refine_receiver_null_test.dart
new file mode 100644
index 0000000..499e998
--- /dev/null
+++ b/tests/language/unsorted/refine_receiver_null_test.dart
@@ -0,0 +1,22 @@
+// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// Regression test for dart2js that used to infer that code following
+// a dynamic call could assume the receiver is not null. This does not
+// work for Object methods.
+
+import "package:expect/expect.dart";
+import "../compiler_annotations.dart";
+
+main() {
+  var a = true ? null : 42;
+  a.toString();
+  foo(a);
+}
+
+@DontInline()
+foo(a) {
+  var f = () => 42;
+  Expect.throwsNoSuchMethodError(() => a + 42);
+}
diff --git a/tests/language/unsorted/savannah_test.dart b/tests/language/unsorted/savannah_test.dart
new file mode 100644
index 0000000..7b2b8ef
--- /dev/null
+++ b/tests/language/unsorted/savannah_test.dart
@@ -0,0 +1,76 @@
+// Copyright (c) 2011, the Dart project authors.  Please see the AUTHORS file
+// for 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 using an identity hash.
+
+import "package:expect/expect.dart";
+
+abstract class BigGame {
+  String get name;
+}
+
+// Giraffe overrides hashCode and provides its own identity hash.
+class Giraffe implements BigGame {
+  final String name;
+  final int identityHash_;
+
+  Giraffe(this.name) : identityHash_ = nextId() {}
+
+  int get hashCode {
+    return identityHash_;
+  }
+
+  // Calculate identity hash for a giraffe.
+  static int nextId_ = 17;
+  static int nextId() {
+    return nextId_++;
+  }
+}
+
+// Zebra relies on the system provided identity hash.
+class Zebra implements BigGame {
+  final String name;
+  Zebra(this.name) {}
+}
+
+class SavannahTest {
+  static void testMain() {
+    Map<BigGame, String> savannah = new Map<BigGame, String>();
+
+    Giraffe giraffe1 = new Giraffe("Tony");
+    Giraffe giraffe2 = new Giraffe("Rose");
+    savannah[giraffe1] = giraffe1.name;
+    savannah[giraffe2] = giraffe2.name;
+    print("giraffe1 hash: ${giraffe1.hashCode}");
+    print("giraffe2 hash: ${giraffe2.hashCode}");
+
+    var count = savannah.length;
+    print("getCount is $count");
+    Expect.equals(2, count);
+
+    print("giraffe1: ${savannah[giraffe1]}");
+    print("giraffe2: ${savannah[giraffe2]}");
+    Expect.equals("Tony", savannah[giraffe1]);
+    Expect.equals("Rose", savannah[giraffe2]);
+
+    Zebra zebra1 = new Zebra("Paolo");
+    Zebra zebra2 = new Zebra("Zeeta");
+    savannah[zebra1] = zebra1.name;
+    savannah[zebra2] = zebra2.name;
+    print("zebra1 hash: ${zebra1.hashCode}");
+    print("zebra2 hash: ${zebra2.hashCode}");
+
+    count = savannah.length;
+    print("getCount is $count");
+    Expect.equals(4, count);
+
+    print("zebra1: ${savannah[zebra1]}");
+    print("zebra2: ${savannah[zebra2]}");
+    Expect.equals("Paolo", savannah[zebra1]);
+    Expect.equals("Zeeta", savannah[zebra2]);
+  }
+}
+
+main() {
+  SavannahTest.testMain();
+}
diff --git a/tests/language/unsorted/scanner_test.dart b/tests/language/unsorted/scanner_test.dart
new file mode 100644
index 0000000..01ee048
--- /dev/null
+++ b/tests/language/unsorted/scanner_test.dart
@@ -0,0 +1,15 @@
+// Copyright (c) 2011, the Dart project authors.  Please see the AUTHORS file
+// for 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 dart scanner.
+
+class ScannerTest {
+  static testMain() {
+    var s = "Hello\tmy\tfriend\n";
+    return s;
+  }
+}
+
+main() {
+  ScannerTest.testMain();
+}
diff --git a/tests/language/unsorted/second_test.dart b/tests/language/unsorted/second_test.dart
new file mode 100644
index 0000000..0cdd2a7
--- /dev/null
+++ b/tests/language/unsorted/second_test.dart
@@ -0,0 +1,24 @@
+// Copyright (c) 2011, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+// Second dart test program.
+
+import "package:expect/expect.dart";
+
+class Helper {
+  static empty() {}
+  static int foo() {
+    return 42;
+  }
+}
+
+class SecondTest {
+  static testMain() {
+    Helper.empty();
+    Expect.equals(42, Helper.foo());
+  }
+}
+
+main() {
+  SecondTest.testMain();
+}
diff --git a/tests/language/unsorted/shadow_parameter_and_local_test.dart b/tests/language/unsorted/shadow_parameter_and_local_test.dart
new file mode 100644
index 0000000..6082f59
--- /dev/null
+++ b/tests/language/unsorted/shadow_parameter_and_local_test.dart
@@ -0,0 +1,134 @@
+// Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import "package:expect/expect.dart";
+
+// Regression test for https://github.com/dart-lang/sdk/issues/29733 in DDC.
+foo(a) {
+  var a = 123;
+  return a;
+}
+
+// Regression test for https://github.com/dart-lang/sdk/issues/30792 in DDC.
+bar(a) async {
+  var a = 123;
+  return a;
+}
+
+baz(a) sync* {
+  var a = 123;
+  yield a;
+}
+
+qux(a) async* {
+  var a = 123;
+  yield a;
+}
+
+// Regression test for https://github.com/dart-lang/sdk/issues/32140
+class C {
+  var x, y, localY, _value;
+
+  C(a) {
+    var a = 123;
+    this.x = a;
+  }
+
+  C.initY(this.y) {
+    var y = 123;
+    this.localY = y;
+  }
+
+  method(a) {
+    var a = 123;
+    return a;
+  }
+
+  mOptional([a = 0]) {
+    var a = 123;
+    return a;
+  }
+
+  mNamed({a = 0}) {
+    var a = 123;
+    return a;
+  }
+
+  mAsync({a: 0}) async {
+    var a = 123;
+    return a;
+  }
+
+  mSyncStar({a: 0}) sync* {
+    var a = 123;
+    yield a;
+  }
+
+  mAsyncStar({a: 0}) async* {
+    var a = 123;
+    yield a;
+  }
+
+  get accessor => _value;
+  set accessor(a) {
+    var a = 123;
+    this._value = a;
+  }
+}
+
+testCatch() {
+  try {
+    throw 'oops';
+  } catch (e) {
+    var e = 123;
+    return e;
+  }
+}
+
+testStackTrace() {
+  try {
+    throw 'oops';
+  } catch (e, s) {
+    var s = 123;
+    return s;
+  }
+}
+
+main() async {
+  Expect.equals(123, foo(42));
+  Expect.equals(123, await bar(42));
+  Expect.equals(123, baz(42).single);
+  Expect.equals(123, await qux(42).single);
+
+  await testClass();
+
+  Expect.equals(123, testCatch());
+  Expect.equals(123, testStackTrace());
+}
+
+testClass() async {
+  var c = new C('hi');
+  Expect.equals(123, c.x);
+  Expect.equals(123, c.method(42));
+  c.accessor = 42;
+  Expect.equals(123, c.accessor);
+  c = new C.initY(42);
+  Expect.equals(42, c.y);
+  Expect.equals(123, c.localY);
+
+  Expect.equals(123, c.mOptional());
+  Expect.equals(123, c.mOptional(42));
+
+  Expect.equals(123, c.mNamed());
+  Expect.equals(123, c.mNamed(a: 42));
+
+  Expect.equals(123, await c.mAsync());
+
+  var iter = c.mSyncStar();
+  Expect.listEquals([123], iter.toList());
+  Expect.listEquals([123], iter.toList(), 'second iteration yields same value');
+
+  var stream = c.mAsyncStar();
+  Expect.listEquals([123], await stream.toList());
+}
diff --git a/tests/language/unsorted/side_effect_throw_test.dart b/tests/language/unsorted/side_effect_throw_test.dart
new file mode 100644
index 0000000..484b762
--- /dev/null
+++ b/tests/language/unsorted/side_effect_throw_test.dart
@@ -0,0 +1,28 @@
+// 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.
+
+import "package:expect/expect.dart";
+
+class B {
+  static var x;
+  operator <<(other) {
+    x = other;
+    return 33;
+  }
+}
+
+class A {
+  get _m => new B();
+  opshl(n) {
+    // 'n' must be a number, but we are not allowed to throw before we have
+    // evaluated _m << 499.
+    return (_m << 499) | (2 - n);
+  }
+}
+
+main() {
+  var a = new A();
+  Expect.throws(() => a.opshl("string"));
+  Expect.equals(499, B.x);
+}
diff --git a/tests/language/unsorted/smaller_4_Interface_Types_A11_t01_test.dart b/tests/language/unsorted/smaller_4_Interface_Types_A11_t01_test.dart
new file mode 100644
index 0000000..281315e
--- /dev/null
+++ b/tests/language/unsorted/smaller_4_Interface_Types_A11_t01_test.dart
@@ -0,0 +1,269 @@
+/*
+ * Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
+ * for details. All rights reserved. Use of this source code is governed by a
+ * BSD-style license that can be found in the LICENSE file.
+ */
+
+// This is a small version of the co19 test
+// Language/14_Types/4_Interface_Types_A11_t01.
+
+import 'package:expect/expect.dart';
+
+class C {}
+
+main() {
+  Expect.isTrue(new C126() is C);
+  Expect.isTrue(new C126() is Object);
+}
+
+class C1 extends C {}
+
+class C2 extends C1 {}
+
+class C3 extends C2 {}
+
+class C4 extends C3 {}
+
+class C5 extends C4 {}
+
+class C6 extends C5 {}
+
+class C7 extends C6 {}
+
+class C8 extends C7 {}
+
+class C9 extends C8 {}
+
+class C10 extends C9 {}
+
+class C11 extends C10 {}
+
+class C12 extends C11 {}
+
+class C13 extends C12 {}
+
+class C14 extends C13 {}
+
+class C15 extends C14 {}
+
+class C16 extends C15 {}
+
+class C17 extends C16 {}
+
+class C18 extends C17 {}
+
+class C19 extends C18 {}
+
+class C20 extends C19 {}
+
+class C21 extends C20 {}
+
+class C22 extends C21 {}
+
+class C23 extends C22 {}
+
+class C24 extends C23 {}
+
+class C25 extends C24 {}
+
+class C26 extends C25 {}
+
+class C27 extends C26 {}
+
+class C28 extends C27 {}
+
+class C29 extends C28 {}
+
+class C30 extends C29 {}
+
+class C31 extends C30 {}
+
+class C32 extends C31 {}
+
+class C33 extends C32 {}
+
+class C34 extends C33 {}
+
+class C35 extends C34 {}
+
+class C36 extends C35 {}
+
+class C37 extends C36 {}
+
+class C38 extends C37 {}
+
+class C39 extends C38 {}
+
+class C40 extends C39 {}
+
+class C41 extends C40 {}
+
+class C42 extends C41 {}
+
+class C43 extends C42 {}
+
+class C44 extends C43 {}
+
+class C45 extends C44 {}
+
+class C46 extends C45 {}
+
+class C47 extends C46 {}
+
+class C48 extends C47 {}
+
+class C49 extends C48 {}
+
+class C50 extends C49 {}
+
+class C51 extends C50 {}
+
+class C52 extends C51 {}
+
+class C53 extends C52 {}
+
+class C54 extends C53 {}
+
+class C55 extends C54 {}
+
+class C56 extends C55 {}
+
+class C57 extends C56 {}
+
+class C58 extends C57 {}
+
+class C59 extends C58 {}
+
+class C60 extends C59 {}
+
+class C61 extends C60 {}
+
+class C62 extends C61 {}
+
+class C63 extends C62 {}
+
+class C64 extends C63 {}
+
+class C65 extends C64 {}
+
+class C66 extends C65 {}
+
+class C67 extends C66 {}
+
+class C68 extends C67 {}
+
+class C69 extends C68 {}
+
+class C70 extends C69 {}
+
+class C71 extends C70 {}
+
+class C72 extends C71 {}
+
+class C73 extends C72 {}
+
+class C74 extends C73 {}
+
+class C75 extends C74 {}
+
+class C76 extends C75 {}
+
+class C77 extends C76 {}
+
+class C78 extends C77 {}
+
+class C79 extends C78 {}
+
+class C80 extends C79 {}
+
+class C81 extends C80 {}
+
+class C82 extends C81 {}
+
+class C83 extends C82 {}
+
+class C84 extends C83 {}
+
+class C85 extends C84 {}
+
+class C86 extends C85 {}
+
+class C87 extends C86 {}
+
+class C88 extends C87 {}
+
+class C89 extends C88 {}
+
+class C90 extends C89 {}
+
+class C91 extends C90 {}
+
+class C92 extends C91 {}
+
+class C93 extends C92 {}
+
+class C94 extends C93 {}
+
+class C95 extends C94 {}
+
+class C96 extends C95 {}
+
+class C97 extends C96 {}
+
+class C98 extends C97 {}
+
+class C99 extends C98 {}
+
+class C100 extends C99 {}
+
+class C101 extends C100 {}
+
+class C102 extends C101 {}
+
+class C103 extends C102 {}
+
+class C104 extends C103 {}
+
+class C105 extends C104 {}
+
+class C106 extends C105 {}
+
+class C107 extends C106 {}
+
+class C108 extends C107 {}
+
+class C109 extends C108 {}
+
+class C110 extends C109 {}
+
+class C111 extends C110 {}
+
+class C112 extends C111 {}
+
+class C113 extends C112 {}
+
+class C114 extends C113 {}
+
+class C115 extends C114 {}
+
+class C116 extends C115 {}
+
+class C117 extends C116 {}
+
+class C118 extends C117 {}
+
+class C119 extends C118 {}
+
+class C120 extends C119 {}
+
+class C121 extends C120 {}
+
+class C122 extends C121 {}
+
+class C123 extends C122 {}
+
+class C124 extends C123 {}
+
+class C125 extends C124 {}
+
+class C126 extends C125 {}
diff --git a/tests/language/unsorted/smaller_4_Interface_Types_A11_t02_test.dart b/tests/language/unsorted/smaller_4_Interface_Types_A11_t02_test.dart
new file mode 100644
index 0000000..db2ecca
--- /dev/null
+++ b/tests/language/unsorted/smaller_4_Interface_Types_A11_t02_test.dart
@@ -0,0 +1,270 @@
+/*
+ * Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
+ * for details. All rights reserved. Use of this source code is governed by a
+ * BSD-style license that can be found in the LICENSE file.
+ */
+
+// This is a small version of the co19 test
+// Language/14_Types/4_Interface_Types_A11_t02.
+
+import 'package:expect/expect.dart';
+
+class C {}
+
+class G<T, S, U> {}
+
+main() {
+  Expect.isTrue(new G<C126, C126, C126>() is G<C, C, C>);
+}
+
+class C1 extends C {}
+
+class C2 extends C1 {}
+
+class C3 extends C2 {}
+
+class C4 extends C3 {}
+
+class C5 extends C4 {}
+
+class C6 extends C5 {}
+
+class C7 extends C6 {}
+
+class C8 extends C7 {}
+
+class C9 extends C8 {}
+
+class C10 extends C9 {}
+
+class C11 extends C10 {}
+
+class C12 extends C11 {}
+
+class C13 extends C12 {}
+
+class C14 extends C13 {}
+
+class C15 extends C14 {}
+
+class C16 extends C15 {}
+
+class C17 extends C16 {}
+
+class C18 extends C17 {}
+
+class C19 extends C18 {}
+
+class C20 extends C19 {}
+
+class C21 extends C20 {}
+
+class C22 extends C21 {}
+
+class C23 extends C22 {}
+
+class C24 extends C23 {}
+
+class C25 extends C24 {}
+
+class C26 extends C25 {}
+
+class C27 extends C26 {}
+
+class C28 extends C27 {}
+
+class C29 extends C28 {}
+
+class C30 extends C29 {}
+
+class C31 extends C30 {}
+
+class C32 extends C31 {}
+
+class C33 extends C32 {}
+
+class C34 extends C33 {}
+
+class C35 extends C34 {}
+
+class C36 extends C35 {}
+
+class C37 extends C36 {}
+
+class C38 extends C37 {}
+
+class C39 extends C38 {}
+
+class C40 extends C39 {}
+
+class C41 extends C40 {}
+
+class C42 extends C41 {}
+
+class C43 extends C42 {}
+
+class C44 extends C43 {}
+
+class C45 extends C44 {}
+
+class C46 extends C45 {}
+
+class C47 extends C46 {}
+
+class C48 extends C47 {}
+
+class C49 extends C48 {}
+
+class C50 extends C49 {}
+
+class C51 extends C50 {}
+
+class C52 extends C51 {}
+
+class C53 extends C52 {}
+
+class C54 extends C53 {}
+
+class C55 extends C54 {}
+
+class C56 extends C55 {}
+
+class C57 extends C56 {}
+
+class C58 extends C57 {}
+
+class C59 extends C58 {}
+
+class C60 extends C59 {}
+
+class C61 extends C60 {}
+
+class C62 extends C61 {}
+
+class C63 extends C62 {}
+
+class C64 extends C63 {}
+
+class C65 extends C64 {}
+
+class C66 extends C65 {}
+
+class C67 extends C66 {}
+
+class C68 extends C67 {}
+
+class C69 extends C68 {}
+
+class C70 extends C69 {}
+
+class C71 extends C70 {}
+
+class C72 extends C71 {}
+
+class C73 extends C72 {}
+
+class C74 extends C73 {}
+
+class C75 extends C74 {}
+
+class C76 extends C75 {}
+
+class C77 extends C76 {}
+
+class C78 extends C77 {}
+
+class C79 extends C78 {}
+
+class C80 extends C79 {}
+
+class C81 extends C80 {}
+
+class C82 extends C81 {}
+
+class C83 extends C82 {}
+
+class C84 extends C83 {}
+
+class C85 extends C84 {}
+
+class C86 extends C85 {}
+
+class C87 extends C86 {}
+
+class C88 extends C87 {}
+
+class C89 extends C88 {}
+
+class C90 extends C89 {}
+
+class C91 extends C90 {}
+
+class C92 extends C91 {}
+
+class C93 extends C92 {}
+
+class C94 extends C93 {}
+
+class C95 extends C94 {}
+
+class C96 extends C95 {}
+
+class C97 extends C96 {}
+
+class C98 extends C97 {}
+
+class C99 extends C98 {}
+
+class C100 extends C99 {}
+
+class C101 extends C100 {}
+
+class C102 extends C101 {}
+
+class C103 extends C102 {}
+
+class C104 extends C103 {}
+
+class C105 extends C104 {}
+
+class C106 extends C105 {}
+
+class C107 extends C106 {}
+
+class C108 extends C107 {}
+
+class C109 extends C108 {}
+
+class C110 extends C109 {}
+
+class C111 extends C110 {}
+
+class C112 extends C111 {}
+
+class C113 extends C112 {}
+
+class C114 extends C113 {}
+
+class C115 extends C114 {}
+
+class C116 extends C115 {}
+
+class C117 extends C116 {}
+
+class C118 extends C117 {}
+
+class C119 extends C118 {}
+
+class C120 extends C119 {}
+
+class C121 extends C120 {}
+
+class C122 extends C121 {}
+
+class C123 extends C122 {}
+
+class C124 extends C123 {}
+
+class C125 extends C124 {}
+
+class C126 extends C125 {}
diff --git a/tests/language/unsorted/stack_overflow_stacktrace_test.dart b/tests/language/unsorted/stack_overflow_stacktrace_test.dart
new file mode 100644
index 0000000..6e54477
--- /dev/null
+++ b/tests/language/unsorted/stack_overflow_stacktrace_test.dart
@@ -0,0 +1,28 @@
+// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+// Dart program testing stack overflow.
+
+import "package:expect/expect.dart";
+
+class StackOverflowTest {
+  static void curseTheRecurse(a, b, c) {
+    curseTheRecurse(b, c, a);
+  }
+
+  static void testMain() {
+    bool exceptionCaught = false;
+    try {
+      curseTheRecurse(1, 2, 3);
+    } on StackOverflowError catch (e, stacktrace) {
+      String s = stacktrace.toString();
+      Expect.equals(-1, s.indexOf("-1:-1"));
+      exceptionCaught = true;
+    }
+    Expect.equals(true, exceptionCaught);
+  }
+}
+
+main() {
+  StackOverflowTest.testMain();
+}
diff --git a/tests/language/unsorted/stack_overflow_test.dart b/tests/language/unsorted/stack_overflow_test.dart
new file mode 100644
index 0000000..bd87a25
--- /dev/null
+++ b/tests/language/unsorted/stack_overflow_test.dart
@@ -0,0 +1,26 @@
+// Copyright (c) 2011, the Dart project authors.  Please see the AUTHORS file
+// for 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 program testing stack overflow.
+
+import "package:expect/expect.dart";
+
+class StackOverflowTest {
+  static void curseTheRecurse(a, b, c) {
+    curseTheRecurse(b, c, a);
+  }
+
+  static void testMain() {
+    bool exceptionCaught = false;
+    try {
+      curseTheRecurse(1, 2, 3);
+    } on StackOverflowError catch (e) {
+      exceptionCaught = true;
+    }
+    Expect.equals(true, exceptionCaught);
+  }
+}
+
+main() {
+  StackOverflowTest.testMain();
+}
diff --git a/tests/language/unsorted/state_mangling2_test.dart b/tests/language/unsorted/state_mangling2_test.dart
new file mode 100644
index 0000000..53a7677
--- /dev/null
+++ b/tests/language/unsorted/state_mangling2_test.dart
@@ -0,0 +1,38 @@
+// 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.
+
+import "package:expect/expect.dart";
+
+foo(state) {
+  if (state == null) return 0;
+  var sum = 0;
+  state = inscrutableId(state);
+  for (int i = 0; i < state.length; i++) {
+    sum += state[i] as int;
+  }
+  state = inscrutableId(state);
+  for (int i = 0; i < state.length; i++) {
+    sum += state[i] as int;
+  }
+  return sum;
+}
+
+int inscrutable(int x) => x == 0 ? 0 : x | inscrutable(x & (x - 1));
+
+inscrutableId(x) {
+  if (x == 0) return inscrutable(x);
+  return (3 == inscrutable(3)) ? x : false;
+}
+
+class A {
+  int length = 3;
+  operator [](i) => 1;
+}
+
+main() {
+  Expect.equals(12, foo([1, 2, 3]));
+  if (inscrutableId(0) == 0) {
+    Expect.equals(6, foo(new A()));
+  }
+}
diff --git a/tests/language/unsorted/state_mangling3_test.dart b/tests/language/unsorted/state_mangling3_test.dart
new file mode 100644
index 0000000..6db5316
--- /dev/null
+++ b/tests/language/unsorted/state_mangling3_test.dart
@@ -0,0 +1,37 @@
+// 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.
+
+import "package:expect/expect.dart";
+
+foo(state0) {
+  if (state0 == null) return 0;
+  var sum = 0;
+  for (int i = 0; i < state0.length; i++) {
+    sum += state0[i] as int;
+  }
+  state0 = inscrutableId(state0);
+  for (int i = 0; i < state0.length; i++) {
+    sum += state0[i] as int;
+  }
+  return sum;
+}
+
+int inscrutable(int x) => x == 0 ? 0 : x | inscrutable(x & (x - 1));
+
+inscrutableId(x) {
+  if (x == 0) return inscrutable(x);
+  return (3 == inscrutable(3)) ? x : false;
+}
+
+class A {
+  int length = 3;
+  operator [](i) => 1;
+}
+
+main() {
+  Expect.equals(12, foo([1, 2, 3]));
+  if (inscrutableId(0) == 0) {
+    Expect.equals(6, foo(new A()));
+  }
+}
diff --git a/tests/language/unsorted/state_mangling4_test.dart b/tests/language/unsorted/state_mangling4_test.dart
new file mode 100644
index 0000000..ff30b22
--- /dev/null
+++ b/tests/language/unsorted/state_mangling4_test.dart
@@ -0,0 +1,37 @@
+// 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.
+
+import "package:expect/expect.dart";
+
+foo(env1) {
+  if (env1 == null) return 0;
+  var env0 = 0;
+  for (int i = 0; i < env1.length; i++) {
+    env0 += env1[i] as int;
+  }
+  env1 = inscrutableId(new A());
+  for (int i = 0; i < env1.length; i++) {
+    env0 += env1[i] as int;
+  }
+  return env0;
+}
+
+int inscrutable(int x) => x == 0 ? 0 : x | inscrutable(x & (x - 1));
+
+inscrutableId(x) {
+  if (x == 0) return inscrutable(x);
+  return (3 == inscrutable(3)) ? x : false;
+}
+
+class A {
+  int length = 3;
+  operator [](i) => 1;
+}
+
+main() {
+  Expect.equals(9, foo([1, 2, 3]));
+  if (inscrutableId(0) == 0) {
+    Expect.equals(6, foo(new A()));
+  }
+}
diff --git a/tests/language/unsorted/state_mangling_test.dart b/tests/language/unsorted/state_mangling_test.dart
new file mode 100644
index 0000000..c63f615
--- /dev/null
+++ b/tests/language/unsorted/state_mangling_test.dart
@@ -0,0 +1,37 @@
+// 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.
+
+import "package:expect/expect.dart";
+
+foo(state) {
+  if (state == null) return 0;
+  var sum = 0;
+  for (int i = 0; i < state.length; i++) {
+    sum += state[i] as int;
+  }
+  state = inscrutableId(state);
+  for (int i = 0; i < state.length; i++) {
+    sum += state[i] as int;
+  }
+  return sum;
+}
+
+int inscrutable(int x) => x == 0 ? 0 : x | inscrutable(x & (x - 1));
+
+inscrutableId(x) {
+  if (x == 0) return inscrutable(x);
+  return (3 == inscrutable(3)) ? x : false;
+}
+
+class A {
+  int length = 3;
+  operator [](i) => 1;
+}
+
+main() {
+  Expect.equals(12, foo([1, 2, 3]));
+  if (inscrutableId(0) == 0) {
+    Expect.equals(6, foo(new A()));
+  }
+}
diff --git a/tests/language/unsorted/temp_mangling_test.dart b/tests/language/unsorted/temp_mangling_test.dart
new file mode 100644
index 0000000..bbe8e4a
--- /dev/null
+++ b/tests/language/unsorted/temp_mangling_test.dart
@@ -0,0 +1,33 @@
+// 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.
+
+import "package:expect/expect.dart";
+
+main() {
+  testOne();
+  testTwo();
+}
+
+testOne() {
+  // Dart2JS uses t[0-9]* to declare temporaries, so a local variable
+  // with that pattern can conflict with them.
+  var t0 = [];
+  // By using 'is' check, we make sure 't0.length' does not become
+  // generate at use site.
+  Expect.isTrue(t0.length is int);
+  Expect.isTrue(t0 is List);
+}
+
+testTwo() {
+  var x = [];
+  var x_0 = [];
+  {
+    // This used to introduce x_0.
+    var x = new Set();
+    Expect.equals(0, x.length);
+    Expect.isTrue(x.isEmpty);
+  }
+  Expect.isTrue(x is List);
+  Expect.isTrue(x_0 is List);
+}
diff --git a/tests/language/unsorted/third_test.dart b/tests/language/unsorted/third_test.dart
new file mode 100644
index 0000000..3df66d3
--- /dev/null
+++ b/tests/language/unsorted/third_test.dart
@@ -0,0 +1,54 @@
+// Copyright (c) 2011, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+// Third dart test program.
+
+import "package:expect/expect.dart";
+
+class A extends B {
+  var a;
+  static var s;
+
+  static foo() {
+    return s;
+  }
+
+  A(x, y)
+      : a = x,
+        super(y) {}
+
+  value() {
+    return a + b + foo();
+  }
+}
+
+class B {
+  var b;
+  static var s;
+
+  static foo(x) {
+    return x + s;
+  }
+
+  value() {
+    return b + foo(s) + A.foo();
+  }
+
+  B(x) : b = x {
+    b = b + 1;
+  }
+}
+
+class ThirdTest {
+  static testMain() {
+    var a = new A(1, 2);
+    var b = new B(3);
+    A.s = 4;
+    B.s = 5;
+    Expect.equals(26, a.value() + b.value());
+  }
+}
+
+main() {
+  ThirdTest.testMain();
+}
diff --git a/tests/language/unsorted/tree_shake_typed_selector_test.dart b/tests/language/unsorted/tree_shake_typed_selector_test.dart
new file mode 100644
index 0000000..480c846
--- /dev/null
+++ b/tests/language/unsorted/tree_shake_typed_selector_test.dart
@@ -0,0 +1,25 @@
+// 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.
+// Check that dart2js emits code for classes that implement another
+// class.
+
+import "package:expect/expect.dart";
+
+class A {
+  factory A() => new B();
+  foo() => 0;
+}
+
+class B implements A {
+  foo() => 42;
+}
+
+main() {
+  var a = new A();
+  if (a is A) {
+    Expect.equals(42, a.foo());
+  } else {
+    Expect.fail('Should not be here');
+  }
+}
diff --git a/tests/language/unsorted/typecheck_multifield_declaration_test.dart b/tests/language/unsorted/typecheck_multifield_declaration_test.dart
new file mode 100644
index 0000000..ccccf6f
--- /dev/null
+++ b/tests/language/unsorted/typecheck_multifield_declaration_test.dart
@@ -0,0 +1,16 @@
+// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+/// Checks that we can correctly typecheck multi-variable declarations on fields
+/// and top-levels. This is also a regression test for Issue 27401.
+
+class A {}
+
+A a = new A(), b = new A();
+
+class B {
+  A a = new A(), b = new A();
+}
+
+main() => [a, b, new B().a, new B().b];
diff --git a/tests/language/unsorted/typed_equality_test.dart b/tests/language/unsorted/typed_equality_test.dart
new file mode 100644
index 0000000..9f48e79
--- /dev/null
+++ b/tests/language/unsorted/typed_equality_test.dart
@@ -0,0 +1,21 @@
+// 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.
+
+// Regression test for http://dartbug.com/6036. dart2js used to fail
+// this method because it was computing that intersecting type D with
+// type C is conflicting.
+
+foo(a, b) {
+  if (identical(a, b)) return;
+  throw 'broken';
+}
+
+class D {}
+
+class C implements D {}
+
+main() {
+  var c = new C();
+  foo(c, c as D);
+}
diff --git a/tests/language/unsorted/typed_selector2_test.dart b/tests/language/unsorted/typed_selector2_test.dart
new file mode 100644
index 0000000..db1cc30
--- /dev/null
+++ b/tests/language/unsorted/typed_selector2_test.dart
@@ -0,0 +1,22 @@
+// 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 for dart2js to handle a typed selector with a typedef as a
+// receiver type.
+
+getComparator() => (a, b) => 42;
+
+class A {
+  foo() => 42;
+}
+
+main() {
+  Comparator a = getComparator();
+  if (a(1, 2) != 42) {
+    // This call used to crash dart2js because 'foo' was a typed
+    // selector with a typedef as a receiver type.
+    a.foo(); /*@compile-error=unspecified*/
+  }
+  var b = new A();
+  b.foo();
+}
diff --git a/tests/language/unsorted/typed_selector_test.dart b/tests/language/unsorted/typed_selector_test.dart
new file mode 100644
index 0000000..98c2d08
--- /dev/null
+++ b/tests/language/unsorted/typed_selector_test.dart
@@ -0,0 +1,30 @@
+// 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.
+
+import "package:expect/expect.dart";
+
+// Regression test for http://dartbug.com/6259. This test used to fail
+// on dart2js because class A does not know [A.document] is a target for
+// the call [:obj.document:] in the [main] method. Therefore, dart2js
+// would not compile [A.document].
+
+class A {
+  get document => 42;
+}
+
+abstract class B {
+  get document; // Abstract.
+}
+
+class C extends A implements B {}
+
+int inscrutable(int x) => x == 0 ? 0 : x | inscrutable(x & (x - 1));
+
+void main() {
+  var tab = [new Object(), new C()];
+  var obj = tab[inscrutable(1)];
+  int res = 0;
+  if (obj is B) res = obj.document;
+  Expect.equals(42, res);
+}
diff --git a/tests/language/unsorted/unevaluated_field.dart b/tests/language/unsorted/unevaluated_field.dart
new file mode 100644
index 0000000..5c701db
--- /dev/null
+++ b/tests/language/unsorted/unevaluated_field.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.
+
+// Test that environment constants in field initializers work properly.
+
+import "package:expect/expect.dart";
+
+const int gx =
+    const bool.hasEnvironment("x") ? const int.fromEnvironment("x") : null;
+
+class A {
+  final int x = gx;
+  final int y =
+      const bool.hasEnvironment("y") ? const int.fromEnvironment("y") : null;
+  const A();
+}
+
+main() {
+  const a = const A();
+  Expect.isTrue(a.x == null || a.x != null);
+  Expect.isTrue(a.y == null || a.y != null);
+}
diff --git a/tests/language/unsorted/unused_overridden_async_test.dart b/tests/language/unsorted/unused_overridden_async_test.dart
new file mode 100644
index 0000000..da7aa72
--- /dev/null
+++ b/tests/language/unsorted/unused_overridden_async_test.dart
@@ -0,0 +1,31 @@
+// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+import 'dart:async';
+
+class Base {
+  Future<int> method() async {
+    throw 'Should be unused';
+  }
+}
+
+class Sub1 extends Base {
+  Future<int> method() async {
+    return 1;
+  }
+}
+
+class Sub2 extends Base {
+  Future<int> method() async {
+    return 2;
+  }
+}
+
+help(Base object) async {
+  print(await object.method());
+}
+
+main() async {
+  await help(new Sub1());
+  await help(new Sub2());
+}
diff --git a/tests/language/unsorted/value_range2_test.dart b/tests/language/unsorted/value_range2_test.dart
new file mode 100644
index 0000000..ac0a99d
--- /dev/null
+++ b/tests/language/unsorted/value_range2_test.dart
@@ -0,0 +1,22 @@
+// 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.
+
+import "package:expect/expect.dart";
+
+int inscrutable(int x) => x == 0 ? 0 : x | inscrutable(x & (x - 1));
+
+foo() {
+  int x = 0;
+  if (inscrutable(0) == 0) x = -2; // x is now in range [-2 .. 0].
+  int y = 2;
+  if (inscrutable(0) == 0) y = 4; // y is now in range [2 .. 4].
+  int i = y - x; // i should be in range [2 .. 6].
+  i -= 4; // i should be in range [-2 .. 2]. Actual value: 2.
+  var a = const [1];
+  return a[i];
+}
+
+main() {
+  Expect.throwsRangeError(() => foo());
+}
diff --git a/tests/language/unsorted/value_range3_test.dart b/tests/language/unsorted/value_range3_test.dart
new file mode 100644
index 0000000..a7f05f1
--- /dev/null
+++ b/tests/language/unsorted/value_range3_test.dart
@@ -0,0 +1,18 @@
+// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:expect/expect.dart';
+
+class A {
+  copy(array, index1, index2) {
+    if (index1 < index2 + index2) {
+      // dart2js used to remove the bounds check.
+      return array[index1];
+    }
+  }
+}
+
+main() {
+  Expect.throwsRangeError(() => new A().copy(new List.empty(), 0, 1));
+}
diff --git a/tests/language/unsorted/value_range_test.dart b/tests/language/unsorted/value_range_test.dart
new file mode 100644
index 0000000..83fcc9f
--- /dev/null
+++ b/tests/language/unsorted/value_range_test.dart
@@ -0,0 +1,20 @@
+// 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.
+
+import "package:expect/expect.dart";
+
+int inscrutable(int x) => x == 0 ? 0 : x | inscrutable(x & (x - 1));
+
+foo() {
+  var x = 0x102;
+  if (inscrutable(x) == 0) x = 0x0;
+  if (inscrutable(10) == 10) x = 0x10; // x is in range [0 .. 0x102].
+  x = x & 0xFF; // x should be in range [0 .. 0xFF]. Actual value: 0x10.
+  var a = const [1, 2, 3];
+  return a[x];
+}
+
+main() {
+  Expect.throwsRangeError(() => foo());
+}
diff --git a/tests/language/unsorted/var_init_test.dart b/tests/language/unsorted/var_init_test.dart
new file mode 100644
index 0000000..61ffd9b
--- /dev/null
+++ b/tests/language/unsorted/var_init_test.dart
@@ -0,0 +1,20 @@
+// Copyright (c) 2011, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+// Testing correct initialization of variables in scopes.
+
+import "package:expect/expect.dart";
+
+class VarInitTest {
+  static void testMain() {
+    for (int i = 0; i < 10; i++) {
+      var x;
+      Expect.equals(null, x);
+      x = 1;
+    }
+  }
+}
+
+main() {
+  VarInitTest.testMain();
+}
diff --git a/tests/language/variance/syntax/variance_disabled_keyword_identifier_syntax_test.dart b/tests/language/variance/syntax/variance_disabled_keyword_identifier_syntax_test.dart
new file mode 100644
index 0000000..0d6828c
--- /dev/null
+++ b/tests/language/variance/syntax/variance_disabled_keyword_identifier_syntax_test.dart
@@ -0,0 +1,48 @@
+// 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.
+
+// Tests identifier usage of keywords `out` and `inout`, correct usage of `in`.
+
+import "package:expect/expect.dart";
+
+class A<out> {}
+
+class B<inout> {}
+
+class C<out, inout> {}
+
+F<inout, out>() {}
+
+mixin G<out, inout> {}
+
+typedef H<inout, out> = out Function(inout);
+
+class OutParameter {
+  var out = 3;
+  int func(int out) {
+    return out;
+  }
+}
+
+class inout {
+  void out(int x) {}
+}
+
+var out = 5;
+
+main() {
+  OutParameter x = new OutParameter();
+  Expect.equals(2, x.func(2));
+  Expect.equals(3, x.out);
+
+  inout foo = inout();
+  foo.out(4);
+
+  Expect.equals(5, out);
+
+  var collection = [0, 1, 2];
+  for (var x in collection) {
+    Expect.isTrue(x is int);
+  }
+}
diff --git a/tests/language/variance/syntax/variance_disabled_syntax_test.dart b/tests/language/variance/syntax/variance_disabled_syntax_test.dart
new file mode 100644
index 0000000..2811208
--- /dev/null
+++ b/tests/language/variance/syntax/variance_disabled_syntax_test.dart
@@ -0,0 +1,76 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// Tests with `variance` flag disabled
+// Correct variance modifier usage will issue an error.
+
+import 'package:expect/expect.dart';
+
+abstract class A<in X> {
+//               ^^
+// [analyzer] SYNTACTIC_ERROR.EXPERIMENT_NOT_ENABLED
+// [cfe] This requires the 'variance' language feature to be enabled.
+  int foo(X bar);
+}
+
+class B<out X, in Y, inout Z> {}
+//      ^^^
+// [analyzer] SYNTACTIC_ERROR.EXPERIMENT_NOT_ENABLED
+// [cfe] This requires the 'variance' language feature to be enabled.
+//             ^^
+// [analyzer] SYNTACTIC_ERROR.EXPERIMENT_NOT_ENABLED
+// [cfe] This requires the 'variance' language feature to be enabled.
+//                   ^^^^^
+// [analyzer] SYNTACTIC_ERROR.EXPERIMENT_NOT_ENABLED
+// [cfe] This requires the 'variance' language feature to be enabled.
+
+class C<in T> extends A<T> {
+//      ^^
+// [analyzer] SYNTACTIC_ERROR.EXPERIMENT_NOT_ENABLED
+// [cfe] This requires the 'variance' language feature to be enabled.
+  @override
+  int foo(T bar) {
+    return 2;
+  }
+}
+
+mixin D<out T> {}
+//      ^^^
+// [analyzer] SYNTACTIC_ERROR.EXPERIMENT_NOT_ENABLED
+// [cfe] This requires the 'variance' language feature to be enabled.
+
+class E1 {}
+
+mixin E<in T extends E1> {}
+//      ^^
+// [analyzer] SYNTACTIC_ERROR.EXPERIMENT_NOT_ENABLED
+// [cfe] This requires the 'variance' language feature to be enabled.
+
+class F<out T> = Object with D<T>;
+//      ^^^
+// [analyzer] SYNTACTIC_ERROR.EXPERIMENT_NOT_ENABLED
+// [cfe] This requires the 'variance' language feature to be enabled.
+
+class G<out out> {}
+//      ^^^
+// [analyzer] SYNTACTIC_ERROR.EXPERIMENT_NOT_ENABLED
+// [cfe] This requires the 'variance' language feature to be enabled.
+
+class H<out inout> {}
+//      ^^^
+// [analyzer] SYNTACTIC_ERROR.EXPERIMENT_NOT_ENABLED
+// [cfe] This requires the 'variance' language feature to be enabled.
+
+main() {
+  B<int, String, bool> b = B();
+
+  C<int> c = C();
+  Expect.equals(2, c.foo(3));
+
+  F<int> f = F();
+
+  G<int> g = G();
+
+  H<int> h = H();
+}
diff --git a/tests/language/variance/syntax/variance_keyword_identifier_syntax_test.dart b/tests/language/variance/syntax/variance_keyword_identifier_syntax_test.dart
new file mode 100644
index 0000000..a0bf3d7
--- /dev/null
+++ b/tests/language/variance/syntax/variance_keyword_identifier_syntax_test.dart
@@ -0,0 +1,51 @@
+// 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.
+
+// Tests identifier usage of keywords `out` and `inout`, correct usage of `in`
+// with the experimental flag `variance` enabled.
+
+// SharedOptions=--enable-experiment=variance
+
+import "package:expect/expect.dart";
+
+class A<out> {}
+
+class B<inout> {}
+
+class C<out, inout> {}
+
+F<inout, out>() {}
+
+mixin G<out, inout> {}
+
+typedef H<inout, out> = out Function(inout);
+
+class OutParameter {
+  var out = 3;
+  int func(int out) {
+    return out;
+  }
+}
+
+class inout {
+  void out(int x) {}
+}
+
+var out = 5;
+
+main() {
+  OutParameter x = new OutParameter();
+  Expect.equals(2, x.func(2));
+  Expect.equals(3, x.out);
+
+  inout foo = inout();
+  foo.out(4);
+
+  Expect.equals(5, out);
+
+  var collection = [0, 1, 2];
+  for (var x in collection) {
+    Expect.isTrue(x is int);
+  }
+}
diff --git a/tests/language/variance/syntax/variance_syntax_test.dart b/tests/language/variance/syntax/variance_syntax_test.dart
new file mode 100644
index 0000000..9a40965
--- /dev/null
+++ b/tests/language/variance/syntax/variance_syntax_test.dart
@@ -0,0 +1,45 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// SharedOptions=--enable-experiment=variance
+
+import 'package:expect/expect.dart';
+
+abstract class A<in X> {
+  int foo(X bar);
+}
+
+class B<out X, in Y, inout Z> {}
+
+class C<in T> extends A<T> {
+  @override
+  int foo(T bar) {
+    return 2;
+  }
+}
+
+mixin D<out T> {}
+
+class E1 {}
+
+mixin E<in T extends E1> {}
+
+class F<out T> = Object with D<T>;
+
+class G<out out> {}
+
+class H<out inout> {}
+
+main() {
+  B<int, String, bool> b = B();
+
+  C<int> c = C();
+  Expect.equals(2, c.foo(3));
+
+  F<int> f = F();
+
+  G<int> g = G();
+
+  H<int> h = H();
+}
diff --git a/tests/language/variance/syntax/variance_type_parameter_error_syntax_test.dart b/tests/language/variance/syntax/variance_type_parameter_error_syntax_test.dart
new file mode 100644
index 0000000..28c1add
--- /dev/null
+++ b/tests/language/variance/syntax/variance_type_parameter_error_syntax_test.dart
@@ -0,0 +1,68 @@
+// 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.
+
+// Tests erroneous usages of variance in unapplicable type parameters.
+
+// SharedOptions=--enable-experiment=variance
+
+void A(out int foo) {
+//     ^^^
+// [analyzer] COMPILE_TIME_ERROR.UNDEFINED_CLASS
+// [cfe] 'out' isn't a type.
+//     ^
+// [cfe] Type 'out' not found.
+//             ^^^
+// [analyzer] SYNTACTIC_ERROR.EXPECTED_TOKEN
+// [cfe] Expected ')' before this.
+  List<out String> bar;
+  //  ^
+  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_OPERATOR
+  // [cfe] The operator '<' isn't defined for the class 'Type'.
+  //   ^^^
+  // [analyzer] STATIC_WARNING.UNDEFINED_IDENTIFIER
+  // [cfe] Expected ';' after this.
+  //   ^^^
+  // [analyzer] SYNTACTIC_ERROR.EXPECTED_TOKEN
+  // [cfe] Getter not found: 'out'.
+  //             ^
+  // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_OPERATOR
+  // [cfe] The operator '>' isn't defined for the class 'Type'.
+  //               ^^^
+  // [analyzer] STATIC_WARNING.UNDEFINED_IDENTIFIER
+  // [cfe] Getter not found: 'bar'.
+}
+
+void B(out foo) {}
+//     ^^^
+// [analyzer] COMPILE_TIME_ERROR.UNDEFINED_CLASS
+// [cfe] 'out' isn't a type.
+//     ^
+// [cfe] Type 'out' not found.
+
+class C<in out X, out out Y> {}
+//         ^^^
+// [analyzer] SYNTACTIC_ERROR.MULTIPLE_VARIANCE_MODIFIERS
+// [cfe] Each type parameter can have at most one variance modifier.
+//                    ^^^
+// [analyzer] SYNTACTIC_ERROR.MULTIPLE_VARIANCE_MODIFIERS
+// [cfe] Each type parameter can have at most one variance modifier.
+
+class D<in out inout in out X> {}
+//         ^^^
+// [analyzer] SYNTACTIC_ERROR.MULTIPLE_VARIANCE_MODIFIERS
+// [cfe] Each type parameter can have at most one variance modifier.
+//             ^^^^^
+// [analyzer] SYNTACTIC_ERROR.MULTIPLE_VARIANCE_MODIFIERS
+// [cfe] Each type parameter can have at most one variance modifier.
+//                   ^^
+// [analyzer] SYNTACTIC_ERROR.MULTIPLE_VARIANCE_MODIFIERS
+// [cfe] Each type parameter can have at most one variance modifier.
+//                      ^^^
+// [analyzer] SYNTACTIC_ERROR.MULTIPLE_VARIANCE_MODIFIERS
+// [cfe] Each type parameter can have at most one variance modifier.
+
+typedef E<out T> = T Function(T a);
+//            ^
+// [analyzer] SYNTACTIC_ERROR.EXPECTED_TOKEN
+// [cfe] Expected ',' before this.
diff --git a/tests/language/variance/variance_downwards_inference_test.dart b/tests/language/variance/variance_downwards_inference_test.dart
new file mode 100644
index 0000000..b6cd329
--- /dev/null
+++ b/tests/language/variance/variance_downwards_inference_test.dart
@@ -0,0 +1,53 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// Tests downwards inference for explicit variance modifiers.
+
+// SharedOptions=--enable-experiment=variance
+
+class A<out T> {
+  final T _x;
+  A(T x):_x = x;
+  T get x => _x;
+  void set x(Object value) {}
+}
+
+class B<in T> {
+  B(List<T> x);
+  void set x(T val) {}
+}
+
+class C<out T, S> {
+  final T _x;
+  C(T x, S y):_x = x;
+  T get x => _x;
+  void set x(Object value) {}
+  void set y(S _value) {}
+}
+
+class D<in T> {
+  D(T x, void Function(T) y) {}
+  void set x(T val) {}
+}
+
+main() {
+  // int <: T <: Object
+  // Choose int
+  A<Object> a = new A(3)..x+=1;
+
+  // int <: T
+  // num <: T
+  // Choose num
+  B<int> b = new B(<num>[])..x=2.2;
+
+  // int <: T <: Object
+  // Choose int
+  // int <: S <: Object
+  // Choose Object
+  C<Object, Object> c = new C(3, 3)..x+=1..y="hello";
+
+  // int <: T <: num
+  // Choose num due to contravariant heuristic.
+  D<int> d = new D(3, (num x) {})..x=2.2;
+}
diff --git a/tests/language/variance/variance_in_field_error_test.dart b/tests/language/variance/variance_in_field_error_test.dart
new file mode 100644
index 0000000..98c4af6
--- /dev/null
+++ b/tests/language/variance/variance_in_field_error_test.dart
@@ -0,0 +1,91 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// Tests erroneous field usage for the `in` variance modifier.
+
+// SharedOptions=--enable-experiment=variance
+
+class A<in T> {
+  final T a = throw "uncalled";
+  //      ^
+  // [analyzer] COMPILE_TIME_ERROR.WRONG_TYPE_PARAMETER_VARIANCE_POSITION
+  // [cfe] Can't use 'in' type variable 'T' in an 'out' position.
+
+  final T Function() b = () => throw "uncalled";
+  //                 ^
+  // [analyzer] COMPILE_TIME_ERROR.WRONG_TYPE_PARAMETER_VARIANCE_POSITION
+  // [cfe] Can't use 'in' type variable 'T' in an 'out' position.
+
+  T get c => throw "uncalled";
+//^
+// [analyzer] COMPILE_TIME_ERROR.WRONG_TYPE_PARAMETER_VARIANCE_POSITION
+//        ^
+// [cfe] Can't use 'in' type variable 'T' in an 'out' position in the return type.
+
+  late T d;
+//       ^
+// [analyzer] COMPILE_TIME_ERROR.WRONG_TYPE_PARAMETER_VARIANCE_POSITION
+// [cfe] Can't use 'in' type variable 'T' in an 'out' position.
+
+  covariant late T e;
+  //               ^
+  // [analyzer] COMPILE_TIME_ERROR.WRONG_TYPE_PARAMETER_VARIANCE_POSITION
+  // [cfe] Can't use 'in' type variable 'T' in an 'out' position.
+
+  T? f = null;
+  // ^
+  // [analyzer] COMPILE_TIME_ERROR.WRONG_TYPE_PARAMETER_VARIANCE_POSITION
+  // [cfe] Can't use 'in' type variable 'T' in an 'out' position.
+}
+
+mixin BMixin<in T> {
+  final T a = throw "uncalled";
+  //      ^
+  // [analyzer] COMPILE_TIME_ERROR.WRONG_TYPE_PARAMETER_VARIANCE_POSITION
+  // [cfe] Can't use 'in' type variable 'T' in an 'out' position.
+
+  final T Function() b = () => throw "uncalled";
+  //                 ^
+  // [analyzer] COMPILE_TIME_ERROR.WRONG_TYPE_PARAMETER_VARIANCE_POSITION
+  // [cfe] Can't use 'in' type variable 'T' in an 'out' position.
+
+  T get c => throw "uncalled";
+//^
+// [analyzer] COMPILE_TIME_ERROR.WRONG_TYPE_PARAMETER_VARIANCE_POSITION
+//        ^
+// [cfe] Can't use 'in' type variable 'T' in an 'out' position in the return type.
+
+  late T d;
+//       ^
+// [analyzer] COMPILE_TIME_ERROR.WRONG_TYPE_PARAMETER_VARIANCE_POSITION
+// [cfe] Can't use 'in' type variable 'T' in an 'out' position.
+
+  covariant late T e;
+  //               ^
+  // [analyzer] COMPILE_TIME_ERROR.WRONG_TYPE_PARAMETER_VARIANCE_POSITION
+  // [cfe] Can't use 'in' type variable 'T' in an 'out' position.
+
+  T? f = null;
+  // ^
+  // [analyzer] COMPILE_TIME_ERROR.WRONG_TYPE_PARAMETER_VARIANCE_POSITION
+  // [cfe] Can't use 'in' type variable 'T' in an 'out' position.
+}
+
+abstract class C<in T> {
+  T get a;
+//^
+// [analyzer] COMPILE_TIME_ERROR.WRONG_TYPE_PARAMETER_VARIANCE_POSITION
+//       ^
+// [cfe] Can't use 'in' type variable 'T' in an 'out' position in the return type.
+}
+
+class D<in T> extends C<T> {
+  var a;
+  //  ^
+  // [analyzer] COMPILE_TIME_ERROR.NOT_INITIALIZED_NON_NULLABLE_INSTANCE_FIELD
+  // [cfe] Can't use 'in' type variable 'T' in an 'out' position.
+  //  ^
+  // [analyzer] COMPILE_TIME_ERROR.WRONG_TYPE_PARAMETER_VARIANCE_POSITION
+  // [cfe] Field 'a' should be initialized because its type 'T' doesn't allow null.
+}
diff --git a/tests/language/variance/variance_in_field_test.dart b/tests/language/variance/variance_in_field_test.dart
new file mode 100644
index 0000000..2b60fbb
--- /dev/null
+++ b/tests/language/variance/variance_in_field_test.dart
@@ -0,0 +1,56 @@
+// 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.
+
+// Tests various fields for the `in` variance modifier.
+
+// SharedOptions=--enable-experiment=variance
+
+import "package:expect/expect.dart";
+
+typedef Int2Void = void Function(int);
+
+class A<in T> {
+  void set a(T value) => value;
+  final void Function(T) b = (T val) {
+    Expect.equals(2, val);
+  };
+  A<T> get c => this;
+}
+
+mixin BMixin<in T> {
+  void set a(T value) => value;
+  final void Function(T) b = (T val) {
+    Expect.equals(2, val);
+  };
+  BMixin<T> get c => this;
+}
+
+class B with BMixin<int> {}
+
+void testClass() {
+  A<int> a = new A();
+
+  a.a = 2;
+
+  Expect.type<Int2Void>(a.b);
+  a.b(2);
+
+  a.c.a = 2;
+}
+
+void testMixin() {
+  B b = new B();
+
+  b.a = 2;
+
+  Expect.type<Int2Void>(b.b);
+  b.b(2);
+
+  b.c.a = 2;
+}
+
+main() {
+  testClass();
+  testMixin();
+}
diff --git a/tests/language/variance/variance_in_inference_error_test.dart b/tests/language/variance/variance_in_inference_error_test.dart
new file mode 100644
index 0000000..2c220ab
--- /dev/null
+++ b/tests/language/variance/variance_in_inference_error_test.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.
+
+// Tests local inference errors for the `in` variance modifier.
+
+// SharedOptions=--enable-experiment=variance
+
+class Covariant<out T> {}
+class Contravariant<in T> {}
+
+class Exactly<inout T> {}
+
+class Upper {}
+class Middle extends Upper {}
+class Lower extends Middle {}
+
+class ContraBound<in T> {
+  ContraBound(T x, void Function(T) y) {}
+}
+
+Exactly<T> inferCovContra<T>(Covariant<T> x, Contravariant<T> y) => new Exactly<T>();
+Exactly<T> inferContraContra<T>(Contravariant<T> x, Contravariant<T> y) => new Exactly<T>();
+Exactly<T> inferContraBound<T>(ContraBound<T> x) => new Exactly<T>();
+
+main() {
+  Exactly<Upper> upper;
+  Exactly<Lower> lower;
+
+  // T <: Upper and T <: Middle.
+  // We choose Middle.
+  var inferredMiddle = inferContraContra(Contravariant<Upper>(), Contravariant<Middle>());
+  upper = inferredMiddle;
+  //      ^^^^^^^^^^^^^^
+  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  // [cfe] A value of type 'Exactly<Middle>' can't be assigned to a variable of type 'Exactly<Upper>'.
+
+  // T <: Upper and T <: Lower.
+  // We choose Lower.
+  var inferredLower = inferContraContra(Contravariant<Upper>(), Contravariant<Lower>());
+  upper = inferredLower;
+  //      ^^^^^^^^^^^^^
+  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  // [cfe] A value of type 'Exactly<Lower>' can't be assigned to a variable of type 'Exactly<Upper>'.
+
+  // int <: T <: String is not a valid constraint.
+  inferCovContra(Covariant<int>(), Contravariant<String>());
+//^^^^^^^^^^^^^^
+// [analyzer] COMPILE_TIME_ERROR.COULD_NOT_INFER
+//                                 ^^^^^^^^^^^^^^^^^^^^^^^
+// [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+// [cfe] The argument type 'Contravariant<String>' can't be assigned to the parameter type 'Contravariant<int>'.
+
+  // String <: T <: int is not a valid constraint.
+  inferCovContra(Covariant<String>(), Contravariant<int>());
+//^^^^^^^^^^^^^^
+// [analyzer] COMPILE_TIME_ERROR.COULD_NOT_INFER
+//                                    ^^^^^^^^^^^^^^^^^^^^
+// [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+// [cfe] The argument type 'Contravariant<int>' can't be assigned to the parameter type 'Contravariant<String>'.
+
+  // Middle <: T <: Lower is not a valid constraint
+  inferCovContra(Covariant<Middle>(), Contravariant<Lower>());
+//^^^^^^^^^^^^^^
+// [analyzer] COMPILE_TIME_ERROR.COULD_NOT_INFER
+//                                    ^^^^^^^^^^^^^^^^^^^^^^
+// [analyzer] COMPILE_TIME_ERROR.INVALID_CAST_NEW_EXPR
+// [cfe] The argument type 'Contravariant<Lower>' can't be assigned to the parameter type 'Contravariant<Middle>'.
+
+  // Upper <: T <: Lower is not a valid constraint
+  inferCovContra(Covariant<Upper>(), Contravariant<Lower>());
+//^^^^^^^^^^^^^^
+// [analyzer] COMPILE_TIME_ERROR.COULD_NOT_INFER
+//                                   ^^^^^^^^^^^^^^^^^^^^^^
+// [analyzer] COMPILE_TIME_ERROR.INVALID_CAST_NEW_EXPR
+// [cfe] The argument type 'Contravariant<Lower>' can't be assigned to the parameter type 'Contravariant<Upper>'.
+
+  // Upper <: T <: Middle is not a valid constraint
+  inferCovContra(Covariant<Upper>(), Contravariant<Middle>());
+//^^^^^^^^^^^^^^
+// [analyzer] COMPILE_TIME_ERROR.COULD_NOT_INFER
+//                                   ^^^^^^^^^^^^^^^^^^^^^^^
+// [analyzer] COMPILE_TIME_ERROR.INVALID_CAST_NEW_EXPR
+// [cfe] The argument type 'Contravariant<Middle>' can't be assigned to the parameter type 'Contravariant<Upper>'.
+
+  // Inference for Contrabound(...) produces Lower <: T <: Upper.
+  // Since T is contravariant, we choose Upper as the solution.
+  var inferredContraUpper = inferContraBound(ContraBound(Lower(), (Upper x) {}));
+  lower = inferredContraUpper;
+  //      ^^^^^^^^^^^^^^^^^^^
+  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  // [cfe] A value of type 'Exactly<Upper>' can't be assigned to a variable of type 'Exactly<Lower>'.
+
+  // Inference for Contrabound(...) produces Lower <: T <: Middle.
+  // Since T is contravariant, we choose Middle as the solution.
+  var inferredContraMiddle = inferContraBound(ContraBound(Lower(), (Middle x) {}));
+  lower = inferredContraMiddle;
+  //      ^^^^^^^^^^^^^^^^^^^^
+  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  // [cfe] A value of type 'Exactly<Middle>' can't be assigned to a variable of type 'Exactly<Lower>'.
+}
diff --git a/tests/language/variance/variance_in_inference_test.dart b/tests/language/variance/variance_in_inference_test.dart
new file mode 100644
index 0000000..03277fb
--- /dev/null
+++ b/tests/language/variance/variance_in_inference_test.dart
@@ -0,0 +1,76 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// Tests local inference for the `in` variance modifier.
+
+// SharedOptions=--enable-experiment=variance
+
+class Covariant<out T> {}
+class Contravariant<in T> {}
+
+class Exactly<inout T> {}
+
+class Upper {}
+class Middle extends Upper {}
+class Lower extends Middle {}
+
+class ContraBound<in T> {
+  ContraBound(T x, void Function(T) y) {}
+}
+
+Exactly<T> inferCovContra<T>(Covariant<T> x, Contravariant<T> y) => new Exactly<T>();
+Exactly<T> inferContraContra<T>(Contravariant<T> x, Contravariant<T> y) => new Exactly<T>();
+Exactly<T> inferContraBound<T>(ContraBound<T> x) => new Exactly<T>();
+
+main() {
+  Exactly<Upper> upper;
+  Exactly<Middle> middle;
+  Exactly<Lower> lower;
+
+  // Lower <: T
+  // T <: Lower
+  // Choose Lower for Lower <: T <: Lower
+  var inferredLower = inferCovContra(Covariant<Lower>(), Contravariant<Lower>());
+  lower = inferredLower;
+
+  // Lower <: T
+  // T <: Middle
+  // Choose Lower for Lower <: T <: Middle
+  var inferredLower2 = inferCovContra(Covariant<Lower>(), Contravariant<Middle>());
+  lower = inferredLower2;
+
+  // Lower <: T
+  // T <: Upper
+  // Choose Lower for Lower <: T <: Upper
+  var inferredLower3 = inferCovContra(Covariant<Lower>(), Contravariant<Upper>());
+  lower = inferredLower3;
+
+  // T <: Upper
+  // T <: Middle
+  // Choose Middle since it is the greatest lower bound of Upper and Middle.
+  var inferredMiddle = inferContraContra(Contravariant<Upper>(), Contravariant<Middle>());
+  middle = inferredMiddle;
+
+  // T <: Upper
+  // T <: Lower
+  // Choose Lower since it is the greatest lower bound of Upper and Lower.
+  var inferredLower4 = inferContraContra(Contravariant<Lower>(), Contravariant<Upper>());
+  lower = inferredLower4;
+
+  // T <: Middle
+  // T <: Lower
+  // Choose Lower since it is the greatest lower bound of Middle and Lower.
+  var inferredLower5 = inferContraContra(Contravariant<Lower>(), Contravariant<Middle>());
+  lower = inferredLower5;
+
+  // Lower <: T <: Upper
+  // Choose Upper.
+  var inferredContraUpper = inferContraBound(ContraBound(Lower(), (Upper x) {}));
+  upper = inferredContraUpper;
+
+  // Lower <: T <: Middle
+  // Choose Middle.
+  var inferredContraMiddle = inferContraBound(ContraBound(Lower(), (Middle x) {}));
+  middle = inferredContraMiddle;
+}
diff --git a/tests/language/variance/variance_in_method_error_test.dart b/tests/language/variance/variance_in_method_error_test.dart
new file mode 100644
index 0000000..b06567c
--- /dev/null
+++ b/tests/language/variance/variance_in_method_error_test.dart
@@ -0,0 +1,349 @@
+// 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.
+
+// Tests erroneous method signatures and return types for the `in` variance modifier.
+
+// SharedOptions=--enable-experiment=variance
+
+typedef Inv<T> = void Function<X extends T>();
+typedef Cov<T> = T Function();
+typedef Contra<T> = void Function(T);
+
+class Covariant<out T> {}
+class Contravariant<in T> {}
+class Invariant<inout T> {}
+
+class A<in T> {
+  T method1() => throw "uncalled";
+//^
+// [analyzer] COMPILE_TIME_ERROR.WRONG_TYPE_PARAMETER_VARIANCE_POSITION
+//         ^
+// [cfe] Can't use 'in' type variable 'T' in an 'out' position in the return type.
+
+  void method2(Contra<T> x) {}
+  //           ^^^^^^^^^^^
+  // [analyzer] COMPILE_TIME_ERROR.WRONG_TYPE_PARAMETER_VARIANCE_POSITION
+  //                     ^
+  // [cfe] Can't use 'in' type variable 'T' in an 'out' position.
+
+  Cov<T> method3() {
+//^^^^^^
+// [analyzer] COMPILE_TIME_ERROR.WRONG_TYPE_PARAMETER_VARIANCE_POSITION
+//              ^
+// [cfe] Can't use 'in' type variable 'T' in an 'out' position in the return type.
+    return () => throw "uncalled";
+  }
+
+  void method4(Contra<Cov<T>> x) {}
+  //           ^^^^^^^^^^^^^^^^
+  // [analyzer] COMPILE_TIME_ERROR.WRONG_TYPE_PARAMETER_VARIANCE_POSITION
+  //                          ^
+  // [cfe] Can't use 'in' type variable 'T' in an 'out' position.
+
+  void method5(Cov<Contra<T>> x) {}
+  //           ^^^^^^^^^^^^^^^^
+  // [analyzer] COMPILE_TIME_ERROR.WRONG_TYPE_PARAMETER_VARIANCE_POSITION
+  //                          ^
+  // [cfe] Can't use 'in' type variable 'T' in an 'out' position.
+
+  Contra<Contra<T>> method6() => (Contra<T> x) {};
+//^^^^^^^^^^^^^^^^^
+// [analyzer] COMPILE_TIME_ERROR.WRONG_TYPE_PARAMETER_VARIANCE_POSITION
+//                         ^
+// [cfe] Can't use 'in' type variable 'T' in an 'out' position in the return type.
+
+  Cov<Cov<T>> method7() {
+//^^^^^^^^^^^
+// [analyzer] COMPILE_TIME_ERROR.WRONG_TYPE_PARAMETER_VARIANCE_POSITION
+//                   ^
+// [cfe] Can't use 'in' type variable 'T' in an 'out' position in the return type.
+    return () {
+      return () => throw "uncalled";
+    };
+  }
+
+  Inv<T> method8() => throw "uncalled";
+//^^^^^^
+// [analyzer] COMPILE_TIME_ERROR.WRONG_TYPE_PARAMETER_VARIANCE_POSITION
+//              ^
+// [cfe] Can't use 'in' type variable 'T' in an 'inout' position in the return type.
+
+  void method9(Inv<T> x) {}
+  //           ^^^^^^^^
+  // [analyzer] COMPILE_TIME_ERROR.WRONG_TYPE_PARAMETER_VARIANCE_POSITION
+  //                  ^
+  // [cfe] Can't use 'in' type variable 'T' in an 'inout' position.
+
+  Covariant<T> method10() => throw "uncalled";
+//^^^^^^^^^^^^
+// [analyzer] COMPILE_TIME_ERROR.WRONG_TYPE_PARAMETER_VARIANCE_POSITION
+//                     ^
+// [cfe] Can't use 'in' type variable 'T' in an 'out' position in the return type.
+
+  void method11(Contravariant<T> x) {}
+  //            ^^^^^^^^^^^^^^^^^^
+  // [analyzer] COMPILE_TIME_ERROR.WRONG_TYPE_PARAMETER_VARIANCE_POSITION
+  //                             ^
+  // [cfe] Can't use 'in' type variable 'T' in an 'out' position.
+
+  Invariant<T> method12() => throw "uncalled";
+//^^^^^^^^^^^^
+// [analyzer] COMPILE_TIME_ERROR.WRONG_TYPE_PARAMETER_VARIANCE_POSITION
+//                     ^
+// [cfe] Can't use 'in' type variable 'T' in an 'inout' position in the return type.
+
+  void method13(Invariant<T> x) {}
+  //            ^^^^^^^^^^^^^^
+  // [analyzer] COMPILE_TIME_ERROR.WRONG_TYPE_PARAMETER_VARIANCE_POSITION
+  //                         ^
+  // [cfe] Can't use 'in' type variable 'T' in an 'inout' position.
+
+  void method14(Contravariant<Covariant<T>> x) {}
+  //            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+  // [analyzer] COMPILE_TIME_ERROR.WRONG_TYPE_PARAMETER_VARIANCE_POSITION
+  //                                        ^
+  // [cfe] Can't use 'in' type variable 'T' in an 'out' position.
+
+  void method15(Covariant<Contravariant<T>> x) {}
+  //            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+  // [analyzer] COMPILE_TIME_ERROR.WRONG_TYPE_PARAMETER_VARIANCE_POSITION
+  //                                        ^
+  // [cfe] Can't use 'in' type variable 'T' in an 'out' position.
+
+  Contravariant<Contravariant<T>> method16() => Contravariant<Contravariant<T>>();
+//^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+// [analyzer] COMPILE_TIME_ERROR.WRONG_TYPE_PARAMETER_VARIANCE_POSITION
+//                                        ^
+// [cfe] Can't use 'in' type variable 'T' in an 'out' position in the return type.
+
+  Covariant<Covariant<T>> method17() => Covariant<Covariant<T>>();
+//^^^^^^^^^^^^^^^^^^^^^^^
+// [analyzer] COMPILE_TIME_ERROR.WRONG_TYPE_PARAMETER_VARIANCE_POSITION
+//                                ^
+// [cfe] Can't use 'in' type variable 'T' in an 'out' position in the return type.
+
+  void method18<X extends T>() {}
+  //            ^^^^^^^^^^^
+  // [analyzer] COMPILE_TIME_ERROR.WRONG_TYPE_PARAMETER_VARIANCE_POSITION
+  // [cfe] Can't use 'in' type variable 'T' in an 'inout' position.
+
+  void method19<X extends Cov<T>>() {}
+  //            ^^^^^^^^^^^^^^^^
+  // [analyzer] COMPILE_TIME_ERROR.WRONG_TYPE_PARAMETER_VARIANCE_POSITION
+  // [cfe] Can't use 'in' type variable 'T' in an 'inout' position.
+
+  void method20<X extends Covariant<T>>() {}
+  //            ^^^^^^^^^^^^^^^^^^^^^^
+  // [analyzer] COMPILE_TIME_ERROR.WRONG_TYPE_PARAMETER_VARIANCE_POSITION
+  // [cfe] Can't use 'in' type variable 'T' in an 'inout' position.
+
+  void method21({required Contra<T> x}) {}
+  //             ^^^^^^^^^^^^^^^^^^^^
+  // [analyzer] COMPILE_TIME_ERROR.WRONG_TYPE_PARAMETER_VARIANCE_POSITION
+  //                                ^
+  // [cfe] Can't use 'in' type variable 'T' in an 'out' position.
+
+  void method22({required Contravariant<T> x}) {}
+  //             ^^^^^^^^^^^^^^^^^^^^^^^^^^^
+  // [analyzer] COMPILE_TIME_ERROR.WRONG_TYPE_PARAMETER_VARIANCE_POSITION
+  //                                       ^
+  // [cfe] Can't use 'in' type variable 'T' in an 'out' position.
+
+  void method23({required Covariant<T> x, required Contravariant<T> y}) {}
+  //                                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^
+  // [analyzer] COMPILE_TIME_ERROR.WRONG_TYPE_PARAMETER_VARIANCE_POSITION
+  //                                                                ^
+  // [cfe] Can't use 'in' type variable 'T' in an 'out' position.
+
+  void method24<X extends Contra<T>>() {}
+  //            ^^^^^^^^^^^^^^^^^^^
+  // [analyzer] COMPILE_TIME_ERROR.WRONG_TYPE_PARAMETER_VARIANCE_POSITION
+  // [cfe] Can't use 'in' type variable 'T' in an 'inout' position.
+
+  void method25<X extends Contravariant<T>>() {}
+  //            ^^^^^^^^^^^^^^^^^^^^^^^^^^
+  // [analyzer] COMPILE_TIME_ERROR.WRONG_TYPE_PARAMETER_VARIANCE_POSITION
+  // [cfe] Can't use 'in' type variable 'T' in an 'inout' position.
+}
+
+mixin BMixin<in T> {
+  T method1() => throw "uncalled";
+//^
+// [analyzer] COMPILE_TIME_ERROR.WRONG_TYPE_PARAMETER_VARIANCE_POSITION
+//         ^
+// [cfe] Can't use 'in' type variable 'T' in an 'out' position in the return type.
+
+  void method2(Contra<T> x) {}
+  //           ^^^^^^^^^^^
+  // [analyzer] COMPILE_TIME_ERROR.WRONG_TYPE_PARAMETER_VARIANCE_POSITION
+  //                     ^
+  // [cfe] Can't use 'in' type variable 'T' in an 'out' position.
+
+  Cov<T> method3() {
+//^^^^^^
+// [analyzer] COMPILE_TIME_ERROR.WRONG_TYPE_PARAMETER_VARIANCE_POSITION
+//              ^
+// [cfe] Can't use 'in' type variable 'T' in an 'out' position in the return type.
+    return () => throw "uncalled";
+  }
+
+  void method4(Contra<Cov<T>> x) {}
+  //           ^^^^^^^^^^^^^^^^
+  // [analyzer] COMPILE_TIME_ERROR.WRONG_TYPE_PARAMETER_VARIANCE_POSITION
+  //                          ^
+  // [cfe] Can't use 'in' type variable 'T' in an 'out' position.
+
+  void method5(Cov<Contra<T>> x) {}
+  //           ^^^^^^^^^^^^^^^^
+  // [analyzer] COMPILE_TIME_ERROR.WRONG_TYPE_PARAMETER_VARIANCE_POSITION
+  //                          ^
+  // [cfe] Can't use 'in' type variable 'T' in an 'out' position.
+
+  Contra<Contra<T>> method6() => (Contra<T> x) {};
+//^^^^^^^^^^^^^^^^^
+// [analyzer] COMPILE_TIME_ERROR.WRONG_TYPE_PARAMETER_VARIANCE_POSITION
+//                         ^
+// [cfe] Can't use 'in' type variable 'T' in an 'out' position in the return type.
+
+  Cov<Cov<T>> method7() {
+//^^^^^^^^^^^
+// [analyzer] COMPILE_TIME_ERROR.WRONG_TYPE_PARAMETER_VARIANCE_POSITION
+//                   ^
+// [cfe] Can't use 'in' type variable 'T' in an 'out' position in the return type.
+    return () {
+      return () => throw "uncalled";
+    };
+  }
+
+  Inv<T> method8() => throw "uncalled";
+//^^^^^^
+// [analyzer] COMPILE_TIME_ERROR.WRONG_TYPE_PARAMETER_VARIANCE_POSITION
+//              ^
+// [cfe] Can't use 'in' type variable 'T' in an 'inout' position in the return type.
+
+  void method9(Inv<T> x) {}
+  //           ^^^^^^^^
+  // [analyzer] COMPILE_TIME_ERROR.WRONG_TYPE_PARAMETER_VARIANCE_POSITION
+  //                  ^
+  // [cfe] Can't use 'in' type variable 'T' in an 'inout' position.
+
+  Covariant<T> method10() => throw "uncalled";
+//^^^^^^^^^^^^
+// [analyzer] COMPILE_TIME_ERROR.WRONG_TYPE_PARAMETER_VARIANCE_POSITION
+//                     ^
+// [cfe] Can't use 'in' type variable 'T' in an 'out' position in the return type.
+
+  void method11(Contravariant<T> x) {}
+  //            ^^^^^^^^^^^^^^^^^^
+  // [analyzer] COMPILE_TIME_ERROR.WRONG_TYPE_PARAMETER_VARIANCE_POSITION
+  //                             ^
+  // [cfe] Can't use 'in' type variable 'T' in an 'out' position.
+
+  Invariant<T> method12() => throw "uncalled";
+//^^^^^^^^^^^^
+// [analyzer] COMPILE_TIME_ERROR.WRONG_TYPE_PARAMETER_VARIANCE_POSITION
+//                     ^
+// [cfe] Can't use 'in' type variable 'T' in an 'inout' position in the return type.
+
+  void method13(Invariant<T> x) {}
+  //            ^^^^^^^^^^^^^^
+  // [analyzer] COMPILE_TIME_ERROR.WRONG_TYPE_PARAMETER_VARIANCE_POSITION
+  //                         ^
+  // [cfe] Can't use 'in' type variable 'T' in an 'inout' position.
+
+  void method14(Contravariant<Covariant<T>> x) {}
+  //            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+  // [analyzer] COMPILE_TIME_ERROR.WRONG_TYPE_PARAMETER_VARIANCE_POSITION
+  //                                        ^
+  // [cfe] Can't use 'in' type variable 'T' in an 'out' position.
+
+  void method15(Covariant<Contravariant<T>> x) {}
+  //            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+  // [analyzer] COMPILE_TIME_ERROR.WRONG_TYPE_PARAMETER_VARIANCE_POSITION
+  //                                        ^
+  // [cfe] Can't use 'in' type variable 'T' in an 'out' position.
+
+  Contravariant<Contravariant<T>> method16() => Contravariant<Contravariant<T>>();
+//^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+// [analyzer] COMPILE_TIME_ERROR.WRONG_TYPE_PARAMETER_VARIANCE_POSITION
+//                                        ^
+// [cfe] Can't use 'in' type variable 'T' in an 'out' position in the return type.
+
+  Covariant<Covariant<T>> method17() => Covariant<Covariant<T>>();
+//^^^^^^^^^^^^^^^^^^^^^^^
+// [analyzer] COMPILE_TIME_ERROR.WRONG_TYPE_PARAMETER_VARIANCE_POSITION
+//                                ^
+// [cfe] Can't use 'in' type variable 'T' in an 'out' position in the return type.
+
+  void method18<X extends T>() {}
+  //            ^^^^^^^^^^^
+  // [analyzer] COMPILE_TIME_ERROR.WRONG_TYPE_PARAMETER_VARIANCE_POSITION
+  // [cfe] Can't use 'in' type variable 'T' in an 'inout' position.
+
+  void method19<X extends Cov<T>>() {}
+  //            ^^^^^^^^^^^^^^^^
+  // [analyzer] COMPILE_TIME_ERROR.WRONG_TYPE_PARAMETER_VARIANCE_POSITION
+  // [cfe] Can't use 'in' type variable 'T' in an 'inout' position.
+
+  void method20<X extends Covariant<T>>() {}
+  //            ^^^^^^^^^^^^^^^^^^^^^^
+  // [analyzer] COMPILE_TIME_ERROR.WRONG_TYPE_PARAMETER_VARIANCE_POSITION
+  // [cfe] Can't use 'in' type variable 'T' in an 'inout' position.
+
+  void method21({required Contra<T> x}) {}
+  //             ^^^^^^^^^^^^^^^^^^^^
+  // [analyzer] COMPILE_TIME_ERROR.WRONG_TYPE_PARAMETER_VARIANCE_POSITION
+  //                                ^
+  // [cfe] Can't use 'in' type variable 'T' in an 'out' position.
+
+  void method22({required Contravariant<T> x}) {}
+  //             ^^^^^^^^^^^^^^^^^^^^^^^^^^^
+  // [analyzer] COMPILE_TIME_ERROR.WRONG_TYPE_PARAMETER_VARIANCE_POSITION
+  //                                       ^
+  // [cfe] Can't use 'in' type variable 'T' in an 'out' position.
+
+  void method23({required Covariant<T> x, required Contravariant<T> y}) {}
+  //                                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^
+  // [analyzer] COMPILE_TIME_ERROR.WRONG_TYPE_PARAMETER_VARIANCE_POSITION
+  //                                                                ^
+  // [cfe] Can't use 'in' type variable 'T' in an 'out' position.
+
+  void method24<X extends Contra<T>>() {}
+  //            ^^^^^^^^^^^^^^^^^^^
+  // [analyzer] COMPILE_TIME_ERROR.WRONG_TYPE_PARAMETER_VARIANCE_POSITION
+  // [cfe] Can't use 'in' type variable 'T' in an 'inout' position.
+
+  void method25<X extends Contravariant<T>>() {}
+  //            ^^^^^^^^^^^^^^^^^^^^^^^^^^
+  // [analyzer] COMPILE_TIME_ERROR.WRONG_TYPE_PARAMETER_VARIANCE_POSITION
+  // [cfe] Can't use 'in' type variable 'T' in an 'inout' position.
+}
+
+class B<in T> {
+  void method1(A<T> x) {}
+  //           ^^^^^^
+  // [analyzer] COMPILE_TIME_ERROR.WRONG_TYPE_PARAMETER_VARIANCE_POSITION
+  //                ^
+  // [cfe] Can't use 'in' type variable 'T' in an 'out' position.
+  Contra<A<T>> method2() {
+//^^^^^^^^^^^^
+// [analyzer] COMPILE_TIME_ERROR.WRONG_TYPE_PARAMETER_VARIANCE_POSITION
+//                    ^
+// [cfe] Can't use 'in' type variable 'T' in an 'out' position in the return type.
+    throw "uncalled";
+  }
+}
+
+class C<T> {
+  void method(T x) {}
+}
+
+class D<in T> extends C<void Function(T)> {
+  @override
+  void method(void Function(T) x) {}
+  //          ^^^^^^^^^^^^^^^^^^
+  // [analyzer] COMPILE_TIME_ERROR.WRONG_TYPE_PARAMETER_VARIANCE_POSITION
+  //                           ^
+  // [cfe] Can't use 'in' type variable 'T' in an 'out' position.
+}
diff --git a/tests/language/variance/variance_in_method_test.dart b/tests/language/variance/variance_in_method_test.dart
new file mode 100644
index 0000000..a094975
--- /dev/null
+++ b/tests/language/variance/variance_in_method_test.dart
@@ -0,0 +1,246 @@
+// 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.
+
+// Tests method signatures and return types for the `in` variance modifier.
+
+// SharedOptions=--enable-experiment=variance
+
+import "package:expect/expect.dart";
+
+typedef Cov<T> = T Function();
+typedef Contra<T> = void Function(T);
+
+Cov<int> covFunction = () => 2;
+Contra<int> contraFunction = (int val) {};
+
+class Covariant<out T> {}
+class Contravariant<in T> {}
+
+class A<in T> {
+  void method1(T x) {}
+  void method2(Cov<T> x) {}
+  Contra<T> method3() {
+    return (T val) {
+      Expect.equals(2, val);
+    };
+  }
+
+  void method4(Cov<Cov<T>> x) {}
+  Contra<Cov<T>> method5() {
+    return (Cov<T> method) {
+      Expect.type<Cov<T>>(method);
+    };
+  }
+  Cov<Contra<T>> method6() {
+    return () {
+      return (T x) {
+        Expect.equals(2, x);
+      };
+    };
+  }
+  void method7(Contra<Contra<T>> x) {}
+
+  void method8(Covariant<T> x) {}
+  Contravariant<T>? method9() => null;
+  void method10(Covariant<Covariant<T>> x) {}
+  Contravariant<Covariant<T>>? method11() => null;
+  void method12(Contravariant<Contravariant<T>> x) {}
+  Covariant<Contravariant<T>>? method13() => null;
+
+  void method14(covariant T x) {}
+  void method15(covariant Contra<T> x) {}
+  void method16(covariant Cov<T> x) {}
+  void method17(covariant Contravariant<T> x) {}
+  void method18(covariant Covariant<T> x) {}
+
+  void method19({T? x}) {}
+  void method20({Covariant<T>? x}) {}
+  void method21({Cov<T>? x}) {}
+}
+
+mixin BMixin<in T> {
+  void method1(T x) {}
+  void method2(Cov<T> x) {}
+  Contra<T> method3() {
+    return (T val) {
+      Expect.equals(2, val);
+    };
+  }
+
+  void method4(Cov<Cov<T>> x) {}
+  Contra<Cov<T>> method5() {
+    return (Cov<T> method) {
+      Expect.type<Cov<T>>(method);
+    };
+  }
+  Cov<Contra<T>> method6() {
+    return () {
+      return (T x) {
+        Expect.equals(2, x);
+      };
+    };
+  }
+  void method7(Contra<Contra<T>> x) {}
+
+  void method8(Covariant<T> x) {}
+  Contravariant<T>? method9() => null;
+  void method10(Covariant<Covariant<T>> x) {}
+  Contravariant<Covariant<T>>? method11() => null;
+  void method12(Contravariant<Contravariant<T>> x) {}
+  Covariant<Contravariant<T>>? method13() => null;
+
+  void method14(covariant T x) {}
+  void method15(covariant Contra<T> x) {}
+  void method16(covariant Cov<T> x) {}
+  void method17(covariant Contravariant<T> x) {}
+  void method18(covariant Covariant<T> x) {}
+
+  void method19({T? x}) {}
+  void method20({Covariant<T>? x}) {}
+  void method21({Cov<T>? x}) {}
+}
+
+class B with BMixin<int> {}
+
+class C<in T> {
+  void method1(Contra<A<T>> x) {}
+  A<T> method2() {
+    return A<T>();
+  }
+}
+
+class D<T> {
+  late T x;
+  T? method() => null;
+  void method2(T x) {}
+  void method3(covariant T x) {}
+}
+
+class E<in T> extends D<void Function(T)> {
+  @override
+  void Function(T) method() => (T x) {};
+
+  @override
+  void method3(covariant void Function(T) x) {}
+}
+
+void testClass() {
+  A<int> a = new A();
+
+  a.method1(2);
+
+  a.method2(covFunction);
+
+  Expect.type<Contra<int>>(a.method3());
+  Contra<int> method3Function = a.method3();
+  method3Function(2);
+
+  a.method4(() {
+    return covFunction;
+  });
+
+  Expect.type<Contra<Cov<int>>>(a.method5());
+  Contra<Cov<int>> method5Function = a.method5();
+  method5Function(covFunction);
+
+  Expect.type<Cov<Contra<int>>>(a.method6());
+  Cov<Contra<int>> method6Function = a.method6();
+  Expect.type<Contra<int>>(method6Function());
+  Contra<int> method6NestedFunction = method6Function();
+  method6NestedFunction(2);
+
+  a.method7((Contra<int> x) {});
+
+  a.method8(Covariant<int>());
+  Expect.isNull(a.method9());
+  a.method10(Covariant<Covariant<int>>());
+  Expect.isNull(a.method11());
+  a.method12(Contravariant<Contravariant<int>>());
+  Expect.isNull(a.method13());
+
+  a.method14(3);
+  a.method15(contraFunction);
+  a.method16(covFunction);
+  a.method17(Contravariant<int>());
+  a.method18(Covariant<int>());
+
+  a.method19();
+  a.method20();
+  a.method21();
+}
+
+void testMixin() {
+  B b = new B();
+
+  b.method1(2);
+
+  b.method2(covFunction);
+
+  Expect.type<Contra<int>>(b.method3());
+  Contra<int> method3Return = b.method3();
+  method3Return(2);
+
+  b.method4(() {
+    return covFunction;
+  });
+
+  Expect.type<Contra<Cov<int>>>(b.method5());
+  Contra<Cov<int>> method5Return = b.method5();
+  method5Return(covFunction);
+
+  Expect.type<Cov<Contra<int>>>(b.method6());
+  Cov<Contra<int>> method6Function = b.method6();
+  Expect.type<Contra<int>>(method6Function());
+  Contra<int> method6NestedFunction = method6Function();
+  method6NestedFunction(2);
+
+  b.method7((Contra<int> x) {});
+
+  b.method8(Covariant<int>());
+  Expect.isNull(b.method9());
+  b.method10(Covariant<Covariant<int>>());
+  Expect.isNull(b.method11());
+  b.method12(Contravariant<Contravariant<int>>());
+  Expect.isNull(b.method13());
+
+  b.method14(3);
+  b.method15(contraFunction);
+  b.method16(covFunction);
+  b.method17(Contravariant<int>());
+  b.method18(Covariant<int>());
+
+  b.method19();
+  b.method20();
+  b.method21();
+}
+
+void testClassInMethods() {
+  C<int> c = new C();
+
+  c.method1((A<int> x) {});
+
+  Expect.type<A<int>>(c.method2());
+}
+
+void testOverrideLegacyMethods() {
+  E<int> e = new E();
+  Expect.isTrue(e.method() is Function);
+  e.method2(contraFunction);
+  e.method3(contraFunction);
+  e.x = contraFunction;
+
+  D<Object> d = e;
+  Expect.throws(() => d.x = "test");
+
+  e = new E<Object>();
+  Expect.throws(() => e.method2(contraFunction));
+  Expect.throws(() => e.method3(contraFunction));
+}
+
+main() {
+  testClass();
+  testMixin();
+  testClassInMethods();
+  testOverrideLegacyMethods();
+}
diff --git a/tests/language/variance/variance_in_subclass_error_test.dart b/tests/language/variance/variance_in_subclass_error_test.dart
new file mode 100644
index 0000000..123b3e5
--- /dev/null
+++ b/tests/language/variance/variance_in_subclass_error_test.dart
@@ -0,0 +1,144 @@
+// 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.
+
+// Tests erroneous subclass usage for the `in` variance modifier.
+
+// SharedOptions=--enable-experiment=variance
+
+typedef CovFunction<T> = T Function();
+typedef ContraFunction<T> = void Function(T);
+typedef InvFunction<T> = T Function(T);
+
+class LegacyCovariant<T> {}
+class Covariant<out T> {}
+class Contravariant<in T> {}
+class Invariant<inout T> {}
+mixin MLegacyCovariant<T> {}
+mixin MCovariant<out T> {}
+mixin MContravariant<in T> {}
+mixin MInvariant<inout T> {}
+
+class A<in T> extends LegacyCovariant<T> {}
+//    ^
+// [cfe] Can't use 'in' type variable 'T' in an 'out' position in supertype 'LegacyCovariant'.
+//         ^
+// [analyzer] COMPILE_TIME_ERROR.WRONG_EXPLICIT_TYPE_PARAMETER_VARIANCE_IN_SUPERINTERFACE
+
+class B<in T> implements LegacyCovariant<T> {}
+//    ^
+// [cfe] Can't use 'in' type variable 'T' in an 'out' position in supertype 'LegacyCovariant'.
+//         ^
+// [analyzer] COMPILE_TIME_ERROR.WRONG_EXPLICIT_TYPE_PARAMETER_VARIANCE_IN_SUPERINTERFACE
+
+class C<in T> with MLegacyCovariant<T> {}
+//    ^
+// [cfe] Can't use 'in' type variable 'T' in an 'out' position in supertype 'MLegacyCovariant'.
+//         ^
+// [analyzer] COMPILE_TIME_ERROR.WRONG_EXPLICIT_TYPE_PARAMETER_VARIANCE_IN_SUPERINTERFACE
+
+class D<in T> extends Covariant<T> {}
+//    ^
+// [cfe] Can't use 'in' type variable 'T' in an 'out' position in supertype 'Covariant'.
+//         ^
+// [analyzer] COMPILE_TIME_ERROR.WRONG_EXPLICIT_TYPE_PARAMETER_VARIANCE_IN_SUPERINTERFACE
+
+class E<in T> implements Covariant<T> {}
+//    ^
+// [cfe] Can't use 'in' type variable 'T' in an 'out' position in supertype 'Covariant'.
+//         ^
+// [analyzer] COMPILE_TIME_ERROR.WRONG_EXPLICIT_TYPE_PARAMETER_VARIANCE_IN_SUPERINTERFACE
+
+class F<in T> with MCovariant<T> {}
+//    ^
+// [cfe] Can't use 'in' type variable 'T' in an 'out' position in supertype 'MCovariant'.
+//         ^
+// [analyzer] COMPILE_TIME_ERROR.WRONG_EXPLICIT_TYPE_PARAMETER_VARIANCE_IN_SUPERINTERFACE
+
+class G<in T> extends Invariant<T> {}
+//    ^
+// [cfe] Can't use 'in' type variable 'T' in an 'inout' position in supertype 'Invariant'.
+//         ^
+// [analyzer] COMPILE_TIME_ERROR.WRONG_EXPLICIT_TYPE_PARAMETER_VARIANCE_IN_SUPERINTERFACE
+
+class H<in T> implements Invariant<T> {}
+//    ^
+// [cfe] Can't use 'in' type variable 'T' in an 'inout' position in supertype 'Invariant'.
+//         ^
+// [analyzer] COMPILE_TIME_ERROR.WRONG_EXPLICIT_TYPE_PARAMETER_VARIANCE_IN_SUPERINTERFACE
+
+class I<in T> with MInvariant<T> {}
+//    ^
+// [cfe] Can't use 'in' type variable 'T' in an 'inout' position in supertype 'MInvariant'.
+//         ^
+// [analyzer] COMPILE_TIME_ERROR.WRONG_EXPLICIT_TYPE_PARAMETER_VARIANCE_IN_SUPERINTERFACE
+
+class J<in T> extends Covariant<Covariant<T>> {}
+//    ^
+// [cfe] Can't use 'in' type variable 'T' in an 'out' position in supertype 'Covariant'.
+//         ^
+// [analyzer] COMPILE_TIME_ERROR.WRONG_EXPLICIT_TYPE_PARAMETER_VARIANCE_IN_SUPERINTERFACE
+
+class K<in T> extends Contravariant<Contravariant<T>> {}
+//    ^
+// [cfe] Can't use 'in' type variable 'T' in an 'out' position in supertype 'Contravariant'.
+//         ^
+// [analyzer] COMPILE_TIME_ERROR.WRONG_EXPLICIT_TYPE_PARAMETER_VARIANCE_IN_SUPERINTERFACE
+
+class L<in T> extends Covariant<CovFunction<T>> {}
+//    ^
+// [cfe] Can't use 'in' type variable 'T' in an 'out' position in supertype 'Covariant'.
+//         ^
+// [analyzer] COMPILE_TIME_ERROR.WRONG_EXPLICIT_TYPE_PARAMETER_VARIANCE_IN_SUPERINTERFACE
+
+class M<in T> extends Covariant<ContraFunction<ContraFunction<T>>> {}
+//    ^
+// [cfe] Can't use 'in' type variable 'T' in an 'out' position in supertype 'Covariant'.
+//         ^
+// [analyzer] COMPILE_TIME_ERROR.WRONG_EXPLICIT_TYPE_PARAMETER_VARIANCE_IN_SUPERINTERFACE
+
+class N<in T> extends Contravariant<CovFunction<Contravariant<T>>> {}
+//    ^
+// [cfe] Can't use 'in' type variable 'T' in an 'out' position in supertype 'Contravariant'.
+//         ^
+// [analyzer] COMPILE_TIME_ERROR.WRONG_EXPLICIT_TYPE_PARAMETER_VARIANCE_IN_SUPERINTERFACE
+
+class O<in T> extends Covariant<CovFunction<Covariant<T>>> {}
+//    ^
+// [cfe] Can't use 'in' type variable 'T' in an 'out' position in supertype 'Covariant'.
+//         ^
+// [analyzer] COMPILE_TIME_ERROR.WRONG_EXPLICIT_TYPE_PARAMETER_VARIANCE_IN_SUPERINTERFACE
+
+class P<in T> extends Covariant<Covariant<Covariant<T>>> {}
+//    ^
+// [cfe] Can't use 'in' type variable 'T' in an 'out' position in supertype 'Covariant'.
+//         ^
+// [analyzer] COMPILE_TIME_ERROR.WRONG_EXPLICIT_TYPE_PARAMETER_VARIANCE_IN_SUPERINTERFACE
+
+class Q<in T> extends Invariant<InvFunction<T>> {}
+//    ^
+// [cfe] Can't use 'in' type variable 'T' in an 'inout' position in supertype 'Invariant'.
+//         ^
+// [analyzer] COMPILE_TIME_ERROR.WRONG_EXPLICIT_TYPE_PARAMETER_VARIANCE_IN_SUPERINTERFACE
+
+class R<in T> = Covariant<T> with MContravariant<T>;
+//    ^
+// [cfe] Can't use 'in' type variable 'T' in an 'out' position in supertype 'Covariant'.
+//         ^
+// [analyzer] COMPILE_TIME_ERROR.WRONG_EXPLICIT_TYPE_PARAMETER_VARIANCE_IN_SUPERINTERFACE
+
+class S<in T> = Contravariant<T> with MCovariant<T>;
+//    ^
+// [cfe] Can't use 'in' type variable 'T' in an 'out' position in supertype 'MCovariant'.
+//         ^
+// [analyzer] COMPILE_TIME_ERROR.WRONG_EXPLICIT_TYPE_PARAMETER_VARIANCE_IN_SUPERINTERFACE
+
+class T<in X> = Invariant<X> with MInvariant<X>;
+//    ^
+// [cfe] Can't use 'in' type variable 'X' in an 'inout' position in supertype 'Invariant'.
+//    ^
+// [cfe] Can't use 'in' type variable 'X' in an 'inout' position in supertype 'MInvariant'.
+//         ^
+// [analyzer] COMPILE_TIME_ERROR.WRONG_EXPLICIT_TYPE_PARAMETER_VARIANCE_IN_SUPERINTERFACE
+//         ^
+// [analyzer] COMPILE_TIME_ERROR.WRONG_EXPLICIT_TYPE_PARAMETER_VARIANCE_IN_SUPERINTERFACE
diff --git a/tests/language/variance/variance_in_subclass_test.dart b/tests/language/variance/variance_in_subclass_test.dart
new file mode 100644
index 0000000..f7a314a
--- /dev/null
+++ b/tests/language/variance/variance_in_subclass_test.dart
@@ -0,0 +1,49 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// Tests subclass usage for the `in` variance modifier.
+
+// SharedOptions=--enable-experiment=variance
+
+typedef CovFunction<T> = T Function();
+typedef ContraFunction<T> = void Function(T);
+
+class Covariant<out T> {}
+class Contravariant<in T> {}
+mixin MContravariant<in T> {}
+
+class A<in T> extends Contravariant<T> {}
+class B<in T> implements Contravariant<T> {}
+class C<in T> with MContravariant<T> {}
+
+class D<in T> extends Covariant<Contravariant<T>> {}
+class E<in T> extends Contravariant<Covariant<T>> {}
+
+class F<in T> extends Covariant<ContraFunction<T>> {}
+class G<in T> extends Covariant<ContraFunction<CovFunction<T>>> {}
+class H<in T> extends Covariant<CovFunction<ContraFunction<T>>> {}
+
+class I<in T> extends Covariant<ContraFunction<Covariant<T>>> {}
+
+class J<in T> extends Contravariant<Contravariant<Contravariant<T>>> {}
+
+class K<in T> = Contravariant<T> with MContravariant<T>;
+class L<in T> = Covariant<Contravariant<T>> with MContravariant<T>;
+class M<in T> = Contravariant<T> with MContravariant<Covariant<T>>;
+
+main() {
+  A<num> a = A();
+  B<num> b = B();
+  C<num> c = C();
+  D<num> d = D();
+  E<num> e = E();
+  F<num> f = F();
+  G<num> g = G();
+  H<num> h = H();
+  I<num> i = I();
+  J<num> j = J();
+  K<num> k = K();
+  L<num> l = L();
+  M<num> m = M();
+}
diff --git a/tests/language/variance/variance_in_subtyping_error_test.dart b/tests/language/variance/variance_in_subtyping_error_test.dart
new file mode 100644
index 0000000..d5697c7
--- /dev/null
+++ b/tests/language/variance/variance_in_subtyping_error_test.dart
@@ -0,0 +1,80 @@
+// 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.
+
+// Tests erroneous subtyping for the `in` variance modifier.
+
+// SharedOptions=--enable-experiment=variance
+
+class Contravariant<in T> {}
+
+class Upper {}
+class Middle extends Upper {}
+class Lower extends Middle {}
+
+class A {
+  Contravariant<Middle> method1() {
+    return new Contravariant<Middle>();
+  }
+
+  void method2(Contravariant<Middle> x) {}
+}
+
+class B extends A {
+  @override
+  Contravariant<Lower> method1() {
+  //                   ^^^^^^^
+  // [analyzer] COMPILE_TIME_ERROR.INVALID_OVERRIDE
+  // [cfe] The return type of the method 'B.method1' is 'Contravariant<Lower>', which does not match the return type, 'Contravariant<Middle>', of the overridden method, 'A.method1'.
+    return new Contravariant<Lower>();
+  }
+
+  @override
+  void method2(Contravariant<Upper> x) {}
+  //   ^^^^^^^
+  // [analyzer] COMPILE_TIME_ERROR.INVALID_OVERRIDE
+  //                                ^
+  // [cfe] The parameter 'x' of the method 'B.method2' has type 'Contravariant<Upper>', which does not match the corresponding type, 'Contravariant<Middle>', in the overridden method, 'A.method2'.
+}
+
+class C<out T extends Contravariant<Middle>> {}
+
+class D {
+  C<Contravariant<Lower>> method1() {
+  //^^^^^^^^^^^^^^^^^^^^
+  // [analyzer] COMPILE_TIME_ERROR.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS
+  //                             ^
+  // [cfe] Type argument 'Contravariant<Lower>' doesn't conform to the bound 'Contravariant<Middle>' of the type variable 'T' on 'C' in the return type.
+    return C<Contravariant<Lower>>();
+    //     ^
+    // [cfe] Type argument 'Contravariant<Lower>' doesn't conform to the bound 'Contravariant<Middle>' of the type variable 'T' on 'C'.
+    //       ^^^^^^^^^^^^^^^^^^^^
+    // [analyzer] COMPILE_TIME_ERROR.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS
+  }
+}
+
+void testCall(Iterable<Contravariant<Middle>> x) {}
+
+main() {
+  C<Contravariant<Lower>> c = new C<Contravariant<Lower>>();
+  //^^^^^^^^^^^^^^^^^^^^
+  // [analyzer] COMPILE_TIME_ERROR.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS
+  //                      ^
+  // [cfe] Type argument 'Contravariant<Lower>' doesn't conform to the bound 'Contravariant<Middle>' of the type variable 'T' on 'C'.
+  //                              ^
+  // [cfe] Type argument 'Contravariant<Lower>' doesn't conform to the bound 'Contravariant<Middle>' of the type variable 'T' on 'C'.
+  //                                ^^^^^^^^^^^^^^^^^^^^
+  // [analyzer] COMPILE_TIME_ERROR.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS
+
+  Iterable<Contravariant<Middle>> iterableMiddle = [new Contravariant<Middle>()];
+  List<Contravariant<Lower>> listLower = [new Contravariant<Lower>()];
+  iterableMiddle = listLower;
+  //               ^^^^^^^^^
+  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  // [cfe] A value of type 'List<Contravariant<Lower>>' can't be assigned to a variable of type 'Iterable<Contravariant<Middle>>'.
+
+  testCall(listLower);
+  //       ^^^^^^^^^
+  // [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+  // [cfe] The argument type 'List<Contravariant<Lower>>' can't be assigned to the parameter type 'Iterable<Contravariant<Middle>>'.
+}
diff --git a/tests/language/variance/variance_in_subtyping_test.dart b/tests/language/variance/variance_in_subtyping_test.dart
new file mode 100644
index 0000000..df89b2b
--- /dev/null
+++ b/tests/language/variance/variance_in_subtyping_test.dart
@@ -0,0 +1,102 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// Tests subtyping for the `in` variance modifier.
+
+// SharedOptions=--enable-experiment=variance
+
+import "package:expect/expect.dart";
+
+class Contravariant<in T> {}
+
+class Upper {}
+class Middle extends Upper {}
+class Lower extends Middle {}
+
+class A {
+  Contravariant<Middle> method1() {
+    return Contravariant<Middle>();
+  }
+
+  void method2(Contravariant<Middle> x) {}
+}
+
+class B extends A {
+  @override
+  Contravariant<Upper> method1() {
+    return new Contravariant<Upper>();
+  }
+
+  @override
+  void method2(Contravariant<Lower> x) {}
+}
+
+class C extends A {
+  @override
+  Contravariant<Middle> method1() {
+    return new Contravariant<Middle>();
+  }
+
+  @override
+  void method2(Contravariant<Middle> x) {}
+}
+
+class D<out T extends Contravariant<Middle>> {}
+
+class E {
+  D<Contravariant<Upper>> method1() {
+    return D<Contravariant<Upper>>();
+  }
+}
+
+class F {
+  D<Contravariant<Middle>> method1() {
+    return D<Contravariant<Middle>>();
+  }
+}
+
+void testCall(Iterable<Contravariant<Lower>> x) {}
+
+main() {
+  A a = new A();
+  Expect.type<Contravariant<Middle>>(a.method1());
+  Expect.type<Contravariant<Lower>>(a.method1());
+  Expect.notType<Contravariant<Upper>>(a.method1());
+  a.method2(new Contravariant<Middle>());
+  a.method2(new Contravariant<Upper>());
+
+  B b = new B();
+  Expect.type<Contravariant<Upper>>(b.method1());
+  Expect.type<Contravariant<Middle>>(b.method1());
+  Expect.type<Contravariant<Lower>>(b.method1());
+  b.method2(new Contravariant<Lower>());
+  b.method2(new Contravariant<Middle>());
+
+  C c = new C();
+  Expect.type<Contravariant<Middle>>(c.method1());
+  Expect.type<Contravariant<Lower>>(c.method1());
+  Expect.notType<Contravariant<Upper>>(c.method1());
+  c.method2(new Contravariant<Middle>());
+  c.method2(new Contravariant<Upper>());
+
+  D<Contravariant<Upper>> dUpper = new D<Contravariant<Upper>>();
+  D<Contravariant<Middle>> dMiddle = new D<Contravariant<Middle>>();
+
+  E e = new E();
+  Expect.type<D<Contravariant<Upper>>>(e.method1());
+  Expect.type<D<Contravariant<Middle>>>(e.method1());
+
+  F f = new F();
+  Expect.type<D<Contravariant<Middle>>>(e.method1());
+
+  Iterable<Contravariant<Lower>> iterableLower = [new Contravariant<Lower>()];
+  List<Contravariant<Middle>> listMiddle = [new Contravariant<Middle>()];
+  iterableLower = listMiddle;
+
+  testCall(listMiddle);
+
+  Expect.subtype<Contravariant<Upper>, Contravariant<Middle>>();
+  Expect.subtype<Contravariant<Middle>, Contravariant<Middle>>();
+  Expect.notSubtype<Contravariant<Lower>, Contravariant<Middle>>();
+}
diff --git a/tests/language/variance/variance_inout_field_test.dart b/tests/language/variance/variance_inout_field_test.dart
new file mode 100644
index 0000000..4e436d4
--- /dev/null
+++ b/tests/language/variance/variance_inout_field_test.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.
+
+// Tests various fields for the `inout` variance modifier.
+
+// SharedOptions=--enable-experiment=variance
+
+import "package:expect/expect.dart";
+
+typedef Void2Int = int? Function();
+typedef Int2Void = void Function(int);
+
+class A<inout T> {
+  late T a;
+  final T? b = null;
+  final T? Function() c = () => null;
+  final void Function(T) d = (T val) {
+    Expect.equals(2, val);
+  };
+  A<T> get e => this;
+  covariant late T f;
+  T? get g => null;
+  void set h(T value) => value;
+  void set i(covariant T value) => value;
+}
+
+mixin BMixin<inout T> {
+  late T a;
+  final T? b = null;
+  final T? Function() c = () => null;
+  final void Function(T) d = (T val) {
+    Expect.equals(2, val);
+  };
+  BMixin<T> get e => this;
+  covariant late T f;
+  T? get g => null;
+  void set h(T value) => value;
+  void set i(covariant T value) => value;
+}
+
+class B with BMixin<int> {}
+
+void testClass() {
+  A<int> a = new A();
+
+  a.a = 2;
+  Expect.equals(2, a.a);
+
+  Expect.isNull(a.b);
+
+  Expect.type<Void2Int>(a.c);
+  Expect.isNull(a.c());
+
+  Expect.type<Int2Void>(a.d);
+  a.d(2);
+
+  a.e.a = 3;
+
+  a.f = 2;
+  Expect.equals(2, a.f);
+
+  Expect.isNull(a.g);
+
+  a.h = 2;
+
+  a.i = 2;
+}
+
+void testMixin() {
+  B b = new B();
+
+  b.a = 2;
+  Expect.equals(2, b.a);
+
+  Expect.isNull(b.b);
+
+  Expect.type<Void2Int>(b.c);
+  Expect.isNull(b.c());
+
+  Expect.type<Int2Void>(b.d);
+  b.d(2);
+
+  b.e.a = 3;
+
+  b.f = 2;
+  Expect.equals(2, b.f);
+
+  Expect.isNull(b.g);
+
+  b.h = 2;
+
+  b.i = 2;
+}
+
+main() {
+  testClass();
+  testMixin();
+}
diff --git a/tests/language/variance/variance_inout_inference_error_test.dart b/tests/language/variance/variance_inout_inference_error_test.dart
new file mode 100644
index 0000000..76326580
--- /dev/null
+++ b/tests/language/variance/variance_inout_inference_error_test.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.
+
+// Tests local inference errors for the `inout` variance modifier.
+
+// SharedOptions=--enable-experiment=variance
+
+class Covariant<out T> {}
+class Contravariant<in T> {}
+class Invariant<inout T> {}
+
+class Exactly<inout T> {}
+
+class Upper {}
+class Middle extends Upper {}
+class Lower extends Middle {}
+
+Exactly<T> inferInvInv<T>(Invariant<T> x, Invariant<T> y) => new Exactly<T>();
+Exactly<T> inferInvCov<T>(Invariant<T> x, Covariant<T> y) => new Exactly<T>();
+Exactly<T> inferInvContra<T>(Invariant<T> x, Contravariant<T> y) => new Exactly<T>();
+
+main() {
+  // Middle <: T <: Middle and int <: T <: int are not valid constraints.
+  inferInvInv(Invariant<Middle>(), Invariant<int>());
+//            ^^^^^^^^^^^^^^^^^^^
+// [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+// [cfe] The argument type 'Invariant<Middle>' can't be assigned to the parameter type 'Invariant<Object>'.
+//                                 ^^^^^^^^^^^^^^^^
+// [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+// [cfe] The argument type 'Invariant<int>' can't be assigned to the parameter type 'Invariant<Object>'.
+
+  // Middle <: T <: Middle and Upper <: T <: Upper are not valid constraints.
+  inferInvInv(Invariant<Middle>(), Invariant<Upper>());
+//            ^^^^^^^^^^^^^^^^^^^
+// [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+// [cfe] The argument type 'Invariant<Middle>' can't be assigned to the parameter type 'Invariant<Upper>'.
+
+  // Middle <: T <: Middle and Lower <: T <: Lower are not valid constraints.
+  inferInvInv(Invariant<Middle>(), Invariant<Lower>());
+//                                 ^^^^^^^^^^^^^^^^^^
+// [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+// [cfe] The argument type 'Invariant<Lower>' can't be assigned to the parameter type 'Invariant<Middle>'.
+
+  // Upper <: T
+  // Middle <: T <: Middle
+  // Upper <: T <: Middle is not a valid constraint.
+  inferInvCov(Invariant<Middle>(), Covariant<Upper>());
+//            ^^^^^^^^^^^^^^^^^^^
+// [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+// [cfe] The argument type 'Invariant<Middle>' can't be assigned to the parameter type 'Invariant<Upper>'.
+
+  // T <: Lower
+  // Middle <: T <: Lower
+  // Middle <: T <: Lower is not a valid constraint
+  inferInvContra(Invariant<Middle>(), Contravariant<Lower>());
+//                                    ^^^^^^^^^^^^^^^^^^^^^^
+// [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+// [cfe] The argument type 'Contravariant<Lower>' can't be assigned to the parameter type 'Contravariant<Middle>'.
+}
diff --git a/tests/language/variance/variance_inout_inference_test.dart b/tests/language/variance/variance_inout_inference_test.dart
new file mode 100644
index 0000000..8a5e3c5
--- /dev/null
+++ b/tests/language/variance/variance_inout_inference_test.dart
@@ -0,0 +1,54 @@
+// 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.
+
+// Tests local inference for the `inout` variance modifier.
+
+// SharedOptions=--enable-experiment=variance
+
+class Covariant<out T> {}
+class Contravariant<in T> {}
+class Invariant<inout T> {}
+
+class Exactly<inout T> {}
+
+class Upper {}
+class Middle extends Upper {}
+class Lower extends Middle {}
+
+Exactly<T> inferInvInv<T>(Invariant<T> x, Invariant<T> y) => new Exactly<T>();
+Exactly<T> inferInvCov<T>(Invariant<T> x, Covariant<T> y) => new Exactly<T>();
+Exactly<T> inferInvContra<T>(Invariant<T> x, Contravariant<T> y) => new Exactly<T>();
+
+main() {
+  Exactly<Middle> middle;
+
+  // Middle <: T <: Middle
+  // Choose Middle
+  var inferredMiddle = inferInvInv(Invariant<Middle>(), Invariant<Middle>());
+  middle = inferredMiddle;
+
+  // Lower <: T
+  // Middle <: T <: Middle
+  // Choose Middle since this merges to Middle <: T <: Middle
+  var inferredMiddle2 = inferInvCov(Invariant<Middle>(), Covariant<Lower>());
+  middle = inferredMiddle2;
+
+  // Middle <: T
+  // Middle <: T <: Middle
+  // Choose Middle since this merges to Middle <: T <: Middle
+  var inferredMiddle3 = inferInvCov(Invariant<Middle>(), Covariant<Middle>());
+  middle = inferredMiddle3;
+
+  // T <: Upper
+  // Middle <: T <: Middle
+  // Choose Middle since this merges to Middle <: T <: Middle
+  var inferredMiddle4 = inferInvContra(Invariant<Middle>(), Contravariant<Upper>());
+  middle = inferredMiddle4;
+
+  // T <: Middle
+  // Middle <: T <: Middle
+  // Choose Middle since this merges to Middle <: T <: Middle
+  var inferredMiddle5 = inferInvContra(Invariant<Middle>(), Contravariant<Middle>());
+  middle = inferredMiddle5;
+}
diff --git a/tests/language/variance/variance_inout_method_test.dart b/tests/language/variance/variance_inout_method_test.dart
new file mode 100644
index 0000000..e76f19e
--- /dev/null
+++ b/tests/language/variance/variance_inout_method_test.dart
@@ -0,0 +1,288 @@
+// 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.
+
+// Tests method signatures and return types for the `inout` variance modifier.
+
+// SharedOptions=--enable-experiment=variance
+
+import "package:expect/expect.dart";
+
+typedef Cov<T> = T Function();
+typedef Contra<T> = void Function(T);
+
+Cov<int> covFunction = () => 2;
+Contra<int> contraFunction = (int val) {};
+Cov<num> covFunctionNum = () => 2;
+Contra<num> contraFunctionNum = (num val) {};
+
+class Covariant<out T> {}
+class Contravariant<in T> {}
+class Invariant<inout T> {}
+
+class A<inout T> {
+  void method1(T x) {}
+  void method2(Cov<T> x) {}
+  Contra<T> method3() {
+    return (T val) {
+      Expect.equals(2, val);
+    };
+  }
+
+  T? method4() => null;
+  void method5(Contra<T> x) {}
+  Cov<T?> method6() {
+    return () => null;
+  }
+
+  T method7(T x) => x;
+  Contra<T> method8(Contra<T> x) => x;
+  Cov<T> method9(Cov<T> x) => x;
+
+  T method10<S extends T>(S x) => x;
+
+  void method11(Covariant<T> x) {}
+  Covariant<T>? method12() => null;
+  void method13(Contravariant<T> x) {}
+  Contravariant<T>? method14() => null;
+  void method15(Invariant<T> x) {}
+  Invariant<T>? method16() => null;
+
+  void method17(covariant T x) {}
+  void method18(covariant Contra<T> x) {}
+  void method19(covariant Cov<T> x) {}
+  void method20(covariant Contravariant<T> x) {}
+  void method21(covariant Covariant<T> x) {}
+
+  void method22<S extends Contravariant<T>>() {}
+  void method23<S extends Covariant<T>>() {}
+  void method24<S extends Contra<T>>() {}
+  void method25<S extends Cov<T>>() {}
+
+  void method26({Contra<T>? a, Cov<T>? b, T? c}) {}
+  void method27({Contravariant<T>? a, Covariant<T>? b}) {}
+}
+
+mixin BMixin<inout T> {
+  void method1(T x) {}
+  void method2(Cov<T> x) {}
+  Contra<T> method3() {
+    return (T val) {
+      Expect.equals(2, val);
+    };
+  }
+
+  T? method4() => null;
+  void method5(Contra<T> x) {}
+  Cov<T?> method6() {
+    return () => null;
+  }
+
+  T method7(T x) => x;
+  Contra<T> method8(Contra<T> x) => x;
+  Cov<T> method9(Cov<T> x) => x;
+
+  T method10<S extends T>(S x) => x;
+
+  void method11(Covariant<T> x) {}
+  Covariant<T>? method12() => null;
+  void method13(Contravariant<T> x) {}
+  Contravariant<T>? method14() => null;
+  void method15(Invariant<T> x) {}
+  Invariant<T>? method16() => null;
+
+  void method17(covariant T x) {}
+  void method18(covariant Contra<T> x) {}
+  void method19(covariant Cov<T> x) {}
+  void method20(covariant Contravariant<T> x) {}
+  void method21(covariant Covariant<T> x) {}
+
+  void method22<S extends Contravariant<T>>() {}
+  void method23<S extends Covariant<T>>() {}
+  void method24<S extends Contra<T>>() {}
+  void method25<S extends Cov<T>>() {}
+
+  void method26({Contra<T>? a, Cov<T>? b, T? c}) {}
+  void method27({Contravariant<T>? a, Covariant<T>? b}) {}
+}
+
+class B with BMixin<num> {}
+
+class C<inout T> {
+  void method1(Contra<A<T>> x) {}
+  void method2(Cov<A<T>> x) {}
+  A<T> method3() {
+    return A<T>();
+  }
+}
+
+class D<T> {
+  T? method() => null;
+  void method2(T x) {}
+  void method3(covariant T x) {}
+}
+
+class E<inout T> extends D<T> {
+  @override
+  T? method() => null;
+
+  @override
+  void method2(T x) {}
+
+  @override
+  void method3(covariant T x) {}
+}
+
+abstract class F<T> {
+  int method(T x);
+}
+
+class G<inout T> {
+  final void Function(T) f;
+  G(this.f);
+  int method(T x) {
+    f(x);
+    return -1;
+  }
+}
+
+class H<inout T> extends G<T> implements F<T> {
+  H(void Function(T) f) : super(f);
+}
+
+void testClass() {
+  A<int> a = new A();
+
+  a.method1(2);
+
+  a.method2(() => 2);
+
+  Expect.type<Contra<int>>(a.method3());
+  Contra<int> method3Function = a.method3();
+  method3Function(2);
+
+  Expect.isNull(a.method4());
+
+  a.method5((int val) {});
+
+  Expect.type<Cov<int?>>(a.method6());
+  Cov<int?> method6Function = a.method6();
+  Expect.isNull(method6Function());
+
+  Expect.equals(3, a.method7(3));
+
+  Expect.type<Contra<int>>(a.method8(contraFunction));
+  Expect.equals(contraFunction, a.method8(contraFunction));
+
+  Expect.type<Cov<int>>(a.method9(covFunction));
+  Expect.equals(covFunction, a.method9(covFunction));
+
+  A<num> aa = new A();
+  Expect.type<num>(aa.method10(3));
+
+  a.method11(Covariant<int>());
+  Expect.isNull(a.method12());
+  a.method13(Contravariant<int>());
+  Expect.isNull(a.method14());
+  a.method15(Invariant<int>());
+  Expect.isNull(a.method16());
+
+  a.method17(3);
+  a.method18(contraFunction);
+  a.method19(covFunction);
+  a.method20(Contravariant<int>());
+  a.method21(Covariant<int>());
+
+  a.method22<Contravariant<int>>();
+  a.method23<Covariant<int>>();
+  a.method24<Contra<int>>();
+  a.method25<Cov<int>>();
+
+  a.method26();
+  a.method27();
+}
+
+void testMixin() {
+  B b = new B();
+
+  b.method1(2);
+
+  b.method2(() => 2);
+
+  Expect.type<Contra<num>>(b.method3());
+  Contra<num> method3Function = b.method3();
+  method3Function(2);
+
+  Expect.isNull(b.method4());
+
+  b.method5((num val) {});
+
+  Expect.type<Cov<num?>>(b.method6());
+  Cov<num?> method6Function = b.method6();
+  Expect.isNull(method6Function());
+
+  Expect.equals(3, b.method7(3));
+
+  Expect.type<Contra<num>>(b.method8(contraFunctionNum));
+  Expect.equals(contraFunctionNum, b.method8(contraFunctionNum));
+
+  Expect.type<Cov<num>>(b.method9(covFunctionNum));
+  Expect.equals(covFunctionNum, b.method9(covFunctionNum));
+
+  Expect.type<num>(b.method10(3));
+
+  b.method11(Covariant<num>());
+  Expect.isNull(b.method12());
+  b.method13(Contravariant<num>());
+  Expect.isNull(b.method14());
+  b.method15(Invariant<num>());
+  Expect.isNull(b.method16());
+
+  b.method17(3);
+  b.method18(contraFunctionNum);
+  b.method19(covFunctionNum);
+  b.method20(Contravariant<num>());
+  b.method21(Covariant<num>());
+
+  b.method22<Contravariant<num>>();
+  b.method23<Covariant<num>>();
+  b.method24<Contra<num>>();
+  b.method25<Cov<num>>();
+
+  b.method26();
+  b.method27();
+}
+
+void testClassInMethods() {
+  C<int> c = new C();
+
+  c.method1((A<int> x) {});
+  c.method2(() => throw "uncalled");
+
+  Expect.type<A<int>>(c.method3());
+}
+
+void testOverrideLegacyMethods() {
+  E<int> e = new E();
+  Expect.isNull(e.method());
+  e.method2(3);
+  e.method3(3);
+
+  D<Object> d = e;
+  Expect.throws(() => d.method2("test"));
+  Expect.throws(() => d.method3("test"));
+
+  F<Object> f = new H<String>((String s) {});
+  Expect.throws(() => f.method(3));
+
+  // Tests reified type is the type expected for F and not G.
+  Expect.type<int Function(Object)>(f.method);
+  Expect.type<int Function(Object)>(new H<String>((String s){}).method);
+}
+
+main() {
+  testClass();
+  testMixin();
+  testClassInMethods();
+  testOverrideLegacyMethods();
+}
diff --git a/tests/language/variance/variance_inout_subclass_test.dart b/tests/language/variance/variance_inout_subclass_test.dart
new file mode 100644
index 0000000..e1b7122c
--- /dev/null
+++ b/tests/language/variance/variance_inout_subclass_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.
+
+// Tests subclass usage for the `inout` variance modifier.
+
+// SharedOptions=--enable-experiment=variance
+
+typedef CovFunction<T> = T Function();
+typedef ContraFunction<T> = void Function(T);
+typedef InvFunction<T> = T Function(T);
+
+class LegacyCovariant<T> {}
+class Invariant<inout T>{}
+class Covariant<out T> {}
+class Contravariant<in T> {}
+mixin MLegacyCovariant<T> {}
+mixin MContravariant<in T> {}
+mixin MCovariant<out T> {}
+mixin MInvariant<inout T> {}
+
+class A<inout T> extends LegacyCovariant<T> {}
+class B<inout T> extends Invariant<T> {}
+class C<inout T> extends Covariant<T> {}
+class D<inout T> extends Contravariant<T> {}
+
+class E<inout T> implements LegacyCovariant<T> {}
+class F<inout T> implements Invariant<T> {}
+class G<inout T> implements Covariant<T> {}
+class H<inout T> implements Contravariant<T> {}
+
+class I<inout T> with MLegacyCovariant<T> {}
+class J<inout T> with MInvariant<T> {}
+class K<inout T> with MCovariant<T> {}
+class L<inout T> with MContravariant<T> {}
+
+class M<inout T> extends Covariant<Contravariant<T>> {}
+class N<inout T> extends Contravariant<Covariant<T>> {}
+class O<inout T> extends Covariant<ContraFunction<T>> {}
+class P<inout T> extends Covariant<ContraFunction<CovFunction<T>>> {}
+class Q<inout T> extends Covariant<CovFunction<ContraFunction<T>>> {}
+class R<inout T> extends Covariant<ContraFunction<Covariant<T>>> {}
+class S<inout T> extends Contravariant<Contravariant<Contravariant<T>>> {}
+
+class T<inout X> extends Covariant<Covariant<X>> {}
+class U<inout T> extends Contravariant<Contravariant<T>> {}
+class V<inout T> extends Covariant<CovFunction<T>> {}
+class W<inout T> extends Covariant<ContraFunction<ContraFunction<T>>> {}
+class X<inout T> extends Contravariant<CovFunction<Contravariant<T>>> {}
+class Y<inout T> extends Covariant<CovFunction<Covariant<T>>> {}
+class Z<inout T> extends Covariant<Covariant<Covariant<T>>> {}
+
+class AA<inout T> extends Covariant<InvFunction<T>> {}
+
+class AB<inout T> = Invariant<T> with MInvariant<T>;
+class AC<inout T> = Covariant<T> with MCovariant<T>;
+class AD<inout T> = Contravariant<T> with MContravariant<T>;
+
+main() {
+  A<num> a = A();
+  B<num> b = B();
+  C<num> c = C();
+  D<num> d = D();
+  E<num> e = E();
+  F<num> f = F();
+  G<num> g = G();
+  H<num> h = H();
+  I<num> i = I();
+  J<num> j = J();
+  K<num> k = K();
+  L<num> l = L();
+  M<num> m = M();
+  N<num> n = N();
+  O<num> o = O();
+  P<num> p = P();
+  Q<num> q = Q();
+  R<num> r = R();
+  S<num> s = S();
+  T<num> t = T();
+  U<num> u = U();
+  V<num> v = V();
+  W<num> w = W();
+  X<num> x = X();
+  Y<num> y = Y();
+  Z<num> z = Z();
+  AA<num> aa = AA();
+  AB<num> ab = AB();
+  AC<num> ac = AC();
+  AD<num> ad = AD();
+}
diff --git a/tests/language/variance/variance_inout_subtyping_error_test.dart b/tests/language/variance/variance_inout_subtyping_error_test.dart
new file mode 100644
index 0000000..d06f336
--- /dev/null
+++ b/tests/language/variance/variance_inout_subtyping_error_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.
+
+// Tests erroneous subtyping for the `inout` variance modifier.
+
+// SharedOptions=--enable-experiment=variance
+
+class Invariant<inout T> {}
+
+class Upper {}
+class Middle extends Upper {}
+class Lower extends Middle {}
+
+class A {
+  Invariant<Middle> method1() {
+    return Invariant<Middle>();
+  }
+
+  void method2(Invariant<Middle> x) {}
+}
+
+class B extends A {
+  @override
+  Invariant<Upper> method1() {
+  //               ^^^^^^^
+  // [analyzer] COMPILE_TIME_ERROR.INVALID_OVERRIDE
+  // [cfe] The return type of the method 'B.method1' is 'Invariant<Upper>', which does not match the return type, 'Invariant<Middle>', of the overridden method, 'A.method1'.
+    return new Invariant<Upper>();
+  }
+
+  @override
+  void method2(Invariant<Lower> x) {}
+  //   ^^^^^^^
+  // [analyzer] COMPILE_TIME_ERROR.INVALID_OVERRIDE
+  //                            ^
+  // [cfe] The parameter 'x' of the method 'B.method2' has type 'Invariant<Lower>', which does not match the corresponding type, 'Invariant<Middle>', in the overridden method, 'A.method2'.
+}
+
+class C extends A {
+  @override
+  Invariant<Lower> method1() {
+  //               ^^^^^^^
+  // [analyzer] COMPILE_TIME_ERROR.INVALID_OVERRIDE
+  // [cfe] The return type of the method 'C.method1' is 'Invariant<Lower>', which does not match the return type, 'Invariant<Middle>', of the overridden method, 'A.method1'.
+    return new Invariant<Lower>();
+  }
+
+  @override
+  void method2(Invariant<Upper> x) {}
+  //   ^^^^^^^
+  // [analyzer] COMPILE_TIME_ERROR.INVALID_OVERRIDE
+  //                            ^
+  // [cfe] The parameter 'x' of the method 'C.method2' has type 'Invariant<Upper>', which does not match the corresponding type, 'Invariant<Middle>', in the overridden method, 'A.method2'.
+}
+
+class D<out T extends Invariant<Middle>> {}
+
+class E {
+  D<Invariant<Upper>> method1() {
+  //^^^^^^^^^^^^^^^^
+  // [analyzer] COMPILE_TIME_ERROR.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS
+  //                         ^
+  // [cfe] Type argument 'Invariant<Upper>' doesn't conform to the bound 'Invariant<Middle>' of the type variable 'T' on 'D' in the return type.
+    return D<Invariant<Upper>>();
+    //     ^
+    // [cfe] Type argument 'Invariant<Upper>' doesn't conform to the bound 'Invariant<Middle>' of the type variable 'T' on 'D'.
+    //       ^^^^^^^^^^^^^^^^
+    // [analyzer] COMPILE_TIME_ERROR.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS
+  }
+
+  D<Invariant<Lower>> method2() {
+  //^^^^^^^^^^^^^^^^
+  // [analyzer] COMPILE_TIME_ERROR.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS
+  //                         ^
+  // [cfe] Type argument 'Invariant<Lower>' doesn't conform to the bound 'Invariant<Middle>' of the type variable 'T' on 'D' in the return type.
+    return D<Invariant<Lower>>();
+    //     ^
+    // [cfe] Type argument 'Invariant<Lower>' doesn't conform to the bound 'Invariant<Middle>' of the type variable 'T' on 'D'.
+    //       ^^^^^^^^^^^^^^^^
+    // [analyzer] COMPILE_TIME_ERROR.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS
+  }
+}
+
+void testCall<T>(Iterable<Invariant<T>> x) {}
+
+main() {
+  D<Invariant<Upper>> dUpper = new D<Invariant<Upper>>();
+  //^^^^^^^^^^^^^^^^
+  // [analyzer] COMPILE_TIME_ERROR.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS
+  //                  ^
+  // [cfe] Type argument 'Invariant<Upper>' doesn't conform to the bound 'Invariant<Middle>' of the type variable 'T' on 'D'.
+  //                               ^
+  // [cfe] Type argument 'Invariant<Upper>' doesn't conform to the bound 'Invariant<Middle>' of the type variable 'T' on 'D'.
+  //                                 ^^^^^^^^^^^^^^^^
+  // [analyzer] COMPILE_TIME_ERROR.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS
+  D<Invariant<Lower>> dLower = new D<Invariant<Lower>>();
+  //^^^^^^^^^^^^^^^^
+  // [analyzer] COMPILE_TIME_ERROR.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS
+  //                  ^
+  // [cfe] Type argument 'Invariant<Lower>' doesn't conform to the bound 'Invariant<Middle>' of the type variable 'T' on 'D'.
+  //                               ^
+  // [cfe] Type argument 'Invariant<Lower>' doesn't conform to the bound 'Invariant<Middle>' of the type variable 'T' on 'D'.
+  //                                 ^^^^^^^^^^^^^^^^
+  // [analyzer] COMPILE_TIME_ERROR.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS
+
+  Iterable<Invariant<Lower>> iterableLower = [new Invariant<Lower>()];
+  List<Invariant<Middle>> listMiddle = [new Invariant<Middle>()];
+  iterableLower = listMiddle;
+  //              ^^^^^^^^^^
+  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  // [cfe] A value of type 'List<Invariant<Middle>>' can't be assigned to a variable of type 'Iterable<Invariant<Lower>>'.
+
+  Iterable<Invariant<Middle>> iterableMiddle = [new Invariant<Middle>()];
+  List<Invariant<Lower>> listLower = [new Invariant<Lower>()];
+  iterableMiddle = listLower;
+  //               ^^^^^^^^^
+  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  // [cfe] A value of type 'List<Invariant<Lower>>' can't be assigned to a variable of type 'Iterable<Invariant<Middle>>'.
+
+  testCall<Lower>(listMiddle);
+  //              ^^^^^^^^^^
+  // [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+  // [cfe] The argument type 'List<Invariant<Middle>>' can't be assigned to the parameter type 'Iterable<Invariant<Lower>>'.
+
+  testCall<Middle>(listLower);
+  //               ^^^^^^^^^
+  // [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+  // [cfe] The argument type 'List<Invariant<Lower>>' can't be assigned to the parameter type 'Iterable<Invariant<Middle>>'.
+}
diff --git a/tests/language/variance/variance_inout_subtyping_test.dart b/tests/language/variance/variance_inout_subtyping_test.dart
new file mode 100644
index 0000000..e4252f4
--- /dev/null
+++ b/tests/language/variance/variance_inout_subtyping_test.dart
@@ -0,0 +1,170 @@
+// 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.
+
+// Tests subtyping for the `inout` variance modifier.
+
+// SharedOptions=--enable-experiment=variance
+
+import 'dart:async';
+
+import "package:expect/expect.dart";
+
+class Invariant<inout T> {}
+
+class Upper {}
+class Middle extends Upper {}
+class Lower extends Middle {}
+
+class A {
+  Invariant<Middle> method1() {
+    return new Invariant<Middle>();
+  }
+
+  void method2(Invariant<Middle> x) {}
+}
+
+class B extends A {
+  @override
+  Invariant<Middle> method1() {
+    return new Invariant<Middle>();
+  }
+
+  @override
+  void method2(Invariant<Middle> x) {}
+}
+
+class C<out X extends Invariant<Middle>> {}
+
+class D {
+  C<Invariant<Middle>> method1() {
+    return C<Invariant<Middle>>();
+  }
+}
+
+class E {
+  Invariant<dynamic> method1() {
+    return new Invariant<dynamic>();
+  }
+
+  void method2(Invariant<Object?> x) {}
+}
+
+class F extends E {
+  @override
+  Invariant<Object?> method1() {
+    return new Invariant<Object?>();
+  }
+
+  @override
+  void method2(Invariant<dynamic> x) {}
+}
+
+class G {
+  Invariant<dynamic> method1() {
+    return new Invariant<dynamic>();
+  }
+
+  void method2(Invariant<FutureOr<dynamic>> x) {}
+}
+
+class H extends G {
+  @override
+  Invariant<FutureOr<dynamic>> method1() {
+    return new Invariant<FutureOr<dynamic>>();
+  }
+
+  @override
+  void method2(Invariant<dynamic> x) {}
+}
+
+class I {
+  Invariant<FutureOr<Never>> method1() {
+    return new Invariant<FutureOr<Never>>();
+  }
+
+  void method2(Invariant<Future<Never>> x) {}
+}
+
+class J extends I {
+  @override
+  Invariant<Future<Never>> method1() {
+    return new Invariant<Future<Never>>();
+  }
+
+  @override
+  void method2(Invariant<FutureOr<Never>> x) {}
+}
+
+void testCall(Iterable<Invariant<Middle>> x) {}
+
+main() {
+  A a = new A();
+  Expect.type<Invariant<Middle>>(a.method1());
+  Expect.notType<Invariant<Upper>>(a.method1());
+  Expect.notType<Invariant<Lower>>(a.method1());
+  a.method2(new Invariant<Middle>());
+
+  B b = new B();
+  Expect.type<Invariant<Middle>>(b.method1());
+  Expect.notType<Invariant<Upper>>(b.method1());
+  Expect.notType<Invariant<Lower>>(b.method1());
+  b.method2(new Invariant<Middle>());
+
+  C<Invariant<Middle>> c = new C<Invariant<Middle>>();
+
+  D d = new D();
+  Expect.type<C<Invariant<Middle>>>(d.method1());
+
+  E e = new E();
+  Expect.type<Invariant<dynamic>>(e.method1());
+  e.method2(new Invariant<Object?>());
+
+  // Invariant<dynamic> <:> Invariant<Object?>
+  F f = new F();
+  Expect.type<Invariant<Object?>>(f.method1());
+  Expect.type<Invariant<dynamic>>(f.method1());
+  f.method2(new Invariant<Object?>());
+  f.method2(new Invariant<dynamic>());
+
+  G g = new G();
+  Expect.type<Invariant<dynamic>>(g.method1());
+  g.method2(new Invariant<FutureOr<dynamic>>());
+
+  // Invariant<FutureOr<dynamic>> <:> Invariant<dynamic>
+  H h = new H();
+  Expect.type<Invariant<FutureOr<dynamic>>>(h.method1());
+  Expect.type<Invariant<dynamic>>(h.method1());
+  h.method2(new Invariant<FutureOr<dynamic>>());
+  h.method2(new Invariant<dynamic>());
+
+  I i = new I();
+  Expect.type<Invariant<FutureOr<Never>>>(i.method1());
+  i.method2(new Invariant<Future<Never>>());
+
+  // Invariant<FutureOr<Never>> <:> Invariant<Future<Never>>
+  J j = new J();
+  Expect.type<Invariant<FutureOr<Never>>>(j.method1());
+  Expect.type<Invariant<Future<Never>>>(j.method1());
+  j.method2(new Invariant<FutureOr<Never>>());
+  j.method2(new Invariant<Future<Never>>());
+
+  Iterable<Invariant<Middle>> iterableMiddle = [new Invariant<Middle>()];
+  List<Invariant<Middle>> listMiddle = [new Invariant<Middle>()];
+  iterableMiddle = listMiddle;
+
+  testCall(listMiddle);
+
+  Expect.subtype<Invariant<Middle>, Invariant<Middle>>();
+  Expect.notSubtype<Invariant<Lower>, Invariant<Middle>>();
+  Expect.notSubtype<Invariant<Upper>, Invariant<Middle>>();
+
+  Expect.subtype<Invariant<dynamic>, Invariant<Object?>>();
+  Expect.subtype<Invariant<Object?>, Invariant<dynamic>>();
+
+  Expect.subtype<Invariant<FutureOr<dynamic>>, Invariant<dynamic>>();
+  Expect.subtype<Invariant<dynamic>, Invariant<FutureOr<dynamic>>>();
+
+  Expect.subtype<Invariant<FutureOr<Never>>, Invariant<Future<Never>>>();
+  Expect.subtype<Invariant<Future<Never>>, Invariant<FutureOr<Never>>>();
+}
diff --git a/tests/language/variance/variance_method_tearoff_test.dart b/tests/language/variance/variance_method_tearoff_test.dart
new file mode 100644
index 0000000..1e69d79
--- /dev/null
+++ b/tests/language/variance/variance_method_tearoff_test.dart
@@ -0,0 +1,52 @@
+// 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.
+
+// Tests reified types of torn-off methods with type parameters that have
+// explicit variance modifiers.
+
+// SharedOptions=--enable-experiment=variance
+
+import "package:expect/expect.dart";
+
+class Contravariant<in T> {
+  int method(T x) { return -1; }
+}
+
+class Invariant<inout T> {
+  T method(T x) { return x; }
+}
+
+class LegacyCovariant<T> {
+  int method(T x) { return -1; }
+}
+
+class NoSuchMethod<inout T> implements Invariant<T> {
+  noSuchMethod(_) => 3;
+}
+
+main() {
+  Contravariant<int> contraDiff = new Contravariant<num>();
+  Expect.notType<int Function(Object)>(contraDiff.method);
+  Expect.type<int Function(num)>(contraDiff.method);
+
+  Contravariant<num> contraSame = new Contravariant<num>();
+  Expect.notType<int Function(Object)>(contraSame.method);
+  Expect.type<int Function(num)>(contraSame.method);
+
+  Invariant<num> invSame = new Invariant<num>();
+  Expect.notType<num Function(Object)>(invSame.method);
+  Expect.type<num Function(num)>(invSame.method);
+
+  LegacyCovariant<num> legacyDiff = new LegacyCovariant<int>();
+  Expect.type<int Function(Object)>(legacyDiff.method);
+  Expect.type<int Function(num)>(legacyDiff.method);
+
+  LegacyCovariant<num> legacySame = new LegacyCovariant<num>();
+  Expect.type<int Function(Object)>(legacySame.method);
+  Expect.type<int Function(num)>(legacySame.method);
+
+  NoSuchMethod<num> nsm = new NoSuchMethod<num>();
+  Expect.notType<num Function(Object)>(nsm.method);
+  Expect.type<num Function(num)>(nsm.method);
+}
diff --git a/tests/language/variance/variance_multi_subclass_error_test.dart b/tests/language/variance/variance_multi_subclass_error_test.dart
new file mode 100644
index 0000000..ed790c7
--- /dev/null
+++ b/tests/language/variance/variance_multi_subclass_error_test.dart
@@ -0,0 +1,84 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// Tests erroneous variance usage multiple type parameters.
+
+// SharedOptions=--enable-experiment=variance
+
+typedef CovFunction<T> = T Function();
+typedef ContraFunction<T> = void Function(T);
+
+class Covariant<out T> {}
+class Contravariant<in T> {}
+
+class MultiTwo<in T, out U> {}
+class MultiThree<in T, out U, inout V> {}
+
+class A<in T, out U, inout V> extends Covariant<T> {}
+//    ^
+// [cfe] Can't use 'in' type variable 'T' in an 'out' position in supertype 'Covariant'.
+//         ^
+// [analyzer] COMPILE_TIME_ERROR.WRONG_EXPLICIT_TYPE_PARAMETER_VARIANCE_IN_SUPERINTERFACE
+
+class B<in T> extends MultiThree<T, T, T> {}
+//    ^
+// [cfe] Can't use 'in' type variable 'T' in an 'inout' position in supertype 'MultiThree'.
+//         ^
+// [analyzer] COMPILE_TIME_ERROR.WRONG_EXPLICIT_TYPE_PARAMETER_VARIANCE_IN_SUPERINTERFACE
+
+class C<in T, out U, inout V> extends MultiTwo<U, T> {}
+//    ^
+// [cfe] Can't use 'in' type variable 'T' in an 'out' position in supertype 'MultiTwo'.
+//    ^
+// [cfe] Can't use 'out' type variable 'U' in an 'in' position in supertype 'MultiTwo'.
+//         ^
+// [analyzer] COMPILE_TIME_ERROR.WRONG_EXPLICIT_TYPE_PARAMETER_VARIANCE_IN_SUPERINTERFACE
+//                ^
+// [analyzer] COMPILE_TIME_ERROR.WRONG_EXPLICIT_TYPE_PARAMETER_VARIANCE_IN_SUPERINTERFACE
+
+class D<in T, out U, inout V> extends MultiThree<V, U, T> {}
+//    ^
+// [cfe] Can't use 'in' type variable 'T' in an 'inout' position in supertype 'MultiThree'.
+//         ^
+// [analyzer] COMPILE_TIME_ERROR.WRONG_EXPLICIT_TYPE_PARAMETER_VARIANCE_IN_SUPERINTERFACE
+
+class E<in T, out U, inout V> extends MultiThree<Covariant<U>, Covariant<T>, Covariant<U>> {}
+//    ^
+// [cfe] Can't use 'in' type variable 'T' in an 'out' position in supertype 'MultiThree'.
+//    ^
+// [cfe] Can't use 'out' type variable 'U' in an 'inout' position in supertype 'MultiThree'.
+//         ^
+// [analyzer] COMPILE_TIME_ERROR.WRONG_EXPLICIT_TYPE_PARAMETER_VARIANCE_IN_SUPERINTERFACE
+//                ^
+// [analyzer] COMPILE_TIME_ERROR.WRONG_EXPLICIT_TYPE_PARAMETER_VARIANCE_IN_SUPERINTERFACE
+
+class F<in T, out U, inout V> extends MultiTwo<Contravariant<T>, Contravariant<U>> {}
+//    ^
+// [cfe] Can't use 'in' type variable 'T' in an 'out' position in supertype 'MultiTwo'.
+//    ^
+// [cfe] Can't use 'out' type variable 'U' in an 'in' position in supertype 'MultiTwo'.
+//         ^
+// [analyzer] COMPILE_TIME_ERROR.WRONG_EXPLICIT_TYPE_PARAMETER_VARIANCE_IN_SUPERINTERFACE
+//                ^
+// [analyzer] COMPILE_TIME_ERROR.WRONG_EXPLICIT_TYPE_PARAMETER_VARIANCE_IN_SUPERINTERFACE
+
+class G<in T, out U, inout V> extends MultiThree<CovFunction<U>, CovFunction<T>, CovFunction<U>> {}
+//    ^
+// [cfe] Can't use 'in' type variable 'T' in an 'out' position in supertype 'MultiThree'.
+//    ^
+// [cfe] Can't use 'out' type variable 'U' in an 'inout' position in supertype 'MultiThree'.
+//         ^
+// [analyzer] COMPILE_TIME_ERROR.WRONG_EXPLICIT_TYPE_PARAMETER_VARIANCE_IN_SUPERINTERFACE
+//                ^
+// [analyzer] COMPILE_TIME_ERROR.WRONG_EXPLICIT_TYPE_PARAMETER_VARIANCE_IN_SUPERINTERFACE
+
+class H<in T, out U, inout V> extends MultiTwo<ContraFunction<T>, ContraFunction<U>> {}
+//    ^
+// [cfe] Can't use 'in' type variable 'T' in an 'out' position in supertype 'MultiTwo'.
+//    ^
+// [cfe] Can't use 'out' type variable 'U' in an 'in' position in supertype 'MultiTwo'.
+//         ^
+// [analyzer] COMPILE_TIME_ERROR.WRONG_EXPLICIT_TYPE_PARAMETER_VARIANCE_IN_SUPERINTERFACE
+//                ^
+// [analyzer] COMPILE_TIME_ERROR.WRONG_EXPLICIT_TYPE_PARAMETER_VARIANCE_IN_SUPERINTERFACE
diff --git a/tests/language/variance/variance_multi_subclass_test.dart b/tests/language/variance/variance_multi_subclass_test.dart
new file mode 100644
index 0000000..ae4f57a
--- /dev/null
+++ b/tests/language/variance/variance_multi_subclass_test.dart
@@ -0,0 +1,42 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// Tests variance usage multiple type parameters.
+
+// SharedOptions=--enable-experiment=variance
+
+typedef CovFunction<T> = T Function();
+typedef ContraFunction<T> = void Function(T);
+
+class Covariant<out T> {}
+class Contravariant<in T> {}
+
+class A<in T, out U> {}
+class B<in T, out U, inout V> {}
+
+class C<inout T, in U, out V> extends A<T, V> {}
+class D<inout T, in U, out V> extends B<U, V, T> {}
+class E<inout T, in U, out V> extends B<T, T, T> {}
+
+class F<inout T, in U, out V> extends A<Contravariant<V>, Contravariant<U>> {}
+class G<inout T, in U, out V> extends A<Covariant<Contravariant<V>>, Contravariant<Covariant<U>>> {}
+class H<inout T, in U, out V> extends B<Covariant<U>, Covariant<V>, Covariant<T>> {}
+
+class I<inout T, in U, out V> extends A<ContraFunction<V>, ContraFunction<U>> {}
+class J<inout T, in U, out V> extends A<CovFunction<ContraFunction<V>>, ContraFunction<CovFunction<U>>> {}
+class K<inout T, in U, out V> extends B<CovFunction<U>, CovFunction<V>, CovFunction<T>> {}
+
+main() {
+  A<num, bool> a = A();
+  B<num, bool, String> b = B();
+  C<num, bool, String> c = C();
+  D<num, bool, String> d = D();
+  E<num, bool, String> e = E();
+  F<num, bool, String> f = F();
+  G<num, bool, String> g = G();
+  H<num, bool, String> h = H();
+  I<num, bool, String> i = I();
+  J<num, bool, String> j = J();
+  K<num, bool, String> k = K();
+}
diff --git a/tests/language/variance/variance_out_field_error_test.dart b/tests/language/variance/variance_out_field_error_test.dart
new file mode 100644
index 0000000..8fc79a9
--- /dev/null
+++ b/tests/language/variance/variance_out_field_error_test.dart
@@ -0,0 +1,64 @@
+// 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.
+
+// Tests erroneous field usage for the `out` variance modifier.
+
+// SharedOptions=--enable-experiment=variance
+
+class A<out T> {
+  void set a(T value) => value;
+  //         ^^^^^^^
+  // [analyzer] COMPILE_TIME_ERROR.WRONG_TYPE_PARAMETER_VARIANCE_POSITION
+  //           ^
+  // [cfe] Can't use 'out' type variable 'T' in an 'in' position.
+  final void Function(T) b = (T val) {};
+  //                     ^
+  // [analyzer] COMPILE_TIME_ERROR.WRONG_TYPE_PARAMETER_VARIANCE_POSITION
+  // [cfe] Can't use 'out' type variable 'T' in an 'in' position.
+  late T c;
+//       ^
+// [analyzer] COMPILE_TIME_ERROR.WRONG_TYPE_PARAMETER_VARIANCE_POSITION
+// [cfe] Can't use 'out' type variable 'T' in an 'in' position.
+
+  T? d = null;
+  // ^
+  // [analyzer] COMPILE_TIME_ERROR.WRONG_TYPE_PARAMETER_VARIANCE_POSITION
+  // [cfe] Can't use 'out' type variable 'T' in an 'in' position.
+}
+
+mixin BMixin<out T> {
+  void set a(T value) => value;
+  //         ^^^^^^^
+  // [analyzer] COMPILE_TIME_ERROR.WRONG_TYPE_PARAMETER_VARIANCE_POSITION
+  //           ^
+  // [cfe] Can't use 'out' type variable 'T' in an 'in' position.
+  final void Function(T) b = (T val) {};
+  //                     ^
+  // [analyzer] COMPILE_TIME_ERROR.WRONG_TYPE_PARAMETER_VARIANCE_POSITION
+  // [cfe] Can't use 'out' type variable 'T' in an 'in' position.
+  late T c;
+//       ^
+// [analyzer] COMPILE_TIME_ERROR.WRONG_TYPE_PARAMETER_VARIANCE_POSITION
+// [cfe] Can't use 'out' type variable 'T' in an 'in' position.
+
+  T? d = null;
+  // ^
+  // [analyzer] COMPILE_TIME_ERROR.WRONG_TYPE_PARAMETER_VARIANCE_POSITION
+  // [cfe] Can't use 'out' type variable 'T' in an 'in' position.
+}
+
+abstract class C<out T> {
+  void set a(T value) => value;
+  //         ^^^^^^^
+  // [analyzer] COMPILE_TIME_ERROR.WRONG_TYPE_PARAMETER_VARIANCE_POSITION
+  //           ^
+  // [cfe] Can't use 'out' type variable 'T' in an 'in' position.
+}
+
+class D<out T> extends C<T> {
+  late var a;
+  //       ^
+  // [analyzer] COMPILE_TIME_ERROR.WRONG_TYPE_PARAMETER_VARIANCE_POSITION
+  // [cfe] Can't use 'out' type variable 'T' in an 'in' position.
+}
diff --git a/tests/language/variance/variance_out_field_test.dart b/tests/language/variance/variance_out_field_test.dart
new file mode 100644
index 0000000..3059cb8
--- /dev/null
+++ b/tests/language/variance/variance_out_field_test.dart
@@ -0,0 +1,72 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// Tests various fields for the `out` variance modifier.
+
+// SharedOptions=--enable-experiment=variance
+
+import "package:expect/expect.dart";
+
+typedef Void2Int = int? Function();
+
+class A<out T> {
+  final T? a = null;
+  final T? Function() b = () => null;
+  T? get c => null;
+  A<T> get d => this;
+  covariant late T e;
+  void set f(covariant T value) => value;
+}
+
+mixin BMixin<out T> {
+  final T? a = null;
+  final T? Function() b = () => null;
+  T? get c => null;
+  BMixin<T> get d => this;
+  covariant late T e;
+  void set f(covariant T value) => value;
+}
+
+class B with BMixin<int> {}
+
+void testClass() {
+  A<int> a = new A();
+
+  Expect.isNull(a.a);
+
+  Expect.type<Void2Int>(a.b);
+  Expect.isNull(a.b());
+
+  Expect.isNull(a.c);
+
+  Expect.isNull(a.d.a);
+
+  a.e = 2;
+  Expect.equals(2, a.e);
+
+  a.f = 2;
+}
+
+void testMixin() {
+  B b = new B();
+
+  Expect.isNull(b.a);
+
+  Expect.type<Void2Int>(b.b);
+  Expect.isNull(b.b());
+
+  Expect.isNull(b.c);
+
+  Expect.isNull(b.d.a);
+
+  b.e = 2;
+  Expect.equals(2, b.e);
+
+  b.f = 2;
+}
+
+main() {
+  testClass();
+  testMixin();
+}
diff --git a/tests/language/variance/variance_out_inference_error_test.dart b/tests/language/variance/variance_out_inference_error_test.dart
new file mode 100644
index 0000000..809cdfb
--- /dev/null
+++ b/tests/language/variance/variance_out_inference_error_test.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.
+
+// Tests local inference errors for the `out` variance modifier.
+
+// SharedOptions=--enable-experiment=variance
+
+class Covariant<out T> {}
+
+class Exactly<inout T> {}
+
+class Upper {}
+class Middle extends Upper {}
+class Lower extends Middle {}
+
+class CovBound<out T> {
+  CovBound(T x, void Function(T) y) {}
+}
+
+Exactly<T> inferCovCov<T>(Covariant<T> x, Covariant<T> y) => new Exactly<T>();
+Exactly<T> inferCovBound<T>(CovBound<T> x) => new Exactly<T>();
+
+main() {
+  Exactly<Upper> upper;
+  Exactly<Middle> middle;
+  Exactly<Lower> lower;
+
+  // Lower <: T <: Middle.
+  // We choose Middle.
+  var inferredMiddle = inferCovCov(Covariant<Lower>(), Covariant<Middle>());
+  lower = inferredMiddle;
+  //      ^^^^^^^^^^^^^^
+  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  // [cfe] A value of type 'Exactly<Middle>' can't be assigned to a variable of type 'Exactly<Lower>'.
+
+  // Lower <: T <: Upper.
+  // We choose Upper.
+  var inferredUpper = inferCovCov(Covariant<Lower>(), Covariant<Upper>());
+  lower = inferredUpper;
+  //      ^^^^^^^^^^^^^
+  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  // [cfe] A value of type 'Exactly<Upper>' can't be assigned to a variable of type 'Exactly<Lower>'.
+
+  // Inference for Covbound(...) produces Lower <: T <: Upper.
+  // Since T is covariant, we choose Lower as the solution.
+  var inferredCovLower = inferCovBound(CovBound(Lower(), (Upper x) {}));
+  upper = inferredCovLower;
+  //      ^^^^^^^^^^^^^^^^
+  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  // [cfe] A value of type 'Exactly<Lower>' can't be assigned to a variable of type 'Exactly<Upper>'.
+
+  // Inference for Covbound(...) produces Lower <: T <: Middle.
+  // Since T is covariant, we choose Lower as the solution.
+  var inferredCovLower2 = inferCovBound(CovBound(Lower(), (Middle x) {}));
+  middle = inferredCovLower2;
+  //       ^^^^^^^^^^^^^^^^^
+  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  // [cfe] A value of type 'Exactly<Lower>' can't be assigned to a variable of type 'Exactly<Middle>'.
+}
diff --git a/tests/language/variance/variance_out_inference_test.dart b/tests/language/variance/variance_out_inference_test.dart
new file mode 100644
index 0000000..14b49e1
--- /dev/null
+++ b/tests/language/variance/variance_out_inference_test.dart
@@ -0,0 +1,55 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// Tests local inference for the `out` variance modifier.
+
+// SharedOptions=--enable-experiment=variance
+
+class Covariant<out T> {}
+
+class Exactly<inout T> {}
+
+class Upper {}
+class Middle extends Upper {}
+class Lower extends Middle {}
+
+class CovBound<out T> {
+  CovBound(T x, void Function(T) y) {}
+}
+
+Exactly<T> inferCovCov<T>(Covariant<T> x, Covariant<T> y) => new Exactly<T>();
+Exactly<T> inferCovBound<T>(CovBound<T> x) => new Exactly<T>();
+
+main() {
+  Exactly<Upper> upper;
+  Exactly<Lower> lower;
+
+  // Upper <: T
+  // Upper <: T
+  // Choose Upper
+  var inferredUpper = inferCovCov(Covariant<Upper>(), Covariant<Upper>());
+  upper = inferredUpper;
+
+  // Upper <: T
+  // Middle <: T
+  // Choose Upper since it is the lowest upper bound of Upper and Middle.
+  var inferredUpper2 = inferCovCov(Covariant<Upper>(), Covariant<Middle>());
+  upper = inferredUpper2;
+
+  // Upper <: T
+  // Lower <: T
+  // Choose Upper since it is the lowest upper bound of Upper and Lower.
+  var inferredUpper3 = inferCovCov(Covariant<Upper>(), Covariant<Lower>());
+  upper = inferredUpper3;
+
+  // Lower <: T <: Upper
+  // Choose Lower.
+  var inferredCovLower = inferCovBound(CovBound(Lower(), (Upper x) {}));
+  lower = inferredCovLower;
+
+  // Lower <: T <: Middle
+  // Choose Lower.
+  var inferredCovLower2 = inferCovBound(CovBound(Lower(), (Middle x) {}));
+  lower = inferredCovLower2;
+}
diff --git a/tests/language/variance/variance_out_method_error_test.dart b/tests/language/variance/variance_out_method_error_test.dart
new file mode 100644
index 0000000..54ebd17
--- /dev/null
+++ b/tests/language/variance/variance_out_method_error_test.dart
@@ -0,0 +1,357 @@
+// 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.
+
+// Tests erroneous method signatures and return types for the `out` variance modifier.
+
+// SharedOptions=--enable-experiment=variance
+
+typedef Inv<T> = void Function<X extends T>();
+typedef Cov<T> = T Function();
+typedef Contra<T> = void Function(T);
+
+class Covariant<out T> {}
+class Contravariant<in T> {}
+class Invariant<inout T> {}
+
+class A<out T> {
+  void method1(T x) {}
+  //           ^^^
+  // [analyzer] COMPILE_TIME_ERROR.WRONG_TYPE_PARAMETER_VARIANCE_POSITION
+  //             ^
+  // [cfe] Can't use 'out' type variable 'T' in an 'in' position.
+
+  void method2(Cov<T> x) {}
+  //           ^^^^^^^^
+  // [analyzer] COMPILE_TIME_ERROR.WRONG_TYPE_PARAMETER_VARIANCE_POSITION
+  //                  ^
+  // [cfe] Can't use 'out' type variable 'T' in an 'in' position.
+
+  Contra<T> method3() => (T val) {};
+//^^^^^^^^^
+// [analyzer] COMPILE_TIME_ERROR.WRONG_TYPE_PARAMETER_VARIANCE_POSITION
+//                 ^
+// [cfe] Can't use 'out' type variable 'T' in an 'in' position in the return type.
+
+  void method4(Cov<Cov<T>> x) {}
+  //           ^^^^^^^^^^^^^
+  // [analyzer] COMPILE_TIME_ERROR.WRONG_TYPE_PARAMETER_VARIANCE_POSITION
+  //                       ^
+  // [cfe] Can't use 'out' type variable 'T' in an 'in' position.
+
+  Contra<Cov<T>> method5() => (Cov<T> method) {};
+//^^^^^^^^^^^^^^
+// [analyzer] COMPILE_TIME_ERROR.WRONG_TYPE_PARAMETER_VARIANCE_POSITION
+//                      ^
+// [cfe] Can't use 'out' type variable 'T' in an 'in' position in the return type.
+
+  Cov<Contra<T>> method6() {
+//^^^^^^^^^^^^^^
+// [analyzer] COMPILE_TIME_ERROR.WRONG_TYPE_PARAMETER_VARIANCE_POSITION
+//                      ^
+// [cfe] Can't use 'out' type variable 'T' in an 'in' position in the return type.
+    return () {
+      return (T x) {};
+    };
+  }
+
+  void method7(Contra<Contra<T>> x) {}
+  //           ^^^^^^^^^^^^^^^^^^^
+  // [analyzer] COMPILE_TIME_ERROR.WRONG_TYPE_PARAMETER_VARIANCE_POSITION
+  //                             ^
+  // [cfe] Can't use 'out' type variable 'T' in an 'in' position.
+
+  Inv<T> method8() => throw "uncalled";
+//^^^^^^
+// [analyzer] COMPILE_TIME_ERROR.WRONG_TYPE_PARAMETER_VARIANCE_POSITION
+//              ^
+// [cfe] Can't use 'out' type variable 'T' in an 'inout' position in the return type.
+
+  void method9(Inv<T> x) {}
+  //           ^^^^^^^^
+  // [analyzer] COMPILE_TIME_ERROR.WRONG_TYPE_PARAMETER_VARIANCE_POSITION
+  //                  ^
+  // [cfe] Can't use 'out' type variable 'T' in an 'inout' position.
+
+  Contravariant<T> method10() => throw "uncalled";
+//^^^^^^^^^^^^^^^^
+// [analyzer] COMPILE_TIME_ERROR.WRONG_TYPE_PARAMETER_VARIANCE_POSITION
+//                         ^
+// [cfe] Can't use 'out' type variable 'T' in an 'in' position in the return type.
+
+  void method11(Covariant<T> x) {}
+  //            ^^^^^^^^^^^^^^
+  // [analyzer] COMPILE_TIME_ERROR.WRONG_TYPE_PARAMETER_VARIANCE_POSITION
+  //                         ^
+  // [cfe] Can't use 'out' type variable 'T' in an 'in' position.
+
+  Invariant<T> method12() => throw "uncalled";
+//^^^^^^^^^^^^
+// [analyzer] COMPILE_TIME_ERROR.WRONG_TYPE_PARAMETER_VARIANCE_POSITION
+//                     ^
+// [cfe] Can't use 'out' type variable 'T' in an 'inout' position in the return type.
+
+  void method13(Invariant<T> x) {}
+  //            ^^^^^^^^^^^^^^
+  // [analyzer] COMPILE_TIME_ERROR.WRONG_TYPE_PARAMETER_VARIANCE_POSITION
+  //                         ^
+  // [cfe] Can't use 'out' type variable 'T' in an 'inout' position.
+
+  void method14(Covariant<Covariant<T>> x) {}
+  //            ^^^^^^^^^^^^^^^^^^^^^^^^^
+  // [analyzer] COMPILE_TIME_ERROR.WRONG_TYPE_PARAMETER_VARIANCE_POSITION
+  //                                    ^
+  // [cfe] Can't use 'out' type variable 'T' in an 'in' position.
+
+  void method15(Contravariant<Contravariant<T>> x) {}
+  //            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+  // [analyzer] COMPILE_TIME_ERROR.WRONG_TYPE_PARAMETER_VARIANCE_POSITION
+  //                                            ^
+  // [cfe] Can't use 'out' type variable 'T' in an 'in' position.
+
+  Contravariant<Covariant<T>> method16() => Contravariant<Covariant<T>>();
+//^^^^^^^^^^^^^^^^^^^^^^^^^^^
+// [analyzer] COMPILE_TIME_ERROR.WRONG_TYPE_PARAMETER_VARIANCE_POSITION
+//                                    ^
+// [cfe] Can't use 'out' type variable 'T' in an 'in' position in the return type.
+
+  Covariant<Contravariant<T>> method17() => Covariant<Contravariant<T>>();
+//^^^^^^^^^^^^^^^^^^^^^^^^^^^
+// [analyzer] COMPILE_TIME_ERROR.WRONG_TYPE_PARAMETER_VARIANCE_POSITION
+//                                    ^
+// [cfe] Can't use 'out' type variable 'T' in an 'in' position in the return type.
+
+  void method18<X extends Contra<T>>() {}
+  //            ^^^^^^^^^^^^^^^^^^^
+  // [analyzer] COMPILE_TIME_ERROR.WRONG_TYPE_PARAMETER_VARIANCE_POSITION
+  // [cfe] Can't use 'out' type variable 'T' in an 'inout' position.
+
+  void method19<X extends Contravariant<T>>() {}
+  //            ^^^^^^^^^^^^^^^^^^^^^^^^^^
+  // [analyzer] COMPILE_TIME_ERROR.WRONG_TYPE_PARAMETER_VARIANCE_POSITION
+  // [cfe] Can't use 'out' type variable 'T' in an 'inout' position.
+
+  void method20({required T x}) {}
+  //             ^^^^^^^^^^^^
+  // [analyzer] COMPILE_TIME_ERROR.WRONG_TYPE_PARAMETER_VARIANCE_POSITION
+  //                        ^
+  // [cfe] Can't use 'out' type variable 'T' in an 'in' position.
+
+  void method21({required Cov<T> x}) {}
+  //             ^^^^^^^^^^^^^^^^^
+  // [analyzer] COMPILE_TIME_ERROR.WRONG_TYPE_PARAMETER_VARIANCE_POSITION
+  //                             ^
+  // [cfe] Can't use 'out' type variable 'T' in an 'in' position.
+
+  void method22({required Covariant<T> x}) {}
+  //             ^^^^^^^^^^^^^^^^^^^^^^^
+  // [analyzer] COMPILE_TIME_ERROR.WRONG_TYPE_PARAMETER_VARIANCE_POSITION
+  //                                   ^
+  // [cfe] Can't use 'out' type variable 'T' in an 'in' position.
+
+  void method23({required Covariant<T> x, required Contravariant<T> y}) {}
+  //             ^^^^^^^^^^^^^^^^^^^^^^^
+  // [analyzer] COMPILE_TIME_ERROR.WRONG_TYPE_PARAMETER_VARIANCE_POSITION
+  //                                   ^
+  // [cfe] Can't use 'out' type variable 'T' in an 'in' position.
+
+  void method24<X extends T>() {}
+  //            ^^^^^^^^^^^
+  // [analyzer] COMPILE_TIME_ERROR.WRONG_TYPE_PARAMETER_VARIANCE_POSITION
+  // [cfe] Can't use 'out' type variable 'T' in an 'inout' position.
+
+  void method25<X extends Contra<T>>() {}
+  //            ^^^^^^^^^^^^^^^^^^^
+  // [analyzer] COMPILE_TIME_ERROR.WRONG_TYPE_PARAMETER_VARIANCE_POSITION
+  // [cfe] Can't use 'out' type variable 'T' in an 'inout' position.
+
+  void method26<X extends Contravariant<T>>() {}
+  //            ^^^^^^^^^^^^^^^^^^^^^^^^^^
+  // [analyzer] COMPILE_TIME_ERROR.WRONG_TYPE_PARAMETER_VARIANCE_POSITION
+  // [cfe] Can't use 'out' type variable 'T' in an 'inout' position.
+}
+
+mixin BMixin<out T> {
+  void method1(T x) {}
+  //           ^^^
+  // [analyzer] COMPILE_TIME_ERROR.WRONG_TYPE_PARAMETER_VARIANCE_POSITION
+  //             ^
+  // [cfe] Can't use 'out' type variable 'T' in an 'in' position.
+
+  void method2(Cov<T> x) {}
+  //           ^^^^^^^^
+  // [analyzer] COMPILE_TIME_ERROR.WRONG_TYPE_PARAMETER_VARIANCE_POSITION
+  //                  ^
+  // [cfe] Can't use 'out' type variable 'T' in an 'in' position.
+
+  Contra<T> method3() => (T val) {};
+//^^^^^^^^^
+// [analyzer] COMPILE_TIME_ERROR.WRONG_TYPE_PARAMETER_VARIANCE_POSITION
+//                 ^
+// [cfe] Can't use 'out' type variable 'T' in an 'in' position in the return type.
+
+  void method4(Cov<Cov<T>> x) {}
+  //           ^^^^^^^^^^^^^
+  // [analyzer] COMPILE_TIME_ERROR.WRONG_TYPE_PARAMETER_VARIANCE_POSITION
+  //                       ^
+  // [cfe] Can't use 'out' type variable 'T' in an 'in' position.
+
+  Contra<Cov<T>> method5() => (Cov<T> method) {};
+//^^^^^^^^^^^^^^
+// [analyzer] COMPILE_TIME_ERROR.WRONG_TYPE_PARAMETER_VARIANCE_POSITION
+//                      ^
+// [cfe] Can't use 'out' type variable 'T' in an 'in' position in the return type.
+
+  Cov<Contra<T>> method6() {
+//^^^^^^^^^^^^^^
+// [analyzer] COMPILE_TIME_ERROR.WRONG_TYPE_PARAMETER_VARIANCE_POSITION
+//                      ^
+// [cfe] Can't use 'out' type variable 'T' in an 'in' position in the return type.
+    return () {
+      return (T x) {};
+    };
+  }
+
+  void method7(Contra<Contra<T>> x) {}
+  //           ^^^^^^^^^^^^^^^^^^^
+  // [analyzer] COMPILE_TIME_ERROR.WRONG_TYPE_PARAMETER_VARIANCE_POSITION
+  //                             ^
+  // [cfe] Can't use 'out' type variable 'T' in an 'in' position.
+
+  Inv<T> method8() => throw "uncalled";
+//^^^^^^
+// [analyzer] COMPILE_TIME_ERROR.WRONG_TYPE_PARAMETER_VARIANCE_POSITION
+//              ^
+// [cfe] Can't use 'out' type variable 'T' in an 'inout' position in the return type.
+
+  void method9(Inv<T> x) {}
+  //           ^^^^^^^^
+  // [analyzer] COMPILE_TIME_ERROR.WRONG_TYPE_PARAMETER_VARIANCE_POSITION
+  //                  ^
+  // [cfe] Can't use 'out' type variable 'T' in an 'inout' position.
+
+  Contravariant<T> method10() => throw "uncalled";
+//^^^^^^^^^^^^^^^^
+// [analyzer] COMPILE_TIME_ERROR.WRONG_TYPE_PARAMETER_VARIANCE_POSITION
+//                         ^
+// [cfe] Can't use 'out' type variable 'T' in an 'in' position in the return type.
+
+  void method11(Covariant<T> x) {}
+  //            ^^^^^^^^^^^^^^
+  // [analyzer] COMPILE_TIME_ERROR.WRONG_TYPE_PARAMETER_VARIANCE_POSITION
+  //                         ^
+  // [cfe] Can't use 'out' type variable 'T' in an 'in' position.
+
+  Invariant<T> method12() => throw "uncalled";
+//^^^^^^^^^^^^
+// [analyzer] COMPILE_TIME_ERROR.WRONG_TYPE_PARAMETER_VARIANCE_POSITION
+//                     ^
+// [cfe] Can't use 'out' type variable 'T' in an 'inout' position in the return type.
+
+  void method13(Invariant<T> x) {}
+  //            ^^^^^^^^^^^^^^
+  // [analyzer] COMPILE_TIME_ERROR.WRONG_TYPE_PARAMETER_VARIANCE_POSITION
+  //                         ^
+  // [cfe] Can't use 'out' type variable 'T' in an 'inout' position.
+
+  void method14(Covariant<Covariant<T>> x) {}
+  //            ^^^^^^^^^^^^^^^^^^^^^^^^^
+  // [analyzer] COMPILE_TIME_ERROR.WRONG_TYPE_PARAMETER_VARIANCE_POSITION
+  //                                    ^
+  // [cfe] Can't use 'out' type variable 'T' in an 'in' position.
+
+  void method15(Contravariant<Contravariant<T>> x) {}
+  //            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+  // [analyzer] COMPILE_TIME_ERROR.WRONG_TYPE_PARAMETER_VARIANCE_POSITION
+  //                                            ^
+  // [cfe] Can't use 'out' type variable 'T' in an 'in' position.
+
+  Contravariant<Covariant<T>> method16() => Contravariant<Covariant<T>>();
+//^^^^^^^^^^^^^^^^^^^^^^^^^^^
+// [analyzer] COMPILE_TIME_ERROR.WRONG_TYPE_PARAMETER_VARIANCE_POSITION
+//                                    ^
+// [cfe] Can't use 'out' type variable 'T' in an 'in' position in the return type.
+
+  Covariant<Contravariant<T>> method17() => Covariant<Contravariant<T>>();
+//^^^^^^^^^^^^^^^^^^^^^^^^^^^
+// [analyzer] COMPILE_TIME_ERROR.WRONG_TYPE_PARAMETER_VARIANCE_POSITION
+//                                    ^
+// [cfe] Can't use 'out' type variable 'T' in an 'in' position in the return type.
+
+  void method18<X extends Contra<T>>() {}
+  //            ^^^^^^^^^^^^^^^^^^^
+  // [analyzer] COMPILE_TIME_ERROR.WRONG_TYPE_PARAMETER_VARIANCE_POSITION
+  // [cfe] Can't use 'out' type variable 'T' in an 'inout' position.
+
+  void method19<X extends Contravariant<T>>() {}
+  //            ^^^^^^^^^^^^^^^^^^^^^^^^^^
+  // [analyzer] COMPILE_TIME_ERROR.WRONG_TYPE_PARAMETER_VARIANCE_POSITION
+  // [cfe] Can't use 'out' type variable 'T' in an 'inout' position.
+
+  void method20({required T x}) {}
+  //             ^^^^^^^^^^^^
+  // [analyzer] COMPILE_TIME_ERROR.WRONG_TYPE_PARAMETER_VARIANCE_POSITION
+  //                        ^
+  // [cfe] Can't use 'out' type variable 'T' in an 'in' position.
+
+  void method21({required Cov<T> x}) {}
+  //             ^^^^^^^^^^^^^^^^^
+  // [analyzer] COMPILE_TIME_ERROR.WRONG_TYPE_PARAMETER_VARIANCE_POSITION
+  //                             ^
+  // [cfe] Can't use 'out' type variable 'T' in an 'in' position.
+
+  void method22({required Covariant<T> x}) {}
+  //             ^^^^^^^^^^^^^^^^^^^^^^^
+  // [analyzer] COMPILE_TIME_ERROR.WRONG_TYPE_PARAMETER_VARIANCE_POSITION
+  //                                   ^
+  // [cfe] Can't use 'out' type variable 'T' in an 'in' position.
+
+  void method23({required Covariant<T> x, required Contravariant<T> y}) {}
+  //             ^^^^^^^^^^^^^^^^^^^^^^^
+  // [analyzer] COMPILE_TIME_ERROR.WRONG_TYPE_PARAMETER_VARIANCE_POSITION
+  //                                   ^
+  // [cfe] Can't use 'out' type variable 'T' in an 'in' position.
+
+  void method24<X extends T>() {}
+  //            ^^^^^^^^^^^
+  // [analyzer] COMPILE_TIME_ERROR.WRONG_TYPE_PARAMETER_VARIANCE_POSITION
+  // [cfe] Can't use 'out' type variable 'T' in an 'inout' position.
+
+  void method25<X extends Contra<T>>() {}
+  //            ^^^^^^^^^^^^^^^^^^^
+  // [analyzer] COMPILE_TIME_ERROR.WRONG_TYPE_PARAMETER_VARIANCE_POSITION
+  // [cfe] Can't use 'out' type variable 'T' in an 'inout' position.
+
+  void method26<X extends Contravariant<T>>() {}
+  //            ^^^^^^^^^^^^^^^^^^^^^^^^^^
+  // [analyzer] COMPILE_TIME_ERROR.WRONG_TYPE_PARAMETER_VARIANCE_POSITION
+  // [cfe] Can't use 'out' type variable 'T' in an 'inout' position.
+}
+
+class B<out T> {
+  void method1(Cov<A<T>> x) {}
+  //           ^^^^^^^^^^^
+  // [analyzer] COMPILE_TIME_ERROR.WRONG_TYPE_PARAMETER_VARIANCE_POSITION
+  //                     ^
+  // [cfe] Can't use 'out' type variable 'T' in an 'in' position.
+  Contra<A<T>> method2() {
+//^^^^^^^^^^^^
+// [analyzer] COMPILE_TIME_ERROR.WRONG_TYPE_PARAMETER_VARIANCE_POSITION
+//                    ^
+// [cfe] Can't use 'out' type variable 'T' in an 'in' position in the return type.
+    throw "uncalled";
+  }
+}
+
+class C<T> {
+  void method(T x) {}
+}
+
+class D<out T> extends C<T> {
+  @override
+  void method(T x) {}
+  //          ^^^
+  // [analyzer] COMPILE_TIME_ERROR.WRONG_TYPE_PARAMETER_VARIANCE_POSITION
+  //            ^
+  // [cfe] Can't use 'out' type variable 'T' in an 'in' position.
+}
diff --git a/tests/language/variance/variance_out_method_test.dart b/tests/language/variance/variance_out_method_test.dart
new file mode 100644
index 0000000..6d3a9a5
--- /dev/null
+++ b/tests/language/variance/variance_out_method_test.dart
@@ -0,0 +1,231 @@
+// 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.
+
+// Tests method signatures and return types for the `out` variance modifier.
+
+// SharedOptions=--enable-experiment=variance
+
+import "package:expect/expect.dart";
+
+typedef Cov<T> = T Function();
+typedef Contra<T> = void Function(T);
+
+Cov<int> covFunction = () => 2;
+Contra<int> contraFunction = (int val) {};
+
+class Covariant<out T> {}
+class Contravariant<in T> {}
+
+class A<out T> {
+  T? method1() => null;
+  void method2(Contra<T> x) {}
+  Cov<T?> method3() {
+    return () => null;
+  }
+
+  void method4(Contra<Cov<T>> x) {}
+  void method5(Cov<Contra<T>> x) {}
+  Contra<Contra<T>> method6() {
+    return (Contra<T> x) {
+      Expect.type<Contra<T>>(x);
+    };
+  }
+
+  Cov<Cov<T?>> method7() {
+    return () {
+      return () => null;
+    };
+  }
+
+  void method8(Contravariant<T> x) {}
+  Covariant<T>? method9() => null;
+  void method10(Contravariant<Covariant<T>> x) {}
+  Covariant<Covariant<T>>? method11() => null;
+  void method12(Covariant<Contravariant<T>> x) {}
+  Contravariant<Contravariant<T>>? method13() => null;
+
+  void method14(covariant T x) {}
+  void method15(covariant Contra<T> x) {}
+  void method16(covariant Cov<T> x) {}
+  void method17(covariant Contravariant<T> x) {}
+  void method18(covariant Covariant<T> x) {}
+
+  void method19({Contravariant<T>? x}) {}
+  void method20({Contra<T>? x}) {}
+}
+
+mixin BMixin<out T> {
+  T? method1() => null;
+  void method2(Contra<T> x) {}
+  Cov<T?> method3() {
+    return () => null;
+  }
+
+  void method4(Contra<Cov<T>> x) {}
+  void method5(Cov<Contra<T>> x) {}
+  Contra<Contra<T>> method6() {
+    return (Contra<T> x) {
+      Expect.type<Contra<T>>(x);
+    };
+  }
+
+  Cov<Cov<T?>> method7() {
+    return () {
+      return () => null;
+    };
+  }
+
+  void method8(Contravariant<T> x) {}
+  Covariant<T>? method9() => null;
+  void method10(Contravariant<Covariant<T>> x) {}
+  Covariant<Covariant<T>>? method11() => null;
+  void method12(Covariant<Contravariant<T>> x) {}
+  Contravariant<Contravariant<T>>? method13() => null;
+
+  void method14(covariant T x) {}
+  void method15(covariant Contra<T> x) {}
+  void method16(covariant Cov<T> x) {}
+  void method17(covariant Contravariant<T> x) {}
+  void method18(covariant Covariant<T> x) {}
+
+  void method19({Contravariant<T>? x}) {}
+  void method20({Contra<T>? x}) {}
+}
+
+class B with BMixin<int> {}
+
+class C<out T> {
+  void method1(Contra<A<T>> x) {}
+  A<T> method2() {
+    return A<T>();
+  }
+}
+
+class D<T> {
+  T? method() => null;
+  void method2(T x) {}
+  void method3(covariant T x) {}
+}
+
+class E<out T> extends D<T> {
+  @override
+  T? method() => null;
+
+  @override
+  void method3(covariant T x) {}
+}
+
+void testClass() {
+  A<int> a = new A();
+
+  Expect.isNull(a.method1());
+
+  a.method2(contraFunction);
+
+  Expect.type<Cov<int?>>(a.method3());
+  Cov<int?> method3Function = a.method3();
+  Expect.isNull(method3Function());
+
+  a.method4((Cov<int> x) {});
+
+  a.method5(() {
+    return contraFunction;
+  });
+
+  Expect.type<Contra<Contra<int>>>(a.method6());
+  Contra<Contra<int>> method6Function = a.method6();
+  method6Function(contraFunction);
+
+  Expect.type<Cov<Cov<int?>>>(a.method7());
+  Cov<Cov<int?>> method7Function = a.method7();
+  Expect.type<Cov<int?>>(method7Function());
+  Cov<int?> method7NestedFunction = method7Function();
+  Expect.isNull(method7NestedFunction());
+
+  a.method8(Contravariant<int>());
+  Expect.isNull(a.method9());
+  a.method10(Contravariant<Covariant<int>>());
+  Expect.isNull(a.method11());
+  a.method12(Covariant<Contravariant<int>>());
+  Expect.isNull(a.method13());
+
+  a.method14(3);
+  a.method15(contraFunction);
+  a.method16(covFunction);
+  a.method17(Contravariant<int>());
+  a.method18(Covariant<int>());
+
+  a.method19();
+  a.method20();
+}
+
+void testMixin() {
+  B b = new B();
+
+  Expect.isNull(b.method1());
+
+  b.method2(contraFunction);
+
+  Expect.type<Cov<int?>>(b.method3());
+  Cov<int?> method3Function = b.method3();
+  Expect.isNull(method3Function());
+
+  b.method4((Cov<int> x) {});
+
+  b.method5(() {
+    return contraFunction;
+  });
+
+  Expect.type<Contra<Contra<int>>>(b.method6());
+  Contra<Contra<int>> method6Function = b.method6();
+  method6Function(contraFunction);
+
+  Expect.type<Cov<Cov<int?>>>(b.method7());
+  Cov<Cov<int?>> method7Function = b.method7();
+  Expect.type<Cov<int?>>(method7Function());
+  Cov<int?> method7NestedFunction = method7Function();
+  Expect.isNull(method7NestedFunction());
+
+  b.method8(Contravariant<int>());
+  Expect.isNull(b.method9());
+  b.method10(Contravariant<Covariant<int>>());
+  Expect.isNull(b.method11());
+  b.method12(Covariant<Contravariant<int>>());
+  Expect.isNull(b.method13());
+
+  b.method14(3);
+  b.method15(contraFunction);
+  b.method16(covFunction);
+  b.method17(Contravariant<int>());
+  b.method18(Covariant<int>());
+
+  b.method19();
+  b.method20();
+}
+
+void testClassInMethods() {
+  C<int> c = new C();
+
+  c.method1((A<int> x) {});
+
+  Expect.type<A<int>>(c.method2());
+}
+
+void testOverrideLegacyMethods() {
+  E<int> e = new E();
+  Expect.isNull(e.method());
+  e.method2(3);
+  e.method3(3);
+
+  D<Object> d = e;
+  Expect.throws(() => d.method2("test"));
+  Expect.throws(() => d.method3("test"));
+}
+
+main() {
+  testClass();
+  testMixin();
+  testClassInMethods();
+  testOverrideLegacyMethods();
+}
diff --git a/tests/language/variance/variance_out_subclass_error_test.dart b/tests/language/variance/variance_out_subclass_error_test.dart
new file mode 100644
index 0000000..046395c
--- /dev/null
+++ b/tests/language/variance/variance_out_subclass_error_test.dart
@@ -0,0 +1,124 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// Tests erroneous subclass usage for the `out` variance modifier.
+
+// SharedOptions=--enable-experiment=variance
+
+typedef CovFunction<T> = T Function();
+typedef ContraFunction<T> = void Function(T);
+typedef InvFunction<T> = T Function(T);
+
+class Covariant<out T> {}
+class Contravariant<in T> {}
+class Invariant<inout T> {}
+mixin MCovariant<out T> {}
+mixin MContravariant<in T> {}
+mixin MInvariant<in T> {}
+
+class A<out T> extends Contravariant<T> {}
+//    ^
+// [cfe] Can't use 'out' type variable 'T' in an 'in' position in supertype 'Contravariant'.
+//          ^
+// [analyzer] COMPILE_TIME_ERROR.WRONG_EXPLICIT_TYPE_PARAMETER_VARIANCE_IN_SUPERINTERFACE
+
+class B<out T> implements Contravariant<T> {}
+//    ^
+// [cfe] Can't use 'out' type variable 'T' in an 'in' position in supertype 'Contravariant'.
+//          ^
+// [analyzer] COMPILE_TIME_ERROR.WRONG_EXPLICIT_TYPE_PARAMETER_VARIANCE_IN_SUPERINTERFACE
+
+class C<out T> with MContravariant<T> {}
+//    ^
+// [cfe] Can't use 'out' type variable 'T' in an 'in' position in supertype 'MContravariant'.
+//          ^
+// [analyzer] COMPILE_TIME_ERROR.WRONG_EXPLICIT_TYPE_PARAMETER_VARIANCE_IN_SUPERINTERFACE
+
+class D<out T> extends Invariant<T> {}
+//    ^
+// [cfe] Can't use 'out' type variable 'T' in an 'inout' position in supertype 'Invariant'.
+//          ^
+// [analyzer] COMPILE_TIME_ERROR.WRONG_EXPLICIT_TYPE_PARAMETER_VARIANCE_IN_SUPERINTERFACE
+
+class E<out T> implements Invariant<T> {}
+//    ^
+// [cfe] Can't use 'out' type variable 'T' in an 'inout' position in supertype 'Invariant'.
+//          ^
+// [analyzer] COMPILE_TIME_ERROR.WRONG_EXPLICIT_TYPE_PARAMETER_VARIANCE_IN_SUPERINTERFACE
+
+class F<out T> with MInvariant<T> {}
+//    ^
+// [cfe] Can't use 'out' type variable 'T' in an 'in' position in supertype 'MInvariant'.
+//          ^
+// [analyzer] COMPILE_TIME_ERROR.WRONG_EXPLICIT_TYPE_PARAMETER_VARIANCE_IN_SUPERINTERFACE
+
+class G<out T> extends Covariant<Contravariant<T>> {}
+//    ^
+// [cfe] Can't use 'out' type variable 'T' in an 'in' position in supertype 'Covariant'.
+//          ^
+// [analyzer] COMPILE_TIME_ERROR.WRONG_EXPLICIT_TYPE_PARAMETER_VARIANCE_IN_SUPERINTERFACE
+
+class H<out T> extends Contravariant<Covariant<T>> {}
+//    ^
+// [cfe] Can't use 'out' type variable 'T' in an 'in' position in supertype 'Contravariant'.
+//          ^
+// [analyzer] COMPILE_TIME_ERROR.WRONG_EXPLICIT_TYPE_PARAMETER_VARIANCE_IN_SUPERINTERFACE
+
+class I<out T> extends Covariant<ContraFunction<T>> {}
+//    ^
+// [cfe] Can't use 'out' type variable 'T' in an 'in' position in supertype 'Covariant'.
+//          ^
+// [analyzer] COMPILE_TIME_ERROR.WRONG_EXPLICIT_TYPE_PARAMETER_VARIANCE_IN_SUPERINTERFACE
+
+class J<out T> extends Covariant<ContraFunction<CovFunction<T>>> {}
+//    ^
+// [cfe] Can't use 'out' type variable 'T' in an 'in' position in supertype 'Covariant'.
+//          ^
+// [analyzer] COMPILE_TIME_ERROR.WRONG_EXPLICIT_TYPE_PARAMETER_VARIANCE_IN_SUPERINTERFACE
+
+class K<out T> extends Covariant<CovFunction<ContraFunction<T>>> {}
+//    ^
+// [cfe] Can't use 'out' type variable 'T' in an 'in' position in supertype 'Covariant'.
+//          ^
+// [analyzer] COMPILE_TIME_ERROR.WRONG_EXPLICIT_TYPE_PARAMETER_VARIANCE_IN_SUPERINTERFACE
+
+class L<out T> extends Covariant<ContraFunction<Covariant<T>>> {}
+//    ^
+// [cfe] Can't use 'out' type variable 'T' in an 'in' position in supertype 'Covariant'.
+//          ^
+// [analyzer] COMPILE_TIME_ERROR.WRONG_EXPLICIT_TYPE_PARAMETER_VARIANCE_IN_SUPERINTERFACE
+
+class M<out T> extends Contravariant<Contravariant<Contravariant<T>>> {}
+//    ^
+// [cfe] Can't use 'out' type variable 'T' in an 'in' position in supertype 'Contravariant'.
+//          ^
+// [analyzer] COMPILE_TIME_ERROR.WRONG_EXPLICIT_TYPE_PARAMETER_VARIANCE_IN_SUPERINTERFACE
+
+class N<out T> extends Covariant<InvFunction<T>> {}
+//    ^
+// [cfe] Can't use 'out' type variable 'T' in an 'inout' position in supertype 'Covariant'.
+//          ^
+// [analyzer] COMPILE_TIME_ERROR.WRONG_EXPLICIT_TYPE_PARAMETER_VARIANCE_IN_SUPERINTERFACE
+
+class O<out T> = Covariant<T> with MContravariant<T>;
+//    ^
+// [cfe] Can't use 'out' type variable 'T' in an 'in' position in supertype 'MContravariant'.
+//          ^
+// [analyzer] COMPILE_TIME_ERROR.WRONG_EXPLICIT_TYPE_PARAMETER_VARIANCE_IN_SUPERINTERFACE
+
+class P<out T> = Contravariant<T> with MCovariant<T>;
+//    ^
+// [cfe] Can't use 'out' type variable 'T' in an 'in' position in supertype 'Contravariant'.
+//          ^
+// [analyzer] COMPILE_TIME_ERROR.WRONG_EXPLICIT_TYPE_PARAMETER_VARIANCE_IN_SUPERINTERFACE
+
+class Q<out T> = Invariant<T> with MInvariant<T>;
+//    ^
+// [cfe] Can't use 'out' type variable 'T' in an 'in' position in supertype 'MInvariant'.
+//    ^
+// [cfe] Can't use 'out' type variable 'T' in an 'inout' position in supertype 'Invariant'.
+//          ^
+// [analyzer] COMPILE_TIME_ERROR.WRONG_EXPLICIT_TYPE_PARAMETER_VARIANCE_IN_SUPERINTERFACE
+//          ^
+// [analyzer] COMPILE_TIME_ERROR.WRONG_EXPLICIT_TYPE_PARAMETER_VARIANCE_IN_SUPERINTERFACE
diff --git a/tests/language/variance/variance_out_subclass_test.dart b/tests/language/variance/variance_out_subclass_test.dart
new file mode 100644
index 0000000..0c8861d
--- /dev/null
+++ b/tests/language/variance/variance_out_subclass_test.dart
@@ -0,0 +1,58 @@
+// 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.
+
+// Tests subclass usage for the `out` variance modifier.
+
+// SharedOptions=--enable-experiment=variance
+
+typedef CovFunction<T> = T Function();
+typedef ContraFunction<T> = void Function(T);
+
+class LegacyCovariant<T> {}
+class Covariant<out T> {}
+class Contravariant<in T> {}
+mixin MLegacyCovariant<T> {}
+mixin MCovariant<out T> {}
+
+class A<out T> extends LegacyCovariant<T> {}
+class B<out T> implements LegacyCovariant<T> {}
+class C<out T> with MLegacyCovariant<T> {}
+
+class D<out T> extends Covariant<T> {}
+class E<out T> implements Covariant<T> {}
+class F<out T> with MCovariant<T> {}
+
+class G<out T> extends Covariant<Covariant<T>> {}
+class H<out T> extends Contravariant<Contravariant<T>> {}
+
+class I<out T> extends Covariant<CovFunction<T>> {}
+class J<out T> extends Covariant<ContraFunction<ContraFunction<T>>> {}
+class K<out T> extends Contravariant<CovFunction<Contravariant<T>>> {}
+
+class L<out T> extends Covariant<CovFunction<Covariant<T>>> {}
+
+class M<out T> extends Covariant<Covariant<Covariant<T>>> {}
+
+class N<out T> = Covariant<T> with MCovariant<T>;
+class O<out T> = Contravariant<Contravariant<T>> with MCovariant<T>;
+class P<out T> = Covariant<T> with MCovariant<Covariant<T>>;
+
+main() {
+  A<num> a = A();
+  B<num> b = B();
+  C<num> c = C();
+  D<num> d = D();
+  E<num> e = E();
+  F<num> f = F();
+  G<num> g = G();
+  H<num> h = H();
+  I<num> i = I();
+  J<num> j = J();
+  K<num> k = K();
+  L<num> l = L();
+  M<num> m = M();
+  N<num> n = N();
+  O<num> o = O();
+  P<num> p = P();
+}
diff --git a/tests/language/variance/variance_out_subtyping_error_test.dart b/tests/language/variance/variance_out_subtyping_error_test.dart
new file mode 100644
index 0000000..a85f4cb
--- /dev/null
+++ b/tests/language/variance/variance_out_subtyping_error_test.dart
@@ -0,0 +1,80 @@
+// 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.
+
+// Tests erroneous subtyping for the `out` variance modifier.
+
+// SharedOptions=--enable-experiment=variance
+
+class Covariant<out T> {}
+
+class Upper {}
+class Middle extends Upper {}
+class Lower {}
+
+class A {
+  Covariant<Middle> method1() {
+    return Covariant<Middle>();
+  }
+
+  void method2(Covariant<Middle> x) {}
+}
+
+class B extends A {
+  @override
+  Covariant<Upper> method1() {
+  //               ^^^^^^^
+  // [analyzer] COMPILE_TIME_ERROR.INVALID_OVERRIDE
+  // [cfe] The return type of the method 'B.method1' is 'Covariant<Upper>', which does not match the return type, 'Covariant<Middle>', of the overridden method, 'A.method1'.
+    return new Covariant<Upper>();
+  }
+
+  @override
+  void method2(Covariant<Lower> x) {}
+  //   ^^^^^^^
+  // [analyzer] COMPILE_TIME_ERROR.INVALID_OVERRIDE
+  //                            ^
+  // [cfe] The parameter 'x' of the method 'B.method2' has type 'Covariant<Lower>', which does not match the corresponding type, 'Covariant<Middle>', in the overridden method, 'A.method2'.
+}
+
+class C<out T extends Covariant<Middle>> {}
+
+class D {
+  C<Covariant<Upper>> method1() {
+  //^^^^^^^^^^^^^^^^
+  // [analyzer] COMPILE_TIME_ERROR.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS
+  //                         ^
+  // [cfe] Type argument 'Covariant<Upper>' doesn't conform to the bound 'Covariant<Middle>' of the type variable 'T' on 'C' in the return type.
+    return C<Covariant<Upper>>();
+    //     ^
+    // [cfe] Type argument 'Covariant<Upper>' doesn't conform to the bound 'Covariant<Middle>' of the type variable 'T' on 'C'.
+    //       ^^^^^^^^^^^^^^^^
+    // [analyzer] COMPILE_TIME_ERROR.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS
+  }
+}
+
+void testCall(Iterable<Covariant<Lower>> x) {}
+
+main() {
+  C<Covariant<Upper>> c = new C<Covariant<Upper>>();
+  //^^^^^^^^^^^^^^^^
+  // [analyzer] COMPILE_TIME_ERROR.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS
+  //                  ^
+  // [cfe] Type argument 'Covariant<Upper>' doesn't conform to the bound 'Covariant<Middle>' of the type variable 'T' on 'C'.
+  //                          ^
+  // [cfe] Type argument 'Covariant<Upper>' doesn't conform to the bound 'Covariant<Middle>' of the type variable 'T' on 'C'.
+  //                            ^^^^^^^^^^^^^^^^
+  // [analyzer] COMPILE_TIME_ERROR.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS
+
+  Iterable<Covariant<Lower>> iterableLower = [new Covariant<Lower>()];
+  List<Covariant<Middle>> listMiddle = [new Covariant<Middle>()];
+  iterableLower = listMiddle;
+  //              ^^^^^^^^^^
+  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  // [cfe] A value of type 'List<Covariant<Middle>>' can't be assigned to a variable of type 'Iterable<Covariant<Lower>>'.
+
+  testCall(listMiddle);
+  //       ^^^^^^^^^^
+  // [analyzer] STATIC_WARNING.ARGUMENT_TYPE_NOT_ASSIGNABLE
+  // [cfe] The argument type 'List<Covariant<Middle>>' can't be assigned to the parameter type 'Iterable<Covariant<Lower>>'.
+}
diff --git a/tests/language/variance/variance_out_subtyping_test.dart b/tests/language/variance/variance_out_subtyping_test.dart
new file mode 100644
index 0000000..00f5ed3
--- /dev/null
+++ b/tests/language/variance/variance_out_subtyping_test.dart
@@ -0,0 +1,102 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// Tests subtyping for the `out` variance modifier.
+
+// SharedOptions=--enable-experiment=variance
+
+import "package:expect/expect.dart";
+
+class Covariant<out T> {}
+
+class Upper {}
+class Middle extends Upper {}
+class Lower extends Middle {}
+
+class A {
+  Covariant<Middle> method1() {
+    return new Covariant<Middle>();
+  }
+
+  void method2(Covariant<Middle> x) {}
+}
+
+class B extends A {
+  @override
+  Covariant<Lower> method1() {
+    return new Covariant<Lower>();
+  }
+
+  @override
+  void method2(Covariant<Upper> x) {}
+}
+
+class C extends A {
+  @override
+  Covariant<Middle> method1() {
+    return new Covariant<Middle>();
+  }
+
+  @override
+  void method2(Covariant<Middle> x) {}
+}
+
+class D<out T extends Covariant<Middle>> {}
+
+class E {
+  D<Covariant<Lower>> method1() {
+    return D<Covariant<Lower>>();
+  }
+}
+
+class F {
+  D<Covariant<Middle>> method1() {
+    return D<Covariant<Middle>>();
+  }
+}
+
+void testCall(Iterable<Covariant<Middle>> x) {}
+
+main() {
+  A a = new A();
+  Expect.type<Covariant<Middle>>(a.method1());
+  Expect.type<Covariant<Upper>>(a.method1());
+  Expect.notType<Covariant<Lower>>(a.method1());
+  a.method2(new Covariant<Middle>());
+  a.method2(new Covariant<Lower>());
+
+  B b = new B();
+  Expect.type<Covariant<Upper>>(b.method1());
+  Expect.type<Covariant<Middle>>(b.method1());
+  Expect.type<Covariant<Lower>>(b.method1());
+  b.method2(new Covariant<Upper>());
+  b.method2(new Covariant<Middle>());
+
+  C c = new C();
+  Expect.type<Covariant<Middle>>(c.method1());
+  Expect.type<Covariant<Upper>>(c.method1());
+  Expect.notType<Covariant<Lower>>(c.method1());
+  c.method2(new Covariant<Middle>());
+  c.method2(new Covariant<Lower>());
+
+  D<Covariant<Lower>> dLower = new D<Covariant<Lower>>();
+  D<Covariant<Middle>> dMiddle = new D<Covariant<Middle>>();
+
+  E e = new E();
+  Expect.type<D<Covariant<Lower>>>(e.method1());
+  Expect.type<D<Covariant<Middle>>>(e.method1());
+
+  F f = new F();
+  Expect.type<D<Covariant<Middle>>>(f.method1());
+
+  Iterable<Covariant<Middle>> iterableMiddle = [new Covariant<Middle>()];
+  List<Covariant<Lower>> listLower = [new Covariant<Lower>()];
+  iterableMiddle = listLower;
+
+  testCall(listLower);
+
+  Expect.subtype<Covariant<Lower>, Covariant<Middle>>();
+  Expect.subtype<Covariant<Middle>, Covariant<Middle>>();
+  Expect.notSubtype<Covariant<Upper>, Covariant<Middle>>();
+}
diff --git a/tests/language/variance/variance_unconstrained_inference_test.dart b/tests/language/variance/variance_unconstrained_inference_test.dart
new file mode 100644
index 0000000..fed460b
--- /dev/null
+++ b/tests/language/variance/variance_unconstrained_inference_test.dart
@@ -0,0 +1,26 @@
+// 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.
+
+// Tests unconstrained inferencing with sound variance.
+
+// SharedOptions=--enable-experiment=variance
+
+class Covariant<out T> {}
+class Contravariant<in T> {}
+class Invariant<inout T> {}
+
+void covariantListInfer<T>(Covariant<List<T>> x) {}
+void contravariantListInfer<T>(Contravariant<List<T>> x) {}
+void invariantListInfer<T>(Invariant<List<T>> x) {}
+
+main() {
+  var cov = new Covariant();
+  covariantListInfer(Covariant());
+
+  var contra = new Contravariant();
+  contravariantListInfer(Contravariant());
+
+  var inv = new Invariant();
+  invariantListInfer(Invariant());
+}
diff --git a/tests/language/variance/variance_upper_lower_bounds_error_test.dart b/tests/language/variance/variance_upper_lower_bounds_error_test.dart
new file mode 100644
index 0000000..2c69097
--- /dev/null
+++ b/tests/language/variance/variance_upper_lower_bounds_error_test.dart
@@ -0,0 +1,102 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// Tests erroneous upper and lower bounds computation with respect to
+// variance modifiers.
+
+// SharedOptions=--enable-experiment=variance
+
+class Covariant<out T> {}
+class Contravariant<in T> {}
+class Invariant<inout T> {}
+class LegacyCovariant<T> {}
+
+class Multi<out T, inout U, in V> {}
+
+class Exactly<inout T> {}
+Exactly<T> exactly<T>(T x) => new Exactly<T>();
+
+class Upper {}
+class Middle extends Upper {}
+class Lower extends Middle {}
+
+main() {
+  bool condition = true;
+
+  var contraLowerActual =
+      exactly(condition ? Contravariant<Upper>() : Contravariant<Lower>());
+  Exactly<Contravariant<Upper>> contraUpperExpected = contraLowerActual;
+  //                                                  ^^^^^^^^^^^^^^^^^
+  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  // [cfe] A value of type 'Exactly<Contravariant<Lower>>' can't be assigned to a variable of type 'Exactly<Contravariant<Upper>>'.
+
+  var contraMiddleActual =
+      exactly(condition ? Contravariant<Upper>() : Contravariant<Middle>());
+  contraUpperExpected = contraMiddleActual;
+  //                    ^^^^^^^^^^^^^^^^^^
+  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  // [cfe] A value of type 'Exactly<Contravariant<Middle>>' can't be assigned to a variable of type 'Exactly<Contravariant<Upper>>'.
+
+  var covMiddleActual =
+      exactly(condition ? Covariant<Middle>() : Covariant<Lower>());
+  Exactly<Covariant<Lower>> covLowerExpected = covMiddleActual;
+  //                                           ^^^^^^^^^^^^^^^
+  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  // [cfe] A value of type 'Exactly<Covariant<Middle>>' can't be assigned to a variable of type 'Exactly<Covariant<Lower>>'.
+
+  var covUpperActual =
+      exactly(condition ? Covariant<Upper>() : Covariant<Lower>());
+  covLowerExpected = covUpperActual;
+  //                 ^^^^^^^^^^^^^^
+  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  // [cfe] A value of type 'Exactly<Covariant<Upper>>' can't be assigned to a variable of type 'Exactly<Covariant<Lower>>'.
+
+  var invObjectActual =
+      exactly(condition ? Invariant<Upper>() : Invariant<Middle>());
+  Exactly<Invariant<Middle>> invMiddleExpected = invObjectActual;
+  //                                             ^^^^^^^^^^^^^^^
+  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  // [cfe] A value of type 'Exactly<Object>' can't be assigned to a variable of type 'Exactly<Invariant<Middle>>'.
+  Exactly<Invariant<Upper>> invUpperExpected = invObjectActual;
+  //                                           ^^^^^^^^^^^^^^^
+  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  // [cfe] A value of type 'Exactly<Object>' can't be assigned to a variable of type 'Exactly<Invariant<Upper>>'.
+
+  var legacyCovMiddleActual =
+      exactly(condition ? LegacyCovariant<Middle>() : LegacyCovariant<Lower>());
+  Exactly<LegacyCovariant<Lower>> legacyCovLowerExpected =
+      legacyCovMiddleActual;
+  //  ^^^^^^^^^^^^^^^^^^^^^
+  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  // [cfe] A value of type 'Exactly<LegacyCovariant<Middle>>' can't be assigned to a variable of type 'Exactly<LegacyCovariant<Lower>>'.
+
+  var legacyCovUpperActual =
+      exactly(condition ? LegacyCovariant<Upper>() : LegacyCovariant<Lower>());
+  legacyCovLowerExpected = legacyCovUpperActual;
+  //                       ^^^^^^^^^^^^^^^^^^^^
+  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  // [cfe] A value of type 'Exactly<LegacyCovariant<Upper>>' can't be assigned to a variable of type 'Exactly<LegacyCovariant<Lower>>'.
+
+  var multiActual = exactly(condition
+      ? Multi<Middle, Middle, Middle>()
+      : Multi<Lower, Middle, Lower>());
+  Exactly<Multi<Lower, Middle, Lower>> multiExpected = multiActual;
+  //                                                   ^^^^^^^^^^^
+  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  // [cfe] A value of type 'Exactly<Multi<Middle, Middle, Lower>>' can't be assigned to a variable of type 'Exactly<Multi<Lower, Middle, Lower>>'.
+
+  var multiActual2 = exactly(
+      condition ? Multi<Middle, int, Middle>() : Multi<Lower, Middle, Lower>());
+  Exactly<Multi<Middle, Object, Lower>> multiObjectExpected = multiActual2;
+  //                                                          ^^^^^^^^^^^^
+  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  // [cfe] A value of type 'Exactly<Object>' can't be assigned to a variable of type 'Exactly<Multi<Middle, Object, Lower>>'.
+
+  var multiActual3 = exactly(
+      condition ? Multi<int, Middle, Middle>() : Multi<Lower, Middle, Lower>());
+  Exactly<Object> multiObjectExpected2 = multiActual3;
+  //                                     ^^^^^^^^^^^^
+  // [analyzer] STATIC_TYPE_WARNING.INVALID_ASSIGNMENT
+  // [cfe] A value of type 'Exactly<Multi<Object, Middle, Lower>>' can't be assigned to a variable of type 'Exactly<Object>'.
+}
diff --git a/tests/language/variance/variance_upper_lower_bounds_test.dart b/tests/language/variance/variance_upper_lower_bounds_test.dart
new file mode 100644
index 0000000..ceb9ac8
--- /dev/null
+++ b/tests/language/variance/variance_upper_lower_bounds_test.dart
@@ -0,0 +1,71 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// Tests upper and lower bounds computation with respect to variance modifiers.
+
+// SharedOptions=--enable-experiment=variance
+
+class Covariant<out T> {}
+class Contravariant<in T> {}
+class Invariant<inout T> {}
+class LegacyCovariant<T> {}
+
+class Multi<out T, inout U, in V> {}
+
+class Exactly<inout T> {}
+Exactly<T> exactly<T>(T x) => new Exactly<T>();
+
+class Upper {}
+class Middle extends Upper {}
+class Lower extends Middle {}
+
+main() {
+  bool condition = true;
+
+  var contraLowerActual =
+      exactly(condition ? Contravariant<Upper>() : Contravariant<Lower>());
+  Exactly<Contravariant<Lower>> contraLowerExpected = contraLowerActual;
+
+  var contraMiddleActual =
+      exactly(condition ? Contravariant<Upper>() : Contravariant<Middle>());
+  Exactly<Contravariant<Middle>> contraMiddleExpected = contraMiddleActual;
+
+  var covMiddleActual =
+      exactly(condition ? Covariant<Middle>() : Covariant<Lower>());
+  Exactly<Covariant<Middle>> covMiddleExpected = covMiddleActual;
+
+  var covUpperActual =
+      exactly(condition ? Covariant<Upper>() : Covariant<Lower>());
+  Exactly<Covariant<Upper>> covUpperExpected = covUpperActual;
+
+  var invMiddleActual =
+      exactly(condition ? Invariant<Middle>() : Invariant<Middle>());
+  Exactly<Invariant<Middle>> invMiddleExpected = invMiddleActual;
+
+  var invObjectActual =
+      exactly(condition ? Invariant<Upper>() : Invariant<Middle>());
+  Exactly<Object> invObjectExpected = invObjectActual;
+
+  var legacyCovMiddleActual =
+      exactly(condition ? LegacyCovariant<Middle>() : LegacyCovariant<Lower>());
+  Exactly<LegacyCovariant<Middle>> legacyCovMiddleExpected =
+      legacyCovMiddleActual;
+
+  var legacyCovUpperActual =
+      exactly(condition ? LegacyCovariant<Upper>() : LegacyCovariant<Lower>());
+  Exactly<LegacyCovariant<Upper>> legacyCovUpperExpected = legacyCovUpperActual;
+
+  var multiActual = exactly(condition
+      ? Multi<Middle, Middle, Middle>()
+      : Multi<Lower, Middle, Lower>());
+  Exactly<Multi<Middle, Middle, Lower>> multiExpected = multiActual;
+
+  var multiActual2 = exactly(
+      condition ? Multi<Middle, int, Middle>() : Multi<Lower, Middle, Lower>());
+  Exactly<Object> multiObjectExpected = multiActual2;
+
+  var multiActual3 = exactly(
+      condition ? Multi<int, Middle, Middle>() : Multi<Lower, Middle, Lower>());
+  Exactly<Multi<Object, Middle, Lower>> multiObjectExpected2 = multiActual3;
+}
diff --git a/tests/language/vm/no_such_args_error_message_vm_test.dart b/tests/language/vm/no_such_args_error_message_vm_test.dart
index 3402472..d3ca510 100644
--- a/tests/language/vm/no_such_args_error_message_vm_test.dart
+++ b/tests/language/vm/no_such_args_error_message_vm_test.dart
@@ -2,6 +2,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 // VMOptions=--optimization-counter-threshold=10 --no-use-osr --no-background-compilation
+// VMOptions=--optimization-counter-threshold=10 --no-use-osr --no-background-compilation --no-lazy-dispatchers
 
 import "package:expect/expect.dart";
 
@@ -14,8 +15,10 @@
   try {
     call_with_bar(() {});
   } catch (e) {
-    Expect.isTrue(e.toString().contains(
-        "Tried calling: testClosureMessage.<anonymous closure>(\"bar\")"));
+    final expectedStrings = [
+      'Tried calling: testClosureMessage.<anonymous closure>("bar")',
+    ];
+    Expect.stringContainsInOrder(e.toString(), expectedStrings);
   }
 }
 
@@ -25,7 +28,10 @@
   try {
     call_with_bar(noargs);
   } catch (e) {
-    Expect.isTrue(e.toString().contains("Tried calling: noargs(\"bar\")"));
+    final expectedStrings = [
+      'Tried calling: noargs("bar")',
+    ];
+    Expect.stringContainsInOrder(e.toString(), expectedStrings);
   }
 }
 
diff --git a/tests/language_2/call/constructor_on_unresolvable_class_test.dart b/tests/language_2/call/constructor_on_unresolvable_class_test.dart
index f3fa482..3b32987 100644
--- a/tests/language_2/call/constructor_on_unresolvable_class_test.dart
+++ b/tests/language_2/call/constructor_on_unresolvable_class_test.dart
@@ -11,14 +11,14 @@
 main() {
   new A();
   //  ^
-  // [analyzer] STATIC_WARNING.NEW_WITH_NON_TYPE
+  // [analyzer] STATIC_WARNING.CREATION_WITH_NON_TYPE
   // [cfe] Method not found: 'A'.
   new A.foo();
   //  ^^^^^
-  // [analyzer] STATIC_WARNING.NEW_WITH_NON_TYPE
+  // [analyzer] STATIC_WARNING.CREATION_WITH_NON_TYPE
   // [cfe] Method not found: 'A.foo'.
   new lib.A();
   //  ^^^^^
-  // [analyzer] STATIC_WARNING.NEW_WITH_NON_TYPE
+  // [analyzer] STATIC_WARNING.CREATION_WITH_NON_TYPE
   // [cfe] Method not found: 'lib.A'.
 }
diff --git a/tests/language_2/class/variable_shadow_class_test.dart b/tests/language_2/class/variable_shadow_class_test.dart
index 35a1fda..5e24390 100644
--- a/tests/language_2/class/variable_shadow_class_test.dart
+++ b/tests/language_2/class/variable_shadow_class_test.dart
@@ -16,7 +16,7 @@
     // Now this refers to the variable.
     var i = new Test.named(10);
     //          ^^^^^^^^^^
-    // [analyzer] STATIC_WARNING.NEW_WITH_NON_TYPE
+    // [analyzer] STATIC_WARNING.CREATION_WITH_NON_TYPE
     //          ^^^^
     // [cfe] Method not found: 'Test.named'.
     Expect.equals(10, i.field);
diff --git a/tests/language_2/closure/with_super_field_test.dart b/tests/language_2/closure/with_super_field_test.dart
index 68cc3be..603c0f6 100644
--- a/tests/language_2/closure/with_super_field_test.dart
+++ b/tests/language_2/closure/with_super_field_test.dart
@@ -3,10 +3,8 @@
 // BSD-style license that can be found in the LICENSE file.
 
 import "package:expect/expect.dart";
-import "package:meta/meta.dart" show virtual;
 
 class A {
-  @virtual
   int a;
   A() : a = 42;
 }
diff --git a/tests/language_2/const/constructor_nonconst_field_test.dart b/tests/language_2/const/constructor_nonconst_field_test.dart
index d2e7030..3533842 100644
--- a/tests/language_2/const/constructor_nonconst_field_test.dart
+++ b/tests/language_2/const/constructor_nonconst_field_test.dart
@@ -10,7 +10,7 @@
   // [cfe] Method invocation is not a constant expression.
   final int j = 1;
   const A();
-//^^^^^^^^^^
+//^^^^^
 // [analyzer] COMPILE_TIME_ERROR.CONST_CONSTRUCTOR_WITH_FIELD_INITIALIZED_BY_NON_CONST
 }
 
diff --git a/tests/language_2/constructor/named_constructor_test.dart b/tests/language_2/constructor/named_constructor_test.dart
index 915f147..12a58b1 100644
--- a/tests/language_2/constructor/named_constructor_test.dart
+++ b/tests/language_2/constructor/named_constructor_test.dart
@@ -36,13 +36,13 @@
   // 'prefix' is not a type:
   new prefix<int>.Class().value;
   //  ^^^^^^
-  // [analyzer] STATIC_WARNING.NEW_WITH_NON_TYPE
+  // [analyzer] STATIC_WARNING.CREATION_WITH_NON_TYPE
   // [cfe] Method not found: 'prefix.Class'.
   new prefix.Class<int>().value;
   // 'prefix<int>.Class<int>' doesn't fit the grammar syntax T.id:
   new prefix<int>.Class<int>().value;
   //  ^^^^^^
-  // [analyzer] STATIC_WARNING.NEW_WITH_NON_TYPE
+  // [analyzer] STATIC_WARNING.CREATION_WITH_NON_TYPE
   // [cfe] Method not found: 'prefix.Class'.
   //              ^^^^^
   // [analyzer] STATIC_TYPE_WARNING.WRONG_NUMBER_OF_TYPE_ARGUMENTS_CONSTRUCTOR
@@ -52,7 +52,7 @@
   // 'prefix<int>.Class.named' doesn't fit the grammar syntax T.id:
   new prefix<int>.Class.named().value;
   //  ^^^^^^
-  // [analyzer] STATIC_WARNING.NEW_WITH_NON_TYPE
+  // [analyzer] STATIC_WARNING.CREATION_WITH_NON_TYPE
   // [cfe] Method not found: 'prefix.Class'.
   //              ^^^^^
   // [analyzer] SYNTACTIC_ERROR.EXPECTED_TOKEN
@@ -70,7 +70,7 @@
   // 'prefix<int>.Class<int>' doesn't fit the grammar syntax T.id:
   new prefix<int>.Class<int>.named().value;
   //  ^^^^^^
-  // [analyzer] STATIC_WARNING.NEW_WITH_NON_TYPE
+  // [analyzer] STATIC_WARNING.CREATION_WITH_NON_TYPE
   // [cfe] Method not found: 'prefix.Class'.
   //              ^^^^^
   // [analyzer] STATIC_TYPE_WARNING.WRONG_NUMBER_OF_TYPE_ARGUMENTS_CONSTRUCTOR
@@ -80,7 +80,7 @@
   // 'prefix<int>.Class.named<int>' doesn't fit the grammar syntax T.id:
   new prefix<int>.Class.named<int>().value;
   //  ^^^^^^
-  // [analyzer] STATIC_WARNING.NEW_WITH_NON_TYPE
+  // [analyzer] STATIC_WARNING.CREATION_WITH_NON_TYPE
   // [cfe] Method not found: 'prefix.Class'.
   //              ^^^^^
   // [analyzer] SYNTACTIC_ERROR.EXPECTED_TOKEN
@@ -96,7 +96,7 @@
   // 'prefix<int>.Class<int>.named<int>' doesn't fit the grammar syntax T.id:
   new prefix<int>.Class<int>.named<int>().value;
   //  ^^^^^^
-  // [analyzer] STATIC_WARNING.NEW_WITH_NON_TYPE
+  // [analyzer] STATIC_WARNING.CREATION_WITH_NON_TYPE
   // [cfe] Method not found: 'prefix.Class'.
   //              ^^^^^
   // [analyzer] STATIC_TYPE_WARNING.WRONG_NUMBER_OF_TYPE_ARGUMENTS_CONSTRUCTOR
diff --git a/tests/language_2/constructor/reference_test.dart b/tests/language_2/constructor/reference_test.dart
index cecfbf3..7aab1ff 100644
--- a/tests/language_2/constructor/reference_test.dart
+++ b/tests/language_2/constructor/reference_test.dart
@@ -13,7 +13,7 @@
   new Foo.bar();
   new Foo.bar.baz();
   //  ^^^^^^^
-  // [analyzer] STATIC_WARNING.NEW_WITH_NON_TYPE
+  // [analyzer] STATIC_WARNING.CREATION_WITH_NON_TYPE
   //          ^
   // [cfe] Method not found: 'Foo.bar.baz'.
   new Foo<int>();
@@ -34,12 +34,12 @@
   //      ^
   // [cfe] A constructor invocation can't have type arguments on the constructor name.
   //  ^^^^^^^
-  // [analyzer] STATIC_WARNING.NEW_WITH_NON_TYPE
+  // [analyzer] STATIC_WARNING.CREATION_WITH_NON_TYPE
   //               ^
   // [cfe] Method not found: 'Foo.bar.baz'.
   new Foo.bar.baz<int>();
   //  ^^^^^^^
-  // [analyzer] STATIC_WARNING.NEW_WITH_NON_TYPE
+  // [analyzer] STATIC_WARNING.CREATION_WITH_NON_TYPE
   //          ^^^
   // [analyzer] STATIC_TYPE_WARNING.WRONG_NUMBER_OF_TYPE_ARGUMENTS_CONSTRUCTOR
   // [cfe] A constructor invocation can't have type arguments on the constructor name.
@@ -50,7 +50,7 @@
   const Foo.bar();
   const Foo.bar.baz();
   //    ^^^^^^^
-  // [analyzer] COMPILE_TIME_ERROR.CONST_WITH_NON_TYPE
+  // [analyzer] COMPILE_TIME_ERROR.CREATION_WITH_NON_TYPE
   //            ^
   // [cfe] Method not found: 'Foo.bar.baz'.
   const Foo<int>();
@@ -71,12 +71,12 @@
   //        ^
   // [cfe] A constructor invocation can't have type arguments on the constructor name.
   //    ^^^^^^^
-  // [analyzer] COMPILE_TIME_ERROR.CONST_WITH_NON_TYPE
+  // [analyzer] COMPILE_TIME_ERROR.CREATION_WITH_NON_TYPE
   //                 ^
   // [cfe] Method not found: 'Foo.bar.baz'.
   const Foo.bar.baz<int>();
   //    ^^^^^^^
-  // [analyzer] COMPILE_TIME_ERROR.CONST_WITH_NON_TYPE
+  // [analyzer] COMPILE_TIME_ERROR.CREATION_WITH_NON_TYPE
   //            ^^^
   // [analyzer] STATIC_TYPE_WARNING.WRONG_NUMBER_OF_TYPE_ARGUMENTS_CONSTRUCTOR
   // [cfe] A constructor invocation can't have type arguments on the constructor name.
@@ -107,7 +107,7 @@
   //  ^
   // [cfe] A constructor invocation can't have type arguments on the constructor name.
 //^^^^^^^
-// [analyzer] STATIC_WARNING.NEW_WITH_NON_TYPE
+// [analyzer] STATIC_WARNING.CREATION_WITH_NON_TYPE
   //           ^
   // [cfe] Method not found: 'Foo.bar.baz'.
   Foo.bar.baz<int>();
diff --git a/tests/language_2/field/override_optimization_test.dart b/tests/language_2/field/override_optimization_test.dart
index 5e2b13a..ebb7656 100644
--- a/tests/language_2/field/override_optimization_test.dart
+++ b/tests/language_2/field/override_optimization_test.dart
@@ -3,12 +3,9 @@
 // BSD-style license that can be found in the LICENSE file.
 
 import "package:expect/expect.dart";
-import "package:meta/meta.dart";
 
 class A {
-  @virtual
   final bool flag = true;
-  @virtual
   final int x = 42;
 }
 
diff --git a/tests/language_2/generic/instantiate_type_variable_test.dart b/tests/language_2/generic/instantiate_type_variable_test.dart
index 72fc68c..7fb503d 100644
--- a/tests/language_2/generic/instantiate_type_variable_test.dart
+++ b/tests/language_2/generic/instantiate_type_variable_test.dart
@@ -11,7 +11,7 @@
     //     ^^^^^^^
     // [analyzer] COMPILE_TIME_ERROR.INVALID_CAST_NEW_EXPR
     //         ^
-    // [analyzer] STATIC_WARNING.NEW_WITH_NON_TYPE
+    // [analyzer] STATIC_WARNING.CREATION_WITH_NON_TYPE
     // [cfe] Method not found: 'T'.
   }
 }
diff --git a/tests/language_2/malformed/malformed_test.dart b/tests/language_2/malformed/malformed_test.dart
index e2ee13a..119001c 100644
--- a/tests/language_2/malformed/malformed_test.dart
+++ b/tests/language_2/malformed/malformed_test.dart
@@ -105,11 +105,11 @@
 
   new undeclared_prefix.Unresolved();
   //  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-  // [analyzer] STATIC_WARNING.NEW_WITH_NON_TYPE
+  // [analyzer] STATIC_WARNING.CREATION_WITH_NON_TYPE
   // [cfe] Method not found: 'undeclared_prefix.Unresolved'.
   new undeclared_prefix.Unresolved<int>();
   //  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-  // [analyzer] STATIC_WARNING.NEW_WITH_NON_TYPE
+  // [analyzer] STATIC_WARNING.CREATION_WITH_NON_TYPE
   // [cfe] Method not found: 'undeclared_prefix.Unresolved'.
 
   try {
diff --git a/tests/language_2/method/not_found_test.dart b/tests/language_2/method/not_found_test.dart
index 1eaea26..4755cba 100644
--- a/tests/language_2/method/not_found_test.dart
+++ b/tests/language_2/method/not_found_test.dart
@@ -13,7 +13,7 @@
   // [analyzer] COMPILE_TIME_ERROR.IMPLICIT_THIS_REFERENCE_IN_INITIALIZER
   // [cfe] Method not found: 'B'.
   //                         ^
-  // [analyzer] COMPILE_TIME_ERROR.CONST_WITH_NON_TYPE
+  // [analyzer] COMPILE_TIME_ERROR.CREATION_WITH_NON_TYPE
   // [cfe] Can't access 'this' in a field initializer to read 'B'.
 }
 
diff --git a/tests/language_2/new/create_unresolved_type_test.dart b/tests/language_2/new/create_unresolved_type_test.dart
index b1ce560..6d215ab 100644
--- a/tests/language_2/new/create_unresolved_type_test.dart
+++ b/tests/language_2/new/create_unresolved_type_test.dart
@@ -5,6 +5,6 @@
 main() {
   new F<int>();
   //  ^
-  // [analyzer] STATIC_WARNING.NEW_WITH_NON_TYPE
+  // [analyzer] STATIC_WARNING.CREATION_WITH_NON_TYPE
   // [cfe] Method not found: 'F'.
 }
diff --git a/tests/language_2/new/expression_type_args_test.dart b/tests/language_2/new/expression_type_args_test.dart
index debf248..b32f0e1 100644
--- a/tests/language_2/new/expression_type_args_test.dart
+++ b/tests/language_2/new/expression_type_args_test.dart
@@ -7,11 +7,11 @@
   // Can't instantiate type parameter (within static or instance method).
   m1() => new T();
   //          ^
-  // [analyzer] STATIC_WARNING.NEW_WITH_NON_TYPE
+  // [analyzer] STATIC_WARNING.CREATION_WITH_NON_TYPE
   // [cfe] Method not found: 'T'.
   static m2() => new T();
   //                 ^
-  // [analyzer] STATIC_WARNING.NEW_WITH_NON_TYPE
+  // [analyzer] STATIC_WARNING.CREATION_WITH_NON_TYPE
   // [cfe] Method not found: 'T'.
   //                 ^
   // [analyzer] STATIC_WARNING.TYPE_PARAMETER_REFERENCED_BY_STATIC
diff --git a/tests/language_2/new/prefix_test.dart b/tests/language_2/new/prefix_test.dart
index 72794c8..bef0d69 100644
--- a/tests/language_2/new/prefix_test.dart
+++ b/tests/language_2/new/prefix_test.dart
@@ -7,6 +7,6 @@
 main() {
   return new prefix();
   //         ^^^^^^
-  // [analyzer] STATIC_WARNING.NEW_WITH_NON_TYPE
+  // [analyzer] STATIC_WARNING.CREATION_WITH_NON_TYPE
   // [cfe] Method not found: 'prefix'.
 }
diff --git a/tests/language_2/nonfunction_type_aliases/infer_aliased_factory_invocation_01_test.dart b/tests/language_2/nonfunction_type_aliases/infer_aliased_factory_invocation_01_test.dart
new file mode 100644
index 0000000..0b59c9b
--- /dev/null
+++ b/tests/language_2/nonfunction_type_aliases/infer_aliased_factory_invocation_01_test.dart
@@ -0,0 +1,24 @@
+// Copyright (c) 2020, the Dart project authors.  Please see the AUTHORS file
+// for 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=nonfunction-type-aliases
+
+import 'package:expect/expect.dart';
+
+class C<X> {
+  factory C(Type t) => D<X>(t);
+}
+
+class D<X> implements C<X> {
+  D(Type t) {
+    Expect.equals(t, X);
+  }
+}
+
+typedef T<X> = C<X>;
+
+void main() {
+  T<num> x1 = T(num);
+  C<num> x2 = T(num);
+}
diff --git a/tests/language_2/nonfunction_type_aliases/infer_aliased_factory_invocation_02_test.dart b/tests/language_2/nonfunction_type_aliases/infer_aliased_factory_invocation_02_test.dart
new file mode 100644
index 0000000..e5caf2a
--- /dev/null
+++ b/tests/language_2/nonfunction_type_aliases/infer_aliased_factory_invocation_02_test.dart
@@ -0,0 +1,20 @@
+// Copyright (c) 2020, the Dart project authors.  Please see the AUTHORS file
+// for 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=nonfunction-type-aliases
+
+import 'package:expect/expect.dart';
+
+class C {
+  factory C() => D();
+}
+
+class D implements C {}
+
+typedef T<X> = C;
+
+void main() {
+  T<num> x1 = T();
+  C x2 = T();
+}
diff --git a/tests/language_2/nonfunction_type_aliases/infer_aliased_factory_invocation_03_test.dart b/tests/language_2/nonfunction_type_aliases/infer_aliased_factory_invocation_03_test.dart
new file mode 100644
index 0000000..5bda338
--- /dev/null
+++ b/tests/language_2/nonfunction_type_aliases/infer_aliased_factory_invocation_03_test.dart
@@ -0,0 +1,24 @@
+// Copyright (c) 2020, the Dart project authors.  Please see the AUTHORS file
+// for 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=nonfunction-type-aliases
+
+import 'package:expect/expect.dart';
+
+class C<X> {
+  factory C(Type t) => D<X>(t);
+}
+
+class D<X> implements C<X> {
+  D(Type t) {
+    Expect.equals(t, X);
+  }
+}
+
+typedef T = C<num>;
+
+void main() {
+  T x1 = T(num);
+  C<num> x2 = T(num);
+}
diff --git a/tests/language_2/nonfunction_type_aliases/infer_aliased_factory_invocation_04_test.dart b/tests/language_2/nonfunction_type_aliases/infer_aliased_factory_invocation_04_test.dart
new file mode 100644
index 0000000..5fbec80
--- /dev/null
+++ b/tests/language_2/nonfunction_type_aliases/infer_aliased_factory_invocation_04_test.dart
@@ -0,0 +1,26 @@
+// Copyright (c) 2020, the Dart project authors.  Please see the AUTHORS file
+// for 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=nonfunction-type-aliases
+
+import 'package:expect/expect.dart';
+
+class C<X> {
+  factory C(Type t) => D<X>(t);
+}
+
+class D<X> implements C<X> {
+  D(Type t) {
+    Expect.equals(t, X);
+  }
+}
+
+typedef T<X> = C<List<X>>;
+
+Type typeOf<X>() => X;
+
+void main() {
+  T<num> x1 = T(typeOf<List<num>>());
+  C<Iterable<num>> x2 = T(typeOf<List<num>>());
+}
diff --git a/tests/language_2/nonfunction_type_aliases/infer_aliased_factory_invocation_05_test.dart b/tests/language_2/nonfunction_type_aliases/infer_aliased_factory_invocation_05_test.dart
new file mode 100644
index 0000000..3e4dd64
--- /dev/null
+++ b/tests/language_2/nonfunction_type_aliases/infer_aliased_factory_invocation_05_test.dart
@@ -0,0 +1,25 @@
+// Copyright (c) 2020, the Dart project authors.  Please see the AUTHORS file
+// for 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=nonfunction-type-aliases
+
+import 'package:expect/expect.dart';
+
+class C<X, Y> {
+  factory C(Type tx, Type ty) => D<X, Y>(tx, ty);
+}
+
+class D<X, Y> implements C<X, Y> {
+  D(Type tx, Type ty) {
+    Expect.equals(tx, X);
+    Expect.equals(ty, Y);
+  }
+}
+
+typedef T<Y, X> = C<X, Y>;
+
+void main() {
+  T<int, String> x1 = T(String, int);
+  C<String, int> x2 = T(String, int);
+}
diff --git a/tests/language_2/nonfunction_type_aliases/infer_aliased_factory_invocation_06_test.dart b/tests/language_2/nonfunction_type_aliases/infer_aliased_factory_invocation_06_test.dart
new file mode 100644
index 0000000..b5b8cce
--- /dev/null
+++ b/tests/language_2/nonfunction_type_aliases/infer_aliased_factory_invocation_06_test.dart
@@ -0,0 +1,23 @@
+// Copyright (c) 2020, the Dart project authors.  Please see the AUTHORS file
+// for 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=nonfunction-type-aliases
+
+import 'package:expect/expect.dart';
+
+class C<X> {
+  factory C(X x, Type t) => D<X>(x, t);
+}
+
+class D<X> implements C<X> {
+  D(X x, Type t) {
+    Expect.equals(t, X);
+  }
+}
+
+typedef T<X> = C<X>;
+
+void main() {
+  T(1, int);
+}
diff --git a/tests/language_2/nonfunction_type_aliases/infer_aliased_factory_invocation_07_test.dart b/tests/language_2/nonfunction_type_aliases/infer_aliased_factory_invocation_07_test.dart
new file mode 100644
index 0000000..abd1f08
--- /dev/null
+++ b/tests/language_2/nonfunction_type_aliases/infer_aliased_factory_invocation_07_test.dart
@@ -0,0 +1,25 @@
+// Copyright (c) 2020, the Dart project authors.  Please see the AUTHORS file
+// for 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=nonfunction-type-aliases
+
+import 'package:expect/expect.dart';
+
+class C<X> {
+  factory C(X x, Type t) => D<X>(x, t);
+}
+
+class D<X> implements C<X> {
+  D(X x, Type t) {
+    Expect.equals(t, X);
+  }
+}
+
+typedef T<X> = C<List<X>>;
+
+Type typeOf<X>() => X;
+
+void main() {
+  T(<num>[1], typeOf<List<num>>());
+}
diff --git a/tests/language_2/nonfunction_type_aliases/infer_aliased_factory_invocation_08_test.dart b/tests/language_2/nonfunction_type_aliases/infer_aliased_factory_invocation_08_test.dart
new file mode 100644
index 0000000..954b7e2
--- /dev/null
+++ b/tests/language_2/nonfunction_type_aliases/infer_aliased_factory_invocation_08_test.dart
@@ -0,0 +1,24 @@
+// Copyright (c) 2020, the Dart project authors.  Please see the AUTHORS file
+// for 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=nonfunction-type-aliases
+
+import 'package:expect/expect.dart';
+
+class C<X extends num> {
+  factory C(Type t) => D<X>(t);
+}
+
+class D<X extends num> implements C<X> {
+  D(Type t) {
+    Expect.equals(t, X);
+  }
+}
+
+typedef T<X extends int> = C<X>;
+
+void main() {
+  T<int> x1 = T(int);
+  C<int> x2 = T(int);
+}
diff --git a/tests/language_2/nonfunction_type_aliases/infer_aliased_factory_invocation_09_test.dart b/tests/language_2/nonfunction_type_aliases/infer_aliased_factory_invocation_09_test.dart
new file mode 100644
index 0000000..68ea8b9
--- /dev/null
+++ b/tests/language_2/nonfunction_type_aliases/infer_aliased_factory_invocation_09_test.dart
@@ -0,0 +1,20 @@
+// Copyright (c) 2020, the Dart project authors.  Please see the AUTHORS file
+// for 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=nonfunction-type-aliases
+
+import 'package:expect/expect.dart';
+
+class C {
+  factory C() => D();
+}
+
+class D implements C {}
+
+typedef T<X extends num> = C;
+
+void main() {
+  T<num> x1 = T();
+  C x2 = T();
+}
diff --git a/tests/language_2/nonfunction_type_aliases/infer_aliased_factory_invocation_10_test.dart b/tests/language_2/nonfunction_type_aliases/infer_aliased_factory_invocation_10_test.dart
new file mode 100644
index 0000000..d9dc455
--- /dev/null
+++ b/tests/language_2/nonfunction_type_aliases/infer_aliased_factory_invocation_10_test.dart
@@ -0,0 +1,24 @@
+// Copyright (c) 2020, the Dart project authors.  Please see the AUTHORS file
+// for 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=nonfunction-type-aliases
+
+import 'package:expect/expect.dart';
+
+class C<X extends num> {
+  factory C(Type t) => D<X>(t);
+}
+
+class D<X extends num> implements C<X> {
+  D(Type t) {
+    Expect.equals(t, X);
+  }
+}
+
+typedef T = C<num>;
+
+void main() {
+  T x1 = T(num);
+  C<num> x2 = T(num);
+}
diff --git a/tests/language_2/nonfunction_type_aliases/infer_aliased_factory_invocation_11_test.dart b/tests/language_2/nonfunction_type_aliases/infer_aliased_factory_invocation_11_test.dart
new file mode 100644
index 0000000..42aaab5
--- /dev/null
+++ b/tests/language_2/nonfunction_type_aliases/infer_aliased_factory_invocation_11_test.dart
@@ -0,0 +1,26 @@
+// Copyright (c) 2020, the Dart project authors.  Please see the AUTHORS file
+// for 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=nonfunction-type-aliases
+
+import 'package:expect/expect.dart';
+
+class C<X extends Iterable<num>> {
+  factory C(Type t) => D<X>(t);
+}
+
+class D<X extends Iterable<num>> implements C<X> {
+  D(Type t) {
+    Expect.equals(t, X);
+  }
+}
+
+typedef T<X extends int> = C<List<X>>;
+
+Type typeOf<X>() => X;
+
+void main() {
+  T<int> x1 = T(typeOf<List<int>>());
+  C<Iterable<num>> x2 = T(typeOf<List<int>>());
+}
diff --git a/tests/language_2/nonfunction_type_aliases/infer_aliased_factory_invocation_12_test.dart b/tests/language_2/nonfunction_type_aliases/infer_aliased_factory_invocation_12_test.dart
new file mode 100644
index 0000000..1d4a419
--- /dev/null
+++ b/tests/language_2/nonfunction_type_aliases/infer_aliased_factory_invocation_12_test.dart
@@ -0,0 +1,25 @@
+// Copyright (c) 2020, the Dart project authors.  Please see the AUTHORS file
+// for 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=nonfunction-type-aliases
+
+import 'package:expect/expect.dart';
+
+class C<X extends String, Y extends num> {
+  factory C(Type tx, Type ty) => D<X, Y>(tx, ty);
+}
+
+class D<X extends String, Y extends num> implements C<X, Y> {
+  D(Type tx, Type ty) {
+    Expect.equals(tx, X);
+    Expect.equals(ty, Y);
+  }
+}
+
+typedef T<Y extends int, X extends String> = C<X, Y>;
+
+void main() {
+  T<int, String> x1 = T(String, int);
+  C<String, int> x2 = T(String, int);
+}
diff --git a/tests/language_2/nonfunction_type_aliases/infer_aliased_redirecting_factory_invocation_01_test.dart b/tests/language_2/nonfunction_type_aliases/infer_aliased_redirecting_factory_invocation_01_test.dart
new file mode 100644
index 0000000..c4e1da4
--- /dev/null
+++ b/tests/language_2/nonfunction_type_aliases/infer_aliased_redirecting_factory_invocation_01_test.dart
@@ -0,0 +1,24 @@
+// Copyright (c) 2020, the Dart project authors.  Please see the AUTHORS file
+// for 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=nonfunction-type-aliases
+
+import 'package:expect/expect.dart';
+
+class C<X> {
+  factory C(Type t) = D<X>;
+}
+
+class D<X> implements C<X> {
+  D(Type t) {
+    Expect.equals(t, X);
+  }
+}
+
+typedef T<X> = C<X>;
+
+void main() {
+  T<num> x1 = T(num);
+  C<num> x2 = T(num);
+}
diff --git a/tests/language_2/nonfunction_type_aliases/infer_aliased_redirecting_factory_invocation_02_test.dart b/tests/language_2/nonfunction_type_aliases/infer_aliased_redirecting_factory_invocation_02_test.dart
new file mode 100644
index 0000000..79ba8a6
--- /dev/null
+++ b/tests/language_2/nonfunction_type_aliases/infer_aliased_redirecting_factory_invocation_02_test.dart
@@ -0,0 +1,20 @@
+// Copyright (c) 2020, the Dart project authors.  Please see the AUTHORS file
+// for 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=nonfunction-type-aliases
+
+import 'package:expect/expect.dart';
+
+class C {
+  factory C() = D;
+}
+
+class D implements C {}
+
+typedef T<X> = C;
+
+void main() {
+  T<num> x1 = T();
+  C x2 = T();
+}
diff --git a/tests/language_2/nonfunction_type_aliases/infer_aliased_redirecting_factory_invocation_03_test.dart b/tests/language_2/nonfunction_type_aliases/infer_aliased_redirecting_factory_invocation_03_test.dart
new file mode 100644
index 0000000..28efd82
--- /dev/null
+++ b/tests/language_2/nonfunction_type_aliases/infer_aliased_redirecting_factory_invocation_03_test.dart
@@ -0,0 +1,24 @@
+// Copyright (c) 2020, the Dart project authors.  Please see the AUTHORS file
+// for 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=nonfunction-type-aliases
+
+import 'package:expect/expect.dart';
+
+class C<X> {
+  factory C(Type t) = D<X>;
+}
+
+class D<X> implements C<X> {
+  D(Type t) {
+    Expect.equals(t, X);
+  }
+}
+
+typedef T = C<num>;
+
+void main() {
+  T x1 = T(num);
+  C<num> x2 = T(num);
+}
diff --git a/tests/language_2/nonfunction_type_aliases/infer_aliased_redirecting_factory_invocation_04_test.dart b/tests/language_2/nonfunction_type_aliases/infer_aliased_redirecting_factory_invocation_04_test.dart
new file mode 100644
index 0000000..e8047da
--- /dev/null
+++ b/tests/language_2/nonfunction_type_aliases/infer_aliased_redirecting_factory_invocation_04_test.dart
@@ -0,0 +1,26 @@
+// Copyright (c) 2020, the Dart project authors.  Please see the AUTHORS file
+// for 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=nonfunction-type-aliases
+
+import 'package:expect/expect.dart';
+
+class C<X> {
+  factory C(Type t) = D<X>;
+}
+
+class D<X> implements C<X> {
+  D(Type t) {
+    Expect.equals(t, X);
+  }
+}
+
+typedef T<X> = C<List<X>>;
+
+Type typeOf<X>() => X;
+
+void main() {
+  T<num> x1 = T(typeOf<List<num>>());
+  C<Iterable<num>> x2 = T(typeOf<List<num>>());
+}
diff --git a/tests/language_2/nonfunction_type_aliases/infer_aliased_redirecting_factory_invocation_05_test.dart b/tests/language_2/nonfunction_type_aliases/infer_aliased_redirecting_factory_invocation_05_test.dart
new file mode 100644
index 0000000..1171b23
--- /dev/null
+++ b/tests/language_2/nonfunction_type_aliases/infer_aliased_redirecting_factory_invocation_05_test.dart
@@ -0,0 +1,25 @@
+// Copyright (c) 2020, the Dart project authors.  Please see the AUTHORS file
+// for 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=nonfunction-type-aliases
+
+import 'package:expect/expect.dart';
+
+class C<X, Y> {
+  factory C(Type tx, Type ty) = D<X, Y>;
+}
+
+class D<X, Y> implements C<X, Y> {
+  D(Type tx, Type ty) {
+    Expect.equals(tx, X);
+    Expect.equals(ty, Y);
+  }
+}
+
+typedef T<Y, X> = C<X, Y>;
+
+void main() {
+  T<int, String> x1 = T(String, int);
+  C<String, int> x2 = T(String, int);
+}
diff --git a/tests/language_2/nonfunction_type_aliases/infer_aliased_redirecting_factory_invocation_06_test.dart b/tests/language_2/nonfunction_type_aliases/infer_aliased_redirecting_factory_invocation_06_test.dart
new file mode 100644
index 0000000..86d7f84
--- /dev/null
+++ b/tests/language_2/nonfunction_type_aliases/infer_aliased_redirecting_factory_invocation_06_test.dart
@@ -0,0 +1,23 @@
+// Copyright (c) 2020, the Dart project authors.  Please see the AUTHORS file
+// for 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=nonfunction-type-aliases
+
+import 'package:expect/expect.dart';
+
+class C<X> {
+  factory C(X x, Type t) = D<X>;
+}
+
+class D<X> implements C<X> {
+  D(X x, Type t) {
+    Expect.equals(t, X);
+  }
+}
+
+typedef T<X> = C<X>;
+
+void main() {
+  T(1, int);
+}
diff --git a/tests/language_2/nonfunction_type_aliases/infer_aliased_redirecting_factory_invocation_07_test.dart b/tests/language_2/nonfunction_type_aliases/infer_aliased_redirecting_factory_invocation_07_test.dart
new file mode 100644
index 0000000..a58164c
--- /dev/null
+++ b/tests/language_2/nonfunction_type_aliases/infer_aliased_redirecting_factory_invocation_07_test.dart
@@ -0,0 +1,25 @@
+// Copyright (c) 2020, the Dart project authors.  Please see the AUTHORS file
+// for 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=nonfunction-type-aliases
+
+import 'package:expect/expect.dart';
+
+class C<X> {
+  factory C(X x, Type t) = D<X>;
+}
+
+class D<X> implements C<X> {
+  D(X x, Type t) {
+    Expect.equals(t, X);
+  }
+}
+
+typedef T<X> = C<List<X>>;
+
+Type typeOf<X>() => X;
+
+void main() {
+  T(<num>[1], typeOf<List<num>>());
+}
diff --git a/tests/language_2/nonfunction_type_aliases/infer_aliased_redirecting_factory_invocation_08_test.dart b/tests/language_2/nonfunction_type_aliases/infer_aliased_redirecting_factory_invocation_08_test.dart
new file mode 100644
index 0000000..a539743
--- /dev/null
+++ b/tests/language_2/nonfunction_type_aliases/infer_aliased_redirecting_factory_invocation_08_test.dart
@@ -0,0 +1,24 @@
+// Copyright (c) 2020, the Dart project authors.  Please see the AUTHORS file
+// for 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=nonfunction-type-aliases
+
+import 'package:expect/expect.dart';
+
+class C<X extends num> {
+  factory C(Type t) = D<X>;
+}
+
+class D<X extends num> implements C<X> {
+  D(Type t) {
+    Expect.equals(t, X);
+  }
+}
+
+typedef T<X extends int> = C<X>;
+
+void main() {
+  T<int> x1 = T(int);
+  C<int> x2 = T(int);
+}
diff --git a/tests/language_2/nonfunction_type_aliases/infer_aliased_redirecting_factory_invocation_09_test.dart b/tests/language_2/nonfunction_type_aliases/infer_aliased_redirecting_factory_invocation_09_test.dart
new file mode 100644
index 0000000..f7dc992
--- /dev/null
+++ b/tests/language_2/nonfunction_type_aliases/infer_aliased_redirecting_factory_invocation_09_test.dart
@@ -0,0 +1,20 @@
+// Copyright (c) 2020, the Dart project authors.  Please see the AUTHORS file
+// for 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=nonfunction-type-aliases
+
+import 'package:expect/expect.dart';
+
+class C {
+  factory C() = D;
+}
+
+class D implements C {}
+
+typedef T<X extends num> = C;
+
+void main() {
+  T<num> x1 = T();
+  C x2 = T();
+}
diff --git a/tests/language_2/nonfunction_type_aliases/infer_aliased_redirecting_factory_invocation_10_test.dart b/tests/language_2/nonfunction_type_aliases/infer_aliased_redirecting_factory_invocation_10_test.dart
new file mode 100644
index 0000000..0d3aae3
--- /dev/null
+++ b/tests/language_2/nonfunction_type_aliases/infer_aliased_redirecting_factory_invocation_10_test.dart
@@ -0,0 +1,24 @@
+// Copyright (c) 2020, the Dart project authors.  Please see the AUTHORS file
+// for 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=nonfunction-type-aliases
+
+import 'package:expect/expect.dart';
+
+class C<X extends num> {
+  factory C(Type t) = D<X>;
+}
+
+class D<X extends num> implements C<X> {
+  D(Type t) {
+    Expect.equals(t, X);
+  }
+}
+
+typedef T = C<num>;
+
+void main() {
+  T x1 = T(num);
+  C<num> x2 = T(num);
+}
diff --git a/tests/language_2/nonfunction_type_aliases/infer_aliased_redirecting_factory_invocation_11_test.dart b/tests/language_2/nonfunction_type_aliases/infer_aliased_redirecting_factory_invocation_11_test.dart
new file mode 100644
index 0000000..bae703d
--- /dev/null
+++ b/tests/language_2/nonfunction_type_aliases/infer_aliased_redirecting_factory_invocation_11_test.dart
@@ -0,0 +1,26 @@
+// Copyright (c) 2020, the Dart project authors.  Please see the AUTHORS file
+// for 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=nonfunction-type-aliases
+
+import 'package:expect/expect.dart';
+
+class C<X extends Iterable<num>> {
+  factory C(Type t) = D<X>;
+}
+
+class D<X extends Iterable<num>> implements C<X> {
+  D(Type t) {
+    Expect.equals(t, X);
+  }
+}
+
+typedef T<X extends int> = C<List<X>>;
+
+Type typeOf<X>() => X;
+
+void main() {
+  T<int> x1 = T(typeOf<List<int>>());
+  C<Iterable<num>> x2 = T(typeOf<List<int>>());
+}
diff --git a/tests/language_2/nonfunction_type_aliases/infer_aliased_redirecting_factory_invocation_12_test.dart b/tests/language_2/nonfunction_type_aliases/infer_aliased_redirecting_factory_invocation_12_test.dart
new file mode 100644
index 0000000..adc2ae5
--- /dev/null
+++ b/tests/language_2/nonfunction_type_aliases/infer_aliased_redirecting_factory_invocation_12_test.dart
@@ -0,0 +1,25 @@
+// Copyright (c) 2020, the Dart project authors.  Please see the AUTHORS file
+// for 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=nonfunction-type-aliases
+
+import 'package:expect/expect.dart';
+
+class C<X extends String, Y extends num> {
+  factory C(Type tx, Type ty) = D<X, Y>;
+}
+
+class D<X extends String, Y extends num> implements C<X, Y> {
+  D(Type tx, Type ty) {
+    Expect.equals(tx, X);
+    Expect.equals(ty, Y);
+  }
+}
+
+typedef T<Y extends int, X extends String> = C<X, Y>;
+
+void main() {
+  T<int, String> x1 = T(String, int);
+  C<String, int> x2 = T(String, int);
+}
diff --git a/tests/language_2/nonfunction_type_aliases/usage_null_error_test.dart b/tests/language_2/nonfunction_type_aliases/usage_null_error_test.dart
index 117d218..834b5f1 100644
--- a/tests/language_2/nonfunction_type_aliases/usage_null_error_test.dart
+++ b/tests/language_2/nonfunction_type_aliases/usage_null_error_test.dart
@@ -47,8 +47,6 @@
 
 X foo<X>(X x) => x;
 
-T Function(T) id = (x) => x;
-
 main() {
   var v13 = <T>[];
   var v14 = <Set<T>, Set<T>>{{}: {}};
diff --git a/tests/language_2/nonfunction_type_aliases/usage_void_error_test.dart b/tests/language_2/nonfunction_type_aliases/usage_void_error_test.dart
index 721cbb7..8b97111 100644
--- a/tests/language_2/nonfunction_type_aliases/usage_void_error_test.dart
+++ b/tests/language_2/nonfunction_type_aliases/usage_void_error_test.dart
@@ -41,8 +41,6 @@
 
 X foo<X>(X x) => x;
 
-T Function(T) id = (x) => x;
-
 main() {
   var v14 = <Set<T>, Set<T>>{{}: {}};
   v14[{}] = {T()};
diff --git a/tests/language_2/override/inheritance_field_test.dart b/tests/language_2/override/inheritance_field_test.dart
index d9430e1..82ee9a9 100644
--- a/tests/language_2/override/inheritance_field_test.dart
+++ b/tests/language_2/override/inheritance_field_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.
 
-import "package:meta/meta.dart" show virtual;
-
 class A {
   get getter1 => null; //# 01: ok
   num get getter2 => null; //# 02: ok
@@ -26,12 +24,12 @@
   set setter10(int _) => null; //# 30: compile-time error
   set setter11(int _) => null; //# 31: compile-time error
 
-  @virtual int field1; //# 41: ok
+  int field1; //# 41: ok
   num field2; //# 42: compile-time error
   int field3; //# 43: compile-time error
   int field4; //# 44: compile-time error
   int field5; //# 45: compile-time error
-  @virtual num field6; //# 46: ok
+  num field6; //# 46: ok
   num field7; //# 47: compile-time error
   num get field8 => null; //# 48: compile-time error
   num field9; //# 49: compile-time error
diff --git a/tests/language_2/prefix/transitive_import_prefix_test.dart b/tests/language_2/prefix/transitive_import_prefix_test.dart
index 9186560..34c3020 100644
--- a/tests/language_2/prefix/transitive_import_prefix_test.dart
+++ b/tests/language_2/prefix/transitive_import_prefix_test.dart
@@ -7,7 +7,7 @@
   // Library prefixes in the imported libraries should not be visible here.
   new lib11.Library11(1);
   //  ^^^^^^^^^^^^^^^
-  // [analyzer] STATIC_WARNING.NEW_WITH_NON_TYPE
+  // [analyzer] STATIC_WARNING.CREATION_WITH_NON_TYPE
   // [cfe] Method not found: 'lib11.Library11'.
   lib11.Library11.static_func();
 //^^^^^
diff --git a/tests/language_2/prefix/transitive_import_test.dart b/tests/language_2/prefix/transitive_import_test.dart
index 0ae3fa7..256894c 100644
--- a/tests/language_2/prefix/transitive_import_test.dart
+++ b/tests/language_2/prefix/transitive_import_test.dart
@@ -10,7 +10,7 @@
   // Class should not be visible.
   new lib12.Library11(1);
   //        ^^^^^^^^^
-  // [analyzer] STATIC_WARNING.NEW_WITH_NON_TYPE
+  // [analyzer] STATIC_WARNING.CREATION_WITH_NON_TYPE
   // [cfe] Method not found: 'Library11'.
 
   // Variable should not be visible.
diff --git a/tests/language_2/private/access_test.dart b/tests/language_2/private/access_test.dart
index a1cf6a1..016e4dc 100644
--- a/tests/language_2/private/access_test.dart
+++ b/tests/language_2/private/access_test.dart
@@ -19,7 +19,7 @@
 // [analyzer] STATIC_TYPE_WARNING.UNDEFINED_FUNCTION
   new _Class();
   //  ^^^^^^
-  // [analyzer] STATIC_WARNING.NEW_WITH_NON_TYPE
+  // [analyzer] STATIC_WARNING.CREATION_WITH_NON_TYPE
   // [cfe] Method not found: '_Class'.
   private._Class();
 //^
diff --git a/tests/language_2/regress/regress21793_test.dart b/tests/language_2/regress/regress21793_test.dart
index d767690..26d9ff6d 100644
--- a/tests/language_2/regress/regress21793_test.dart
+++ b/tests/language_2/regress/regress21793_test.dart
@@ -15,6 +15,6 @@
 main() {
   print(new A()(499));
   //        ^
-  // [analyzer] STATIC_WARNING.NEW_WITH_NON_TYPE
+  // [analyzer] STATIC_WARNING.CREATION_WITH_NON_TYPE
   // [cfe] Method not found: 'A'.
 }
diff --git a/tests/language_2/regress/regress34495_test.dart b/tests/language_2/regress/regress34495_test.dart
index cce9bfe..f33f4c5 100644
--- a/tests/language_2/regress/regress34495_test.dart
+++ b/tests/language_2/regress/regress34495_test.dart
@@ -4,7 +4,7 @@
 
 final foo = A<B>.foo();
 //          ^
-// [analyzer] STATIC_WARNING.NEW_WITH_NON_TYPE
+// [analyzer] STATIC_WARNING.CREATION_WITH_NON_TYPE
 // [cfe] Method not found: 'A'.
 //            ^
 // [analyzer] STATIC_TYPE_WARNING.NON_TYPE_AS_TYPE_ARGUMENT
diff --git a/tests/language_2/super/field_2_test.dart b/tests/language_2/super/field_2_test.dart
index 51cc926..82b899c 100644
--- a/tests/language_2/super/field_2_test.dart
+++ b/tests/language_2/super/field_2_test.dart
@@ -3,10 +3,8 @@
 // BSD-style license that can be found in the LICENSE file.
 
 import "package:expect/expect.dart";
-import "package:meta/meta.dart" show virtual;
 
 class A {
-  @virtual
   var foo;
   A(this.foo);
 
diff --git a/tests/language_2/super/field_test.dart b/tests/language_2/super/field_test.dart
index aa56eb2..85ae8e9 100644
--- a/tests/language_2/super/field_test.dart
+++ b/tests/language_2/super/field_test.dart
@@ -4,7 +4,6 @@
 // Dart test for testing super field access.
 
 import "package:expect/expect.dart";
-import "package:meta/meta.dart" show virtual;
 
 class A {
   A() {
@@ -14,7 +13,6 @@
     return "Gruezi";
   }
 
-  @virtual
   String city;
 }
 
diff --git a/tests/language_2/vm/no_such_args_error_message_vm_test.dart b/tests/language_2/vm/no_such_args_error_message_vm_test.dart
index 3402472..d3ca510 100644
--- a/tests/language_2/vm/no_such_args_error_message_vm_test.dart
+++ b/tests/language_2/vm/no_such_args_error_message_vm_test.dart
@@ -2,6 +2,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 // VMOptions=--optimization-counter-threshold=10 --no-use-osr --no-background-compilation
+// VMOptions=--optimization-counter-threshold=10 --no-use-osr --no-background-compilation --no-lazy-dispatchers
 
 import "package:expect/expect.dart";
 
@@ -14,8 +15,10 @@
   try {
     call_with_bar(() {});
   } catch (e) {
-    Expect.isTrue(e.toString().contains(
-        "Tried calling: testClosureMessage.<anonymous closure>(\"bar\")"));
+    final expectedStrings = [
+      'Tried calling: testClosureMessage.<anonymous closure>("bar")',
+    ];
+    Expect.stringContainsInOrder(e.toString(), expectedStrings);
   }
 }
 
@@ -25,7 +28,10 @@
   try {
     call_with_bar(noargs);
   } catch (e) {
-    Expect.isTrue(e.toString().contains("Tried calling: noargs(\"bar\")"));
+    final expectedStrings = [
+      'Tried calling: noargs("bar")',
+    ];
+    Expect.stringContainsInOrder(e.toString(), expectedStrings);
   }
 }
 
diff --git a/tests/lib/async/future_error_test.dart b/tests/lib/async/future_error_test.dart
new file mode 100644
index 0000000..760c392
--- /dev/null
+++ b/tests/lib/async/future_error_test.dart
@@ -0,0 +1,14 @@
+// Copyright (c) 2020, the Dart project authors.  Please see the AUTHORS file
+// for 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:expect/expect.dart';
+
+main() {
+  // The error cannot be null.
+  Expect.throwsNullCheckError(() {
+    Future.error(null as dynamic);
+  });
+}
diff --git a/tests/lib/async/stream_controller_add_error_test.dart b/tests/lib/async/stream_controller_add_error_test.dart
new file mode 100644
index 0000000..f195fef
--- /dev/null
+++ b/tests/lib/async/stream_controller_add_error_test.dart
@@ -0,0 +1,49 @@
+// Copyright (c) 2020, the Dart project authors.  Please see the AUTHORS file
+// for 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:expect/expect.dart';
+
+main() {
+  // Single-cast async.
+  var controller = StreamController();
+  Expect.throwsNullCheckError(() {
+    controller.addError(null as dynamic);
+  });
+
+  Expect.throwsNullCheckError(() {
+    controller.sink.addError(null as dynamic);
+  });
+
+  // Single-cast sync.
+  controller = StreamController(sync: true);
+  Expect.throwsNullCheckError(() {
+    controller.addError(null as dynamic);
+  });
+
+  Expect.throwsNullCheckError(() {
+    controller.sink.addError(null as dynamic);
+  });
+
+  // Broadcast async.
+  controller = StreamController.broadcast();
+  Expect.throwsNullCheckError(() {
+    controller.addError(null as dynamic);
+  });
+
+  Expect.throwsNullCheckError(() {
+    controller.sink.addError(null as dynamic);
+  });
+
+  // Broadcast sync.
+  controller = StreamController.broadcast(sync: true);
+  Expect.throwsNullCheckError(() {
+    controller.addError(null as dynamic);
+  });
+
+  Expect.throwsNullCheckError(() {
+    controller.sink.addError(null as dynamic);
+  });
+}
diff --git a/tests/lib/async/stream_multi_test.dart b/tests/lib/async/stream_multi_test.dart
new file mode 100644
index 0000000..e57c4f4
--- /dev/null
+++ b/tests/lib/async/stream_multi_test.dart
@@ -0,0 +1,140 @@
+// Copyright (c) 2020, the Dart project authors.  Please see the AUTHORS file
+// for 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:expect/expect.dart";
+import "package:async_helper/async_helper.dart";
+
+extension StreamRepeatLatestExtension<T extends Object> on Stream<T> {
+  Stream<T> repeatLatest() {
+    var done = false;
+    T? latest = null;
+    var currentListeners = <MultiStreamController<T>>{};
+    this.listen((event) {
+      latest = event;
+      for (var listener in [...currentListeners]) listener.addSync(event);
+    }, onError: (Object error, StackTrace stack) {
+      for (var listener in [...currentListeners])
+        listener.addErrorSync(error, stack);
+    }, onDone: () {
+      done = true;
+      latest = null;
+      for (var listener in currentListeners) listener.closeSync();
+      currentListeners.clear();
+    });
+    return Stream.multi((controller) {
+      if (done) {
+        controller.close();
+        return;
+      }
+      currentListeners.add(controller);
+      var latestValue = latest;
+      if (latestValue != null) controller.add(latestValue);
+      controller.onCancel = () {
+        currentListeners.remove(controller);
+      };
+    });
+  }
+}
+
+void main() {
+  asyncStart();
+  testStreamsIndependent();
+  asyncTest(testStreamNonOverlap);
+  asyncTest(testRepeatLatest);
+  asyncEnd();
+}
+
+/// Test that the streams can provide different events.
+void testStreamsIndependent() {
+  var log = <String>[];
+  var index = 0;
+  var multi = Stream<List<int>>.multi((c) {
+    var id = ++index;
+    log.add("$id");
+    for (var i = 0; i < id + 1; i++) {
+      c.add([id, i]);
+    }
+    c.close();
+  });
+  void logList(List<int> l) {
+    log.add("${l.first}-${l.last}");
+  }
+
+  asyncStart();
+  Future.wait([multi.forEach(logList), multi.forEach(logList)])
+      .whenComplete(() {
+    Expect.equals(7, log.length);
+    for (var element in ["1", "1-0", "1-1", "2", "2-0", "2-1", "2-2"]) {
+      Expect.isTrue(log.contains(element));
+    }
+    asyncEnd();
+  });
+}
+
+/// Test that stream can be listened to again after having no listener.
+Future<void> testStreamNonOverlap() async {
+  var completer = Completer<Object?>();
+  MultiStreamController<int>? controller;
+  var stream = Stream<int>.multi((c) {
+    controller = c;
+    c.onCancel = () {
+      controller = null;
+      if (!completer.isCompleted) completer.complete(null);
+    };
+  });
+  for (var i in [1, 2, 3]) {
+    var log = <Object?>[];
+    var subscription = stream.listen((v) {
+      log.add(v);
+      if (!completer.isCompleted) completer.complete(v);
+    }, onError: (e, s) {
+      log.add(e);
+      if (!completer.isCompleted) completer.complete(e);
+    }, onDone: () {
+      log.add(null);
+      if (!completer.isCompleted) completer.complete(null);
+    });
+    Expect.isNotNull(controller);
+    controller!.add(1);
+    await completer.future;
+    Expect.listEquals([1], log);
+
+    completer = Completer();
+    controller!.add(2);
+    await completer.future;
+    Expect.listEquals([1, 2], log);
+
+    completer = Completer();
+    if (i == 2) {
+      subscription.cancel();
+    } else {
+      controller!.close();
+    }
+    await completer.future;
+    Expect.listEquals([1, 2, if (i != 2) null], log);
+  }
+}
+
+/// Test that the [Stream.repeatLatest] example code works as described.
+Future<void> testRepeatLatest() async {
+  var c = StreamController<int>();
+  var repStream = c.stream.repeatLatest();
+
+  var f1 = repStream.first;
+  c.add(1);
+  var v1 = await f1;
+  Expect.equals(1, v1);
+
+  var f2 = repStream.take(2).toList();
+  c.add(2);
+  var l2 = await f2;
+  Expect.listEquals([1, 2], l2);
+
+  var f3 = repStream.take(2).toList();
+  c.add(3);
+  var l3 = await f3;
+  Expect.listEquals([2, 3], l3);
+}
diff --git a/tests/lib/async/zone_async_error_test.dart b/tests/lib/async/zone_async_error_test.dart
new file mode 100644
index 0000000..ca6c87c
--- /dev/null
+++ b/tests/lib/async/zone_async_error_test.dart
@@ -0,0 +1,14 @@
+// Copyright (c) 2020, the Dart project authors.  Please see the AUTHORS file
+// for 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:expect/expect.dart';
+
+main() {
+  // The error cannot be null.
+  Expect.throwsNullCheckError(() {
+    AsyncError(null as dynamic, StackTrace.current);
+  });
+}
diff --git a/tests/lib/isolate/scenarios/automatic_resolution_root/package_resolve_test.dart b/tests/lib/isolate/scenarios/automatic_resolution_root/package_resolve_test.dart
new file mode 100644
index 0000000..eb3cbf7
--- /dev/null
+++ b/tests/lib/isolate/scenarios/automatic_resolution_root/package_resolve_test.dart
@@ -0,0 +1,51 @@
+// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'dart:io';
+import 'dart:isolate';
+
+final PACKAGE_URI = "package:foo/bar.dart";
+
+main([args, port]) async {
+  if (port != null) {
+    testPackageResolution(port);
+    return;
+  }
+  var p = new RawReceivePort();
+  Isolate.spawnUri(Platform.script, [], p.sendPort,
+      automaticPackageResolution: true);
+  p.handler = (msg) {
+    p.close();
+    if (msg is! List) {
+      print(msg.runtimeType);
+      throw "Failure return from spawned isolate:\n\n$msg";
+    }
+    if (msg[0] != null) {
+      throw "Bad package root in child isolate: ${msg[0]}.\n"
+          "Expected: null";
+    }
+    if (msg[1] != null) {
+      throw "Package path not matching: ${msg[1]}\n"
+          "Expected: null";
+    }
+    print("SUCCESS");
+  };
+  print("Spawning isolate's package root: ${await Isolate.packageRoot}");
+}
+
+testPackageResolution(port) async {
+  try {
+    var packageRootStr = Platform.packageRoot;
+    var packageConfigStr = Platform.packageConfig;
+    var packageRoot = await Isolate.packageRoot;
+    var resolvedPkg = await Isolate.resolvePackageUri(Uri.parse(PACKAGE_URI));
+    print("Spawned isolate's package root flag: $packageRootStr");
+    print("Spawned isolate's package config flag: $packageConfigStr");
+    print("Spawned isolate's loaded package root: $packageRoot");
+    print("Spawned isolate's resolved package path: $resolvedPkg");
+    port.send([packageRoot?.toString(), resolvedPkg?.toString()]);
+  } catch (e, s) {
+    port.send("$e\n$s\n");
+  }
+}
diff --git a/tests/lib/isolate/scenarios/automatic_resolution_spec/.packages b/tests/lib/isolate/scenarios/automatic_resolution_spec/.packages
new file mode 100644
index 0000000..79bcf43
--- /dev/null
+++ b/tests/lib/isolate/scenarios/automatic_resolution_spec/.packages
@@ -0,0 +1 @@
+foo:file:///no/such/directory/
diff --git a/tests/lib/isolate/scenarios/automatic_resolution_spec/package_resolve_test.dart b/tests/lib/isolate/scenarios/automatic_resolution_spec/package_resolve_test.dart
new file mode 100644
index 0000000..dee6d10
--- /dev/null
+++ b/tests/lib/isolate/scenarios/automatic_resolution_spec/package_resolve_test.dart
@@ -0,0 +1,52 @@
+// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'dart:io';
+import 'dart:isolate';
+
+final PACKAGE_URI = "package:foo/bar.dart";
+final PACKAGE_PATH = "file:///no/such/directory/bar.dart";
+
+main([args, port]) async {
+  if (port != null) {
+    testPackageResolution(port);
+    return;
+  }
+  var p = new RawReceivePort();
+  Isolate.spawnUri(Platform.script, [], p.sendPort,
+      automaticPackageResolution: true);
+  p.handler = (msg) {
+    p.close();
+    if (msg is! List) {
+      print(msg.runtimeType);
+      throw "Failure return from spawned isolate:\n\n$msg";
+    }
+    var child_pkg_config = Platform.script.resolve(".packages");
+    if (msg[0] != child_pkg_config.toString()) {
+      throw "Bad package config in child isolate: ${msg[0]}\n"
+          "Expected: $child_pkg_config";
+    }
+    if (msg[1] != PACKAGE_PATH) {
+      throw "Package path not matching: ${msg[1]}";
+    }
+    print("SUCCESS");
+  };
+  print("Spawning isolate's package root: ${await Isolate.packageRoot}");
+}
+
+testPackageResolution(port) async {
+  try {
+    var packageRootStr = Platform.packageRoot;
+    var packageConfigStr = Platform.packageConfig;
+    var packageConfig = await Isolate.packageConfig;
+    var resolvedPkg = await Isolate.resolvePackageUri(Uri.parse(PACKAGE_URI));
+    print("Spawned isolate's package root flag: $packageRootStr");
+    print("Spawned isolate's package config flag: $packageConfigStr");
+    print("Spawned isolate's loaded package config: $packageConfig");
+    print("Spawned isolate's resolved package path: $resolvedPkg");
+    port.send([packageConfig?.toString(), resolvedPkg?.toString()]);
+  } catch (e, s) {
+    port.send("$e\n$s\n");
+  }
+}
diff --git a/tests/lib/isolate/scenarios/bad_resolve_package/bad_resolve_package_test.dart b/tests/lib/isolate/scenarios/bad_resolve_package/bad_resolve_package_test.dart
new file mode 100644
index 0000000..5866729
--- /dev/null
+++ b/tests/lib/isolate/scenarios/bad_resolve_package/bad_resolve_package_test.dart
@@ -0,0 +1,47 @@
+// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// Packages=none
+
+import 'dart:io';
+import 'dart:isolate';
+
+main([args, port]) async {
+  if (port != null) {
+    testBadResolvePackage(port);
+    return;
+  }
+  var p = new RawReceivePort();
+  Isolate.spawnUri(Platform.script, [], p.sendPort);
+  p.handler = (msg) {
+    p.close();
+    if (msg is! List) {
+      print(msg.runtimeType);
+      throw "Failure return from spawned isolate:\n\n$msg";
+    }
+    // Expecting a null resolution for inexistent package mapping.
+    if (msg[0] != null) {
+      throw "Bad package config in child isolate: ${msg[0]}\n"
+          "Expected: 'Foo'";
+    }
+    print("SUCCESS");
+  };
+}
+
+testBadResolvePackage(port) async {
+  try {
+    var packageRootStr = Platform.packageRoot;
+    var packageConfigStr = Platform.packageConfig;
+    var packageConfig = await Isolate.packageConfig;
+    var badPackageUri = Uri.parse("package:asdf/qwerty.dart");
+    var resolvedPkg = await Isolate.resolvePackageUri(badPackageUri);
+    print("Spawned isolate's package root flag: $packageRootStr");
+    print("Spawned isolate's package config flag: $packageConfigStr");
+    print("Spawned isolate's loaded package config: $packageConfig");
+    print("Spawned isolate's resolved package path: $resolvedPkg");
+    port.send([resolvedPkg]);
+  } catch (e, s) {
+    port.send("$e\n$s\n");
+  }
+}
diff --git a/tests/lib/isolate/scenarios/package_data_uri_spec/package_resolve_test.dart b/tests/lib/isolate/scenarios/package_data_uri_spec/package_resolve_test.dart
new file mode 100644
index 0000000..50686a3
--- /dev/null
+++ b/tests/lib/isolate/scenarios/package_data_uri_spec/package_resolve_test.dart
@@ -0,0 +1,75 @@
+// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// VMOptions=--enable-isolate-groups
+// VMOptions=--no-enable-isolate-groups
+
+import 'dart:io';
+import 'dart:isolate';
+
+final packageUriToResolve = "package:foo/bar.dart";
+final packageResolvedUri = "file:///no/such/directory/lib/bar.dart";
+
+final dotPackages = """
+# This is the content of a .packages file.
+foo:file:///no/such/directory/lib/
+""";
+
+final packageConfigJson = """
+{
+  "configVersion": 2,
+  "packages": [
+    {
+      "name": "foo",
+      "rootUri": "file:///no/such/directory",
+      "packageUri": "lib/",
+      "languageVersion": "2.7"
+    }
+  ]
+}
+""";
+
+main([args, port]) async {
+  if (port != null) {
+    testPackageResolution(port);
+    return;
+  }
+  await runTest(dotPackages);
+  await runTest(packageConfigJson);
+}
+
+Future runTest(String packageConfig) async {
+  final data = Uri.dataFromString(packageConfig);
+  final port = ReceivePort();
+  await Isolate.spawnUri(Platform.script, [], port.sendPort,
+      packageConfig: data);
+  final msg = await port.first;
+  if (msg is! List) {
+    print(msg.runtimeType);
+    throw "Failure return from spawned isolate:\n\n$msg";
+  }
+  if (msg[0] != data.toString()) {
+    throw "Bad package config in child isolate: ${msg[0]}\n"
+        "Expected: $data";
+  }
+  if (msg[1] != packageResolvedUri) {
+    throw "Package path not matching: ${msg[1]}";
+  }
+  print("SUCCESS");
+}
+
+testPackageResolution(port) async {
+  try {
+    var packageConfigStr = Platform.packageConfig;
+    var packageConfig = await Isolate.packageConfig;
+    var resolvedPkg =
+        await Isolate.resolvePackageUri(Uri.parse(packageUriToResolve));
+    print("Spawned isolate's package config flag: $packageConfigStr");
+    print("Spawned isolate's loaded package config: $packageConfig");
+    print("Spawned isolate's resolved package path: $resolvedPkg");
+    port.send([packageConfig?.toString(), resolvedPkg?.toString()]);
+  } catch (e, s) {
+    port.send("$e\n$s\n");
+  }
+}
diff --git a/tests/lib/isolate/scenarios/package_relative_root/.dart_tool/package_config.json b/tests/lib/isolate/scenarios/package_relative_root/.dart_tool/package_config.json
new file mode 100644
index 0000000..00b936c
--- /dev/null
+++ b/tests/lib/isolate/scenarios/package_relative_root/.dart_tool/package_config.json
@@ -0,0 +1,15 @@
+{
+  "configVersion": 2,
+  "packages": [
+    {
+      "name": "foo",
+      "rootUri": "../packages/foo",
+      "languageVersion": "2.9"
+    },
+    {
+      "name": "bar",
+      "rootUri": "../packages/bar",
+      "languageVersion": "2.9"
+    }
+  ]
+}
diff --git a/tests/lib/isolate/scenarios/package_relative_root/package_relative_root_test.dart b/tests/lib/isolate/scenarios/package_relative_root/package_relative_root_test.dart
new file mode 100644
index 0000000..034881b
--- /dev/null
+++ b/tests/lib/isolate/scenarios/package_relative_root/package_relative_root_test.dart
@@ -0,0 +1,60 @@
+// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// Packages=none
+
+import 'dart:io';
+import 'dart:isolate';
+
+import "package:foo/foo.dart";
+import "package:bar/bar.dart";
+
+var CONFIG_URI = "package:bar/spawned_packages/";
+
+main([args, port]) async {
+  if (port != null) {
+    testCorrectBarPackage(port);
+    return;
+  }
+  var p = new RawReceivePort();
+  Isolate.spawnUri(Platform.script, [], p.sendPort,
+      packageRoot: Uri.parse(CONFIG_URI));
+  p.handler = (msg) {
+    p.close();
+    if (msg is! List) {
+      print(msg.runtimeType);
+      throw "Failure return from spawned isolate:\n\n$msg";
+    }
+    if (msg[0] != "Foo") {
+      throw "Bad package config in child isolate: ${msg[0]}\n"
+          "Expected: 'Foo'";
+    }
+    if (msg[1] != "Bar1") {
+      throw "Package path not matching: ${msg[1]}\n"
+          "Expected: 'Bar1'";
+    }
+    print("SUCCESS");
+  };
+  if (Bar.value != "Bar1") {
+    throw "Spawning isolate package:bar invalid.";
+  }
+  print("Spawned isolate resolved $CONFIG_URI to: "
+      "${await Isolate.resolvePackageUri(Uri.parse(CONFIG_URI))}");
+}
+
+testCorrectBarPackage(port) async {
+  try {
+    var packageRootStr = Platform.packageRoot;
+    var packageConfigStr = Platform.packageConfig;
+    var packageConfig = await Isolate.packageConfig;
+    var resolvedPkg = await Isolate.resolvePackageUri(Uri.parse(CONFIG_URI));
+    print("Spawned isolate's package root flag: $packageRootStr");
+    print("Spawned isolate's package config flag: $packageConfigStr");
+    print("Spawned isolate's loaded package config: $packageConfig");
+    print("Spawned isolate's resolved package path: $resolvedPkg");
+    port.send([Foo.value, Bar.value]);
+  } catch (e, s) {
+    port.send("$e\n$s\n");
+  }
+}
diff --git a/tests/lib/isolate/scenarios/package_relative_root/packages/bar/bar.dart b/tests/lib/isolate/scenarios/package_relative_root/packages/bar/bar.dart
new file mode 100644
index 0000000..7fb99e2
--- /dev/null
+++ b/tests/lib/isolate/scenarios/package_relative_root/packages/bar/bar.dart
@@ -0,0 +1,3 @@
+class Bar {
+  static var value = "Bar1";
+}
diff --git a/tests/lib/isolate/scenarios/package_relative_root/packages/bar/spawned_packages/bar/bar.dart b/tests/lib/isolate/scenarios/package_relative_root/packages/bar/spawned_packages/bar/bar.dart
new file mode 100644
index 0000000..cd6723a
--- /dev/null
+++ b/tests/lib/isolate/scenarios/package_relative_root/packages/bar/spawned_packages/bar/bar.dart
@@ -0,0 +1,3 @@
+class Bar {
+  static var value = "Bar2";
+}
diff --git a/tests/lib/isolate/scenarios/package_relative_root/packages/bar/spawned_packages/foo/foo.dart b/tests/lib/isolate/scenarios/package_relative_root/packages/bar/spawned_packages/foo/foo.dart
new file mode 100644
index 0000000..ba907d1
--- /dev/null
+++ b/tests/lib/isolate/scenarios/package_relative_root/packages/bar/spawned_packages/foo/foo.dart
@@ -0,0 +1,3 @@
+class Foo {
+  static var value = "Foo";
+}
diff --git a/tests/lib/isolate/scenarios/package_relative_root/packages/foo/foo.dart b/tests/lib/isolate/scenarios/package_relative_root/packages/foo/foo.dart
new file mode 100644
index 0000000..ba907d1
--- /dev/null
+++ b/tests/lib/isolate/scenarios/package_relative_root/packages/foo/foo.dart
@@ -0,0 +1,3 @@
+class Foo {
+  static var value = "Foo";
+}
diff --git a/tests/lib/isolate/scenarios/package_relative_spec/.dart_tool/package_config.json b/tests/lib/isolate/scenarios/package_relative_spec/.dart_tool/package_config.json
new file mode 100644
index 0000000..581db8e
--- /dev/null
+++ b/tests/lib/isolate/scenarios/package_relative_spec/.dart_tool/package_config.json
@@ -0,0 +1,15 @@
+{
+  "configVersion": 2,
+  "packages": [
+    {
+      "name": "foo",
+      "rootUri": "../foo_package",
+      "languageVersion": "2.9"
+    },
+    {
+      "name": "bar",
+      "rootUri": "../bar1_package",
+      "languageVersion": "2.9"
+    }
+  ]
+}
diff --git a/tests/lib/isolate/scenarios/package_relative_spec/bar1_package/bar.dart b/tests/lib/isolate/scenarios/package_relative_spec/bar1_package/bar.dart
new file mode 100644
index 0000000..7fb99e2
--- /dev/null
+++ b/tests/lib/isolate/scenarios/package_relative_spec/bar1_package/bar.dart
@@ -0,0 +1,3 @@
+class Bar {
+  static var value = "Bar1";
+}
diff --git a/tests/lib/isolate/scenarios/package_relative_spec/bar1_package/package.config b/tests/lib/isolate/scenarios/package_relative_spec/bar1_package/package.config
new file mode 100644
index 0000000..daf3199
--- /dev/null
+++ b/tests/lib/isolate/scenarios/package_relative_spec/bar1_package/package.config
@@ -0,0 +1,15 @@
+{
+  "configVersion": 2,
+  "packages": [
+    {
+      "name": "foo",
+      "rootUri": "../foo_package",
+      "languageVersion": "2.9"
+    },
+    {
+      "name": "bar",
+      "rootUri": "../bar2_package",
+      "languageVersion": "2.9"
+    }
+  ]
+}
diff --git a/tests/lib/isolate/scenarios/package_relative_spec/bar2_package/bar.dart b/tests/lib/isolate/scenarios/package_relative_spec/bar2_package/bar.dart
new file mode 100644
index 0000000..cd6723a
--- /dev/null
+++ b/tests/lib/isolate/scenarios/package_relative_spec/bar2_package/bar.dart
@@ -0,0 +1,3 @@
+class Bar {
+  static var value = "Bar2";
+}
diff --git a/tests/lib/isolate/scenarios/package_relative_spec/foo_package/foo.dart b/tests/lib/isolate/scenarios/package_relative_spec/foo_package/foo.dart
new file mode 100644
index 0000000..ba907d1
--- /dev/null
+++ b/tests/lib/isolate/scenarios/package_relative_spec/foo_package/foo.dart
@@ -0,0 +1,3 @@
+class Foo {
+  static var value = "Foo";
+}
diff --git a/tests/lib/isolate/scenarios/package_relative_spec/package_relative_spec_test.dart b/tests/lib/isolate/scenarios/package_relative_spec/package_relative_spec_test.dart
new file mode 100644
index 0000000..9e5b603
--- /dev/null
+++ b/tests/lib/isolate/scenarios/package_relative_spec/package_relative_spec_test.dart
@@ -0,0 +1,60 @@
+// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// Packages=none
+
+import 'dart:io';
+import 'dart:isolate';
+
+import "package:foo/foo.dart";
+import "package:bar/bar.dart";
+
+var CONFIG_URI = "package:bar/package.config";
+
+main([args, port]) async {
+  if (port != null) {
+    testCorrectBarPackage(port);
+    return;
+  }
+  var p = new RawReceivePort();
+  Isolate.spawnUri(Platform.script, [], p.sendPort,
+      packageConfig: Uri.parse(CONFIG_URI));
+  p.handler = (msg) {
+    p.close();
+    if (msg is! List) {
+      print(msg.runtimeType);
+      throw "Failure return from spawned isolate:\n\n$msg";
+    }
+    if (msg[0] != "Foo") {
+      throw "Bad package config in child isolate: ${msg[0]}\n"
+          "Expected: 'Foo'";
+    }
+    if (msg[1] != "Bar2") {
+      throw "Package path not matching: ${msg[1]}\n"
+          "Expected: 'Bar2'";
+    }
+    print("SUCCESS");
+  };
+  if (Bar.value != "Bar1") {
+    throw "Spawning isolate package:bar invalid.";
+  }
+  print("Spawned isolate resolved $CONFIG_URI to: "
+      "${await Isolate.resolvePackageUri(Uri.parse(CONFIG_URI))}");
+}
+
+testCorrectBarPackage(port) async {
+  try {
+    var packageRootStr = Platform.packageRoot;
+    var packageConfigStr = Platform.packageConfig;
+    var packageConfig = await Isolate.packageConfig;
+    var resolvedPkg = await Isolate.resolvePackageUri(Uri.parse(CONFIG_URI));
+    print("Spawned isolate's package root flag: $packageRootStr");
+    print("Spawned isolate's package config flag: $packageConfigStr");
+    print("Spawned isolate's loaded package config: $packageConfig");
+    print("Spawned isolate's resolved package path: $resolvedPkg");
+    port.send([Foo.value, Bar.value]);
+  } catch (e, s) {
+    port.send("$e\n$s\n");
+  }
+}
diff --git a/tests/lib/isolate/scenarios/short_package/.dart_tool/package_config.json b/tests/lib/isolate/scenarios/short_package/.dart_tool/package_config.json
new file mode 100644
index 0000000..f77884c
--- /dev/null
+++ b/tests/lib/isolate/scenarios/short_package/.dart_tool/package_config.json
@@ -0,0 +1,10 @@
+{
+  "configVersion": 2,
+  "packages": [
+    {
+      "name": "flu",
+      "rootUri": "../flu_package",
+      "languageVersion": "2.9"
+    }
+  ]
+}
diff --git a/tests/lib/isolate/scenarios/short_package/flu_package/flu.dart b/tests/lib/isolate/scenarios/short_package/flu_package/flu.dart
new file mode 100644
index 0000000..5e33f7c
--- /dev/null
+++ b/tests/lib/isolate/scenarios/short_package/flu_package/flu.dart
@@ -0,0 +1,3 @@
+class Flu {
+  static var value = "Flu";
+}
diff --git a/tests/lib/isolate/scenarios/short_package/flu_package/flu.text b/tests/lib/isolate/scenarios/short_package/flu_package/flu.text
new file mode 100644
index 0000000..d9d3a9a
--- /dev/null
+++ b/tests/lib/isolate/scenarios/short_package/flu_package/flu.text
@@ -0,0 +1 @@
+Bar
\ No newline at end of file
diff --git a/tests/lib/isolate/scenarios/short_package/short_package_test.dart b/tests/lib/isolate/scenarios/short_package/short_package_test.dart
new file mode 100644
index 0000000..62dfb8c
--- /dev/null
+++ b/tests/lib/isolate/scenarios/short_package/short_package_test.dart
@@ -0,0 +1,40 @@
+// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// Packages=none
+
+import 'dart:io';
+import 'dart:isolate';
+
+import "package:flu/flu.dart";
+
+var PACKAGE_FLU = "package:flu";
+var FLU_TEXT = "flu.text";
+
+testShortResolution(package_uri) async {
+  var fluPackage = await Isolate.resolvePackageUri(Uri.parse(package_uri));
+  print("Resolved $package_uri to $fluPackage");
+  if (fluPackage == null) {
+    throw "Package resolves to null for $package_uri.\n";
+  }
+  var fluText = fluPackage.resolve(FLU_TEXT);
+  print("Resolved $FLU_TEXT from $package_uri to $fluText");
+  var fluFile = new File.fromUri(fluText);
+  var fluString = await fluFile.readAsString();
+  if (fluString != "Bar") {
+    throw "Contents of $FLU_TEXT not matching.\n"
+        "Got: $fluString\n"
+        "Expected: Bar";
+  }
+}
+
+main([args, port]) async {
+  if (Flu.value != "Flu") {
+    throw "Import of wrong Flu package.";
+  }
+//  await testShortResolution(PACKAGE_FLU);
+  await testShortResolution(PACKAGE_FLU + "/");
+  await testShortResolution(PACKAGE_FLU + "/abc.def");
+  print("SUCCESS");
+}
diff --git a/tests/lib/lib.status b/tests/lib/lib.status
index 9b87a8d..87f57d3 100644
--- a/tests/lib/lib.status
+++ b/tests/lib/lib.status
@@ -38,6 +38,9 @@
 js/instanceof_test: SkipByDesign # Issue 42085. CSP policy disallows injected JS code
 js/parameters_test: SkipByDesign # Issue 42085.
 
+[ $compiler != dart2js && $compiler != dartdevk ]
+web/*: SkipByDesign
+
 [ $runtime == chrome && $system == linux ]
 mirrors/native_class_test: Slow, Pass
 
diff --git a/tests/lib/mirrors/instance_members_with_override_test.dart b/tests/lib/mirrors/instance_members_with_override_test.dart
index 7325248..6e1b960 100644
--- a/tests/lib/mirrors/instance_members_with_override_test.dart
+++ b/tests/lib/mirrors/instance_members_with_override_test.dart
@@ -6,12 +6,9 @@
 
 import 'dart:mirrors';
 import 'package:expect/expect.dart';
-import 'package:meta/meta.dart' show virtual;
 
 class S {
-  @virtual
   var field;
-  @virtual
   final finalField = 0;
   method() {}
   get getter {}
diff --git a/tests/lib/web/mirrors_support_test.dart b/tests/lib/web/mirrors_support_test.dart
new file mode 100644
index 0000000..03dc2d5
--- /dev/null
+++ b/tests/lib/web/mirrors_support_test.dart
@@ -0,0 +1,17 @@
+// Copyright (c) 2020, the Dart project authors.  Please see the AUTHORS file
+// for 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:mirrors' provides no functionality in dart-web, but can be imported and
+// all APIs throw.
+import 'dart:mirrors';
+import 'package:expect/expect.dart';
+
+main() {
+  Expect.throws<UnsupportedError>(() => currentMirrorSystem());
+  Expect.throws<UnsupportedError>(() => reflect(main));
+  Expect.throws<UnsupportedError>(() => reflectClass(Object));
+  Expect.throws<UnsupportedError>(() => reflectType(Object));
+  Expect.throws<UnsupportedError>(() => MirrorSystem.getName(#core));
+  Expect.throws<UnsupportedError>(() => MirrorSystem.getSymbol("core"));
+}
diff --git a/tests/lib_2/async/stream_multi_test.dart b/tests/lib_2/async/stream_multi_test.dart
new file mode 100644
index 0000000..b5dd7e5
--- /dev/null
+++ b/tests/lib_2/async/stream_multi_test.dart
@@ -0,0 +1,139 @@
+// Copyright (c) 2020, the Dart project authors.  Please see the AUTHORS file
+// for 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:expect/expect.dart";
+import "package:async_helper/async_helper.dart";
+
+extension StreamRepeatLatestExtension<T> on Stream<T> {
+  Stream<T> repeatLatest() {
+    var done = false;
+    T latest = null;
+    var currentListeners = <MultiStreamController<T>>{};
+    this.listen((event) {
+      latest = event;
+      for (var listener in [...currentListeners]) listener.addSync(event);
+    }, onError: (Object error, StackTrace stack) {
+      for (var listener in [...currentListeners])
+        listener.addErrorSync(error, stack);
+    }, onDone: () {
+      done = true;
+      latest = null;
+      for (var listener in currentListeners) listener.closeSync();
+      currentListeners.clear();
+    });
+    return Stream.multi((controller) {
+      if (done) {
+        controller.close();
+        return;
+      }
+      currentListeners.add(controller);
+      if (latest != null) controller.add(latest);
+      controller.onCancel = () {
+        currentListeners.remove(controller);
+      };
+    });
+  }
+}
+
+void main() {
+  asyncStart();
+  testStreamsIndependent();
+  asyncTest(testStreamNonOverlap);
+  asyncTest(testRepeatLatest);
+  asyncEnd();
+}
+
+/// Test that the streams can provide different events.
+void testStreamsIndependent() {
+  var log = <String>[];
+  var index = 0;
+  var multi = Stream<List<int>>.multi((c) {
+    var id = ++index;
+    log.add("$id");
+    for (var i = 0; i < id + 1; i++) {
+      c.add([id, i]);
+    }
+    c.close();
+  });
+  void logList(List<int> l) {
+    log.add("${l.first}-${l.last}");
+  }
+
+  asyncStart();
+  Future.wait([multi.forEach(logList), multi.forEach(logList)])
+      .whenComplete(() {
+    Expect.equals(7, log.length);
+    for (var element in ["1", "1-0", "1-1", "2", "2-0", "2-1", "2-2"]) {
+      Expect.isTrue(log.contains(element));
+    }
+    asyncEnd();
+  });
+}
+
+/// Test that stream can be listened to again after having no listener.
+Future<void> testStreamNonOverlap() async {
+  var completer = Completer<Object>();
+  MultiStreamController<int> controller;
+  var stream = Stream<int>.multi((c) {
+    controller = c;
+    c.onCancel = () {
+      controller = null;
+      if (!completer.isCompleted) completer.complete(null);
+    };
+  });
+  for (var i in [1, 2, 3]) {
+    var log = <Object>[];
+    var subscription = stream.listen((v) {
+      log.add(v);
+      if (!completer.isCompleted) completer.complete(v);
+    }, onError: (e, s) {
+      log.add(e);
+      if (!completer.isCompleted) completer.complete(e);
+    }, onDone: () {
+      log.add(null);
+      if (!completer.isCompleted) completer.complete(null);
+    });
+    Expect.isNotNull(controller);
+    controller.add(1);
+    await completer.future;
+    Expect.listEquals([1], log);
+
+    completer = Completer();
+    controller.add(2);
+    await completer.future;
+    Expect.listEquals([1, 2], log);
+
+    completer = Completer();
+    if (i == 2) {
+      subscription.cancel();
+    } else {
+      controller.close();
+    }
+    await completer.future;
+    Expect.listEquals([1, 2, if (i != 2) null], log);
+  }
+}
+
+/// Test that the [Stream.repeatLatest] example code works as described.
+Future<void> testRepeatLatest() async {
+  var c = StreamController<int>();
+  var repStream = c.stream.repeatLatest();
+
+  var f1 = repStream.first;
+  c.add(1);
+  var v1 = await f1;
+  Expect.equals(1, v1);
+
+  var f2 = repStream.take(2).toList();
+  c.add(2);
+  var l2 = await f2;
+  Expect.listEquals([1, 2], l2);
+
+  var f3 = repStream.take(2).toList();
+  c.add(3);
+  var l3 = await f3;
+  Expect.listEquals([2, 3], l3);
+}
diff --git a/tests/lib_2/lib_2.status b/tests/lib_2/lib_2.status
index 5a05b95..d17a636 100644
--- a/tests/lib_2/lib_2.status
+++ b/tests/lib_2/lib_2.status
@@ -38,6 +38,9 @@
 js/instanceof_test: SkipByDesign # Issue 42085. CSP policy disallows injected JS code
 js/parameters_test: SkipByDesign # Issue 42085.
 
+[ $compiler != dart2js && $compiler != dartdevk ]
+web/*: SkipByDesign
+
 [ $runtime == chrome && $system == linux ]
 mirrors/native_class_test: Slow, Pass
 
diff --git a/tests/lib_2/mirrors/instance_members_with_override_test.dart b/tests/lib_2/mirrors/instance_members_with_override_test.dart
index 41d1bcc..1dce0c6 100644
--- a/tests/lib_2/mirrors/instance_members_with_override_test.dart
+++ b/tests/lib_2/mirrors/instance_members_with_override_test.dart
@@ -6,12 +6,9 @@
 
 import 'dart:mirrors';
 import 'package:expect/expect.dart';
-import 'package:meta/meta.dart' show virtual;
 
 class S {
-  @virtual
   var field;
-  @virtual
   final finalField = 0;
   method() {}
   get getter {}
diff --git a/tests/lib_2/web/mirrors_support_test.dart b/tests/lib_2/web/mirrors_support_test.dart
new file mode 100644
index 0000000..03dc2d5
--- /dev/null
+++ b/tests/lib_2/web/mirrors_support_test.dart
@@ -0,0 +1,17 @@
+// Copyright (c) 2020, the Dart project authors.  Please see the AUTHORS file
+// for 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:mirrors' provides no functionality in dart-web, but can be imported and
+// all APIs throw.
+import 'dart:mirrors';
+import 'package:expect/expect.dart';
+
+main() {
+  Expect.throws<UnsupportedError>(() => currentMirrorSystem());
+  Expect.throws<UnsupportedError>(() => reflect(main));
+  Expect.throws<UnsupportedError>(() => reflectClass(Object));
+  Expect.throws<UnsupportedError>(() => reflectType(Object));
+  Expect.throws<UnsupportedError>(() => MirrorSystem.getName(#core));
+  Expect.throws<UnsupportedError>(() => MirrorSystem.getSymbol("core"));
+}
diff --git a/tests/standalone/byte_array_view_optimized_test.dart b/tests/standalone/byte_array_view_optimized_test.dart
new file mode 100644
index 0000000..77b22d3
--- /dev/null
+++ b/tests/standalone/byte_array_view_optimized_test.dart
@@ -0,0 +1,22 @@
+// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// Test optimization of byte array views on external data.
+
+// Library tag to be able to run in html test framework.
+library ByteArrayViewOptimizedTest;
+
+import "package:expect/expect.dart";
+import "dart:typed_data";
+
+li16(v) => v[0];
+
+main() {
+  var a = new Uint8List(2);
+  a[0] = a[1] = 0xff;
+  var b = new Int16List.view(a.buffer);
+  Expect.equals(-1, li16(b));
+  for (var i = 0; i < 10000; i++) li16(b);
+  Expect.equals(-1, li16(b));
+}
diff --git a/tests/standalone/bytedata_test.dart b/tests/standalone/bytedata_test.dart
new file mode 100644
index 0000000..7f8acf4
--- /dev/null
+++ b/tests/standalone/bytedata_test.dart
@@ -0,0 +1,338 @@
+// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+//
+// Dart test program for testing typed data.
+
+// Library tag to be able to run in html test framework.
+library ByteDataTest;
+
+import "package:expect/expect.dart";
+import 'dart:typed_data';
+
+testGetters() {
+  bool host_is_little_endian =
+      (new Uint8List.view(new Uint16List.fromList([1]).buffer))[0] == 1;
+
+  var list = new Uint8List(8);
+  list[0] = 0xf1;
+  list[1] = 0xf2;
+  list[2] = 0xf3;
+  list[3] = 0xf4;
+  list[4] = 0xf5;
+  list[5] = 0xf6;
+  list[6] = 0xf7;
+  list[7] = 0xf8;
+  var ba = list.buffer;
+
+  ByteData bd = new ByteData.view(ba);
+  var value;
+  int expected_value_be = -3598;
+  int expected_value_le = -3343;
+
+  value = bd.getInt16(0); // Default is big endian access.
+  Expect.equals(expected_value_be, value);
+  value = bd.getInt16(0, Endian.big);
+  Expect.equals(expected_value_be, value);
+  value = bd.getInt16(0, Endian.little);
+  Expect.equals(expected_value_le, value);
+  value = bd.getInt16(0, Endian.host);
+  if (host_is_little_endian) {
+    Expect.isTrue(identical(Endian.host, Endian.little));
+    Expect.equals(expected_value_le, value);
+  } else {
+    Expect.isTrue(identical(Endian.host, Endian.big));
+    Expect.equals(expected_value_be, value);
+  }
+
+  value = bd.getUint16(0); // Default is big endian access.
+  Expect.equals(0xf1f2, value);
+  value = bd.getUint16(0, Endian.big);
+  Expect.equals(0xf1f2, value);
+  value = bd.getUint16(0, Endian.little);
+  Expect.equals(0xf2f1, value);
+  if (host_is_little_endian) {
+    Expect.isTrue(identical(Endian.host, Endian.little));
+    Expect.equals(0xf2f1, value);
+  } else {
+    Expect.isTrue(identical(Endian.host, Endian.big));
+    Expect.equals(0xf1f2, value);
+  }
+
+  expected_value_be = -235736076;
+  expected_value_le = -185339151;
+
+  value = bd.getInt32(0); // Default is big endian access.
+  Expect.equals(expected_value_be, value);
+  value = bd.getInt32(0, Endian.big);
+  Expect.equals(expected_value_be, value);
+  value = bd.getInt32(0, Endian.little);
+  Expect.equals(expected_value_le, value);
+  if (host_is_little_endian) {
+    Expect.isTrue(identical(Endian.host, Endian.little));
+    Expect.equals(expected_value_le, value);
+  } else {
+    Expect.isTrue(identical(Endian.host, Endian.big));
+    Expect.equals(expected_value_be, value);
+  }
+
+  value = bd.getUint32(0); // Default is big endian access.
+  Expect.equals(0xf1f2f3f4, value);
+  value = bd.getUint32(0, Endian.big);
+  Expect.equals(0xf1f2f3f4, value);
+  value = bd.getUint32(0, Endian.little);
+  Expect.equals(0xf4f3f2f1, value);
+  if (host_is_little_endian) {
+    Expect.isTrue(identical(Endian.host, Endian.little));
+    Expect.equals(0xf4f3f2f1, value);
+  } else {
+    Expect.isTrue(identical(Endian.host, Endian.big));
+    Expect.equals(0xf1f2f3f4, value);
+  }
+
+  expected_value_be = -1012478732780767240;
+  expected_value_le = -506664896818842895;
+
+  value = bd.getInt64(0); // Default is big endian access.
+  Expect.equals(expected_value_be, value);
+  value = bd.getInt64(0, Endian.big);
+  Expect.equals(expected_value_be, value);
+  value = bd.getInt64(0, Endian.little);
+  Expect.equals(expected_value_le, value);
+  if (host_is_little_endian) {
+    Expect.isTrue(identical(Endian.host, Endian.little));
+    Expect.equals(expected_value_le, value);
+  } else {
+    Expect.isTrue(identical(Endian.host, Endian.big));
+    Expect.equals(expected_value_be, value);
+  }
+
+  value = bd.getUint64(0); // Default is big endian access.
+  Expect.equals(0xf1f2f3f4f5f6f7f8, value);
+  value = bd.getUint64(0, Endian.big);
+  Expect.equals(0xf1f2f3f4f5f6f7f8, value);
+  value = bd.getUint64(0, Endian.little);
+  Expect.equals(0xf8f7f6f5f4f3f2f1, value);
+  if (host_is_little_endian) {
+    Expect.isTrue(identical(Endian.host, Endian.little));
+    Expect.equals(0xf8f7f6f5f4f3f2f1, value);
+  } else {
+    Expect.isTrue(identical(Endian.host, Endian.big));
+    Expect.equals(0xf1f2f3f4f5f6f7f8, value);
+  }
+
+  double expected_be_value = -2.4060893954673178e+30;
+  double expected_le_value = -1.5462104171572421e+32;
+  value = bd.getFloat32(0); // Default is big endian access.
+  Expect.equals(expected_be_value, value);
+  value = bd.getFloat32(0, Endian.big);
+  Expect.equals(expected_be_value, value);
+  value = bd.getFloat32(0, Endian.little);
+  Expect.equals(expected_le_value, value);
+  if (host_is_little_endian) {
+    Expect.isTrue(identical(Endian.host, Endian.little));
+    Expect.equals(expected_le_value, value);
+  } else {
+    Expect.isTrue(identical(Endian.host, Endian.big));
+    Expect.equals(expected_be_value, value);
+  }
+
+  expected_be_value = -7.898661740976602e+240;
+  expected_le_value = -5.185705956736366e+274;
+  value = bd.getFloat64(0); // Default is big endian access.
+  Expect.equals(expected_be_value, value);
+  value = bd.getFloat64(0, Endian.big);
+  Expect.equals(expected_be_value, value);
+  value = bd.getFloat64(0, Endian.little);
+  Expect.equals(expected_le_value, value);
+  if (host_is_little_endian) {
+    Expect.isTrue(identical(Endian.host, Endian.little));
+    Expect.equals(expected_le_value, value);
+  } else {
+    Expect.isTrue(identical(Endian.host, Endian.big));
+    Expect.equals(expected_be_value, value);
+  }
+}
+
+validate16be(var list) {
+  Expect.equals(0xf1, list[0]);
+  Expect.equals(0xf2, list[1]);
+}
+
+validate16le(var list) {
+  Expect.equals(0xf2, list[0]);
+  Expect.equals(0xf1, list[1]);
+}
+
+validate32be(var list) {
+  Expect.equals(0xf1, list[0]);
+  Expect.equals(0xf2, list[1]);
+  Expect.equals(0xf3, list[2]);
+  Expect.equals(0xf4, list[3]);
+}
+
+validate32le(var list) {
+  Expect.equals(0xf4, list[0]);
+  Expect.equals(0xf3, list[1]);
+  Expect.equals(0xf2, list[2]);
+  Expect.equals(0xf1, list[3]);
+}
+
+validate64be(var list) {
+  Expect.equals(0xf1, list[0]);
+  Expect.equals(0xf2, list[1]);
+  Expect.equals(0xf3, list[2]);
+  Expect.equals(0xf4, list[3]);
+  Expect.equals(0xf5, list[4]);
+  Expect.equals(0xf6, list[5]);
+  Expect.equals(0xf7, list[6]);
+  Expect.equals(0xf8, list[7]);
+}
+
+validate64le(var list) {
+  Expect.equals(0xf8, list[0]);
+  Expect.equals(0xf7, list[1]);
+  Expect.equals(0xf6, list[2]);
+  Expect.equals(0xf5, list[3]);
+  Expect.equals(0xf4, list[4]);
+  Expect.equals(0xf3, list[5]);
+  Expect.equals(0xf2, list[6]);
+  Expect.equals(0xf1, list[7]);
+}
+
+testSetters() {
+  bool host_is_little_endian =
+      (new Uint8List.view(new Uint16List.fromList([1]).buffer))[0] == 1;
+
+  var list = new Uint8List(8);
+  for (int i = 0; i < list.length; i++) {
+    list[i] = 0;
+  }
+  var ba = list.buffer;
+  ByteData bd = new ByteData.view(ba);
+
+  bd.setInt16(0, 0xf1f2); // Default is big endian access.
+  validate16be(list);
+  bd.setInt16(0, 0xf1f2, Endian.big);
+  validate16be(list);
+  bd.setInt16(0, 0xf1f2, Endian.little);
+  validate16le(list);
+  bd.setInt16(0, 0xf1f2, Endian.host);
+  if (host_is_little_endian) {
+    Expect.isTrue(identical(Endian.host, Endian.little));
+    validate16le(list);
+  } else {
+    Expect.isTrue(identical(Endian.host, Endian.big));
+    validate16be(list);
+  }
+
+  bd.setUint16(0, 0xf1f2); // Default is big endian access.
+  validate16be(list);
+  bd.setUint16(0, 0xf1f2, Endian.big);
+  validate16be(list);
+  bd.setUint16(0, 0xf1f2, Endian.little);
+  validate16le(list);
+  bd.setUint16(0, 0xf1f2, Endian.host);
+  if (host_is_little_endian) {
+    Expect.isTrue(identical(Endian.host, Endian.little));
+    validate16le(list);
+  } else {
+    Expect.isTrue(identical(Endian.host, Endian.big));
+    validate16be(list);
+  }
+
+  bd.setInt32(0, 0xf1f2f3f4); // Default is big endian access.
+  validate32be(list);
+  bd.setInt32(0, 0xf1f2f3f4, Endian.big);
+  validate32be(list);
+  bd.setInt32(0, 0xf1f2f3f4, Endian.little);
+  validate32le(list);
+  bd.setInt32(0, 0xf1f2f3f4, Endian.host);
+  if (host_is_little_endian) {
+    Expect.isTrue(identical(Endian.host, Endian.little));
+    validate32le(list);
+  } else {
+    Expect.isTrue(identical(Endian.host, Endian.big));
+    validate32be(list);
+  }
+
+  bd.setUint32(0, 0xf1f2f3f4); // Default is big endian access.
+  validate32be(list);
+  bd.setUint32(0, 0xf1f2f3f4, Endian.big);
+  validate32be(list);
+  bd.setUint32(0, 0xf1f2f3f4, Endian.little);
+  validate32le(list);
+  bd.setUint32(0, 0xf1f2f3f4, Endian.host);
+  if (host_is_little_endian) {
+    Expect.isTrue(identical(Endian.host, Endian.little));
+    validate32le(list);
+  } else {
+    Expect.isTrue(identical(Endian.host, Endian.big));
+    validate32be(list);
+  }
+
+  bd.setInt64(0, 0xf1f2f3f4f5f6f7f8); // Default is big endian access.
+  validate64be(list);
+  bd.setInt64(0, 0xf1f2f3f4f5f6f7f8, Endian.big);
+  validate64be(list);
+  bd.setInt64(0, 0xf1f2f3f4f5f6f7f8, Endian.little);
+  validate64le(list);
+  bd.setInt64(0, 0xf1f2f3f4f5f6f7f8, Endian.host);
+  if (host_is_little_endian) {
+    Expect.isTrue(identical(Endian.host, Endian.little));
+    validate64le(list);
+  } else {
+    Expect.isTrue(identical(Endian.host, Endian.big));
+    validate64be(list);
+  }
+
+  bd.setUint64(0, 0xf1f2f3f4f5f6f7f8); // Default is big endian access.
+  validate64be(list);
+  bd.setUint64(0, 0xf1f2f3f4f5f6f7f8, Endian.big);
+  validate64be(list);
+  bd.setUint64(0, 0xf1f2f3f4f5f6f7f8, Endian.little);
+  validate64le(list);
+  bd.setUint64(0, 0xf1f2f3f4f5f6f7f8, Endian.host);
+  if (host_is_little_endian) {
+    Expect.isTrue(identical(Endian.host, Endian.little));
+    validate64le(list);
+  } else {
+    Expect.isTrue(identical(Endian.host, Endian.big));
+    validate64be(list);
+  }
+
+  bd.setFloat32(0, -2.4060893954673178e+30); // Default is big endian access.
+  validate32be(list);
+  bd.setFloat32(0, -2.4060893954673178e+30, Endian.big);
+  validate32be(list);
+  bd.setFloat32(0, -2.4060893954673178e+30, Endian.little);
+  validate32le(list);
+  bd.setFloat32(0, -2.4060893954673178e+30, Endian.host);
+  if (host_is_little_endian) {
+    Expect.isTrue(identical(Endian.host, Endian.little));
+    validate32le(list);
+  } else {
+    Expect.isTrue(identical(Endian.host, Endian.big));
+    validate32be(list);
+  }
+
+  bd.setFloat64(0, -7.898661740976602e+240); // Default is big endian access.
+  validate64be(list);
+  bd.setFloat64(0, -7.898661740976602e+240, Endian.big);
+  validate64be(list);
+  bd.setFloat64(0, -7.898661740976602e+240, Endian.little);
+  validate64le(list);
+  bd.setFloat64(0, -7.898661740976602e+240, Endian.host);
+  if (host_is_little_endian) {
+    Expect.isTrue(identical(Endian.host, Endian.little));
+    validate64le(list);
+  } else {
+    Expect.isTrue(identical(Endian.host, Endian.big));
+    validate64be(list);
+  }
+}
+
+main() {
+  testGetters();
+  testSetters();
+}
diff --git a/tests/standalone/causal_async_stack_test.dart b/tests/standalone/causal_async_stack_test.dart
new file mode 100644
index 0000000..5b44bec
--- /dev/null
+++ b/tests/standalone/causal_async_stack_test.dart
@@ -0,0 +1,35 @@
+// Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+// VMOptions=--causal_async_stacks --no-lazy-async-stacks
+// VMOptions=--no-causal_async_stacks --lazy-async-stacks
+
+import "package:expect/expect.dart";
+
+noop() async => Future.value(null);
+
+baz() async {
+  // Throw exception after the first continuation, when there is no
+  // original stack trace.
+  await noop();
+  throw "Bad!";
+}
+
+bar() async {
+  await baz();
+}
+
+foo() async {
+  await bar();
+}
+
+main() async {
+  try {
+    await foo();
+  } catch (e, st) {
+    Expect.isTrue(st.toString().contains("baz"));
+    Expect.isTrue(st.toString().contains("bar"));
+    Expect.isTrue(st.toString().contains("foo"));
+    Expect.isTrue(st.toString().contains("main"));
+  }
+}
diff --git a/tests/standalone/check_class_cha_test.dart b/tests/standalone/check_class_cha_test.dart
new file mode 100644
index 0000000..50d6664
--- /dev/null
+++ b/tests/standalone/check_class_cha_test.dart
@@ -0,0 +1,66 @@
+// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import "package:expect/expect.dart";
+
+// Class hierarchy on an abstract class
+// that defines a "next" structure.
+
+abstract class A {
+  A? next;
+}
+
+class B extends A {
+  B(A? n) {
+    this.next = n;
+  }
+}
+
+// Method that counts length of list.
+// With only Bs, the getter can be
+// inlined without check class.
+int countMe(A? i) {
+  int x = 0;
+  while (i != null) {
+    A? next = i.next;
+    x++;
+    i = next;
+  }
+  return x;
+}
+
+int doitHot(A? a) {
+  // Warm up the JIT.
+  int d = 0;
+  for (int i = 0; i < 1000; i++) {
+    d += countMe(a);
+  }
+  return d;
+}
+
+// Nasty class that overrides the getter.
+class C extends A {
+  C(A? n) {
+    this.next = n;
+  }
+  // New override.
+  A? get next => null;
+}
+
+int bringInC(A? a) {
+  // Introduce C to compiler.
+  a = new C(a);
+  return doitHot(a);
+}
+
+main() {
+  // Make a list with just Bs.
+  A? a = null;
+  for (int i = 0; i < 1000; i++) {
+    a = new B(a);
+  }
+
+  Expect.equals(1000 * 1000, doitHot(a));
+  Expect.equals(1000, bringInC(a));
+}
diff --git a/tests/standalone/check_null_cha_test.dart b/tests/standalone/check_null_cha_test.dart
new file mode 100644
index 0000000..72017d2
--- /dev/null
+++ b/tests/standalone/check_null_cha_test.dart
@@ -0,0 +1,58 @@
+// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import "package:expect/expect.dart";
+
+// A class the has a getter also provided by Object
+// (higher in the class hierarchy) and thus also the
+// Null class (besides X in the class hierarchy).
+class X {
+  int hashCode = -1;
+  X() {
+    hashCode = 1;
+  }
+}
+
+// Use this getter on X receiver.
+int hashMe(X? x) {
+  int d = 0;
+  for (int i = 0; i < 10; i++) {
+    d += x.hashCode;
+  }
+  return d;
+}
+
+// Use this getter on Null class receiver.
+// Only possible value is null.
+int hashNull(Null x) {
+  int d = 0;
+  for (int i = 0; i < 10; i++) {
+    d += x.hashCode;
+  }
+  return d;
+}
+
+main() {
+  // Warm up the JIT with just an X object. Having a single receiver
+  // of type X with nothing below in the hierarchy that overrides
+  // hashCode could tempt the JIT to inline the getter with CHA
+  // that deopts when X is subclassed in the future.
+  X x = new X();
+  for (int i = 0; i < 1000; i++) {
+    Expect.equals(10, hashMe(x));
+  }
+
+  // However, this is a special case that also works on null
+  // (calling Object's hashCode). So this should not throw an
+  // exception. Had we inlined, this would have hit the null
+  // check and thrown an exception.
+  Expect.notEquals(0, hashMe(null));
+
+  // Also warm up the JIT on a direct Null receiver.
+  int d = 0;
+  for (int i = 0; i < 1000; i++) {
+    d += hashNull(null);
+  }
+  Expect.notEquals(0, d);
+}
diff --git a/tests/standalone/constant_left_shift_test.dart b/tests/standalone/constant_left_shift_test.dart
new file mode 100644
index 0000000..5f87650
--- /dev/null
+++ b/tests/standalone/constant_left_shift_test.dart
@@ -0,0 +1,78 @@
+// 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 left shifts of a constant.
+
+import "package:expect/expect.dart";
+
+shiftLeft0(c) => 0 << c;
+shiftLeft1(c) => 1 << c;
+shiftLeft8448(c) => 8448 << c;
+
+shiftLeftNeg1(c) => -1 << c;
+shiftLeftNeg8448(c) => -8448 << c;
+
+main() {
+  // Optimize shifts.
+  for (int i = 0; i < 6000; i++) {
+    shiftLeft1(2);
+    shiftLeft0(2);
+    shiftLeft8448(2);
+    shiftLeftNeg1(2);
+    shiftLeftNeg8448(2);
+  }
+  for (int i = 0; i < 80; i++) {
+    Expect.equals(0, shiftLeft0(i));
+  }
+  // Exceptions.
+  Expect.throws(() => shiftLeft0(-1));
+
+  Expect.equals(1, shiftLeft1(0));
+  Expect.equals(128, shiftLeft1(7));
+  Expect.equals(536870912, shiftLeft1(29));
+  // Deoptimize on 32-bit.
+  Expect.equals(1073741824, shiftLeft1(30));
+  Expect.equals(2147483648, shiftLeft1(31));
+  Expect.equals(1152921504606846976, shiftLeft1(60));
+  Expect.equals(2305843009213693952, shiftLeft1(61));
+  // Deoptimize on 64 bits.
+  Expect.equals(4611686018427387904, shiftLeft1(62));
+  Expect.equals(-9223372036854775808, shiftLeft1(63));
+
+  Expect.equals(8448, shiftLeft8448(0));
+  Expect.equals(1081344, shiftLeft8448(7));
+  Expect.equals(553648128, shiftLeft8448(16));
+  // Deoptimize on 32-bit.
+  Expect.equals(1107296256, shiftLeft8448(17));
+  Expect.equals(2214592512, shiftLeft8448(18));
+  Expect.equals(1188950301625810944, shiftLeft8448(47));
+  Expect.equals(2377900603251621888, shiftLeft8448(48));
+  // Deoptimize on 64 bits.
+  Expect.equals(4755801206503243776, shiftLeft8448(49));
+  Expect.equals(-8935141660703064064, shiftLeft8448(50));
+
+  Expect.equals(-1, shiftLeftNeg1(0));
+  Expect.equals(-128, shiftLeftNeg1(7));
+  Expect.equals(-536870912, shiftLeftNeg1(29));
+  // Deoptimize on 32-bit.
+  Expect.equals(-1073741824, shiftLeftNeg1(30));
+  Expect.equals(-2147483648, shiftLeftNeg1(31));
+  Expect.equals(-1152921504606846976, shiftLeftNeg1(60));
+  Expect.equals(-2305843009213693952, shiftLeftNeg1(61));
+  // Deoptimize on 64 bits.
+  Expect.equals(-4611686018427387904, shiftLeftNeg1(62));
+  Expect.equals(-9223372036854775808, shiftLeftNeg1(63));
+
+  Expect.equals(-8448, shiftLeftNeg8448(0));
+  Expect.equals(-1081344, shiftLeftNeg8448(7));
+  Expect.equals(-553648128, shiftLeftNeg8448(16));
+  // Deoptimize on 32-bit.
+  Expect.equals(-1107296256, shiftLeftNeg8448(17));
+  Expect.equals(-2214592512, shiftLeftNeg8448(18));
+  Expect.equals(-1188950301625810944, shiftLeftNeg8448(47));
+  Expect.equals(-2377900603251621888, shiftLeftNeg8448(48));
+  // Deoptimize on 64 bits.
+  Expect.equals(-4755801206503243776, shiftLeftNeg8448(49));
+  Expect.equals(8935141660703064064, shiftLeftNeg8448(50));
+}
diff --git a/tests/standalone/dart_developer_disabled_env_test.dart b/tests/standalone/dart_developer_disabled_env_test.dart
new file mode 100644
index 0000000..1d9653b
--- /dev/null
+++ b/tests/standalone/dart_developer_disabled_env_test.dart
@@ -0,0 +1,11 @@
+// Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+// VMOptions=--no_causal_async_stacks
+
+import "package:expect/expect.dart";
+
+main() {
+  Expect.isFalse(
+      const bool.fromEnvironment('dart.developer.causal_async_stacks'));
+}
diff --git a/tests/standalone/dart_developer_env2_test.dart b/tests/standalone/dart_developer_env2_test.dart
new file mode 100644
index 0000000..881880a
--- /dev/null
+++ b/tests/standalone/dart_developer_env2_test.dart
@@ -0,0 +1,11 @@
+// Copyright (c) 2020, the Dart project authors.  Please see the AUTHORS file
+// for 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=--lazy-async-stacks --no-causal-async-stacks
+
+import "package:expect/expect.dart";
+
+main() {
+  Expect.isFalse(
+      const bool.fromEnvironment('dart.developer.causal_async_stacks'));
+}
diff --git a/tests/standalone/dart_developer_env_test.dart b/tests/standalone/dart_developer_env_test.dart
new file mode 100644
index 0000000..abb7bf6
--- /dev/null
+++ b/tests/standalone/dart_developer_env_test.dart
@@ -0,0 +1,11 @@
+// Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+// VMOptions=--no-lazy-async-stacks --causal-async-stacks
+
+import "package:expect/expect.dart";
+
+main() {
+  Expect
+      .isTrue(const bool.fromEnvironment('dart.developer.causal_async_stacks'));
+}
diff --git a/tests/standalone/deferred/alpha.dart b/tests/standalone/deferred/alpha.dart
new file mode 100644
index 0000000..20aac88
--- /dev/null
+++ b/tests/standalone/deferred/alpha.dart
@@ -0,0 +1,2 @@
+// beta.dart does not exist!
+import 'beta.dart';
diff --git a/tests/standalone/deferred/exists.dart b/tests/standalone/deferred/exists.dart
new file mode 100644
index 0000000..26cc193
--- /dev/null
+++ b/tests/standalone/deferred/exists.dart
@@ -0,0 +1 @@
+var x = 99;
diff --git a/tests/standalone/deferred/transitive_error.dart b/tests/standalone/deferred/transitive_error.dart
new file mode 100644
index 0000000..e5a9af7
--- /dev/null
+++ b/tests/standalone/deferred/transitive_error.dart
@@ -0,0 +1 @@
+import 'alpha.dart';
diff --git a/tests/standalone/deferred_transitive_import_error_test.dart b/tests/standalone/deferred_transitive_import_error_test.dart
new file mode 100644
index 0000000..585c9cd
--- /dev/null
+++ b/tests/standalone/deferred_transitive_import_error_test.dart
@@ -0,0 +1,29 @@
+// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import "package:expect/expect.dart";
+// A deferred library that doesn't exist.
+import 'package:foo/foo.dart' deferred as foo;
+// A deferred library that does exist.
+import 'deferred/exists.dart' deferred as exists;
+// A deferred library that transitively will fail due to a file not found.
+import 'deferred/transitive_error.dart' deferred as te;
+
+main() async {
+  // Attempt to load foo which will fail.
+  var fooError;
+  await foo.loadLibrary().catchError((e) {
+    fooError = e;
+  });
+  Expect.isNotNull(fooError);
+  await exists.loadLibrary();
+  Expect.equals(99, exists.x);
+  /* TODO(johnmccutchan): Implement transitive error reporting.
+  var teError;
+  await te.loadLibrary().catchError((e) {
+    teError = e;
+  });
+  Expect.isNotNull(teError);
+  */
+}
diff --git a/tests/standalone/deny_listed_test.dart b/tests/standalone/deny_listed_test.dart
new file mode 100644
index 0000000..2516b20
--- /dev/null
+++ b/tests/standalone/deny_listed_test.dart
@@ -0,0 +1,59 @@
+// Copyright (c) 2011, the Dart project authors.  Please see the AUTHORS file
+// for 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 checking that static/instance field shadowing do not conflict.
+
+// Test that certain interfaces/classes are denylisted from being
+// implemented or extended (VM corelib only).
+
+library BlackListedTest;
+
+class MyBool extends Bool {} // //# 01: compile-time error
+
+class MyDouble extends Double {} // //# 02: compile-time error
+
+class MyObjectArray extends ObjectArray {} // //# 03: compile-time error
+
+class MyImmutableArray extends ImmutableArray {} // //# 04: compile-time error
+
+class MyGrowableObjectArray extends GrowableObjectArray {} // //# 05: compile-time error
+
+class MyIntegerImplementation extends IntegerImplementation {} // //# 06: compile-time error
+
+class MySmi extends Smi {} // //# 07: compile-time error
+
+class MyMint extends Mint {} // //# 08: compile-time error
+
+class MyBigint extends Bigint {} // //# 09: compile-time error
+
+class MyOneByteString extends OneByteString {} // //# 10: compile-time error
+
+class MyTwoByteString extends TwoByteString {} // //# 11: compile-time error
+
+class MyFourByteString extends FourByteString {} // //# 12: compile-time error
+
+main() {
+  new MyBool(); //# 01: continued
+
+  new MyDouble(); //# 02: continued
+
+  new MyObjectArray(); //# 03: continued
+
+  new MyImmutableArray(); //# 04: continued
+
+  new MyGrowableObjectArray(); //# 05: continued
+
+  new MyIntegerImplementation(); //# 06: continued
+
+  new MySmi(); //# 07: continued
+
+  new MyMint(); //# 08: continued
+
+  new MyBigint(); //# 09: continued
+
+  new MyOneByteString(); //# 10: continued
+
+  new MyTwoByteString(); //# 11: continued
+
+  new MyFourByteString(); //# 12: continued
+}
diff --git a/tests/standalone/deoptimization_test.dart b/tests/standalone/deoptimization_test.dart
new file mode 100644
index 0000000..b60f789
--- /dev/null
+++ b/tests/standalone/deoptimization_test.dart
@@ -0,0 +1,215 @@
+// Copyright (c) 2011, the Dart project authors.  Please see the AUTHORS file
+// for 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 deoptimization.
+
+import "package:expect/expect.dart";
+
+class SmiCompares {
+  // Test deoptimization when one argument is known to be Smi.
+  static bool smiCompareLessThan2(a) {
+    return a < 2;
+  }
+
+  // Test deoptimization when one argument is known to be Smi.
+  static bool smiCompareGreaterThan2(a) {
+    return 2 < a;
+  }
+
+  // Test deoptimization when both arguments unknown.
+  static bool smiCompareLessThan(a, b) {
+    return a < b;
+  }
+
+  // Test deoptimization when both arguments unknown.
+  static bool smiCompareGreaterThan(a, b) {
+    return a > b;
+  }
+
+  static smiComparesTest() {
+    for (int i = 0; i < 2000; i++) {
+      Expect.equals(true, smiCompareLessThan2(1));
+      Expect.equals(false, smiCompareLessThan2(3));
+      Expect.equals(false, smiCompareGreaterThan2(1));
+      Expect.equals(true, smiCompareGreaterThan2(3));
+      Expect.equals(true, smiCompareLessThan(1, 2));
+      Expect.equals(false, smiCompareGreaterThan(1, 2));
+    }
+    // Deoptimize by passing a double instead of Smi
+    Expect.equals(true, smiCompareLessThan2(1.0));
+    Expect.equals(false, smiCompareGreaterThan2(1.0));
+    Expect.equals(true, smiCompareLessThan(1.0, 2));
+    Expect.equals(false, smiCompareGreaterThan(1, 2.0));
+  }
+}
+
+class SmiBinop {
+  static subWithLiteral(a) {
+    return a - 1;
+  }
+
+  static void smiBinopTest() {
+    for (int i = 0; i < 2000; i++) {
+      Expect.equals(2, subWithLiteral(3));
+    }
+    // Deoptimize.
+    Expect.equals(2.0, subWithLiteral(3.0));
+  }
+
+  static mul(x) {
+    return x * 1024;
+  }
+
+  static void smiBinopOverflowTest() {
+    final int big = 536870912;
+    for (int i = 0; i < 2000; i++) {
+      Expect.equals(1024, mul(1));
+    }
+    // Deoptimize by overflow.
+    Expect.equals(1024 * big, mul(big));
+  }
+}
+
+class ObjectsEquality {
+  static bool compareEqual(a, b) {
+    return a == b;
+  }
+
+  static bool compareNotEqual(a, b) {
+    return a != b;
+  }
+
+  // Use only Object.==.
+  static void objectsEqualityTest() {
+    var a = new ObjectsEquality();
+    var b = new ObjectsEquality();
+    for (int i = 0; i < 1000; i++) {
+      Expect.equals(true, compareEqual(a, a));
+      Expect.equals(true, compareEqual(null, null));
+      Expect.equals(false, compareEqual(null, a));
+      Expect.equals(false, compareEqual(a, null));
+      Expect.equals(true, compareEqual(b, b));
+      Expect.equals(false, compareEqual(a, b));
+
+      Expect.equals(false, compareNotEqual(a, a));
+      Expect.equals(false, compareNotEqual(null, null));
+      Expect.equals(true, compareNotEqual(null, a));
+      Expect.equals(true, compareNotEqual(a, null));
+      Expect.equals(false, compareNotEqual(b, b));
+      Expect.equals(true, compareNotEqual(a, b));
+    }
+    var c = new SmiBinop();
+    // Deoptimize.
+    Expect.equals(true, compareEqual(c, c));
+    Expect.equals(false, compareEqual(c, null));
+    Expect.equals(false, compareNotEqual(c, c));
+    Expect.equals(true, compareNotEqual(c, null));
+  }
+}
+
+class DeoptimizationTest {
+  static foo(a, b) {
+    return a - b;
+  }
+
+  static test1() {
+    for (int i = 0; i < 2000; i++) {
+      Expect.equals(2, foo(3, 1)); // <-- Optimizes 'foo',
+    }
+    Expect.equals(2.2, foo(1.2, -1.0)); // <-- Deoptimizes 'foo'.
+    for (int i = 0; i < 10000; i++) {
+      Expect.equals(2, foo(3, 1)); // <-- Optimizes 'foo'.
+    }
+    Expect.equals(2.2, foo(1.2, -1)); // <-- Deoptimizes 'foo'.
+  }
+
+  static moo(n) {
+    return ++n;
+  }
+
+  static test2() {
+    for (int i = 0; i < 2000; i++) {
+      Expect.equals(4, moo(3)); // <-- Optimizes 'moo',
+    }
+    Expect.equals(2.2, moo(1.2)); // <-- Deoptimizes 'moo'.
+    for (int i = 0; i < 10000; i++) {
+      Expect.equals(4, moo(3)); // <-- Optimizes 'moo'.
+    }
+    Expect.equals(2.2, moo(1.2)); // <-- Deoptimizes 'moo'.
+  }
+
+  static test3() {
+    for (int i = 0; i < 2000; i++) {
+      Expect.equals(2.0, foo(3.0, 1.0)); // <-- Optimizes 'foo',
+    }
+    Expect.equals(2, foo(1, -1)); // <-- Deoptimizes 'foo'.
+    for (int i = 0; i < 2000; i++) {
+      Expect.equals(2.0, foo(3.0, 1.0)); // <-- Optimizes 'foo',
+    }
+    Expect.equals(2.2, moo(1.2)); // <-- Deoptimizes 'moo'.
+  }
+
+  static bool compareInt(a, b) {
+    return a < b;
+  }
+
+  static bool compareDouble(a, b) {
+    return a < b;
+  }
+
+  static test4() {
+    for (int i = 0; i < 2000; i++) {
+      Expect.equals(true, compareInt(1, 2));
+      Expect.equals(true, compareDouble(1.0, 2.0));
+    }
+    // Trigger deoptimization in compareInt and compareDouble.
+    Expect.equals(true, compareInt(1, 2.0));
+    Expect.equals(true, compareDouble(1.0, 2));
+  }
+
+  static smiRightShift() {
+    int ShiftRight(int a, int b) {
+      return a >> b;
+    }
+
+    for (int i = 0; i < 2000; i++) {
+      var r = ShiftRight(10, 2);
+      Expect.equals(2, r);
+    }
+    // ShiftRight is optimized.
+    Expect.equals(0, ShiftRight(10, 64));
+    // Deoptimize ShiftRight because 'a' is a Mint.
+    var mint = 1 << 63;
+    Expect.equals(-1 << 3, ShiftRight(mint, 60));
+  }
+
+  static doubleUnary() {
+    num unary(num a) {
+      return -a;
+    }
+
+    for (int i = 0; i < 2000; i++) {
+      var r = unary(2.0);
+      Expect.equals(-2.0, r);
+    }
+    var r = unary(5);
+    Expect.equals(-5, r);
+  }
+
+  static void testMain() {
+    test1();
+    test2();
+    test3();
+    test4();
+    SmiCompares.smiComparesTest();
+    SmiBinop.smiBinopTest();
+    SmiBinop.smiBinopOverflowTest();
+    ObjectsEquality.objectsEqualityTest();
+    smiRightShift();
+    doubleUnary();
+  }
+}
+
+main() {
+  DeoptimizationTest.testMain();
+}
diff --git a/tests/standalone/double_hash_distribution_test.dart b/tests/standalone/double_hash_distribution_test.dart
new file mode 100644
index 0000000..1a66e17
--- /dev/null
+++ b/tests/standalone/double_hash_distribution_test.dart
@@ -0,0 +1,48 @@
+// Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// Test that the distribution of hash codes for doubles is reasonable.
+
+// VMOptions=--intrinsify
+// VMOptions=--no_intrinsify
+
+import 'package:expect/expect.dart';
+
+main() {
+  Expect.isTrue(ratio(0, 1) >= 0.95);
+  Expect.isTrue(ratio(0, 100) >= 0.95);
+  Expect.isTrue(ratio(0, 0xffffff) >= 0.95);
+  Expect.isTrue(ratio(0xffffff) >= 0.95);
+  Expect.isTrue(ratio(0xffffffff) >= 0.95);
+  Expect.isTrue(ratio(0xffffffffffffff) >= 0.95);
+
+  Expect.isTrue(ratio(0, -1) >= 0.95);
+  Expect.isTrue(ratio(0, -100) >= 0.95);
+  Expect.isTrue(ratio(0, -0xffffff) >= 0.95);
+  Expect.isTrue(ratio(-0xffffff) >= 0.95);
+  Expect.isTrue(ratio(-0xffffffff) >= 0.95);
+  Expect.isTrue(ratio(-0xffffffffffffff) >= 0.95);
+}
+
+double ratio(num start, [num? end]) {
+  final n = 1000;
+  end ??= (start + 1) * 2;
+
+  // Collect the set of distinct doubles and the
+  // set of distinct hash codes.
+  final doubles = new Set<double>();
+  final codes = new Set<int>();
+
+  final step = (end.toDouble() - start.toDouble()) / n;
+  var current = start.toDouble();
+  for (int i = 0; i < n; i++) {
+    doubles.add(current);
+    codes.add(current.hashCode);
+    current += step;
+  }
+
+  // Return the ratio between distinct doubles and
+  // distinct hash codes.
+  return codes.length / doubles.length;
+}
diff --git a/tests/standalone/double_smi_comparison_test.dart b/tests/standalone/double_smi_comparison_test.dart
new file mode 100644
index 0000000..fff6015
--- /dev/null
+++ b/tests/standalone/double_smi_comparison_test.dart
@@ -0,0 +1,23 @@
+// Copyright (c) 2011, the Dart project authors.  Please see the AUTHORS file
+// for 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 correct comparison (equality and relational) when mixing double and
+// Smi arguments. We convert Smi to doubles and to the operation. This is
+// not correct in 64-bit mode where not every Smi can be converted to a
+// double without loss of precision.
+// VMOptions=--optimization-counter-threshold=10 --no-use-osr --no-background-compilation
+
+import "package:expect/expect.dart";
+
+equalityFunc(a, b) => a == b;
+
+lessThanFunc(a, b) => a < b;
+
+main() {
+  for (int i = 0; i < 20; i++) {
+    Expect.isFalse(equalityFunc(1.0, 4));
+    Expect.isTrue(lessThanFunc(1.0, 4));
+  }
+  Expect.isFalse(equalityFunc(3459045988797251776, 3459045988797251777));
+  Expect.isTrue(lessThanFunc(3459045988797251776, 3459045988797251777));
+}
diff --git a/tests/standalone/double_temp_test.dart b/tests/standalone/double_temp_test.dart
new file mode 100644
index 0000000..da55ef3
--- /dev/null
+++ b/tests/standalone/double_temp_test.dart
@@ -0,0 +1,38 @@
+// 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 correct usage of inlined double temporary objects.
+
+import "package:expect/expect.dart";
+
+main() {
+  for (int i = 0; i < 2000; i++) {
+    testBinaryOp();
+    testUnaryOp();
+  }
+}
+
+// VM: temporary double should not be used as result of division,
+// otherwise the function always returns the same object.
+double divide(double a, double b) {
+  return a / b;
+}
+
+testBinaryOp() {
+  var x = divide(1.0, 2.0);
+  var y = divide(2.0, 3.0);
+  Expect.notEquals(x, y);
+}
+
+// VM: temporary double should be used only for "-b", otherwise the
+// function would always return the same object.
+double unary(double a, double b) {
+  return -(a * (-b));
+}
+
+testUnaryOp() {
+  var x = unary(1.0, 2.0);
+  var y = unary(3.0, 4.0);
+  Expect.equals(2.0, x);
+  Expect.equals(12.0, y);
+}
diff --git a/tests/standalone/double_to_int_test.dart b/tests/standalone/double_to_int_test.dart
new file mode 100644
index 0000000..d2207a9
--- /dev/null
+++ b/tests/standalone/double_to_int_test.dart
@@ -0,0 +1,33 @@
+// 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.
+//
+// Tests optimization: transform double.toInt() to DoubleToSmi
+// unless we encounter a non-Smi result, in which case we deoptimize and
+// optimize it later to DoubleToInt.
+
+import "package:expect/expect.dart";
+
+main() {
+  for (int i = 0; i < 600; i++) {
+    Expect.equals(100, foo(100, 1.2));
+  }
+  // Deoptimize 'foo', d2smi -> d2int.
+  Expect.equals(36507222016 * 2, foo(2, 36507222016.6));
+  for (int i = 0; i < 600; i++) {
+    Expect.equals(100, foo(100, 1.2));
+  }
+  Expect.equals(36507222016 * 2, foo(2, 36507222016.6));
+}
+
+foo(n, a) {
+  int k = 0;
+  for (int i = 0; i < n; i++) {
+    k += goo(a);
+  }
+  return k;
+}
+
+int goo(a) {
+  return a.toInt();
+}
diff --git a/tests/standalone/entrypoints_verification_test.dart b/tests/standalone/entrypoints_verification_test.dart
new file mode 100644
index 0000000..cfc8058
--- /dev/null
+++ b/tests/standalone/entrypoints_verification_test.dart
@@ -0,0 +1,107 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+//
+// VMOptions=--verify-entry-points=true
+
+import 'dart:io';
+import 'dart:convert';
+import 'dart:math';
+import 'package:path/path.dart';
+import 'package:expect/expect.dart';
+import 'dart-ext:entrypoints_verification_test_extension';
+
+void RunTest() native "RunTest";
+
+main() {
+  RunTest();
+
+  new C();
+  new D();
+}
+
+class C {}
+
+@pragma("vm:entry-point")
+class D {
+  D();
+
+  @pragma("vm:entry-point")
+  D.defined();
+
+  @pragma("vm:entry-point")
+  factory D.fact() => E.ctor();
+
+  void fn0() {}
+
+  @pragma("vm:entry-point")
+  void fn1() {}
+
+  @pragma("vm:entry-point", "get")
+  void fn1_get() {}
+
+  @pragma("vm:entry-point", "call")
+  void fn1_call() {}
+
+  static void fn2() {}
+
+  @pragma("vm:entry-point")
+  static void fn3() {}
+
+  @pragma("vm:entry-point", "call")
+  static void fn3_call() {}
+
+  @pragma("vm:entry-point", "get")
+  static void fn3_get() {}
+
+  void Function()? fld0;
+
+  @pragma("vm:entry-point")
+  void Function()? fld1;
+
+  @pragma("vm:entry-point", "get")
+  void Function()? fld2;
+
+  @pragma("vm:entry-point", "set")
+  void Function()? fld3;
+}
+
+void fn0() {}
+
+@pragma("vm:entry-point")
+void fn1() {}
+
+@pragma("vm:entry-point", "get")
+void fn1_get() {}
+
+@pragma("vm:entry-point", "call")
+void fn1_call() {}
+
+class E extends D {
+  E.ctor();
+}
+
+@pragma("vm:entry-point")
+class F {
+  static void Function()? fld0;
+
+  @pragma("vm:entry-point")
+  static void Function()? fld1;
+
+  @pragma("vm:entry-point", "get")
+  static void Function()? fld2;
+
+  @pragma("vm:entry-point", "set")
+  static void Function()? fld3;
+}
+
+void Function()? fld0;
+
+@pragma("vm:entry-point")
+void Function()? fld1;
+
+@pragma("vm:entry-point", "get")
+void Function()? fld2;
+
+@pragma("vm:entry-point", "set")
+void Function()? fld3;
diff --git a/tests/standalone/env_test.dart b/tests/standalone/env_test.dart
new file mode 100644
index 0000000..6280f60
--- /dev/null
+++ b/tests/standalone/env_test.dart
@@ -0,0 +1,10 @@
+// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+// SharedOptions=-Dvar -D -D=var -Dvar=invalid -Dvar=valid -Dvar
+
+import "package:expect/expect.dart";
+
+main() {
+  Expect.equals('valid', const String.fromEnvironment('var'));
+}
diff --git a/tests/standalone/fields_may_be_reset_test.dart b/tests/standalone/fields_may_be_reset_test.dart
new file mode 100644
index 0000000..3ab6fc6
--- /dev/null
+++ b/tests/standalone/fields_may_be_reset_test.dart
@@ -0,0 +1,9 @@
+// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// VMOptions=--fields_may_be_reset
+
+main() {
+  print("Okay");
+}
diff --git a/tests/standalone/float_array_static_test.dart b/tests/standalone/float_array_static_test.dart
new file mode 100644
index 0000000..1c89b96
--- /dev/null
+++ b/tests/standalone/float_array_static_test.dart
@@ -0,0 +1,56 @@
+// 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 native float arrays.
+
+// VMOptions=--optimization_counter_threshold=10 --no-background_compilation
+
+// Library tag to be able to run in html test framework.
+library FloatArrayTest;
+
+import "package:expect/expect.dart";
+import 'dart:typed_data';
+
+void testIndexOf32() {
+  var list = new Float32List(10);
+  for (int i = 0; i < list.length; i++) {
+    list[i] = i + 10.0;
+  }
+  /*@compile-error=unspecified*/ Expect.equals(0, list.indexOf(10));
+  /*@compile-error=unspecified*/ Expect.equals(5, list.indexOf(15));
+  /*@compile-error=unspecified*/ Expect.equals(9, list.indexOf(19));
+  /*@compile-error=unspecified*/ Expect.equals(-1, list.indexOf(20));
+}
+
+void testBadValues32() {
+  var list = new Float32List(10);
+  list[0] = 2.0;
+  /*@compile-error=unspecified*/ list[0] = 2;
+  /*@compile-error=unspecified*/ list[0] = "hello";
+}
+
+void testIndexOf64() {
+  var list = new Float64List(10);
+  for (int i = 0; i < list.length; i++) {
+    list[i] = i + 10.0;
+  }
+  /*@compile-error=unspecified*/ Expect.equals(0, list.indexOf(10));
+  /*@compile-error=unspecified*/ Expect.equals(5, list.indexOf(15));
+  /*@compile-error=unspecified*/ Expect.equals(9, list.indexOf(19));
+  /*@compile-error=unspecified*/ Expect.equals(-1, list.indexOf(20));
+}
+
+void testBadValues64() {
+  var list = new Float64List(10);
+  list[0] = 2.0;
+  /*@compile-error=unspecified*/ list[0] = 2;
+  /*@compile-error=unspecified*/ list[0] = "hello";
+}
+
+main() {
+  testIndexOf32();
+  testIndexOf64();
+  testBadValues32();
+  testBadValues64();
+}
diff --git a/tests/standalone/float_array_test.dart b/tests/standalone/float_array_test.dart
new file mode 100644
index 0000000..a7e7842
--- /dev/null
+++ b/tests/standalone/float_array_test.dart
@@ -0,0 +1,186 @@
+// 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 native float arrays.
+
+// VMOptions=--optimization_counter_threshold=10 --no-background_compilation
+
+// Library tag to be able to run in html test framework.
+library FloatArrayTest;
+
+import "package:expect/expect.dart";
+import 'dart:typed_data';
+
+void testCreateFloat32Array() {
+  Float32List floatArray;
+
+  floatArray = new Float32List(0);
+  Expect.equals(0, floatArray.length);
+
+  floatArray = new Float32List(10);
+  Expect.equals(10, floatArray.length);
+  for (int i = 0; i < 10; i++) {
+    Expect.equals(0.0, floatArray[i]);
+  }
+}
+
+void testSetRange32() {
+  Float32List floatArray = new Float32List(3);
+
+  List<double> list = [10.0, 11.0, 12.0];
+  floatArray.setRange(0, 3, list);
+  for (int i = 0; i < 3; i++) {
+    Expect.equals(10 + i, floatArray[i]);
+  }
+
+  floatArray[0] = 20.0;
+  floatArray[1] = 21.0;
+  floatArray[2] = 22.0;
+  list.setRange(0, 3, floatArray);
+  for (int i = 0; i < 3; i++) {
+    Expect.equals(20 + i, list[i]);
+  }
+
+  // 4.0e40 is larger than the largest representable float.
+  floatArray.setRange(1, 3, const [8.0, 4.0e40]);
+  Expect.equals(20, floatArray[0]);
+  Expect.equals(8, floatArray[1]);
+  Expect.equals(double.infinity, floatArray[2]);
+}
+
+void testIndexOutOfRange32() {
+  Float32List floatArray = new Float32List(3);
+  List<double> list = const [0.0, 1.0, 2.0, 3.0];
+
+  Expect.throws(() {
+    floatArray[5] = 2.0;
+  });
+  Expect.throws(() {
+    floatArray.setRange(0, 4, list);
+  });
+
+  Expect.throws(() {
+    floatArray.setRange(3, 4, list);
+  });
+}
+
+void testIndexOf32() {
+  var list = new Float32List(10);
+  for (int i = 0; i < list.length; i++) {
+    list[i] = i + 10.0;
+  }
+  Expect.equals(0, list.indexOf(10.0));
+  Expect.equals(5, list.indexOf(15.0));
+  Expect.equals(9, list.indexOf(19.0));
+  Expect.equals(-1, list.indexOf(20.0));
+}
+
+void testCreateFloat64Array() {
+  Float64List floatArray;
+
+  floatArray = new Float64List(0);
+  Expect.equals(0, floatArray.length);
+
+  floatArray = new Float64List(10);
+  Expect.equals(10, floatArray.length);
+  for (int i = 0; i < 10; i++) {
+    Expect.equals(0.0, floatArray[i]);
+  }
+}
+
+void testSetRange64() {
+  Float64List floatArray = new Float64List(3);
+
+  List<double> list = [10.0, 11.0, 12.0];
+  floatArray.setRange(0, 3, list);
+  for (int i = 0; i < 3; i++) {
+    Expect.equals(10 + i, floatArray[i]);
+  }
+
+  floatArray[0] = 20.0;
+  floatArray[1] = 21.0;
+  floatArray[2] = 22.0;
+  list.setRange(0, 3, floatArray);
+  for (int i = 0; i < 3; i++) {
+    Expect.equals(20 + i, list[i]);
+  }
+
+  // Unlike Float32Array we can properly represent 4.0e40
+  floatArray.setRange(1, 3, const [8.0, 4.0e40]);
+  Expect.equals(20, floatArray[0]);
+  Expect.equals(8, floatArray[1]);
+  Expect.equals(4.0e40, floatArray[2]);
+}
+
+void testIndexOutOfRange64() {
+  Float64List floatArray = new Float64List(3);
+  List<double> list = const [0.0, 1.0, 2.0, 3.0];
+
+  Expect.throws(() {
+    floatArray[5] = 2.0;
+  });
+  Expect.throws(() {
+    floatArray.setRange(0, 4, list);
+  });
+
+  Expect.throws(() {
+    floatArray.setRange(3, 4, list);
+  });
+}
+
+void testIndexOf64() {
+  var list = new Float64List(10);
+  for (int i = 0; i < list.length; i++) {
+    list[i] = i + 10.0;
+  }
+  Expect.equals(0, list.indexOf(10.0));
+  Expect.equals(5, list.indexOf(15.0));
+  Expect.equals(9, list.indexOf(19.0));
+  Expect.equals(-1, list.indexOf(20.0));
+}
+
+storeIt32(Float32List a, int index, value) {
+  a[index] = value;
+}
+
+storeIt64(Float64List a, int index, value) {
+  a[index] = value;
+}
+
+testPolymorphicLoad(var list) {
+  return list[0];
+}
+
+main() {
+  var a32 = new Float32List(5);
+  for (int i = 0; i < 20; i++) {
+    testCreateFloat32Array();
+    testSetRange32();
+    testIndexOutOfRange32();
+    testIndexOf32();
+    storeIt32(a32, 1, 2.0);
+    testPolymorphicLoad(a32);
+  }
+  var a64 = new Float64List(5);
+  for (int i = 0; i < 20; i++) {
+    testCreateFloat64Array();
+    testSetRange64();
+    testIndexOutOfRange64();
+    testIndexOf64();
+    storeIt64(a64, 1, 2.0);
+    testPolymorphicLoad(a64);
+  }
+  var f32x4 = new Float32x4List(5);
+  for (int i = 0; i < 20; i++) {
+    testPolymorphicLoad(f32x4);
+  }
+
+  // Check optimized (inlined) version of []=
+  Expect.throws(() {
+    storeIt32(a32, 1, 2);
+  });
+  Expect.throws(() {
+    storeIt64(a64, 1, 2);
+  });
+}
diff --git a/tests/standalone/fragmentation_test.dart b/tests/standalone/fragmentation_test.dart
new file mode 100644
index 0000000..04f21c4
--- /dev/null
+++ b/tests/standalone/fragmentation_test.dart
@@ -0,0 +1,41 @@
+// Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// Deliberately fragment the heap and test that GC peformance does not
+// break down.  See https://github.com/dart-lang/sdk/issues/29588
+// Normally runs in about 6-7 seconds on an x64 machine, using about 2.5Gbytes
+// of memory.
+//
+// This test is deliberately CPU-light and so it can make a lot of
+// progress before the concurrent sweepers are done sweeping the heap.
+// In that time there is no freelist and so the issue does not arise.
+// VMOptions=--no_concurrent_mark --no_concurrent_sweep
+// VMOptions=--no_concurrent_mark --concurrent_sweep
+// VMOptions=--no_concurrent_mark --use_compactor
+// VMOptions=--no_concurrent_mark --use_compactor --force_evacuation
+// VMOptions=--concurrent_mark --no_concurrent_sweep
+// VMOptions=--concurrent_mark --concurrent_sweep
+// VMOptions=--concurrent_mark --use_compactor
+// VMOptions=--concurrent_mark --use_compactor --force_evacuation
+// VMOptions=--scavenger_tasks=0
+// VMOptions=--scavenger_tasks=1
+// VMOptions=--scavenger_tasks=2
+// VMOptions=--scavenger_tasks=3
+
+main() {
+  final List<List?> arrays = [];
+  // Fill up heap with alternate large-small items.
+  for (int i = 0; i < 500000; i++) {
+    arrays.add(new List<dynamic>.filled(260, null));
+    arrays.add(new List<dynamic>.filled(1, null));
+  }
+  // Clear the large items so that the heap is full of 260-word gaps.
+  for (int i = 0; i < arrays.length; i += 2) {
+    arrays[i] = null;
+  }
+  // Allocate a lot of 300-word objects that don't fit in the gaps.
+  for (int i = 0; i < 600000; i++) {
+    arrays.add(new List<dynamic>.filled(300, null));
+  }
+}
diff --git a/tests/standalone/fragmentation_typed_data_test.dart b/tests/standalone/fragmentation_typed_data_test.dart
new file mode 100644
index 0000000..c4577f2
--- /dev/null
+++ b/tests/standalone/fragmentation_typed_data_test.dart
@@ -0,0 +1,38 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// See fragmentation_test.dart for more information.
+//
+// VMOptions=--no_concurrent_mark --no_concurrent_sweep
+// VMOptions=--no_concurrent_mark --concurrent_sweep
+// VMOptions=--no_concurrent_mark --use_compactor
+// VMOptions=--no_concurrent_mark --use_compactor --force_evacuation
+// VMOptions=--concurrent_mark --no_concurrent_sweep
+// VMOptions=--concurrent_mark --concurrent_sweep
+// VMOptions=--concurrent_mark --use_compactor
+// VMOptions=--concurrent_mark --use_compactor --force_evacuation
+
+import 'dart:io';
+import 'dart:typed_data';
+
+main() {
+  // We have less memory available on the Android testing devices, and if we
+  // allocate to much the kernel may summarily terminate us.
+  final double factor = Platform.isAndroid ? 0.5 : 1.0;
+
+  final List<List?> arrays = [];
+  // Fill up heap with alternate large-small items.
+  for (int i = 0; i < 500000 * factor; i++) {
+    arrays.add(new Uint32List(260));
+    arrays.add(new Uint32List(1));
+  }
+  // Clear the large items so the heap has large gaps.
+  for (int i = 0; i < arrays.length; i += 2) {
+    arrays[i] = null;
+  }
+  // Allocate a lot of large items which don't fit in the gaps created above.
+  for (int i = 0; i < 600000 * factor; i++) {
+    arrays.add(new Uint32List(300));
+  }
+}
diff --git a/tests/standalone/http_launch_data/.dart_tool/package_config.json b/tests/standalone/http_launch_data/.dart_tool/package_config.json
new file mode 100644
index 0000000..6ff2893
--- /dev/null
+++ b/tests/standalone/http_launch_data/.dart_tool/package_config.json
@@ -0,0 +1,9 @@
+{
+  "configVersion": 2,
+  "packages": [
+    {
+      "name": "simple",
+      "rootUri": "../the_packages/simple"
+    }
+  ]
+}
diff --git a/tests/standalone/http_launch_data/.packages b/tests/standalone/http_launch_data/.packages
new file mode 100644
index 0000000..4d7ff27
--- /dev/null
+++ b/tests/standalone/http_launch_data/.packages
@@ -0,0 +1 @@
+simple:the_packages/simple
diff --git a/tests/standalone/http_launch_data/http_isolate_main.dart b/tests/standalone/http_launch_data/http_isolate_main.dart
new file mode 100644
index 0000000..ad6306a
--- /dev/null
+++ b/tests/standalone/http_launch_data/http_isolate_main.dart
@@ -0,0 +1,10 @@
+// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'dart:isolate';
+
+main(List<String> args, SendPort replyTo) {
+  var data = args[0];
+  replyTo.send(data);
+}
diff --git a/tests/standalone/http_launch_data/http_launch_main.dart b/tests/standalone/http_launch_data/http_launch_main.dart
new file mode 100644
index 0000000..f9a5b52
--- /dev/null
+++ b/tests/standalone/http_launch_data/http_launch_main.dart
@@ -0,0 +1,11 @@
+// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+library http_launch_main;
+
+import 'package:simple/simple.dart';
+
+main() {
+  print(getSimpleString());
+}
diff --git a/tests/standalone/http_launch_data/http_spawn_main.dart b/tests/standalone/http_launch_data/http_spawn_main.dart
new file mode 100644
index 0000000..e6b1a24
--- /dev/null
+++ b/tests/standalone/http_launch_data/http_spawn_main.dart
@@ -0,0 +1,18 @@
+// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+library http_launch_main;
+
+import 'dart:isolate';
+import 'dart:io';
+
+main(List<String> arguments) {
+  int port = int.parse(arguments[0]);
+  ReceivePort receivePort = new ReceivePort();
+  Isolate.spawnUri(Uri.parse('http://127.0.0.1:$port/http_isolate_main.dart'),
+      ['hello'], receivePort.sendPort);
+  receivePort.first.then((response) {
+    print(response);
+  });
+}
diff --git a/tests/standalone/http_launch_data/the_packages/simple/simple.dart b/tests/standalone/http_launch_data/the_packages/simple/simple.dart
new file mode 100644
index 0000000..1a7e7e0
--- /dev/null
+++ b/tests/standalone/http_launch_data/the_packages/simple/simple.dart
@@ -0,0 +1,7 @@
+// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+library simple;
+
+String getSimpleString() => 'hello';
diff --git a/tests/standalone/http_launch_test.dart b/tests/standalone/http_launch_test.dart
new file mode 100644
index 0000000..1c9f8ab
--- /dev/null
+++ b/tests/standalone/http_launch_test.dart
@@ -0,0 +1,112 @@
+// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+// VMOptions=
+// VMOptions=--short_socket_read
+// VMOptions=--short_socket_write
+// VMOptions=--short_socket_read --short_socket_write
+// OtherResources=http_launch_data/http_isolate_main.dart
+// OtherResources=http_launch_data/http_launch_main.dart
+// OtherResources=http_launch_data/http_spawn_main.dart
+// OtherResources=http_launch_data/the_packages/simple/simple.dart
+// OtherResources=http_launch_data/.packages
+//
+// Test:
+//   *) Launching a script fetched over HTTP.
+//   *) Importing a library fetched over HTTP.
+//   *) Automatically resolving package_root when script is fetched over HTTP.
+//   *) Spawning a URI over HTTP.
+
+library http_launch_test;
+
+import 'dart:async';
+import 'dart:io';
+import 'package:expect/expect.dart';
+
+String pathToExecutable = Platform.executable;
+List<String> executableArguments = Platform.executableArguments
+    .where((arg) => !arg.startsWith('--packages='))
+    .toList();
+Uri pathOfData = Platform.script.resolve('http_launch_data/');
+late int port;
+
+_sendNotFound(HttpResponse response) {
+  response.statusCode = HttpStatus.notFound;
+  response.close();
+}
+
+handleRequest(HttpRequest request) {
+  final String path = request.uri.path.substring(1);
+  final Uri requestPath = pathOfData.resolve(path);
+  final File file = new File(requestPath.toFilePath());
+  file.exists().then((bool found) {
+    if (found) {
+      file.openRead().cast<List<int>>().pipe(request.response).catchError((e) {
+        _sendNotFound(request.response);
+      });
+    } else {
+      _sendNotFound(request.response);
+    }
+  });
+}
+
+serverRunning(HttpServer server) {
+  port = server.port;
+  server.listen(handleRequest);
+  Future<ProcessResult> no_http_run = Process.run(
+      pathToExecutable,
+      []
+        ..addAll(executableArguments)
+        ..add(pathOfData.resolve('http_launch_main.dart').toFilePath()));
+  Future<ProcessResult> http_run = Process.run(
+      pathToExecutable,
+      []
+        ..addAll(executableArguments)
+        ..add('http://127.0.0.1:$port/http_launch_main.dart'));
+  Future<ProcessResult> http_pkg_root_run = Process.run(
+      pathToExecutable,
+      []
+        ..addAll(executableArguments)
+        ..addAll(['http://127.0.0.1:$port/http_launch_main.dart']));
+  Future<ProcessResult> isolate_run = Process.run(
+      pathToExecutable,
+      []
+        ..addAll(executableArguments)
+        ..addAll(['http://127.0.0.1:$port/http_spawn_main.dart', '$port']));
+  Future<List<ProcessResult>> results =
+      Future.wait([no_http_run, http_run, http_pkg_root_run, isolate_run]);
+  results.then((results) {
+    // Close server.
+    server.close();
+    // Check results.
+    checkResults(results);
+  });
+}
+
+checkResults(List<ProcessResult> results) {
+  Expect.equals(4, results.length);
+  // Exited cleanly.
+  for (int i = 0; i < results.length; i++) {
+    ProcessResult result = results[i];
+    if (result.exitCode != 0) {
+      print("Exit code for process $i = ${result.exitCode}");
+      print("---stdout:---\n${result.stdout}");
+      print("---stderr:---\n${result.stderr}\n---");
+    }
+    Expect.equals(0, result.exitCode);
+  }
+  String stdout = results[0].stdout;
+  // Output is the string 'hello'. Use startsWith to avoid new line differences.
+  if (!stdout.startsWith('hello')) {
+    print("---- stdout of remote process:\n$stdout\n----");
+  }
+  Expect.isTrue(stdout.startsWith('hello'));
+  // Same output from all three process runs.
+  for (int i = 0; i < results.length; i++) {
+    Expect.equals(stdout, results[i].stdout);
+  }
+}
+
+main() {
+  HttpServer.bind(InternetAddress.loopbackIPv4, 0).then(serverRunning);
+}
diff --git a/tests/standalone/int_array_deopt.dart b/tests/standalone/int_array_deopt.dart
new file mode 100644
index 0000000..7a2b969
--- /dev/null
+++ b/tests/standalone/int_array_deopt.dart
@@ -0,0 +1,33 @@
+// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+//
+// Dart deoptimization of Uint32Array and Int32Array loads.
+
+import 'dart:typed_data';
+import "package:expect/expect.dart";
+
+loadI32(a) => a[0] + 1;
+loadUi32(a) => a[0] + 1;
+
+main() {
+  var i32 = new Int32List(10);
+  var ui32 = new Uint32List(10);
+  i32[0] = ui32[0] = 8;
+  // Optimize loadI32 and LoadUi32 for Smi result of indexed load.
+  for (int i = 0; i < 2000; i++) {
+    Expect.equals(9, loadI32(i32));
+    Expect.equals(9, loadUi32(ui32));
+  }
+  // On ia32, deoptimize when attempting to load a value that exceeds
+  // Smi range.
+  i32[0] = ui32[0] = 2147483647;
+  Expect.equals(2147483648, loadI32(i32));
+  Expect.equals(2147483648, loadUi32(ui32));
+  // Reoptimize again, but this time assume mixed Smi/Mint results
+  i32[0] = ui32[0] = 10;
+  for (int i = 0; i < 2000; i++) {
+    Expect.equals(11, loadI32(i32));
+    Expect.equals(11, loadUi32(ui32));
+  }
+}
diff --git a/tests/standalone/int_array_load_elimination_test.dart b/tests/standalone/int_array_load_elimination_test.dart
new file mode 100644
index 0000000..4e8dea6
--- /dev/null
+++ b/tests/standalone/int_array_load_elimination_test.dart
@@ -0,0 +1,24 @@
+// 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 correct load elimination for scalar lists.
+
+// TODO: remove once bug 2264 fixed.
+library int_array_load_elimination;
+
+import "package:expect/expect.dart";
+import 'dart:typed_data';
+
+void testUint16() {
+  Uint16List intArray = new Uint16List(1);
+  intArray[0] = -1;
+  var x = intArray[0];
+  Expect.equals(65535, x);
+}
+
+main() {
+  for (int i = 0; i < 2000; i++) {
+    testUint16();
+  }
+}
diff --git a/tests/standalone/int_array_test.dart b/tests/standalone/int_array_test.dart
new file mode 100644
index 0000000..30d326a
--- /dev/null
+++ b/tests/standalone/int_array_test.dart
@@ -0,0 +1,139 @@
+// 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 native int arrays.
+
+// Library tag to be able to run in html test framework.
+library IntArrayTest;
+
+import "package:expect/expect.dart";
+import 'dart:typed_data';
+
+void testInt16() {
+  Int16List intArray = new Int16List(4);
+  intArray[0] = 0;
+  intArray[1] = -1;
+  intArray[2] = -2;
+  intArray[3] = -3;
+  for (int i = 0; i < intArray.length; i++) {
+    intArray[i]++;
+  }
+  var x = intArray[0];
+  var y = intArray[1];
+  var z = intArray[2];
+  var w = intArray[3];
+  Expect.equals(1, x);
+  Expect.equals(0, y);
+  Expect.equals(-1, z);
+  Expect.equals(-2, w);
+  var t = y + 1;
+  intArray[0] = t;
+  Expect.equals(t, intArray[0]);
+}
+
+void testUint16() {
+  Uint16List intArray = new Uint16List(4);
+  intArray[0] = 0;
+  intArray[1] = 1;
+  intArray[2] = 2;
+  intArray[3] = 3;
+  for (int i = 0; i < intArray.length; i++) {
+    intArray[i]--;
+  }
+  var x = intArray[0];
+  var y = intArray[1];
+  var z = intArray[2];
+  var w = intArray[3];
+  Expect.equals(65535, x);
+  Expect.equals(0, y);
+  Expect.equals(1, z);
+  Expect.equals(2, w);
+  var t = y + 1;
+  intArray[0] = t;
+  Expect.equals(t, intArray[0]);
+}
+
+void testInt32ToSmi() {
+  Int32List intArray;
+
+  intArray = new Int32List(4);
+  intArray[0] = 1073741823; // SmiMax
+  intArray[1] = -1073741824; // SmiMin
+  intArray[2] = 1073741824; // SmiMax+1
+  intArray[3] = -1073741825; // SmiMin-1
+  var x = intArray[0];
+  var y = intArray[1];
+  var z = intArray[2];
+  var w = intArray[3];
+  Expect.equals(1073741823, x);
+  Expect.equals(-1073741824, y);
+  Expect.equals(1073741824, z);
+  Expect.equals(-1073741825, w);
+}
+
+void testUint32ToSmi() {
+  Uint32List intArray;
+
+  intArray = new Uint32List(4);
+  intArray[0] = 1073741823; // SmiMax
+  intArray[1] = -1; // 0xFFFFFFFF : 4294967295
+  intArray[2] = 1073741830; // SmiMax+7
+  intArray[3] = -1073741825; // 0xbfffffff : 3221225471
+  var x = intArray[0];
+  var y = intArray[1];
+  var z = intArray[2];
+  var w = intArray[3];
+  Expect.equals(1073741823, x);
+  Expect.equals(4294967295, y);
+  Expect.equals(1073741830, z);
+  Expect.equals(3221225471, w);
+}
+
+void testInt64ToSmi() {
+  Int64List intArray;
+
+  intArray = new Int64List(4);
+  intArray[0] = 4611686018427387903; // SmiMax
+  intArray[1] = -4611686018427387904; // SmiMin
+  intArray[2] = 4611686018427387904; // SmiMax+1
+  intArray[3] = -4611686018427387905; // SmiMin-1
+  var x = intArray[0];
+  var y = intArray[1];
+  var z = intArray[2];
+  var w = intArray[3];
+  Expect.equals(4611686018427387903, x);
+  Expect.equals(-4611686018427387904, y);
+  Expect.equals(4611686018427387904, z);
+  Expect.equals(-4611686018427387905, w);
+}
+
+void testUint64ToSmi() {
+  Uint64List intArray;
+
+  intArray = new Uint64List(4);
+  intArray[0] = 4611686018427387903; // SmiMax
+  intArray[1] = -1; // 0xFFFFFFFFFFFFFFFF : 18446744073709551615
+  intArray[2] = 4611686018427387904; // SmiMax+1
+  intArray[3] = -9223372036854775808;
+  var x = intArray[0];
+  var y = intArray[1];
+  var z = intArray[2];
+  var w = intArray[3];
+  Expect.equals(4611686018427387903, x);
+  Expect.equals(-1, y);
+  Expect.equals(4611686018427387904, z);
+  Expect.equals(-9223372036854775808, w);
+}
+
+main() {
+  testUint64ToSmi();
+  for (int i = 0; i < 2000; i++) {
+    testInt16();
+    testUint16();
+    testInt32ToSmi();
+    testUint32ToSmi();
+    testInt64ToSmi();
+    testUint64ToSmi();
+  }
+}
diff --git a/tests/standalone/int_list_test.dart b/tests/standalone/int_list_test.dart
new file mode 100644
index 0000000..c719f4d
--- /dev/null
+++ b/tests/standalone/int_list_test.dart
@@ -0,0 +1,42 @@
+// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+//
+// Dart Mint representations and type propagation issue.
+// Testing Int32List and Uint32List loads.
+//
+// VMOptions=--optimization-counter-threshold=5 --no-use-osr --no-background-compilation
+
+import 'dart:typed_data';
+import "package:expect/expect.dart";
+
+main() {
+  var a = new Uint32List(100);
+  a[2] = 3;
+  var res = sumIt1(a, 2);
+  Expect.equals(3 * 10, res);
+  res = sumIt1(a, 2);
+  Expect.equals(3 * 10, res);
+  var a1 = new Int32List(100);
+  a1[2] = 3;
+  res = sumIt2(a1, 2);
+  Expect.equals(3 * 10, res);
+  res = sumIt2(a1, 2);
+  Expect.equals(3 * 10, res);
+}
+
+sumIt1(Uint32List a, int n) {
+  var sum = 0;
+  for (int i = 0; i < 10; i++) {
+    sum += a[n];
+  }
+  return sum;
+}
+
+sumIt2(Int32List a, int n) {
+  var sum = 0;
+  for (int i = 0; i < 10; i++) {
+    sum += a[n];
+  }
+  return sum;
+}
diff --git a/tests/standalone/left_shift_bit_and_op_test.dart b/tests/standalone/left_shift_bit_and_op_test.dart
new file mode 100644
index 0000000..9140ceb
--- /dev/null
+++ b/tests/standalone/left_shift_bit_and_op_test.dart
@@ -0,0 +1,80 @@
+// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+//
+// Tests optimizing (a << b) & c if c is a Smi constant.
+
+import "package:expect/expect.dart";
+
+main() {
+  checkshiftAnd32();
+  checkShiftAnd64();
+  // Optimize shiftAnd32.
+  for (int i = 0; i < 10000; i++) {
+    A.shiftAnd32(12, 17);
+    A.shiftAnd64(12, 17);
+    Expect.equals(72, A.multipleConstantUses(3, 4));
+    Expect.equals(34493956096, A.multipleShiftUse(134742016, 8));
+  }
+  checkshiftAnd32();
+  checkShiftAnd64();
+
+  Expect.throws(() => A.shiftAnd32(12, -5));
+
+  // Check environment dependency.
+  final a = new A(), b = new B();
+  for (var i = 0; i < 10000; i++) {
+    Expect.equals(0, bar(a));
+  }
+  Expect.equals(4294967296, bar(b));
+}
+
+checkshiftAnd32() {
+  Expect.equals(1572864, A.shiftAnd32(12, 17));
+  Expect.equals(12, A.shiftAnd32(12, 0));
+  Expect.equals(285212672, A.shiftAnd32(16779392, 17));
+}
+
+checkShiftAnd64() {
+  Expect.equals(1125936481173504, A.shiftAnd64(4611694814806147072, 7));
+}
+
+class A {
+  static const int MASK_32 = (1 << 30) - 1;
+  static const int MASK_64 = (1 << 62) - 1;
+
+  static shiftAnd32(a, c) {
+    return (a << c) & MASK_32;
+  }
+
+  static shiftAnd64(a, c) {
+    return (a << c) & MASK_64;
+  }
+
+  static multipleConstantUses(a, c) {
+    var j = (a << c) & 0xFF;
+    var k = (a << 3) & 0xFF;
+    return j + k;
+  }
+
+  // Make sure that left shift is nor marked as truncating.
+  static multipleShiftUse(a, c) {
+    var y = (a << c);
+    var x = y & 0x7F;
+    return y + x;
+  }
+
+  foo(x) {
+    return x & 0xf;
+  }
+}
+
+class B {
+  foo(x) {
+    return x;
+  }
+}
+
+bar(o) {
+  return o.foo(1 << 32);
+}
diff --git a/tests/standalone/link_natives_lazily_test.dart b/tests/standalone/link_natives_lazily_test.dart
new file mode 100644
index 0000000..35a53a1
--- /dev/null
+++ b/tests/standalone/link_natives_lazily_test.dart
@@ -0,0 +1,9 @@
+// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// VMOptions=--link_natives_lazily
+
+main() {
+  print("Okay");
+}
diff --git a/tests/standalone/map_insert_remove_oom_test.dart b/tests/standalone/map_insert_remove_oom_test.dart
new file mode 100644
index 0000000..143fd18
--- /dev/null
+++ b/tests/standalone/map_insert_remove_oom_test.dart
@@ -0,0 +1,21 @@
+// 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.
+//
+// VMOptions=--old_gen_heap_size=12
+//
+// Notice we set the old gen heap size to 12 MB, which seems to be the minimum
+// (in debug mode) to not cause us run OOM during isolate initialization.  The
+// problem here is that we pre-allocate certain exceptions, e.g. NullThrownError
+// during isolate initialization, but if we have an allocation failure before
+// that, we end up running into a recursive allocate/throw loop.
+//
+// Test that compaction does occur on repeated add/remove.
+
+main() {
+  var x = {};
+  for (int i = 0; i < 1000000; i++) {
+    x[i] = 10;
+    x.remove(i);
+  }
+}
diff --git a/tests/standalone/medium_integer_test.dart b/tests/standalone/medium_integer_test.dart
new file mode 100644
index 0000000..28532f9
--- /dev/null
+++ b/tests/standalone/medium_integer_test.dart
@@ -0,0 +1,108 @@
+// Copyright (c) 2011, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+// Testing Mints. Note that the tests may not work on 64-bit machines,
+// as Smi's would be used to represent many of the numbers.
+
+library MediumIntegerTest;
+
+import "package:expect/expect.dart";
+
+class MediumIntegerTest {
+  static int getMint() {
+    return 1234567890123456789;
+  }
+
+  static testSmiOverflow() {
+    int a = 1073741823;
+    int b = 1073741822;
+    Expect.equals(2147483645, a + b);
+    Expect.equals(1152921501385621506, a * b);
+    Expect.equals(-2147483645, -a - b);
+  }
+
+  static testMintAdd() {
+    // Mint and Smi.
+    var a = 1234567890123456789;
+    var b = 2;
+    Expect.equals(1234567890123456791, a + b);
+    Expect.equals(1234567890123456791, b + a);
+    a = 9223372036854775807;
+    Expect.equals(-9223372036854775808, a + 1);
+
+    // Mint and Mint.
+    a = 100000000000000001;
+    Expect.equals(200000000000000002, a + a);
+    a = 9223372036854775800;
+    b = 1000000000000000000;
+    Expect.equals(-8223372036854775816, a + b);
+
+    // Mint and double.
+    var da = 100000000000.0;
+    b = 100000000000;
+    Expect.equals(200000000000.0, da + b);
+    Expect.equals(200000000000.0, b + da);
+  }
+
+  static testMintSub() {
+    // Mint and Smi.
+    var a = 1234567890123456789;
+    var b = 2;
+    Expect.equals(1234567890123456787, a - b);
+    a = -9223372036854775808;
+    Expect.equals(9223372036854775807, a - 1);
+
+    // Mint and Mint.
+    a = 1234567890123456789;
+    b = 1000000000000000000;
+    Expect.equals(234567890123456789, a - b);
+    a = -9223372036854775808;
+    b = 1000000000000000000;
+    Expect.equals(8223372036854775808, a - b);
+  }
+
+  static testMintDiv() {
+    // Mint and Smi.
+    var a = 1234567890123456788;
+    var b = 2;
+    Expect.equals(617283945061728394.0, a / b);
+  }
+
+  static testMintMul() {
+    // Mint and Smi.
+    var a = 4611686018427387904;
+    var b = 10;
+    Expect.equals(-9223372036854775808, a * b);
+    b = 1000000000000000000;
+    Expect.equals(0, a * b);
+  }
+
+  static testMintAnd(mint) {
+    // Issue 1845.
+    final int t = 0;
+    var res = mint & (t - 1);
+    Expect.equals(mint, res);
+  }
+
+  static void testMain() {
+    Expect.equals(1234567890123456789, getMint());
+    testSmiOverflow();
+    testMintAdd();
+    testMintSub();
+    testMintMul();
+    testMintDiv();
+    testMintAnd(-1925149952);
+    testMintAnd(1925149952);
+    testMintAnd(0x100000001);
+    var a = 100000000000;
+    var b = 100000000001;
+    Expect.equals(false, a.hashCode == b.hashCode);
+    Expect.equals(true, a.hashCode == (b - 1).hashCode);
+  }
+}
+
+main() {
+  for (int i = 0; i < 4000; i++) {
+    MediumIntegerTest.testMain();
+  }
+}
diff --git a/tests/standalone/no_allow_absolute_addresses_test.dart b/tests/standalone/no_allow_absolute_addresses_test.dart
new file mode 100644
index 0000000..e013c5e
--- /dev/null
+++ b/tests/standalone/no_allow_absolute_addresses_test.dart
@@ -0,0 +1,9 @@
+// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// VMOptions=--no_allow_absolute_addresses
+
+main() {
+  print("Okay");
+}
diff --git a/tests/standalone/no_lazy_dispatchers_test.dart b/tests/standalone/no_lazy_dispatchers_test.dart
new file mode 100644
index 0000000..f45ba1c
--- /dev/null
+++ b/tests/standalone/no_lazy_dispatchers_test.dart
@@ -0,0 +1,9 @@
+// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// VMOptions=--no_lazy_dispatchers
+
+main() {
+  print("Okay");
+}
diff --git a/tests/standalone/no_profiler_test.dart b/tests/standalone/no_profiler_test.dart
new file mode 100644
index 0000000..0b612d1
--- /dev/null
+++ b/tests/standalone/no_profiler_test.dart
@@ -0,0 +1,9 @@
+// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// VMOptions=--no_profiler
+
+main() {
+  print("Okay");
+}
diff --git a/tests/standalone/no_support_ast_printer_test.dart b/tests/standalone/no_support_ast_printer_test.dart
new file mode 100644
index 0000000..bbffe22
--- /dev/null
+++ b/tests/standalone/no_support_ast_printer_test.dart
@@ -0,0 +1,9 @@
+// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// VMOptions=--no-support_ast_printer
+
+main() {
+  print("Okay");
+}
diff --git a/tests/standalone/no_support_debugger_test.dart b/tests/standalone/no_support_debugger_test.dart
new file mode 100644
index 0000000..fb20c9a
--- /dev/null
+++ b/tests/standalone/no_support_debugger_test.dart
@@ -0,0 +1,9 @@
+// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// VMOptions=--no-support_debugger
+
+main() {
+  print("Okay");
+}
diff --git a/tests/standalone/no_support_disassembler_test.dart b/tests/standalone/no_support_disassembler_test.dart
new file mode 100644
index 0000000..2f0aca0
--- /dev/null
+++ b/tests/standalone/no_support_disassembler_test.dart
@@ -0,0 +1,9 @@
+// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// VMOptions=--no_support_disassembler
+
+main() {
+  print("Okay");
+}
diff --git a/tests/standalone/no_support_il_printer_test.dart b/tests/standalone/no_support_il_printer_test.dart
new file mode 100644
index 0000000..4ebba33
--- /dev/null
+++ b/tests/standalone/no_support_il_printer_test.dart
@@ -0,0 +1,9 @@
+// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// VMOptions=--no-support_il_printer
+
+main() {
+  print("Okay");
+}
diff --git a/tests/standalone/no_support_service_test.dart b/tests/standalone/no_support_service_test.dart
new file mode 100644
index 0000000..2431dbc
--- /dev/null
+++ b/tests/standalone/no_support_service_test.dart
@@ -0,0 +1,9 @@
+// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// VMOptions=--no-support_service
+
+main() {
+  print("Okay");
+}
diff --git a/tests/standalone/no_support_timeline_test.dart b/tests/standalone/no_support_timeline_test.dart
new file mode 100644
index 0000000..c15a441
--- /dev/null
+++ b/tests/standalone/no_support_timeline_test.dart
@@ -0,0 +1,9 @@
+// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// VMOptions=--no-support_timeline
+
+main() {
+  print("Okay");
+}
diff --git a/tests/standalone/number_identity_test.dart b/tests/standalone/number_identity_test.dart
new file mode 100644
index 0000000..ce9cbfe
--- /dev/null
+++ b/tests/standalone/number_identity_test.dart
@@ -0,0 +1,30 @@
+// 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 params.
+//
+// Tests 'identical' for cases that not supported in dart2js (bigint,
+// disambiguation int/double).
+
+import "package:expect/expect.dart";
+
+main() {
+  for (int i = 0; i < 1000; i++) testNumberIdentity();
+}
+
+testNumberIdentity() {
+  const int smi = 8;
+  const int mint = 9223372036854775807;
+  const double dbl = 8.0;
+  // No int/double differences in dart2js.
+  var a = smi + 0;
+  Expect.isFalse(identical(a, dbl));
+  var c = dbl + 0.0;
+  Expect.isFalse(identical(c, smi));
+
+  a = mint;
+  var b = a + 0;
+  Expect.isTrue(identical(a, b));
+  b = a + 1;
+  Expect.isFalse(identical(a, b)); // Fails with dart2js.
+}
diff --git a/tests/standalone/oom_error_stacktrace_test.dart b/tests/standalone/oom_error_stacktrace_test.dart
new file mode 100644
index 0000000..c9289e3
--- /dev/null
+++ b/tests/standalone/oom_error_stacktrace_test.dart
@@ -0,0 +1,49 @@
+// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+// Dart test program for testing throw statement
+// VMOptions=--old_gen_heap_size=512
+
+import "package:expect/expect.dart";
+
+class Helper1 {
+  static int func1() {
+    return func2();
+  }
+
+  static int func2() {
+    return func3();
+  }
+
+  static int func3() {
+    return func4();
+  }
+
+  static int func4() {
+    var i = 0;
+    try {
+      i = 10;
+      func5();
+    } on OutOfMemoryError catch (e) {
+      i = 100;
+      Expect.isNull(e.stackTrace, "OOM should not have a stackTrace on throw");
+    }
+    return i;
+  }
+
+  static List func5() {
+    // Cause an OOM(out of memory) exception.
+    var l1 = new List<dynamic>.filled(268435455, null);
+    return l1;
+  }
+}
+
+class OOMErrorStackTraceTest {
+  static testMain() {
+    Expect.equals(100, Helper1.func1());
+  }
+}
+
+main() {
+  OOMErrorStackTraceTest.testMain();
+}
diff --git a/tests/standalone/out_of_memory_test.dart b/tests/standalone/out_of_memory_test.dart
new file mode 100644
index 0000000..0b85a9f
--- /dev/null
+++ b/tests/standalone/out_of_memory_test.dart
@@ -0,0 +1,17 @@
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+// VMOptions=--old_gen_heap_size=512
+
+import "package:expect/expect.dart";
+
+void main() {
+  var number_of_ints = 134000000;
+  var exception_thrown = false;
+  try {
+    List<int> buf = new List<int>.filled(number_of_ints, -1);
+  } on OutOfMemoryError catch (exc) {
+    exception_thrown = true;
+  }
+  Expect.isTrue(exception_thrown);
+}
diff --git a/tests/standalone/package/invalid_uri_test.dart b/tests/standalone/package/invalid_uri_test.dart
new file mode 100644
index 0000000..c081860
--- /dev/null
+++ b/tests/standalone/package/invalid_uri_test.dart
@@ -0,0 +1,10 @@
+// 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.
+
+library invalid_uri_test;
+
+ // Should not contain "//".
+import 'package://lib1.dart'; //# 01: compile-time error
+
+void main() {}
diff --git a/tests/standalone/package/package1_test.dart b/tests/standalone/package/package1_test.dart
new file mode 100644
index 0000000..53c8828
--- /dev/null
+++ b/tests/standalone/package/package1_test.dart
@@ -0,0 +1,13 @@
+// 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.
+
+// Packages=none
+
+library package1_test;
+
+import 'package:package1.dart' as p1;
+
+main() {
+  p1.main();
+}
diff --git a/tests/standalone/package/package_isolate_test.dart b/tests/standalone/package/package_isolate_test.dart
new file mode 100644
index 0000000..2a30cb5
--- /dev/null
+++ b/tests/standalone/package/package_isolate_test.dart
@@ -0,0 +1,49 @@
+// 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.
+
+library package_isolate_test;
+
+import 'packages/shared.dart' as shared;
+import 'dart:isolate';
+import '../../../pkg/async_helper/lib/async_helper.dart';
+import '../../../pkg/expect/lib/expect.dart';
+
+expectResponse() {
+  asyncStart();
+  var receivePort = new ReceivePort();
+  receivePort.first.then((msg) {
+    Expect.equals('isolate', msg);
+    Expect.equals('main', shared.output);
+    asyncEnd();
+  });
+  return receivePort;
+}
+
+void main() {
+  {
+    var replyPort = expectResponse().sendPort;
+    shared.output = 'main';
+    Isolate.spawn(isolate_main, replyPort);
+  }
+
+  {
+    // Package in spawnUri() of sibling file.
+    var replyPort = expectResponse().sendPort;
+    shared.output = 'main';
+    Isolate.spawnUri(Uri.parse('sibling_isolate.dart'), [], replyPort);
+  }
+
+  {
+    // Package in spawnUri() of file in folder.
+    var replyPort = expectResponse().sendPort;
+    shared.output = 'main';
+    Isolate.spawnUri(
+        Uri.parse('test_folder/folder_isolate.dart'), [], replyPort);
+  }
+}
+
+void isolate_main(SendPort replyTo) {
+  shared.output = 'isolate';
+  replyTo.send(shared.output);
+}
diff --git a/tests/standalone/package/package_test.dart b/tests/standalone/package/package_test.dart
new file mode 100644
index 0000000..4f7e52b
--- /dev/null
+++ b/tests/standalone/package/package_test.dart
@@ -0,0 +1,21 @@
+// 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.
+
+// Packages=none
+
+library package_test;
+
+import 'package:lib1.dart';
+import 'package:shared.dart';
+
+void main() {
+  output = 'main';
+  // Call an imported lib, which will in turn call some others.
+  lib1();
+
+  // Make sure they were all reached successfully.
+  if (output != 'main|lib1|lib2|lib3') {
+    throw new Error("libraries were not reached successfully");
+  }
+}
diff --git a/tests/standalone/package/scenarios/both_dir_and_file/.packages b/tests/standalone/package/scenarios/both_dir_and_file/.packages
new file mode 100644
index 0000000..17ae735
--- /dev/null
+++ b/tests/standalone/package/scenarios/both_dir_and_file/.packages
@@ -0,0 +1 @@
+foo:foo/
\ No newline at end of file
diff --git a/tests/standalone/package/scenarios/both_dir_and_file/both_dir_and_file_noimports_test.dart b/tests/standalone/package/scenarios/both_dir_and_file/both_dir_and_file_noimports_test.dart
new file mode 100644
index 0000000..53195a7
--- /dev/null
+++ b/tests/standalone/package/scenarios/both_dir_and_file/both_dir_and_file_noimports_test.dart
@@ -0,0 +1,9 @@
+// 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.
+
+// Packages=none
+
+library both_dir_and_file_noimports_test;
+
+main() {}
diff --git a/tests/standalone/package/scenarios/both_dir_and_file/foo/foo.dart b/tests/standalone/package/scenarios/both_dir_and_file/foo/foo.dart
new file mode 100644
index 0000000..8e60bcd
--- /dev/null
+++ b/tests/standalone/package/scenarios/both_dir_and_file/foo/foo.dart
@@ -0,0 +1,7 @@
+// 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.
+
+library foo;
+
+String bar = 'good';
diff --git a/tests/standalone/package/scenarios/both_dir_and_file/prefers_packages_file_test.dart b/tests/standalone/package/scenarios/both_dir_and_file/prefers_packages_file_test.dart
new file mode 100644
index 0000000..f06fc56
--- /dev/null
+++ b/tests/standalone/package/scenarios/both_dir_and_file/prefers_packages_file_test.dart
@@ -0,0 +1,15 @@
+// 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.
+
+// Packages=none
+
+library prefers_packages_file_test;
+
+import 'package:foo/foo.dart' as foo;
+
+main() {
+  if (foo.bar != 'good') {
+    throw new Exception('package "foo" was not resolved correctly');
+  }
+}
diff --git a/tests/standalone/package/scenarios/empty_packages_file/.packages b/tests/standalone/package/scenarios/empty_packages_file/.packages
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/standalone/package/scenarios/empty_packages_file/.packages
diff --git a/tests/standalone/package/scenarios/empty_packages_file/empty_packages_file_discovery_test.dart b/tests/standalone/package/scenarios/empty_packages_file/empty_packages_file_discovery_test.dart
new file mode 100644
index 0000000..5b5156e
--- /dev/null
+++ b/tests/standalone/package/scenarios/empty_packages_file/empty_packages_file_discovery_test.dart
@@ -0,0 +1,11 @@
+// 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.
+
+// Packages=none
+
+library empty_packages_file_discovery_test;
+
+import 'package:foo/foo.dart';
+
+main() {}
diff --git a/tests/standalone/package/scenarios/empty_packages_file/empty_packages_file_noimports_test.dart b/tests/standalone/package/scenarios/empty_packages_file/empty_packages_file_noimports_test.dart
new file mode 100644
index 0000000..af76de8
--- /dev/null
+++ b/tests/standalone/package/scenarios/empty_packages_file/empty_packages_file_noimports_test.dart
@@ -0,0 +1,11 @@
+// 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.
+
+// Packages=.packages
+
+// We expect this to not cause any errors. An empty packages file is valid,
+// you should only run into problems if you try to resolve a package import.
+library empty_packages_file_noimports_test;
+
+main() {}
diff --git a/tests/standalone/package/scenarios/empty_packages_file/empty_packages_file_option_test.dart b/tests/standalone/package/scenarios/empty_packages_file/empty_packages_file_option_test.dart
new file mode 100644
index 0000000..010f5f3
--- /dev/null
+++ b/tests/standalone/package/scenarios/empty_packages_file/empty_packages_file_option_test.dart
@@ -0,0 +1,11 @@
+// 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.
+
+// Packages=.packages
+
+library empty_packages_file_option_test;
+
+import 'package:foo/foo.dart';
+
+main() {}
diff --git a/tests/standalone/package/scenarios/invalid/foo/foo.dart b/tests/standalone/package/scenarios/invalid/foo/foo.dart
new file mode 100644
index 0000000..8c5c046
--- /dev/null
+++ b/tests/standalone/package/scenarios/invalid/foo/foo.dart
@@ -0,0 +1,7 @@
+// 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.
+
+library foo;
+
+String foo = 'foo';
diff --git a/tests/standalone/package/scenarios/invalid/invalid_package_name.packages b/tests/standalone/package/scenarios/invalid/invalid_package_name.packages
new file mode 100644
index 0000000..d74d280
--- /dev/null
+++ b/tests/standalone/package/scenarios/invalid/invalid_package_name.packages
@@ -0,0 +1,2 @@
+..:nonexistent/
+foo:foo/
\ No newline at end of file
diff --git a/tests/standalone/package/scenarios/invalid/invalid_package_name_test.dart b/tests/standalone/package/scenarios/invalid/invalid_package_name_test.dart
new file mode 100644
index 0000000..4c278c9
--- /dev/null
+++ b/tests/standalone/package/scenarios/invalid/invalid_package_name_test.dart
@@ -0,0 +1,15 @@
+// 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.
+
+// Packages=invalid_package_name.packages
+
+library invalid_package_name_test;
+
+import 'package:foo/foo.dart' as foo;
+
+main() {
+  if (foo.foo != 'foo') {
+    throw new Exception('package "foo" was not resolved correctly');
+  }
+}
diff --git a/tests/standalone/package/scenarios/invalid/invalid_utf8.packages b/tests/standalone/package/scenarios/invalid/invalid_utf8.packages
new file mode 100644
index 0000000..b0c09d0
--- /dev/null
+++ b/tests/standalone/package/scenarios/invalid/invalid_utf8.packages
@@ -0,0 +1 @@
+þ:foo/
diff --git a/tests/standalone/package/scenarios/invalid/invalid_utf8_test.dart b/tests/standalone/package/scenarios/invalid/invalid_utf8_test.dart
new file mode 100644
index 0000000..224fc88
--- /dev/null
+++ b/tests/standalone/package/scenarios/invalid/invalid_utf8_test.dart
@@ -0,0 +1,9 @@
+// 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.
+
+// Packages=invalid_utf8.packages
+
+library invalid_utf8_test;
+
+main() {}
diff --git a/tests/standalone/package/scenarios/invalid/non_existent_packages_file_test.dart b/tests/standalone/package/scenarios/invalid/non_existent_packages_file_test.dart
new file mode 100644
index 0000000..dc7380c
--- /dev/null
+++ b/tests/standalone/package/scenarios/invalid/non_existent_packages_file_test.dart
@@ -0,0 +1,9 @@
+// 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.
+
+// Packages=non_existent.packages
+
+library non_existent_packages_file_test;
+
+main() {}
diff --git a/tests/standalone/package/scenarios/invalid/same_package_twice.packages b/tests/standalone/package/scenarios/invalid/same_package_twice.packages
new file mode 100644
index 0000000..bdd57b6
--- /dev/null
+++ b/tests/standalone/package/scenarios/invalid/same_package_twice.packages
@@ -0,0 +1,3 @@
+foo:nonexistentdir/
+# This overrides the previous entry
+foo:foo/
\ No newline at end of file
diff --git a/tests/standalone/package/scenarios/invalid/same_package_twice_test.dart b/tests/standalone/package/scenarios/invalid/same_package_twice_test.dart
new file mode 100644
index 0000000..acedb40
--- /dev/null
+++ b/tests/standalone/package/scenarios/invalid/same_package_twice_test.dart
@@ -0,0 +1,11 @@
+// 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.
+
+// Packages=same_package_twice.packages
+
+library same_package_twice_test;
+
+import 'package:foo/foo.dart' as foo;
+
+main() {}
diff --git a/tests/standalone/package/scenarios/packages_file_in_parent/.packages b/tests/standalone/package/scenarios/packages_file_in_parent/.packages
new file mode 100644
index 0000000..17ae735
--- /dev/null
+++ b/tests/standalone/package/scenarios/packages_file_in_parent/.packages
@@ -0,0 +1 @@
+foo:foo/
\ No newline at end of file
diff --git a/tests/standalone/package/scenarios/packages_file_in_parent/foo/foo.dart b/tests/standalone/package/scenarios/packages_file_in_parent/foo/foo.dart
new file mode 100644
index 0000000..fed9bd7
--- /dev/null
+++ b/tests/standalone/package/scenarios/packages_file_in_parent/foo/foo.dart
@@ -0,0 +1,7 @@
+// 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.
+
+library foo;
+
+String bar = 'hello';
diff --git a/tests/standalone/package/scenarios/packages_file_in_parent/sub/packages_file_in_parent_noimports_test.dart b/tests/standalone/package/scenarios/packages_file_in_parent/sub/packages_file_in_parent_noimports_test.dart
new file mode 100644
index 0000000..d5194f1
--- /dev/null
+++ b/tests/standalone/package/scenarios/packages_file_in_parent/sub/packages_file_in_parent_noimports_test.dart
@@ -0,0 +1,9 @@
+// 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.
+
+// Packages=none
+
+library packages_file_in_parent_noimports_test;
+
+main() {}
diff --git a/tests/standalone/package/scenarios/packages_file_in_parent/sub/packages_file_in_parent_test.dart b/tests/standalone/package/scenarios/packages_file_in_parent/sub/packages_file_in_parent_test.dart
new file mode 100644
index 0000000..0151f19
--- /dev/null
+++ b/tests/standalone/package/scenarios/packages_file_in_parent/sub/packages_file_in_parent_test.dart
@@ -0,0 +1,15 @@
+// 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.
+
+// Packages=none
+
+library packages_file_in_parent_test;
+
+import 'package:foo/foo.dart' as foo;
+
+main() {
+  if (foo.bar != 'hello') {
+    throw new Exception('package "foo" was not resolved correctly');
+  }
+}
diff --git a/tests/standalone/package/scenarios/packages_file_only/.packages b/tests/standalone/package/scenarios/packages_file_only/.packages
new file mode 100644
index 0000000..17ae735
--- /dev/null
+++ b/tests/standalone/package/scenarios/packages_file_only/.packages
@@ -0,0 +1 @@
+foo:foo/
\ No newline at end of file
diff --git a/tests/standalone/package/scenarios/packages_file_only/foo/foo.dart b/tests/standalone/package/scenarios/packages_file_only/foo/foo.dart
new file mode 100644
index 0000000..fed9bd7
--- /dev/null
+++ b/tests/standalone/package/scenarios/packages_file_only/foo/foo.dart
@@ -0,0 +1,7 @@
+// 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.
+
+library foo;
+
+String bar = 'hello';
diff --git a/tests/standalone/package/scenarios/packages_file_only/packages_file_only_noimports_test.dart b/tests/standalone/package/scenarios/packages_file_only/packages_file_only_noimports_test.dart
new file mode 100644
index 0000000..e495256
--- /dev/null
+++ b/tests/standalone/package/scenarios/packages_file_only/packages_file_only_noimports_test.dart
@@ -0,0 +1,9 @@
+// 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.
+
+// Packages=none
+
+library packages_file_only_noimports_test;
+
+main() {}
diff --git a/tests/standalone/package/scenarios/packages_file_only/packages_file_only_test.dart b/tests/standalone/package/scenarios/packages_file_only/packages_file_only_test.dart
new file mode 100644
index 0000000..554f3b7
--- /dev/null
+++ b/tests/standalone/package/scenarios/packages_file_only/packages_file_only_test.dart
@@ -0,0 +1,15 @@
+// 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.
+
+// Packages=none
+
+library packages_file_only_test;
+
+import 'package:foo/foo.dart' as foo;
+
+main() {
+  if (foo.bar != 'hello') {
+    throw new Exception('package "foo" was not resolved correctly');
+  }
+}
diff --git a/tests/standalone/package/scenarios/packages_file_strange_formatting/bar/bar.dart b/tests/standalone/package/scenarios/packages_file_strange_formatting/bar/bar.dart
new file mode 100644
index 0000000..7ff2cb0
--- /dev/null
+++ b/tests/standalone/package/scenarios/packages_file_strange_formatting/bar/bar.dart
@@ -0,0 +1,7 @@
+// 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.
+
+library bar;
+
+String bar = 'bar';
diff --git a/tests/standalone/package/scenarios/packages_file_strange_formatting/baz/baz.dart b/tests/standalone/package/scenarios/packages_file_strange_formatting/baz/baz.dart
new file mode 100644
index 0000000..54059cb
--- /dev/null
+++ b/tests/standalone/package/scenarios/packages_file_strange_formatting/baz/baz.dart
@@ -0,0 +1,7 @@
+// 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.
+
+library baz;
+
+String baz = 'baz';
diff --git a/tests/standalone/package/scenarios/packages_file_strange_formatting/empty_lines.packages b/tests/standalone/package/scenarios/packages_file_strange_formatting/empty_lines.packages
new file mode 100644
index 0000000..e81099e
--- /dev/null
+++ b/tests/standalone/package/scenarios/packages_file_strange_formatting/empty_lines.packages
@@ -0,0 +1,20 @@
+
+
+
+
+foo:foo/
+
+
+bar:bar/
+
+
+
+
+
+
+
+
+baz:baz/
+
+
+
diff --git a/tests/standalone/package/scenarios/packages_file_strange_formatting/empty_lines_test.dart b/tests/standalone/package/scenarios/packages_file_strange_formatting/empty_lines_test.dart
new file mode 100644
index 0000000..665597a
--- /dev/null
+++ b/tests/standalone/package/scenarios/packages_file_strange_formatting/empty_lines_test.dart
@@ -0,0 +1,23 @@
+// 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.
+
+// Packages=empty_lines.packages
+
+library empty_lines_test;
+
+import 'package:foo/foo.dart' as foo;
+import 'package:bar/bar.dart' as bar;
+import 'package:baz/baz.dart' as baz;
+
+main() {
+  if (foo.foo != 'foo') {
+    throw new Exception('package "foo" was not resolved correctly');
+  }
+  if (bar.bar != 'bar') {
+    throw new Exception('package "bar" was not resolved correctly');
+  }
+  if (baz.baz != 'baz') {
+    throw new Exception('package "baz" was not resolved correctly');
+  }
+}
diff --git a/tests/standalone/package/scenarios/packages_file_strange_formatting/empty_package_dir.packages b/tests/standalone/package/scenarios/packages_file_strange_formatting/empty_package_dir.packages
new file mode 100644
index 0000000..0152a79
--- /dev/null
+++ b/tests/standalone/package/scenarios/packages_file_strange_formatting/empty_package_dir.packages
@@ -0,0 +1 @@
+foo:
diff --git a/tests/standalone/package/scenarios/packages_file_strange_formatting/empty_package_dir_test.dart b/tests/standalone/package/scenarios/packages_file_strange_formatting/empty_package_dir_test.dart
new file mode 100644
index 0000000..97cded4
--- /dev/null
+++ b/tests/standalone/package/scenarios/packages_file_strange_formatting/empty_package_dir_test.dart
@@ -0,0 +1,15 @@
+// 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.
+
+// Packages=empty_package_dir.packages
+
+// In this test, we give a packages file that associates the package 'foo' with
+// the empty string. This causes both the VM and dart2js to resolve
+// 'package:foo' imports relative to the root directory. So the import statement
+// `import 'package:foo/foo.dart'` is equivalent to `import '/foo.dart'`.
+library empty_package_dir_test;
+
+import 'package:foo/foo.dart';
+
+main() {}
diff --git a/tests/standalone/package/scenarios/packages_file_strange_formatting/foo/foo.dart b/tests/standalone/package/scenarios/packages_file_strange_formatting/foo/foo.dart
new file mode 100644
index 0000000..8c5c046
--- /dev/null
+++ b/tests/standalone/package/scenarios/packages_file_strange_formatting/foo/foo.dart
@@ -0,0 +1,7 @@
+// 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.
+
+library foo;
+
+String foo = 'foo';
diff --git a/tests/standalone/package/scenarios/packages_file_strange_formatting/mixed_line_ends.packages b/tests/standalone/package/scenarios/packages_file_strange_formatting/mixed_line_ends.packages
new file mode 100644
index 0000000..c3d3e75
--- /dev/null
+++ b/tests/standalone/package/scenarios/packages_file_strange_formatting/mixed_line_ends.packages
@@ -0,0 +1,3 @@
+foo:foo/
+bar:bar/

+baz:baz/
diff --git a/tests/standalone/package/scenarios/packages_file_strange_formatting/mixed_line_ends_test.dart b/tests/standalone/package/scenarios/packages_file_strange_formatting/mixed_line_ends_test.dart
new file mode 100644
index 0000000..3e9ec48
--- /dev/null
+++ b/tests/standalone/package/scenarios/packages_file_strange_formatting/mixed_line_ends_test.dart
@@ -0,0 +1,23 @@
+// 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.
+
+// Packages=mixed_line_ends.packages
+
+library mixed_line_ends_test;
+
+import 'package:foo/foo.dart' as foo;
+import 'package:bar/bar.dart' as bar;
+import 'package:baz/baz.dart' as baz;
+
+main() {
+  if (foo.foo != 'foo') {
+    throw new Exception('package "foo" was not resolved correctly');
+  }
+  if (bar.bar != 'bar') {
+    throw new Exception('package "bar" was not resolved correctly');
+  }
+  if (baz.baz != 'baz') {
+    throw new Exception('package "baz" was not resolved correctly');
+  }
+}
diff --git a/tests/standalone/package/scenarios/packages_option_only/packages_option_only_noimports_test.dart b/tests/standalone/package/scenarios/packages_option_only/packages_option_only_noimports_test.dart
new file mode 100644
index 0000000..92e1cac
--- /dev/null
+++ b/tests/standalone/package/scenarios/packages_option_only/packages_option_only_noimports_test.dart
@@ -0,0 +1,9 @@
+// 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.
+
+// Packages=sub/.packages
+
+library packages_option_only_noimports_test;
+
+main() {}
diff --git a/tests/standalone/package/scenarios/packages_option_only/packages_option_only_test.dart b/tests/standalone/package/scenarios/packages_option_only/packages_option_only_test.dart
new file mode 100644
index 0000000..47fdcde
--- /dev/null
+++ b/tests/standalone/package/scenarios/packages_option_only/packages_option_only_test.dart
@@ -0,0 +1,15 @@
+// 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.
+
+// Packages=sub/.packages
+
+library packages_option_only_test;
+
+import 'package:foo/foo.dart' as foo;
+
+main() {
+  if (foo.bar != 'hello') {
+    throw new Exception('package "foo" was not resolved correctly');
+  }
+}
diff --git a/tests/standalone/package/scenarios/packages_option_only/sub/.packages b/tests/standalone/package/scenarios/packages_option_only/sub/.packages
new file mode 100644
index 0000000..17ae735
--- /dev/null
+++ b/tests/standalone/package/scenarios/packages_option_only/sub/.packages
@@ -0,0 +1 @@
+foo:foo/
\ No newline at end of file
diff --git a/tests/standalone/package/scenarios/packages_option_only/sub/foo/foo.dart b/tests/standalone/package/scenarios/packages_option_only/sub/foo/foo.dart
new file mode 100644
index 0000000..fed9bd7
--- /dev/null
+++ b/tests/standalone/package/scenarios/packages_option_only/sub/foo/foo.dart
@@ -0,0 +1,7 @@
+// 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.
+
+library foo;
+
+String bar = 'hello';
diff --git a/tests/standalone/package/sibling_isolate.dart b/tests/standalone/package/sibling_isolate.dart
new file mode 100644
index 0000000..134196e
--- /dev/null
+++ b/tests/standalone/package/sibling_isolate.dart
@@ -0,0 +1,14 @@
+// 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.
+
+library sibling_isolate;
+
+import 'package:shared.dart' as shared;
+import 'dart:isolate';
+
+// This file is spawned from package_isolate_test.dart
+main(List<String> args, SendPort reply) {
+  shared.output = 'isolate';
+  reply.send(shared.output);
+}
diff --git a/tests/standalone/package/test_folder/folder_isolate.dart b/tests/standalone/package/test_folder/folder_isolate.dart
new file mode 100644
index 0000000..4a56448
--- /dev/null
+++ b/tests/standalone/package/test_folder/folder_isolate.dart
@@ -0,0 +1,15 @@
+// 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.
+
+library folder_isolate;
+
+// This is a package that's not available to the main isolate
+import 'package:folder_lib.dart' as isolate_package;
+import 'dart:isolate';
+
+// This file is spawned from package_isolate_test.dart
+main(List<String> args, Sendport replyTo) {
+  isolate_package.count = 1;
+  replyTo.send('isolate');
+}
diff --git a/tests/standalone/packages_file_test.dart b/tests/standalone/packages_file_test.dart
new file mode 100644
index 0000000..99c2ab5
--- /dev/null
+++ b/tests/standalone/packages_file_test.dart
@@ -0,0 +1,1011 @@
+// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// VMOptions=--enable-isolate-groups
+// VMOptions=--no-enable-isolate-groups
+
+import "dart:async";
+import "dart:io";
+import "dart:convert" show json;
+import "package:path/path.dart" as p;
+import "package:async_helper/async_helper.dart";
+
+/// Root directory of generated files.
+/// Path contains trailing slash.
+/// Each configuration gets its own sub-directory.
+Directory fileRoot;
+
+/// Shared HTTP server serving the files in [httpFiles].
+/// Each configuration gets its own "sub-dir" entry in `httpFiles`.
+HttpServer httpServer;
+
+/// Directory structure served by HTTP server.
+Map<String, dynamic> httpFiles = {};
+
+/// List of configurations.
+List<Configuration> configurations = [];
+
+/// Collection of failing tests and their failure messages.
+///
+/// Each test may fail in more than one way.
+var failingTests = <String, List<String>>{};
+
+main() async {
+  asyncStart();
+  await setUp();
+
+  await runTests(); //                         //# 01: ok
+  await runTests([spawn]); //                  //# 02: ok
+  await runTests([spawn, spawn]); //           //# 03: ok
+  await runTests([spawnUriInherit]); //        //# 04: ok
+  await runTests([spawnUriInherit, spawn]); // //# 05: ok
+  await runTests([spawn, spawnUriInherit]); // //# 06: ok
+
+  // Test that spawning a new VM with file paths instead of URIs as arguments
+  // gives the same URIs in the internal values.
+  await runTests([asPath]); //                 //# 07: ok
+
+  // Test that spawnUri can reproduce the behavior of VM command line parameters
+  // exactly.
+  // (Don't run all configuration combinations in the same test, so
+  // unroll the configurations into multiple groups and run each group
+  // as its own multitest.
+  {
+    var groupCount = 8;
+    var groups = new List.generate(8, (_) => []);
+    for (int i = 0; i < configurations.length; i++) {
+      groups[i % groupCount].add(configurations[i]);
+    }
+    var group = -1;
+    group = 0; //                              //# 10: ok
+    group = 1; //                              //# 11: ok
+    group = 2; //                              //# 12: ok
+    group = 3; //                              //# 13: ok
+    group = 4; //                              //# 14: ok
+    group = 5; //                              //# 15: ok
+    group = 6; //                              //# 16: ok
+    group = 7; //                              //# 17: ok
+    if (group >= 0) {
+      for (var other in groups[group]) {
+        await runTests([spawnUriOther(other)]);
+      }
+    }
+  }
+
+  await tearDown();
+
+  if (failingTests.isNotEmpty) {
+    print("Errors found in tests:");
+    failingTests.forEach((test, actual) {
+      print("$test:\n  ${actual.join("\n  ")}");
+    });
+    exit(255);
+  }
+
+  asyncEnd();
+}
+
+/// Test running the test of the configuration through [Isolate.spawn].
+///
+/// This should not change the expected results compared to running it
+/// directly.
+Configuration spawn(Configuration conf) {
+  return conf.update(
+      description: conf.description + "/spawn",
+      main: "spawnMain",
+      newArgs: [conf.mainType],
+      expect: null);
+}
+
+/// Tests running a spawnUri on top of the configuration before testing.
+///
+/// The `spawnUri` call has no explicit root or config parameter, and
+/// shouldn't search for one, so it implicitly inherits the current isolate's
+/// actual root or configuration.
+Configuration spawnUriInherit(Configuration conf) {
+  if (conf.expect["iroot"] == null &&
+      conf.expect["iconf"] == null &&
+      conf.expect["pconf"] != null) {
+    // This means that the specified configuration file didn't exist.
+    // spawning a new URI to "inherit" that will actually do an automatic
+    // package resolution search with results that are unpredictable.
+    // That behavior will be tested in a setting where we have more control over
+    // the files around the spawned URI.
+    return null;
+  }
+  return conf.update(
+      description: conf.description + "/spawnUri-inherit",
+      main: "spawnUriMain",
+      // encode null parameters as "-". Windows fails if using empty string.
+      newArgs: [
+        conf.mainFile,
+        "-",
+        "-",
+        "false"
+      ],
+      expect: {
+        "proot": conf.expect["iroot"],
+        "pconf": conf.expect["iconf"],
+      });
+}
+
+/// Tests running a spawnUri with an explicit configuration different
+/// from the original configuration.
+///
+/// Duplicates the explicit parameters as arguments to the spawned isolate.
+ConfigurationTransformer spawnUriOther(Configuration other) {
+  return (Configuration conf) {
+    bool search = (other.config == null) && (other.root == null);
+    return conf.update(
+        description: "${conf.description} -spawnUri-> ${other.description}",
+        main: "spawnUriMain",
+        newArgs: [
+          other.mainFile,
+          other.config ?? "-",
+          other.root ?? "-",
+          "$search"
+        ],
+        expect: other.expect);
+  };
+}
+
+/// Convert command line parameters to file paths.
+///
+/// This only works on the command line, not with `spawnUri`.
+Configuration asPath(Configuration conf) {
+  bool change = false;
+
+  String toPath(String string) {
+    if (string == null) return null;
+    if (string.startsWith("file:")) {
+      change = true;
+      return new File.fromUri(Uri.parse(string)).path;
+    }
+    return string;
+  }
+
+  var mainFile = toPath(conf.mainFile);
+  var root = toPath(conf.root);
+  var config = toPath(conf.config);
+  if (!change) return null;
+  return conf.update(
+      description: conf.description + "/as path",
+      mainFile: mainFile,
+      root: root,
+      config: config);
+}
+
+/// --------------------------------------------------------------
+
+Future setUp() async {
+  fileRoot = createTempDir();
+  // print("FILES: $fileRoot");
+  httpServer = await startServer(httpFiles);
+  // print("HTTPS: ${httpServer.address.address}:${httpServer.port}");
+  createConfigurations();
+}
+
+Future tearDown() async {
+  fileRoot.deleteSync(recursive: true);
+  await httpServer.close();
+}
+
+typedef Configuration ConfigurationTransformer(Configuration conf);
+
+Future runTests([List<ConfigurationTransformer> transformations]) async {
+  outer:
+  for (var config in configurations) {
+    if (transformations != null) {
+      for (int i = transformations.length - 1; i >= 0; i--) {
+        config = transformations[i](config);
+        if (config == null) {
+          continue outer; // Can be used to skip some tests.
+        }
+      }
+    }
+    await testConfiguration(config);
+  }
+}
+
+// Creates a combination of configurations for running the Dart VM.
+//
+// The combinations covers most configurations of implicit and explicit
+// package configurations over both file: and http: file sources.
+// It also specifies the expected values of the following for a VM
+// run in that configuration.
+//
+// * `Process.packageRoot`
+// * `Process.packageConfig`
+// * `Isolate.packageRoot`
+// * `Isolate.packageRoot`
+// * `Isolate.resolvePackageUri` of various inputs.
+// * A variable defined in a library loaded using a `package:` URI.
+//
+// The configurations all have URIs as `root`, `config` and `mainFile` strings,
+// have empty argument lists and `mainFile` points to the `main.dart` file.
+void createConfigurations() {
+  add(String description, String mainDir,
+      {String root, String config, Map file, Map http, Map expect}) {
+    var id = freshName("conf");
+
+    file ??= {};
+    http ??= {};
+
+    // Fix-up paths.
+    String fileUri = fileRoot.uri.resolve("$id/").toString();
+    String httpUri =
+        "http://${httpServer.address.address}:${httpServer.port}/$id/";
+
+    String fixPath(String path) {
+      return path?.replaceAllMapped(fileHttpRegexp, (match) {
+        if (path.startsWith("%file/", match.start)) return fileUri;
+        return httpUri;
+      });
+    }
+
+    void fixPaths(Map dirs) {
+      for (var name in dirs.keys) {
+        var value = dirs[name];
+        if (value is Map) {
+          Map subDir = value;
+          fixPaths(subDir);
+        } else {
+          var newValue = fixPath(value);
+          if (newValue != value) dirs[name] = newValue;
+        }
+      }
+    }
+
+    if (!mainDir.endsWith("/")) mainDir += "/";
+    // Insert main files into the main-dir map.
+    Map mainDirMap;
+    {
+      if (mainDir.startsWith("%file/")) {
+        mainDirMap = file;
+      } else {
+        mainDirMap = http;
+      }
+      var parts = mainDir.split('/');
+      for (int i = 1; i < parts.length - 1; i++) {
+        var dirName = parts[i];
+        mainDirMap = mainDirMap[dirName] ?? (mainDirMap[dirName] = {});
+      }
+    }
+
+    mainDirMap["main"] = testMain;
+    mainDirMap["spawnMain"] = spawnMain.replaceAll("%mainDir/", mainDir);
+    mainDirMap["spawnUriMain"] = spawnUriMain;
+
+    mainDir = fixPath(mainDir);
+    root = fixPath(root);
+    config = fixPath(config);
+    fixPaths(file);
+    fixPaths(http);
+    // These expectations are default. If not overridden the value will be
+    // expected to be null. That is, you can't avoid testing the actual
+    // value of these, you can only change what value to expect.
+    // For values not included here (commented out), the result is not tested
+    // unless a value (maybe null) is provided.
+    fixPaths(expect);
+
+    expect = {
+      "pconf": null,
+      "proot": null,
+      "iconf": null,
+      "iroot": null,
+      "foo": null,
+      "foo/": null,
+      "foo/bar": null,
+      "foo.x": "qux",
+      "bar/bar": null,
+      "relative": "relative/path",
+      "nonpkg": "http://example.org/file"
+    }..addAll(expect ?? const {});
+
+    // Add http files to the http server.
+    if (http.isNotEmpty) {
+      httpFiles[id] = http;
+    }
+    // Add file files to the file system.
+    if (file.isNotEmpty) {
+      createFiles(fileRoot, id, file);
+    }
+
+    configurations.add(new Configuration(
+        description: description,
+        root: root,
+        config: config,
+        mainFile: mainDir + "main.dart",
+        args: const [],
+        expect: expect));
+  }
+
+  // The `test` function can generate file or http resources.
+  // It replaces "%file/" with URI of the root directory of generated files and
+  // "%http/" with the URI of the HTTP server's root in appropriate contexts
+  // (all file contents and parameters).
+
+  // Tests that only use one scheme to access files.
+  for (var scheme in ["file", "http"]) {
+    /// Run a test in the current scheme.
+    ///
+    /// The files are served either through HTTP or in a local directory.
+    /// Use "%$scheme/" to refer to the root of the served files.
+    addScheme(description, main, {expect, files, args, root, config}) {
+      add("$scheme/$description", main,
+          expect: expect,
+          root: root,
+          config: config,
+          file: (scheme == "file") ? files : null,
+          http: (scheme == "http") ? files : null);
+    }
+
+    {
+      // No parameters, no .packages files or packages/ dir.
+      // A "file:" source realizes there is no configuration and can't resolve
+      // any packages, but a "http:" source assumes a "packages/" directory.
+      addScheme("no resolution", "%$scheme/",
+          files: {},
+          expect: (scheme == "file")
+              ? {"foo.x": null}
+              : {
+                  "iroot": "%http/packages/",
+                  "foo": "%http/packages/foo",
+                  "foo/": "%http/packages/foo/",
+                  "foo/bar": "%http/packages/foo/bar",
+                  "foo.x": null,
+                  "bar/bar": "%http/packages/bar/bar",
+                });
+    }
+
+    {
+      // No parameters, no .packages files,
+      // packages/ dir exists and is detected.
+      var files = {"packages": fooPackage};
+      addScheme("implicit packages dir", "%$scheme/", files: files, expect: {
+        "iroot": "%$scheme/packages/",
+        "foo": "%$scheme/packages/foo",
+        "foo/": "%$scheme/packages/foo/",
+        "foo/bar": "%$scheme/packages/foo/bar",
+        "bar/bar": "%$scheme/packages/bar/bar",
+      });
+    }
+
+    {
+      // No parameters, no .packages files in current dir, but one in parent,
+      // packages/ dir exists and is used.
+      //
+      // Should not detect the .packages file in parent directory.
+      // That file is empty, so if it is used, the system cannot resolve "foo".
+      var files = {
+        "sub": {"packages": fooPackage},
+        ".packages": ""
+      };
+      addScheme(
+          "implicit packages dir overrides parent .packages", "%$scheme/sub/",
+          files: files,
+          expect: {
+            "iroot": "%$scheme/sub/packages/",
+            "foo": "%$scheme/sub/packages/foo",
+            "foo/": "%$scheme/sub/packages/foo/",
+            "foo/bar": "%$scheme/sub/packages/foo/bar",
+            // "foo.x": "qux",  // Blocked by issue http://dartbug.com/26482
+            "bar/bar": "%$scheme/sub/packages/bar/bar",
+          });
+    }
+
+    {
+      // No parameters, a .packages file next to entry is found and used.
+      // A packages/ directory is ignored.
+      var files = {
+        ".packages": "foo:pkgs/foo/",
+        "packages": {},
+        "pkgs": fooPackage
+      };
+      addScheme("implicit .packages file", "%$scheme/", files: files, expect: {
+        "iconf": "%$scheme/.packages",
+        "foo/": "%$scheme/pkgs/foo/",
+        "foo/bar": "%$scheme/pkgs/foo/bar",
+      });
+    }
+
+    {
+      // No parameters, a .packages file in parent dir, no packages/ dir.
+      // With a file: URI, find the .packages file.
+      // WIth a http: URI, assume a packages/ dir.
+      var files = {"sub": {}, ".packages": "foo:pkgs/foo/", "pkgs": fooPackage};
+      addScheme(".packages file in parent", "%$scheme/sub/",
+          files: files,
+          expect: (scheme == "file")
+              ? {
+                  "iconf": "%file/.packages",
+                  "foo/": "%file/pkgs/foo/",
+                  "foo/bar": "%file/pkgs/foo/bar",
+                }
+              : {
+                  "iroot": "%http/sub/packages/",
+                  "foo": "%http/sub/packages/foo",
+                  "foo/": "%http/sub/packages/foo/",
+                  "foo/bar": "%http/sub/packages/foo/bar",
+                  "foo.x": null,
+                  "bar/bar": "%http/sub/packages/bar/bar",
+                });
+    }
+
+    {
+      // Specified package root that doesn't exist.
+      // Ignores existing .packages file and packages/ dir.
+      addScheme("explicit root not there", "%$scheme/",
+          files: {
+            "packages": fooPackage,
+            ".packages": "foo:%$scheme/packages/"
+          },
+          root: "%$scheme/notthere/",
+          expect: {
+            "proot": "%$scheme/notthere/",
+            "iroot": "%$scheme/notthere/",
+            "foo": "%$scheme/notthere/foo",
+            "foo/": "%$scheme/notthere/foo/",
+            "foo/bar": "%$scheme/notthere/foo/bar",
+            "foo.x": null,
+            "bar/bar": "%$scheme/notthere/bar/bar",
+          });
+    }
+
+    {
+      // Specified package config that doesn't exist.
+      // Ignores existing .packages file and packages/ dir.
+      addScheme("explicit config not there", "%$scheme/",
+          files: {".packages": "foo:packages/foo/", "packages": fooPackage},
+          config: "%$scheme/.notthere",
+          expect: {
+            "pconf": "%$scheme/.notthere",
+            "iconf": null, //   <- Only there if actually loaded (unspecified).
+            "foo/": null,
+            "foo/bar": null,
+            "foo.x": null,
+          });
+    }
+
+    {
+      // Specified package root with no trailing slash.
+      // The Platform.packageRoot and Isolate.packageRoot has a trailing slash.
+      var files = {
+        ".packages": "foo:packages/foo/",
+        "packages": {},
+        "pkgs": fooPackage
+      };
+      addScheme("explicit package root, no slash", "%$scheme/",
+          files: files,
+          root: "%$scheme/pkgs",
+          expect: {
+            "proot": "%$scheme/pkgs/",
+            "iroot": "%$scheme/pkgs/",
+            "foo": "%$scheme/pkgs/foo",
+            "foo/": "%$scheme/pkgs/foo/",
+            "foo/bar": "%$scheme/pkgs/foo/bar",
+            "bar/bar": "%$scheme/pkgs/bar/bar",
+          });
+    }
+
+    {
+      // Specified package root with trailing slash.
+      var files = {
+        ".packages": "foo:packages/foo/",
+        "packages": {},
+        "pkgs": fooPackage
+      };
+      addScheme("explicit package root, slash", "%$scheme/",
+          files: files,
+          root: "%$scheme/pkgs",
+          expect: {
+            "proot": "%$scheme/pkgs/",
+            "iroot": "%$scheme/pkgs/",
+            "foo": "%$scheme/pkgs/foo",
+            "foo/": "%$scheme/pkgs/foo/",
+            "foo/bar": "%$scheme/pkgs/foo/bar",
+            "bar/bar": "%$scheme/pkgs/bar/bar",
+          });
+    }
+
+    {
+      // Specified package config.
+      var files = {
+        ".packages": "foo:packages/foo/",
+        "packages": {},
+        ".pkgs": "foo:pkgs/foo/",
+        "pkgs": fooPackage
+      };
+      addScheme("explicit package config file", "%$scheme/",
+          files: files,
+          config: "%$scheme/.pkgs",
+          expect: {
+            "pconf": "%$scheme/.pkgs",
+            "iconf": "%$scheme/.pkgs",
+            "foo/": "%$scheme/pkgs/foo/",
+            "foo/bar": "%$scheme/pkgs/foo/bar",
+          });
+    }
+
+    {
+      // Specified package config as data: URI.
+      // The package config can be specified as a data: URI.
+      // (In that case, relative URI references in the config file won't work).
+      var files = {
+        ".packages": "foo:packages/foo/",
+        "packages": {},
+        "pkgs": fooPackage
+      };
+      var dataUri = "data:,foo:%$scheme/pkgs/foo/\n";
+      addScheme("explicit data: config file", "%$scheme/",
+          files: files,
+          config: dataUri,
+          expect: {
+            "pconf": dataUri,
+            "iconf": dataUri,
+            "foo/": "%$scheme/pkgs/foo/",
+            "foo/bar": "%$scheme/pkgs/foo/bar",
+          });
+    }
+  }
+
+  // Tests where there are files on both http: and file: sources.
+
+  for (var entryScheme in const ["file", "http"]) {
+    for (var pkgScheme in const ["file", "http"]) {
+      // Package root.
+      if (entryScheme != pkgScheme) {
+        // Package dir and entry point on different schemes.
+        var files = {};
+        var https = {};
+        (entryScheme == "file" ? files : https)["main"] = testMain;
+        (pkgScheme == "file" ? files : https)["pkgs"] = fooPackage;
+        add("$pkgScheme pkg/$entryScheme main", "%$entryScheme/",
+            file: files,
+            http: https,
+            root: "%$pkgScheme/pkgs/",
+            expect: {
+              "proot": "%$pkgScheme/pkgs/",
+              "iroot": "%$pkgScheme/pkgs/",
+              "foo": "%$pkgScheme/pkgs/foo",
+              "foo/": "%$pkgScheme/pkgs/foo/",
+              "foo/bar": "%$pkgScheme/pkgs/foo/bar",
+              "bar/bar": "%$pkgScheme/pkgs/bar/bar",
+              "foo.x": "qux",
+            });
+      }
+      // Package config. The configuration file may also be on either source.
+      for (var configScheme in const ["file", "http"]) {
+        // Don't do the boring stuff!
+        if (entryScheme == configScheme && entryScheme == pkgScheme) continue;
+        // Package config, packages and entry point not all on same scheme.
+        var files = {};
+        var https = {};
+        (entryScheme == "file" ? files : https)["main"] = testMain;
+        (configScheme == "file" ? files : https)[".pkgs"] =
+            "foo:%$pkgScheme/pkgs/foo/\n";
+        (pkgScheme == "file" ? files : https)["pkgs"] = fooPackage;
+        add("$pkgScheme pkg/$configScheme config/$entryScheme main",
+            "%$entryScheme/",
+            file: files,
+            http: https,
+            config: "%$configScheme/.pkgs",
+            expect: {
+              "pconf": "%$configScheme/.pkgs",
+              "iconf": "%$configScheme/.pkgs",
+              "foo/": "%$pkgScheme/pkgs/foo/",
+              "foo/bar": "%$pkgScheme/pkgs/foo/bar",
+              "foo.x": "qux",
+            });
+      }
+    }
+  }
+}
+
+// ---------------------------------------------------------
+// Helper functionality.
+
+var fileHttpRegexp = new RegExp(r"%(?:file|http)/");
+
+// Executes a test in a configuration.
+//
+// The test must specify which main file to use
+// (`main`, `spawnMain` or `spawnUriMain`)
+// and any arguments which will be used by `spawnMain` and `spawnUriMain`.
+//
+// The [expect] map may be used to override the expectations of the
+// configuration on a value-by-value basis. Passing, e.g., `{"pconf": null}`
+// will override only the `pconf` (`Platform.packageConfig`) expectation.
+Future testConfiguration(Configuration conf) async {
+  print("-- ${conf.description}");
+  var description = conf.description;
+  try {
+    var output = await execDart(conf.mainFile,
+        root: conf.root, config: conf.config, scriptArgs: conf.args);
+    match(json.decode(output), conf.expect, description, output);
+  } catch (e, s) {
+    // Unexpected error calling execDart or parsing the result.
+    // Report it and continue.
+    print("ERROR running $description: $e\n$s");
+    failingTests.putIfAbsent(description, () => []).add("$e");
+  }
+}
+
+/// Test that the output of running testMain matches the expectations.
+///
+/// The output is a string which is parse as a JSON literal.
+/// The resulting map is always mapping strings to strings, or possibly `null`.
+/// The expectations can have non-string values other than null,
+/// they are `toString`'ed  before being compared (so the caller can use a URI
+/// or a File/Directory directly as an expectation).
+void match(Map actuals, Map expectations, String desc, String actualJson) {
+  for (var key in expectations.keys) {
+    var expectation = expectations[key]?.toString();
+    var actual = actuals[key];
+    if (expectation != actual) {
+      print("ERROR: $desc: $key: Expected: <$expectation> Found: <$actual>");
+      failingTests
+          .putIfAbsent(desc, () => [])
+          .add("$key: $expectation != $actual");
+    }
+  }
+}
+
+const String improt = "import"; // Avoid multitest import rewriting.
+
+/// Script that prints the current state and the result of resolving
+/// a few package URIs. This script will be invoked in different settings,
+/// and the result will be parsed and compared to the expectations.
+const String testMain = """
+$improt "dart:convert" show json;
+$improt "dart:io" show Platform, Directory;
+$improt "dart:isolate" show Isolate;
+$improt "package:foo/foo.dart" deferred as foo;
+main(_) async {
+  String platformRoot = await Platform.packageRoot;
+  String platformConfig = await Platform.packageConfig;
+  Directory cwd = Directory.current;
+  Uri script = Platform.script;
+  Uri isolateRoot = await Isolate.packageRoot;
+  Uri isolateConfig = await Isolate.packageConfig;
+  Uri base = Uri.base;
+  Uri res1 = await Isolate.resolvePackageUri(Uri.parse("package:foo"));
+  Uri res2 = await Isolate.resolvePackageUri(Uri.parse("package:foo/"));
+  Uri res3 = await Isolate.resolvePackageUri(Uri.parse("package:foo/bar"));
+  Uri res4 = await Isolate.resolvePackageUri(Uri.parse("package:bar/bar"));
+  Uri res5 = await Isolate.resolvePackageUri(Uri.parse("relative/path"));
+  Uri res6 = await Isolate.resolvePackageUri(
+      Uri.parse("http://example.org/file"));
+  String fooX = await foo
+    .loadLibrary()
+    .timeout(const Duration(seconds: 1))
+    .then((_) => foo.x, onError: (_) => null);
+  print(json.encode({
+    "cwd": cwd.path,
+    "base": base?.toString(),
+    "script": script?.toString(),
+    "proot": platformRoot,
+    "pconf": platformConfig,
+    "iroot" : isolateRoot?.toString(),
+    "iconf" : isolateConfig?.toString(),
+    "foo": res1?.toString(),
+    "foo/": res2?.toString(),
+    "foo/bar": res3?.toString(),
+    "foo.x": fooX?.toString(),
+    "bar/bar": res4?.toString(),
+    "relative": res5?.toString(),
+    "nonpkg": res6?.toString(),
+  }));
+}
+""";
+
+/// Script that spawns a new Isolate using Isolate.spawnUri.
+///
+/// Takes URI of target isolate, package config, package root and
+/// automatic package resolution-flag parameters as command line arguments.
+/// Any further arguments are forwarded to the spawned isolate.
+const String spawnUriMain = """
+$improt "dart:isolate";
+$improt "dart:async";
+main(args) async {
+  Uri target = Uri.parse(args[0]);
+  Uri config = (args[1] == "-") ? null : Uri.parse(args[1]);
+  Uri root = (args[2] == "-") ? null : Uri.parse(args[2]);
+  bool search = args[3] == "true";
+  var restArgs = args.skip(4).toList();
+  // Port keeps isolate alive until spawned isolate terminates.
+  var port = new RawReceivePort();
+  port.handler = (res) async {
+    port.close();  // Close on exit or first error.
+    if (res != null) {
+      await new Future.error(res[0], new StackTrace.fromString(res[1]));
+    }
+  };
+  Isolate.spawnUri(target, restArgs, null,
+                   packageRoot: root, packageConfig: config,
+                   automaticPackageResolution: search,
+                   onError: port.sendPort, onExit: port.sendPort);
+}
+""";
+
+/// Script that spawns a new Isolate using Isolate.spawn.
+///
+/// Uses the first argument to select which target to spawn.
+/// Should be either "test", "uri" or "spawn".
+const String spawnMain = """
+$improt "dart:async";
+$improt "dart:isolate";
+$improt "%mainDir/main.dart" as test;
+$improt "%mainDir/spawnUriMain.dart" as spawnUri;
+main(List<String> args) async {
+  // Port keeps isolate alive until spawned isolate terminates.
+  var port = new RawReceivePort();
+  port.handler = (res) async {
+    port.close();  // Close on exit or first error.
+    if (res != null) {
+      await new Future.error(res[0], new StackTrace.fromString(res[1]));
+    }
+  };
+  var arg = args.first;
+  var rest = args.skip(1).toList();
+  var target;
+  if (arg == "main") {
+    target = test.main;
+  } else if (arg == "spawnUriMain") {
+    target = spawnUri.main;
+  } else {
+    target = main;
+  }
+  Isolate.spawn(target, rest, onError: port.sendPort, onExit: port.sendPort);
+}
+""";
+
+/// A package directory containing only one package, "foo", with one file.
+const Map fooPackage = const {
+  "foo": const {"foo": "var x = 'qux';"}
+};
+
+/// Runs the Dart executable with the provided parameters.
+///
+/// Captures and returns the output.
+Future<String> execDart(String script,
+    {String root, String config, Iterable<String> scriptArgs}) async {
+  var checked = false;
+  assert((checked = true));
+  // TODO: Find a way to change CWD before running script.
+  var executable = Platform.executable;
+  var args = [];
+  if (checked) args.add("--checked");
+  if (root != null) args.add("--package-root=$root");
+  if (config != null) args.add("--packages=$config");
+  args.add(script);
+  if (scriptArgs != null) {
+    args.addAll(scriptArgs);
+  }
+  return Process.run(executable, args).then((results) {
+    if (results.exitCode != 0 || results.stderr.isNotEmpty) {
+      throw results.stderr;
+    }
+    return results.stdout;
+  });
+}
+
+/// Creates a number of files and subdirectories.
+///
+/// The [content] is the content of the directory itself. The map keys are
+/// names and the values are either strings that represent Dart file contents
+/// or maps that represent subdirectories.
+void createFiles(Directory tempDir, String subDir, Map content) {
+  Directory createDir(Directory base, String name) {
+    Directory newDir = new Directory(p.join(base.path, name));
+    newDir.createSync();
+    return newDir;
+  }
+
+  void createTextFile(Directory base, String name, String content) {
+    File newFile = new File(p.join(base.path, name));
+    newFile.writeAsStringSync(content);
+  }
+
+  void createRecursive(Directory dir, Map map) {
+    for (var name in map.keys) {
+      var content = map[name];
+      if (content is String) {
+        // If the name starts with "." it's a .packages file, otherwise it's
+        // a dart file. Those are the only files we care about in this test.
+        createTextFile(
+            dir, name.startsWith(".") ? name : name + ".dart", content);
+      } else {
+        assert(content is Map);
+        var subdir = createDir(dir, name);
+        createRecursive(subdir, content);
+      }
+    }
+  }
+
+  createRecursive(createDir(tempDir, subDir), content);
+}
+
+/// Start an HTTP server which serves a directory/file structure.
+///
+/// The directories and files are described by [files].
+///
+/// Each map key is an entry in a directory. A `Map` value is a sub-directory
+/// and a `String` value is a text file.
+/// The file contents are run through [fixPaths] to allow them to be self-
+/// referential.
+Future<HttpServer> startServer(Map files) async {
+  return (await HttpServer.bind(InternetAddress.loopbackIPv4, 0))
+    ..forEach((request) {
+      var result = files;
+      onFailure:
+      {
+        for (var part in request.uri.pathSegments) {
+          if (part.endsWith(".dart")) {
+            part = part.substring(0, part.length - 5);
+          }
+          if (result is Map) {
+            result = result[part];
+          } else {
+            break onFailure;
+          }
+        }
+        if (result is String) {
+          request.response
+            ..write(result)
+            ..close();
+          return;
+        }
+      }
+      request.response
+        ..statusCode = HttpStatus.notFound
+        ..close();
+    });
+}
+
+// Counter used to avoid reusing temporary file or directory names.
+//
+// Used when adding extra files to an existing directory structure,
+// and when creating temporary directories.
+//
+// Some platform temporary-directory implementations are timer based,
+// and creating two temp-dirs withing a short duration may cause a collision.
+int tmpNameCounter = 0;
+
+// Fresh file name.
+String freshName([String base = "tmp"]) => "$base${tmpNameCounter++}";
+
+Directory createTempDir() {
+  return Directory.systemTemp.createTempSync(freshName("pftest-"));
+}
+
+typedef void ConfigUpdate(Configuration configuration);
+
+/// The configuration for a single test.
+class Configuration {
+  /// The "description" of the test - a description of the set-up.
+  final String description;
+
+  /// The package root parameter passed to the Dart isolate.
+  ///
+  /// At most one of [root] and [config] should be supplied. If both are
+  /// omitted, a VM will search for a packages file or dir.
+  final String root;
+
+  /// The package configuration file location passed to the Dart isolate.
+  final String config;
+
+  /// Path to the main file to run.
+  final String mainFile;
+
+  /// List of arguments to pass to the main function.
+  final List<String> args;
+
+  /// The expected values for `Platform.package{Root,Config}`,
+  /// `Isolate.package{Root,Config}` and resolution of package URIs
+  /// in a `foo` package.
+  ///
+  /// The results are found by running the `main.dart` file inside [mainDir].
+  /// The tests can run this file after doing other `spawn` or `spawnUri` calls.
+  final Map expect;
+
+  Configuration(
+      {this.description,
+      this.root,
+      this.config,
+      this.mainFile,
+      this.args,
+      this.expect});
+
+  // Gets the type of main file, one of `main`, `spawnMain` or `spawnUriMain`.
+  String get mainType {
+    var lastSlash = mainFile.lastIndexOf("/");
+    if (lastSlash < 0) {
+      // Assume it's a Windows path.
+      lastSlash = mainFile.lastIndexOf(r"\");
+    }
+    var name = mainFile.substring(lastSlash + 1, mainFile.length - 5);
+    assert(name == "main" || name == "spawnMain" || name == "spawnUriMain");
+    return name;
+  }
+
+  String get mainPath {
+    var lastSlash = mainFile.lastIndexOf("/");
+    if (lastSlash < 0) {
+      // Assume it's a Windows path.
+      lastSlash = mainFile.lastIndexOf(r"\");
+    }
+    return mainFile.substring(0, lastSlash + 1);
+  }
+
+  /// Create a new configuration from the old one.
+  ///
+  /// [description] is new description.
+  ///
+  /// [main] is one of `main`, `spawnMain` or `spawnUriMain`, and changes
+  /// the [Configuration.mainFile] to a different file in the same directory.
+  ///
+  /// [mainFile] overrides [Configuration.mainFile] completely, and ignores
+  /// [main].
+  ///
+  /// [newArgs] are prepended to the existing [Configuration.args].
+  ///
+  /// [args] overrides [Configuration.args] completely and ignores [newArgs].
+  ///
+  /// [expect] overrides individual expectations.
+  ///
+  /// [root] and [config] overrides the existing values.
+  Configuration update(
+      {String description,
+      String main,
+      String mainFile,
+      String root,
+      String config,
+      List<String> args,
+      List<String> newArgs,
+      Map expect}) {
+    return new Configuration(
+        description: description ?? this.description,
+        root: root ?? this.root,
+        config: config ?? this.config,
+        mainFile: mainFile ??
+            ((main == null) ? this.mainFile : "${this.mainPath}$main.dart"),
+        args: args ??
+            (<String>[]
+              ..addAll(newArgs ?? const <String>[])
+              ..addAll(this.args)),
+        expect: expect == null ? this.expect : new Map.from(this.expect)
+          ..addAll(expect ?? const {}));
+  }
+
+  // For debugging.
+  String toString() {
+    return "Configuration($description\n"
+        "  root  : $root\n"
+        "  config: $config\n"
+        "  main  : $mainFile\n"
+        "  args  : ${args.map((x) => '"$x"').join(" ")}\n"
+        ") : expect {\n${expect.keys.map((k) =>
+           '  "$k"'.padRight(6) + ":${json.encode(expect[k])}\n").join()}"
+        "}";
+  }
+}
+
+// Inserts the file with generalized [name] at [path] with [content].
+//
+// The [path] is a directory where the file is created. It must start with
+// either '%file/' or '%http/' to select the structure to put it into.
+//
+// The [name] should not have a trailing ".dart" for Dart files. Any file
+// not starting with "." is assumed to be a ".dart" file.
+void insertFileAt(
+    Map file, Map http, String path, String name, String content) {
+  var parts = path.split('/').toList();
+  var dir = (parts[0] == "%file") ? file : http;
+  for (var i = 1; i < parts.length - 1; i++) {
+    var entry = parts[i];
+    dir = dir[entry] ?? (dir[entry] = {});
+  }
+  dir[name] = content;
+}
diff --git a/tests/standalone/pair_location_remapping_test.dart b/tests/standalone/pair_location_remapping_test.dart
new file mode 100644
index 0000000..13bf7f9
--- /dev/null
+++ b/tests/standalone/pair_location_remapping_test.dart
@@ -0,0 +1,30 @@
+// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+// Test that pair locations are remaped in slow path environments.
+// VMOptions=--optimization_counter_threshold=10 --no-use-osr --no-background_compilation
+
+import "package:expect/expect.dart";
+
+class A {
+  final f;
+  A(this.f);
+}
+
+foo(int i) {
+  int j = 0x7fffffffffffffff + i;
+  var c = new A(j); // allocation will be sunk
+  var r = 0;
+  for (var k = 0; k < 10; k++) {
+    if ((j & (1 << k)) != 0) {
+      r++;
+    }
+  }
+  return c.f - r;
+}
+
+main() {
+  for (var i = 0; i < 1000; i++) {
+    Expect.equals(0x7fffffffffffffff - 10, foo(0));
+  }
+}
diff --git a/tests/standalone/pow_test.dart b/tests/standalone/pow_test.dart
new file mode 100644
index 0000000..2d6a8e2
--- /dev/null
+++ b/tests/standalone/pow_test.dart
@@ -0,0 +1,97 @@
+// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+//
+// Dart test program for testing math's pow.
+
+library pow_test;
+
+import "package:expect/expect.dart";
+import 'dart:math';
+
+var expectedResults = [
+  1,
+  2,
+  4,
+  8,
+  16,
+  32,
+  64,
+  128,
+  256,
+  512,
+  1024,
+  2048,
+  4096,
+  8192,
+  16384,
+  32768,
+  65536,
+  131072,
+  262144,
+  524288,
+  1048576,
+  2097152,
+  4194304,
+  8388608,
+  16777216,
+  33554432,
+  67108864,
+  134217728,
+  268435456,
+  536870912,
+  1073741824,
+  2147483648,
+  4294967296,
+  8589934592,
+  17179869184,
+  34359738368,
+  68719476736,
+  137438953472,
+  274877906944,
+  549755813888,
+  1099511627776,
+  2199023255552,
+  4398046511104,
+  8796093022208,
+  17592186044416,
+  35184372088832,
+  70368744177664,
+  140737488355328,
+  281474976710656,
+  562949953421312,
+  1125899906842624,
+  2251799813685248,
+  4503599627370496,
+  9007199254740992,
+  18014398509481984,
+  36028797018963968,
+  72057594037927936,
+  144115188075855872,
+  288230376151711744,
+  576460752303423488,
+  1152921504606846976,
+  2305843009213693952,
+  4611686018427387904,
+];
+
+void main() {
+  int exp = 0;
+  for (int val in expectedResults) {
+    Expect.equals(val, pow(2, exp));
+    Expect.equals(val.toDouble(), pow(2, exp.toDouble()));
+    exp++;
+  }
+
+  // Optimize it.
+  for (int i = 0; i < 8888; i++) {
+    pow(2, 3);
+    pow(2.0, 3.0);
+  }
+  exp = 0;
+  for (int val in expectedResults) {
+    Expect.equals(val, pow(2, exp));
+    Expect.equals(val.toDouble(), pow(2, exp.toDouble()));
+    exp++;
+  }
+}
diff --git a/tests/standalone/priority_queue_stress_test.dart b/tests/standalone/priority_queue_stress_test.dart
new file mode 100644
index 0000000..4f70334
--- /dev/null
+++ b/tests/standalone/priority_queue_stress_test.dart
@@ -0,0 +1,327 @@
+// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+library priority_queue;
+
+import 'dart:collection';
+import 'dart:math';
+
+/**
+ * A priority used for the priority queue. Subclasses only need to implement
+ * the compareTo function.
+ */
+abstract class Priority implements Comparable {
+  /**
+   * Return < 0 if other is bigger, >0 if other is smaller, 0 if they are equal.
+   */
+  int compareTo(dynamic other);
+  bool operator <(dynamic other) => compareTo(other) < 0;
+  bool operator >(dynamic other) => compareTo(other) > 0;
+  bool operator ==(dynamic other) => compareTo(other) == 0;
+}
+
+/**
+ * Priority based on integers.
+ */
+class IntPriority extends Priority {
+  int priority;
+  IntPriority(int this.priority);
+
+  int compareTo(dynamic other) {
+    return (priority - other.priority) as int;
+  }
+
+  String toString() => "$priority";
+}
+
+/**
+ * An element of a priority queue. The type is used restriction based
+ * querying of the queues.
+ */
+abstract class TypedElement<V> {
+  bool typeEquals(var other);
+}
+
+class StringTypedElement<V> extends TypedElement {
+  String type;
+  V value;
+  StringTypedElement(String this.type, V this.value);
+  bool typeEquals(dynamic otherType) => otherType == type;
+  String toString() => "<Type: $type, Value: $value>";
+}
+
+/**
+ * A priority node in a priority queue. A priority node contains all of the
+ * values for a given priority in a given queue. It is part of a linked
+ * list of nodes, with prev and next pointers.
+ */
+class PriorityNode<N extends TypedElement, T extends Priority> {
+  T priority;
+  Queue<N> values;
+  PriorityNode? prev;
+  PriorityNode? next;
+  PriorityNode(N initialNode, T this.priority) : values = new Queue<N>() {
+    add(initialNode);
+  }
+
+  void add(N n) => values.add(n);
+
+  bool remove(N n) => values.remove(n);
+
+  N removeFirst() => values.removeFirst();
+
+  bool get isEmpty => values.isEmpty;
+
+  N get first => values.first;
+
+  String toString() => "Priority: $priority $values";
+}
+
+/**
+ * A priority queue with a FIFO property for nodes with same priority.
+ * The queue guarantees that nodes are returned in the same order they
+ * are added for a given priority.
+ * For type safety this queue is guarded by the elements being subclasses of
+ * TypedElement - this is not strictly neccesary since we never actually
+ * use the value or type of the nodes.
+ */
+class PriorityQueue<N extends TypedElement, P extends Priority> {
+  PriorityNode<N, P>? head;
+  int length = 0;
+
+  void add(N value, P priority) {
+    length++;
+    if (head == null) {
+      head = new PriorityNode<N, P>(value, priority);
+      return;
+    }
+    assert(head!.next == null);
+    var node = head!;
+    while (node.prev != null && node.priority > priority) {
+      node = node.prev as PriorityNode<N, P>;
+    }
+    if (node.priority == priority) {
+      node.add(value);
+    } else if (node.priority < priority) {
+      var newNode = new PriorityNode<N, P>(value, priority);
+      newNode.next = node.next;
+      if (node.next != null) node.next!.prev = newNode;
+      newNode.prev = node;
+      node.next = newNode;
+      if (node == head) head = newNode;
+    } else {
+      var newNode = new PriorityNode<N, P>(value, priority);
+      node.prev = newNode;
+      newNode.next = node;
+    }
+  }
+
+  N get first => head!.first;
+
+  Priority get firstPriority => head!.priority;
+
+  bool get isEmpty => head == null;
+
+  N removeFirst() {
+    if (isEmpty) throw "Can't get element from empty queue";
+    var value = head!.removeFirst();
+    if (head!.isEmpty) {
+      if (head!.prev != null) {
+        head!.prev!.next = null;
+      }
+      head = head!.prev as PriorityNode<N, P>?;
+    }
+    length--;
+    assert(head == null || head!.next == null);
+    return value;
+  }
+
+  String toString() {
+    if (head == null) return "Empty priority queue";
+    var node = head!;
+    var buffer = new StringBuffer();
+    while (node.prev != null) {
+      buffer.writeln(node);
+      node = node.prev as PriorityNode<N, P>;
+    }
+    buffer.writeln(node);
+    return buffer.toString();
+  }
+}
+
+/**
+ * Implements a specialized priority queue that efficiently allows getting
+ * the highest priorized node that adheres to a set of restrictions.
+ * Most notably it allows to get the highest priority node where the node's
+ * type is not in an exclude list.
+ * In addition, the queue has a number of properties:
+ *   The queue has fifo semantics for nodes with the same priority and type,
+ *   i.e., if nodes a and b are added to the queue with priority x and type z
+ *   then a is returned first iff a was added before b
+ * For different types with the same priority no guarantees are given, but
+ * the returned values try to be fair by returning from the biggest list of
+ * tasks in case of priority clash. (This could be fixed by adding timestamps
+ * to every node, that is _only_ used when collisions occur, not for
+ * insertions)
+ */
+class RestrictViewPriorityQueue<N extends TypedElement, P extends Priority> {
+  // We can't use the basic dart priority queue since it does not guarantee
+  // FIFO for items with the same order. This is currently not uptimized for
+  // different N, if many different N is expected here we should have a
+  // priority queue instead of a list.
+  List<PriorityQueue<N, P>> restrictedQueues = <PriorityQueue<N, P>>[];
+  PriorityQueue<N, P> mainQueue = new PriorityQueue<N, P>();
+
+  void add(N value, P priority) {
+    for (var queue in restrictedQueues) {
+      if ((queue.first as StringTypedElement).value == value) {
+        queue.add(value, priority);
+      }
+    }
+    mainQueue.add(value, priority);
+  }
+
+  bool get isEmpty => restrictedQueues.length + mainQueue.length == 0;
+
+  int get length =>
+      restrictedQueues.fold<int>(0, (v, e) => v + e.length) + mainQueue.length;
+
+  PriorityQueue? getRestricted(List<N> restrictions) {
+    var current = null;
+    // Find highest restricted priority.
+    for (var queue in restrictedQueues) {
+      if (!restrictions.any((e) => queue.head!.first.typeEquals(e))) {
+        if (current == null || queue.firstPriority > current.firstPriority) {
+          current = queue;
+        } else if (current.firstPriority == queue.firstPriority) {
+          current = queue.length > current.length ? queue : current;
+        }
+      }
+    }
+    return current;
+  }
+
+  N? get first {
+    if (isEmpty) throw "Trying to remove node from empty queue";
+    var candidate = getRestricted([]);
+    if (candidate != null &&
+        (mainQueue.isEmpty ||
+            mainQueue.firstPriority < candidate.firstPriority)) {
+      return candidate.first as N;
+    }
+    return mainQueue.isEmpty ? null : mainQueue.first;
+  }
+
+  /**
+   * Returns the node that under the given set of restrictions.
+   * If the queue is empty this function throws.
+   * If the queue is not empty, but no node exists that adheres to the
+   * restrictions we return null.
+   */
+  N? removeFirst({List<N> restrictions: const []}) {
+    if (isEmpty) throw "Trying to remove node from empty queue";
+    var candidate = getRestricted(restrictions);
+
+    if (candidate != null &&
+        (mainQueue.isEmpty ||
+            mainQueue.firstPriority < candidate.firstPriority)) {
+      var value = candidate.removeFirst();
+      if (candidate.isEmpty) restrictedQueues.remove(candidate);
+      return value as N;
+    }
+    while (!mainQueue.isEmpty) {
+      var currentPriority = mainQueue.firstPriority;
+      var current = mainQueue.removeFirst();
+      if (!restrictions.any((e) => current.typeEquals(e))) {
+        return current;
+      } else {
+        PriorityQueue<N, P>? restrictedQueue;
+        for (var e in restrictedQueues) {
+          if (current.typeEquals((e.first as StringTypedElement).type)) {
+            restrictedQueue = e;
+            break;
+          }
+        }
+        if (restrictedQueue == null) {
+          restrictedQueue = new PriorityQueue<N, P>();
+          restrictedQueues.add(restrictedQueue);
+        }
+        restrictedQueue.add(current, currentPriority as P);
+      }
+    }
+    return null;
+  }
+
+  String toString() {
+    if (isEmpty) return "Empty queue";
+    var buffer = new StringBuffer();
+    if (!restrictedQueues.isEmpty) {
+      buffer.writeln("Restricted queues");
+      for (var queue in restrictedQueues) {
+        buffer.writeln("$queue");
+      }
+    }
+    buffer.writeln("Main queue:");
+    buffer.writeln("$mainQueue");
+    return buffer.toString();
+  }
+}
+
+/// TEMPORARY TESTING AND PERFORMANCE
+void main([args]) {
+  stress(new RestrictViewPriorityQueue<StringTypedElement, IntPriority>());
+}
+
+void stress(queue) {
+  final int SIZE = 50000;
+  Random random = new Random(29);
+
+  var priorities = [1, 2, 3, 16, 32, 42, 56, 57, 59, 90];
+  var values = [
+    new StringTypedElement('safari', 'foo'),
+    new StringTypedElement('ie', 'bar'),
+    new StringTypedElement('ff', 'foobar'),
+    new StringTypedElement('dartium', 'barfoo'),
+    new StringTypedElement('chrome', 'hest'),
+    new StringTypedElement('drt', 'fisk')
+  ];
+
+  var restricted = [values[0], values[4]];
+
+  void addRandom() {
+    queue.add(values[random.nextInt(values.length)],
+        new IntPriority(priorities[random.nextInt(priorities.length)]));
+  }
+
+  var stopwatch = new Stopwatch()..start();
+  while (queue.length < SIZE) {
+    addRandom();
+  }
+
+  stopwatch.stop();
+  print("Adding took: ${stopwatch.elapsedMilliseconds}");
+  print("Queue length: ${queue.length}");
+
+  stopwatch = new Stopwatch()..start();
+  while (queue.length > 0) {
+    queue.removeFirst();
+  }
+  stopwatch.stop();
+  print("Remowing took: ${stopwatch.elapsedMilliseconds}");
+  print("Queue length: ${queue.length}");
+
+  print("Restricted add/remove");
+  while (queue.length < SIZE) {
+    addRandom();
+  }
+
+  for (int i = 0; i < SIZE; i++) {
+    if (random.nextDouble() < 0.5) {
+      queue.removeFirst(restrictions: restricted);
+    } else {
+      queue.removeFirst();
+    }
+    addRandom();
+  }
+}
diff --git a/tests/standalone/regress31114_test.dart b/tests/standalone/regress31114_test.dart
new file mode 100644
index 0000000..2977a21
--- /dev/null
+++ b/tests/standalone/regress31114_test.dart
@@ -0,0 +1,9 @@
+// Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+/// VMOptions=--background-compilation=false --optimization-counter-threshold=20
+
+import 'pow_test.dart' as test;
+
+main() => test.main();
diff --git a/tests/standalone/regress_25335_test.dart b/tests/standalone/regress_25335_test.dart
new file mode 100644
index 0000000..500cc7f
--- /dev/null
+++ b/tests/standalone/regress_25335_test.dart
@@ -0,0 +1,33 @@
+// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+//
+// Test that canonicalization inserts constants with correct representation.
+// VMOptions=--optimization-counter-threshold=10 --optimization-filter=bar --no-background-compilation
+
+import 'dart:typed_data';
+
+toSigned(v, width) {
+  var signMask = 1 << (width - 1);
+  return (v & (signMask - 1)) - (v & signMask);
+}
+
+foo(value) {
+  return value >> 32;
+}
+
+bar(td) {
+  return toSigned(foo(td[0]), 64);
+}
+
+main() {
+  toSigned(1 << 1, 32);
+  toSigned(1 << 32, 32);
+
+  var l = new Int64List(1);
+  l[0] = 0x78f7f6f5f4f3f2f1;
+
+  for (var i = 0; i < 20; i++) {
+    bar(l);
+  }
+}
diff --git a/tests/standalone/regress_26031_test.dart b/tests/standalone/regress_26031_test.dart
new file mode 100644
index 0000000..60dd89b
--- /dev/null
+++ b/tests/standalone/regress_26031_test.dart
@@ -0,0 +1,23 @@
+// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// VMOptions=--enable-isolate-groups
+// VMOptions=--no-enable-isolate-groups
+
+import 'dart:io';
+import 'dart:isolate';
+
+import "package:expect/expect.dart";
+
+void checkResolvedExecutable(Object reObj) {
+  String re = reObj as String;
+  Expect.equals(Platform.resolvedExecutable, re);
+}
+
+main() {
+  var exitPort = new ReceivePort();
+  Isolate.spawn(checkResolvedExecutable, Platform.resolvedExecutable,
+      onExit: exitPort.sendPort);
+  exitPort.listen((_) => exitPort.close());
+}
diff --git a/tests/standalone/regress_28854_1_test.dart b/tests/standalone/regress_28854_1_test.dart
new file mode 100644
index 0000000..30b304a
--- /dev/null
+++ b/tests/standalone/regress_28854_1_test.dart
@@ -0,0 +1,44 @@
+// Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// VMOptions=--enable-isolate-groups
+// VMOptions=--no-enable-isolate-groups
+
+library regress;
+
+import 'dart:isolate';
+
+abstract class N {}
+
+class J extends N {
+  final String s;
+  J(this.s);
+}
+
+class K extends N {
+  final int i;
+  K(this.i);
+}
+
+void isolate(Object portObj) {
+  SendPort port = portObj as SendPort;
+  port.send(N);
+  port.send(new J("8" * 4));
+  for (int i = 0; i < 80000; i++) {
+    port.send(new K(i));
+  }
+  port.send('done');
+}
+
+main() async {
+  var recv = new RawReceivePort();
+  recv.handler = (k) {
+    if (k is J) print(k.s.length);
+    if (k is String) {
+      print(k);
+      recv.close();
+    }
+  };
+  var iso = await Isolate.spawn(isolate, recv.sendPort);
+}
diff --git a/tests/standalone/regress_28854_2_test.dart b/tests/standalone/regress_28854_2_test.dart
new file mode 100644
index 0000000..21395c1
--- /dev/null
+++ b/tests/standalone/regress_28854_2_test.dart
@@ -0,0 +1,43 @@
+// Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// VMOptions=--enable-isolate-groups
+// VMOptions=--no-enable-isolate-groups
+
+library regress;
+
+import 'dart:isolate';
+
+abstract class N<T> {}
+
+class J extends N<String> {
+  final String s;
+  J(this.s);
+}
+
+class K extends N<int> {
+  final int i;
+  K(this.i);
+}
+
+void isolate(Object portObj) {
+  SendPort port = portObj as SendPort;
+  port.send(new J("8" * 4));
+  for (int i = 0; i < 80000; i++) {
+    port.send(new K(i));
+  }
+  port.send('done');
+}
+
+main() async {
+  var recv = new RawReceivePort();
+  recv.handler = (k) {
+    if (k is J) print(k.s.length);
+    if (k is String) {
+      print(k);
+      recv.close();
+    }
+  };
+  var iso = await Isolate.spawn(isolate, recv.sendPort);
+}
diff --git a/tests/standalone/regress_29350_test.dart b/tests/standalone/regress_29350_test.dart
new file mode 100644
index 0000000..fe3b534
--- /dev/null
+++ b/tests/standalone/regress_29350_test.dart
@@ -0,0 +1,14 @@
+/*
+ * Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file
+ * for details. All rights reserved. Use of this source code is governed by a
+ * BSD-style license that can be found in the LICENSE file.
+ */
+
+// 'covariant' when used incorrectly should report an error and not crash
+// the VM.
+
+typedef bool Test(covariant num arg); //# none: compile-time error
+
+void main() {
+  Test t = (int value) => false;
+}
diff --git a/tests/standalone/regress_29695_test.dart b/tests/standalone/regress_29695_test.dart
new file mode 100644
index 0000000..2d8ae75
--- /dev/null
+++ b/tests/standalone/regress_29695_test.dart
@@ -0,0 +1,25 @@
+// Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+//
+// Test that type tests are not misoptimized.
+// VMOptions=--optimization-counter-threshold=1000 --optimization-filter=IsAnInt
+
+main() {
+  train();
+  if (IsAnInt("This is not an int")) throw "oops";
+}
+
+// Prime the IC with things that are and are not ints.
+void train() {
+  for (int i = 0; i < 10000; i++) {
+    IsAnInt(42); // Smi - always goes first in the generated code.
+    IsAnInt(1 << 62); // Mint on 64 bit platforms.
+    IsAnInt(1 << 62);
+    // This one that is not an int goes last in the IC because it is called
+    // less frequently.
+    IsAnInt(4.2);
+  }
+}
+
+bool IsAnInt(f) => f is int;
diff --git a/tests/standalone/regress_41329_absolute_test.dart b/tests/standalone/regress_41329_absolute_test.dart
new file mode 100644
index 0000000..cc2a402
--- /dev/null
+++ b/tests/standalone/regress_41329_absolute_test.dart
@@ -0,0 +1,34 @@
+// Copyright (c) 2020, the Dart project authors.  Please see the AUTHORS file
+// for 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:async_helper/async_helper.dart';
+import 'package:path/path.dart' as p;
+import 'package:expect/expect.dart';
+
+Future<void> main() async {
+  final origDir = Directory.current;
+  final exePath = Platform.resolvedExecutable;
+  final d = Directory.systemTemp.createTempSync('dart_symlink');
+
+  // Roughly emulate a Brew installation:
+  //   - $BREW/bin/dart -> ../Cellar/dart/2.8.0-dev.20.0/bin/dart
+  //   - $BREW/Cellar/dart/2.8.0-dev.20.0/bin/dart -> $DART_SDK/bin/dart
+  final a = Directory('${d.path}/usr/local/bin');
+  a.createSync(recursive: true);
+
+  // /usr/local/Cellar/dart/2.8.0-dev.20.0/bin/dart -> $DART_SDK/bin/dart
+  Directory.current = a;
+  final linkLocation = '../Cellar/dart/2.8.0-dev.20.0/bin/dart';
+  final link = Link(linkLocation);
+  link.createSync(exePath, recursive: true);
+
+  // /usr/local/bin/dart -> /usr/local/Cellar/dart/2.8.0-dev.20/bin/dart
+  final link2 = Link('dart')..createSync(linkLocation, recursive: true);
+  final path = Uri.parse(link2.absolute.path).path;
+  Directory.current = origDir;
+  final result = await Process.run('${path}', ['help']);
+  Expect.equals(result.exitCode, 0);
+}
diff --git a/tests/standalone/regress_41329_relative_test.dart b/tests/standalone/regress_41329_relative_test.dart
new file mode 100644
index 0000000..cc2a402
--- /dev/null
+++ b/tests/standalone/regress_41329_relative_test.dart
@@ -0,0 +1,34 @@
+// Copyright (c) 2020, the Dart project authors.  Please see the AUTHORS file
+// for 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:async_helper/async_helper.dart';
+import 'package:path/path.dart' as p;
+import 'package:expect/expect.dart';
+
+Future<void> main() async {
+  final origDir = Directory.current;
+  final exePath = Platform.resolvedExecutable;
+  final d = Directory.systemTemp.createTempSync('dart_symlink');
+
+  // Roughly emulate a Brew installation:
+  //   - $BREW/bin/dart -> ../Cellar/dart/2.8.0-dev.20.0/bin/dart
+  //   - $BREW/Cellar/dart/2.8.0-dev.20.0/bin/dart -> $DART_SDK/bin/dart
+  final a = Directory('${d.path}/usr/local/bin');
+  a.createSync(recursive: true);
+
+  // /usr/local/Cellar/dart/2.8.0-dev.20.0/bin/dart -> $DART_SDK/bin/dart
+  Directory.current = a;
+  final linkLocation = '../Cellar/dart/2.8.0-dev.20.0/bin/dart';
+  final link = Link(linkLocation);
+  link.createSync(exePath, recursive: true);
+
+  // /usr/local/bin/dart -> /usr/local/Cellar/dart/2.8.0-dev.20/bin/dart
+  final link2 = Link('dart')..createSync(linkLocation, recursive: true);
+  final path = Uri.parse(link2.absolute.path).path;
+  Directory.current = origDir;
+  final result = await Process.run('${path}', ['help']);
+  Expect.equals(result.exitCode, 0);
+}
diff --git a/tests/standalone/regress_42092_script.dart b/tests/standalone/regress_42092_script.dart
new file mode 100644
index 0000000..da357ad
--- /dev/null
+++ b/tests/standalone/regress_42092_script.dart
@@ -0,0 +1,21 @@
+// Copyright (c) 2020, the Dart project authors.  Please see the AUTHORS file
+// for 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';
+
+Future<void> main() async {
+  var count = 0;
+  ProcessSignal.sigint.watch().forEach((s) {
+    count++;
+    print('child: Got a SIGINT $count times, hit it 3 times to terminate');
+    if (count >= 3) {
+      exit(42);
+    }
+  });
+  print('Waiting...');
+  while (true) {
+    await Future.delayed(const Duration(seconds: 5));
+  }
+}
diff --git a/tests/standalone/regress_42092_test.dart b/tests/standalone/regress_42092_test.dart
new file mode 100644
index 0000000..e3b3caa
--- /dev/null
+++ b/tests/standalone/regress_42092_test.dart
@@ -0,0 +1,51 @@
+// Copyright (c) 2020, the Dart project authors.  Please see the AUTHORS file
+// for 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:convert';
+import 'dart:io';
+
+import 'package:expect/expect.dart';
+
+late Process process;
+bool lastKill = false;
+
+Future<void> sigint(int iterations) async {
+  for (int i = 0; i < iterations; ++i) {
+    if (i + 1 == iterations) {
+      lastKill = true;
+    }
+    process.kill(ProcessSignal.sigint);
+    // Yield to the event loop to allow for the signal to be sent.
+    await Future.value(null);
+  }
+}
+
+Future<void> main() async {
+  process = await Process.start(
+    Platform.resolvedExecutable,
+    [
+      Platform.script.resolve('regress_42092_script.dart').toString(),
+    ],
+  );
+  final startCompleter = Completer<void>();
+  late StreamSubscription sub;
+  sub = process.stdout.transform(Utf8Decoder()).listen((event) {
+    if (event.contains('Waiting...')) {
+      startCompleter.complete();
+      sub.cancel();
+    }
+  });
+
+  // Wait for target script to setup its signal handling.
+  await startCompleter.future;
+
+  final exitCompleter = Completer<void>();
+  process.exitCode.then((code) {
+    Expect.isTrue(lastKill);
+    exitCompleter.complete();
+  });
+  await sigint(3);
+  await exitCompleter.future;
+}
diff --git a/tests/standalone/slowpath_safepoints_test.dart b/tests/standalone/slowpath_safepoints_test.dart
new file mode 100644
index 0000000..c983e62
--- /dev/null
+++ b/tests/standalone/slowpath_safepoints_test.dart
@@ -0,0 +1,48 @@
+// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+// Test that safepoints associated with slowpaths don't mark non-existing values
+// alive.
+// VMOptions=--optimization-counter-threshold=5 --no-inline_alloc --no-background-compilation
+
+class C {
+  final next;
+  C(this.next);
+}
+
+noop(a1, a2, a3, a4, a5, a6, a7, a8, a9) => 0;
+
+crash(f, i) {
+  final obj1 = new C(null);
+  final obj2 = new C(obj1);
+  final obj3 = new C(obj2);
+  final obj4 = new C(obj3);
+  final obj5 = new C(obj4);
+  final obj6 = new C(obj5);
+  final obj7 = new C(obj6);
+  final obj8 = new C(obj7);
+  final obj9 = new C(obj8);
+
+  f(obj1, obj2, obj3, obj4, obj5, obj6, obj7, obj8, obj9);
+  f(obj1, obj2, obj3, obj4, obj5, obj6, obj7, obj8, obj9);
+
+  final d1 = (i + 0).toDouble();
+  final d2 = (i + 1).toDouble();
+  final d3 = (i + 2).toDouble();
+  final d4 = (i + 3).toDouble();
+  final d5 = (i + 4).toDouble();
+  final d6 = (i + 5).toDouble();
+  final d7 = (i + 6).toDouble();
+  final d8 = (i + 7).toDouble();
+  final d9 = (i + 8).toDouble();
+
+  f(d1, d2, d3, d4, d5, d6, d7, d8, d9);
+  f(d1, d2, d3, d4, d5, d6, d7, d8, d9);
+}
+
+main() {
+  for (var i = 0; i < 10; i++) {
+    print(i);
+    crash(noop, 10);
+  }
+}
diff --git a/tests/standalone/typed_array_int64_uint64_test.dart b/tests/standalone/typed_array_int64_uint64_test.dart
new file mode 100644
index 0000000..7b57986
--- /dev/null
+++ b/tests/standalone/typed_array_int64_uint64_test.dart
@@ -0,0 +1,97 @@
+// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// VMOptions=--enable-isolate-groups
+// VMOptions=--no-enable-isolate-groups
+//
+// Dart test program for testing native typed arrays, int64 and uint64 only.
+
+// Library tag to be able to run in html test framework.
+library TypedArray;
+
+import "package:expect/expect.dart";
+import 'package:async_helper/async_helper.dart';
+import 'dart:async';
+import 'dart:isolate';
+import 'dart:typed_data';
+
+main() {
+  test(int64_receiver);
+  test(uint64_receiver);
+}
+
+test(f) {
+  asyncStart();
+  return f().whenComplete(asyncEnd);
+}
+
+// Int64 array.
+Int64List initInt64() {
+  var int64 = new Int64List(2);
+  int64[0] = 10000000;
+  int64[1] = 100000000;
+  return int64;
+}
+
+Int64List int64 = initInt64();
+
+int64_receiver() {
+  var response = new ReceivePort();
+  var remote = Isolate.spawn(int64_sender, [int64.length, response.sendPort]);
+  asyncStart();
+  return response.first.then((a) {
+    Expect.equals(int64.length, a.length);
+    for (int i = 0; i < a.length; i++) {
+      Expect.equals(int64[i], a[i]);
+    }
+    print("int64_receiver");
+    asyncEnd();
+  });
+}
+
+int64_sender(message) {
+  var len = message[0];
+  var r = message[1];
+  Expect.equals(int64.length, len);
+  var a = new Int64List(len);
+  for (int i = 0; i < len; i++) {
+    a[i] = int64[i];
+  }
+  r.send(a);
+}
+
+// Uint64 array.
+Uint64List initUint64() {
+  var uint64 = new Uint64List(2);
+  uint64[0] = 0xffffffffffffffff;
+  uint64[1] = 0x7fffffffffffffff;
+  return uint64;
+}
+
+Uint64List uint64 = initUint64();
+
+uint64_receiver() {
+  var response = new ReceivePort();
+  var remote = Isolate.spawn(uint64_sender, [uint64.length, response.sendPort]);
+  asyncStart();
+  return response.first.then((a) {
+    Expect.equals(uint64.length, a.length);
+    for (int i = 0; i < a.length; i++) {
+      Expect.equals(uint64[i], a[i]);
+    }
+    print("uint64_receiver");
+    asyncEnd();
+  });
+}
+
+uint64_sender(message) {
+  var len = message[0];
+  var r = message[1];
+  Expect.equals(uint64.length, len);
+  var a = new Uint64List(len);
+  for (int i = 0; i < len; i++) {
+    a[i] = uint64[i];
+  }
+  r.send(a);
+}
diff --git a/tests/standalone/typed_array_test.dart b/tests/standalone/typed_array_test.dart
new file mode 100644
index 0000000..6e4c6c3
--- /dev/null
+++ b/tests/standalone/typed_array_test.dart
@@ -0,0 +1,316 @@
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// VMOptions=--enable-isolate-groups
+// VMOptions=--no-enable-isolate-groups
+//
+// Dart test program for testing native float and int arrays.  64-bit int arrays
+// are in a separate test.
+
+// Library tag to be able to run in html test framework.
+library TypedArray;
+
+import "package:expect/expect.dart";
+import 'package:async_helper/async_helper.dart';
+import 'dart:isolate';
+import 'dart:typed_data';
+
+void main() {
+  test(int8_receiver);
+  test(uint8_receiver);
+  test(int16_receiver);
+  test(uint16_receiver);
+  test(int32_receiver);
+  test(uint32_receiver);
+  // int64 and uint64 in separate test.
+  test(float32_receiver);
+  test(float64_receiver);
+}
+
+test(f) {
+  asyncStart();
+  return f().whenComplete(asyncEnd);
+}
+
+// Int8 array.
+Int8List initInt8() {
+  var int8 = new Int8List(2);
+  int8[0] = 10;
+  int8[1] = 100;
+  return int8;
+}
+
+Int8List int8 = initInt8();
+
+int8_receiver() {
+  var response = new ReceivePort();
+  var remote = Isolate.spawn(int8_sender, [int8.length, response.sendPort]);
+  asyncStart();
+  return response.first.then((a) {
+    Expect.equals(int8.length, a.length);
+    for (int i = 0; i < a.length; i++) {
+      Expect.equals(int8[i], a[i]);
+    }
+    print("int8_receiver");
+    asyncEnd();
+  });
+}
+
+int8_sender(message) {
+  var len = message[0];
+  var r = message[1];
+  Expect.equals(int8.length, len);
+  var a = new Int8List(len);
+  for (int i = 0; i < len; i++) {
+    a[i] = int8[i];
+  }
+  r.send(a);
+}
+
+// Uint8 array.
+Uint8List initUint8() {
+  var uint8 = new Uint8List(2);
+  uint8[0] = 0xff;
+  uint8[1] = 0x7f;
+  return uint8;
+}
+
+Uint8List uint8 = initUint8();
+
+uint8_receiver() {
+  var response = new ReceivePort();
+  var remote = Isolate.spawn(uint8_sender, [uint8.length, response.sendPort]);
+  asyncStart();
+  return response.first.then((a) {
+    Expect.equals(uint8.length, a.length);
+    for (int i = 0; i < a.length; i++) {
+      Expect.equals(uint8[i], a[i]);
+    }
+    print("uint8_receiver");
+    asyncEnd();
+  });
+}
+
+uint8_sender(message) {
+  var len = message[0];
+  var r = message[1];
+  Expect.equals(uint8.length, len);
+  var a = new Uint8List(len);
+  for (int i = 0; i < len; i++) {
+    a[i] = uint8[i];
+  }
+  r.send(a);
+}
+
+// Int16 array.
+Int16List initInt16() {
+  var int16 = new Int16List(2);
+  int16[0] = 1000;
+  int16[1] = 10000;
+  return int16;
+}
+
+Int16List int16 = initInt16();
+
+int16_receiver() {
+  var response = new ReceivePort();
+  var remote = Isolate.spawn(int16_sender, [int16.length, response.sendPort]);
+  asyncStart();
+  return response.first.then((a) {
+    Expect.equals(int16.length, a.length);
+    for (int i = 0; i < a.length; i++) {
+      Expect.equals(int16[i], a[i]);
+    }
+    print("int16_receiver");
+    asyncEnd();
+  });
+}
+
+int16_sender(message) {
+  var len = message[0];
+  var r = message[1];
+  Expect.equals(int16.length, len);
+  var a = new Int16List(len);
+  for (int i = 0; i < len; i++) {
+    a[i] = int16[i];
+  }
+  r.send(a);
+}
+
+// Uint16 array.
+Uint16List initUint16() {
+  var uint16 = new Uint16List(2);
+  uint16[0] = 0xffff;
+  uint16[1] = 0x7fff;
+  return uint16;
+}
+
+Uint16List uint16 = initUint16();
+
+uint16_receiver() {
+  var response = new ReceivePort();
+  var remote = Isolate.spawn(uint16_sender, [uint16.length, response.sendPort]);
+  asyncStart();
+  return response.first.then((a) {
+    Expect.equals(uint16.length, a.length);
+    for (int i = 0; i < a.length; i++) {
+      Expect.equals(uint16[i], a[i]);
+    }
+    print("uint16_receiver");
+    asyncEnd();
+  });
+}
+
+uint16_sender(message) {
+  var len = message[0];
+  var r = message[1];
+  Expect.equals(uint16.length, len);
+  var a = new Uint16List(len);
+  for (int i = 0; i < len; i++) {
+    a[i] = uint16[i];
+  }
+  r.send(a);
+}
+
+// Int32 array.
+Int32List initInt32() {
+  var int32 = new Int32List(2);
+  int32[0] = 100000;
+  int32[1] = 1000000;
+  return int32;
+}
+
+Int32List int32 = initInt32();
+
+int32_receiver() {
+  var response = new ReceivePort();
+  var remote = Isolate.spawn(int32_sender, [int32.length, response.sendPort]);
+  asyncStart();
+  return response.first.then((a) {
+    Expect.equals(int32.length, a.length);
+    for (int i = 0; i < a.length; i++) {
+      Expect.equals(int32[i], a[i]);
+    }
+    print("int32_receiver");
+    asyncEnd();
+  });
+}
+
+int32_sender(message) {
+  var len = message[0];
+  var r = message[1];
+  Expect.equals(int32.length, len);
+  var a = new Int32List(len);
+  for (int i = 0; i < len; i++) {
+    a[i] = int32[i];
+  }
+  r.send(a);
+}
+
+// Uint32 array.
+Uint32List initUint32() {
+  var uint32 = new Uint32List(2);
+  uint32[0] = 0xffffffff;
+  uint32[1] = 0x7fffffff;
+  return uint32;
+}
+
+Uint32List uint32 = initUint32();
+
+uint32_receiver() {
+  var response = new ReceivePort();
+  var remote = Isolate.spawn(uint32_sender, [uint32.length, response.sendPort]);
+  asyncStart();
+  return response.first.then((a) {
+    Expect.equals(uint32.length, a.length);
+    for (int i = 0; i < a.length; i++) {
+      Expect.equals(uint32[i], a[i]);
+    }
+    print("uint32_receiver");
+    asyncEnd();
+  });
+}
+
+uint32_sender(message) {
+  var len = message[0];
+  var r = message[1];
+  Expect.equals(uint32.length, len);
+  var a = new Uint32List(len);
+  for (int i = 0; i < len; i++) {
+    a[i] = uint32[i];
+  }
+  r.send(a);
+}
+
+// Float32 Array.
+Float32List initFloat32() {
+  var float32 = new Float32List(2);
+  float32[0] = 1.0;
+  float32[1] = 2.0;
+  return float32;
+}
+
+Float32List float32 = initFloat32();
+
+float32_receiver() {
+  var response = new ReceivePort();
+  var remote =
+      Isolate.spawn(float32_sender, [float32.length, response.sendPort]);
+  asyncStart();
+  return response.first.then((a) {
+    Expect.equals(float32.length, a.length);
+    for (int i = 0; i < a.length; i++) {
+      Expect.equals(float32[i], a[i]);
+    }
+    print("float32_receiver");
+    asyncEnd();
+  });
+}
+
+float32_sender(message) {
+  var len = message[0];
+  var r = message[1];
+  Expect.equals(float32.length, len);
+  var a = new Float32List(len);
+  for (int i = 0; i < len; i++) {
+    a[i] = float32[i];
+  }
+  r.send(a);
+}
+
+// Float64 Array.
+Float64List initFloat64() {
+  var float64 = new Float64List(2);
+  float64[0] = 101.234;
+  float64[1] = 201.765;
+  return float64;
+}
+
+Float64List float64 = initFloat64();
+
+float64_receiver() {
+  var response = new ReceivePort();
+  var remote =
+      Isolate.spawn(float64_sender, [float64.length, response.sendPort]);
+  asyncStart();
+  return response.first.then((a) {
+    Expect.equals(float64.length, a.length);
+    for (int i = 0; i < a.length; i++) {
+      Expect.equals(float64[i], a[i]);
+    }
+    print("float64_receiver");
+    asyncEnd();
+  });
+}
+
+float64_sender(message) {
+  var len = message[0];
+  var r = message[1];
+  Expect.equals(float64.length, len);
+  var a = new Float64List(len);
+  for (int i = 0; i < len; i++) {
+    a[i] = float64[i];
+  }
+  r.send(a);
+}
diff --git a/tests/standalone/typed_data_isolate_test.dart b/tests/standalone/typed_data_isolate_test.dart
new file mode 100644
index 0000000..ab20d49
--- /dev/null
+++ b/tests/standalone/typed_data_isolate_test.dart
@@ -0,0 +1,36 @@
+// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// VMOptions=--enable-isolate-groups
+// VMOptions=--no-enable-isolate-groups
+//
+// Dart test program for testing typed data.
+
+// Library tag to be able to run in html test framework.
+library TypedDataIsolateTest;
+
+import 'dart:io';
+import 'dart:isolate';
+import 'package:async_helper/async_helper.dart';
+
+second(message) {
+  var data = message[0];
+  var replyTo = message[1];
+  print('got data');
+  print(data);
+  print('printed data');
+  replyTo.send('OK');
+}
+
+main() {
+  asyncStart();
+  new File(Platform.script.toFilePath()).readAsBytes().then((List<int> data) {
+    var response = new ReceivePort();
+    var remote = Isolate.spawn(second, [data, response.sendPort]);
+    response.first.then((reply) {
+      print('got reply');
+      asyncEnd();
+    });
+  });
+}
diff --git a/tests/standalone/typed_data_test.dart b/tests/standalone/typed_data_test.dart
new file mode 100644
index 0000000..c932310
--- /dev/null
+++ b/tests/standalone/typed_data_test.dart
@@ -0,0 +1,583 @@
+// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+//
+// Dart test program for testing typed data.
+
+// VMOptions=--optimization_counter_threshold=10 --no-background_compilation
+
+// Library tag to be able to run in html test framework.
+library TypedDataTest;
+
+import "package:expect/expect.dart";
+import 'dart:typed_data';
+
+void testCreateUint8TypedData() {
+  Uint8List typed_data;
+
+  typed_data = new Uint8List(0);
+  Expect.isTrue(typed_data is Uint8List);
+  Expect.isFalse(typed_data is Uint8ClampedList);
+  Expect.equals(0, typed_data.length);
+
+  typed_data = new Uint8List(10);
+  Expect.equals(10, typed_data.length);
+  for (int i = 0; i < 10; i++) {
+    Expect.equals(0, typed_data[i]);
+  }
+}
+
+void testCreateClampedUint8TypedData() {
+  Uint8ClampedList typed_data;
+
+  typed_data = new Uint8ClampedList(0);
+  Expect.isTrue(typed_data is Uint8ClampedList);
+  Expect.isFalse(typed_data is Uint8List);
+  Expect.equals(0, typed_data.length);
+  Expect.equals(0, typed_data.lengthInBytes);
+
+  typed_data = new Uint8ClampedList(10);
+  Expect.equals(10, typed_data.length);
+  for (int i = 0; i < 10; i++) {
+    Expect.equals(0, typed_data[i]);
+  }
+}
+
+void testTypedDataRange(bool check_throws) {
+  Int8List typed_data;
+  typed_data = new Int8List(10);
+  typed_data[1] = 0;
+  Expect.equals(0, typed_data[1]);
+  typed_data[2] = -128;
+  Expect.equals(-128, typed_data[2]);
+  typed_data[3] = 127;
+  Expect.equals(127, typed_data[3]);
+  // This should eventually throw.
+  typed_data[0] = 128;
+  typed_data[4] = -129;
+  Expect.throws(() => typed_data[-1]);
+  Expect.throws(() => typed_data[100]);
+}
+
+void testUnsignedTypedDataRange(bool check_throws) {
+  Uint8List typed_data;
+  typed_data = new Uint8List(10);
+
+  typed_data[1] = 255;
+  Expect.equals(255, typed_data[1]);
+  typed_data[1] = 0;
+  Expect.equals(0, typed_data[1]);
+
+  for (int i = 0; i < typed_data.length; i++) {
+    typed_data[i] = i;
+  }
+  for (int i = 0; i < typed_data.length; i++) {
+    Expect.equals(i, typed_data[i]);
+  }
+
+  // These should eventually throw.
+  typed_data[1] = 256;
+  typed_data[1] = -1;
+  typed_data[2] = -129;
+  Expect.throws(() => typed_data[-1]);
+  Expect.throws(() => typed_data[100]);
+}
+
+void testClampedUnsignedTypedDataRangeHelper(
+    Uint8ClampedList typed_data, bool check_throws) {
+  Uint8ClampedList typed_data;
+  typed_data = new Uint8ClampedList(10);
+
+  typed_data[1] = 255;
+  Expect.equals(255, typed_data[1]);
+  typed_data[1] = 0;
+  Expect.equals(0, typed_data[1]);
+  for (int i = 0; i < typed_data.length; i++) {
+    typed_data[i] = i;
+  }
+  for (int i = 0; i < typed_data.length; i++) {
+    Expect.equals(i, typed_data[i]);
+  }
+
+  // These should eventually throw.
+  typed_data[1] = 256;
+  typed_data[2] = -129;
+  Expect.equals(255, typed_data[1]);
+  Expect.equals(0, typed_data[2]);
+}
+
+void testClampedUnsignedTypedDataRange(bool check_throws) {
+  testClampedUnsignedTypedDataRangeHelper(
+      new Uint8ClampedList(10), check_throws);
+}
+
+void testSetRangeHelper(typed_data) {
+  List<int> list = [10, 11, 12];
+  typed_data.setRange(0, 3, list);
+  for (int i = 0; i < 3; i++) {
+    Expect.equals(10 + i, typed_data[i]);
+  }
+
+  typed_data[0] = 20;
+  typed_data[1] = 21;
+  typed_data[2] = 22;
+  list.setRange(0, 3, typed_data);
+  for (int i = 0; i < 3; i++) {
+    Expect.equals(20 + i, list[i]);
+  }
+
+  typed_data.setRange(1, 3, const [8, 9]);
+  Expect.equals(20, typed_data[0]);
+  Expect.equals(8, typed_data[1]);
+  Expect.equals(9, typed_data[2]);
+}
+
+void testSetRange() {
+  testSetRangeHelper(new Uint8List(3));
+  testSetRangeHelper(new Uint8ClampedList(3));
+  testSetRangeHelper(new Uint16List(3));
+  testSetRangeHelper(new Int16List(3));
+
+  var list;
+  list = new Uint8List(4);
+  list.setRange(0, 4, "abcd".codeUnits, 0);
+  Expect.listEquals(list, "abcd".codeUnits);
+  list = new Uint16List(4);
+  list.setRange(0, 4, "abcd".codeUnits, 0);
+  Expect.listEquals(list, "abcd".codeUnits);
+  list.setRange(0, 4, "\xff\u0100\uffff\x00".codeUnits, 0);
+  Expect.listEquals(list, "\xff\u0100\uffff\x00".codeUnits);
+  list = new Int16List(4);
+  list.setRange(0, 4, "abcd".codeUnits, 0);
+  Expect.listEquals(list, "abcd".codeUnits);
+  list.setRange(0, 4, "\xff\u0100\u7fff\x00".codeUnits, 0);
+  Expect.listEquals(list, "\xff\u0100\u7fff\x00".codeUnits);
+}
+
+class C {
+  final x;
+  C(this.x);
+  operator <(o) => false;
+  operator >=(o) => false;
+  operator *(o) => x;
+}
+
+void testIndexOutOfRangeHelper(typed_data, value) {
+  List<int> list = new List<int>.filled(typed_data.length + 1, -1);
+  for (int i = 0; i < list.length; i++) list[i] = i;
+
+  Expect.throws(() {
+    typed_data.setRange(0, 4, list);
+  });
+
+  Expect.throws(() {
+    typed_data.setRange(3, 4, list);
+  });
+
+  Expect.throws(() {
+    typed_data[new C(-4000000)] = value;
+  });
+
+  Expect.throws(() {
+    var size = typed_data.elementSizeInBytes;
+    var i = (typed_data.length - 1) * size + 1;
+    typed_data[new C(i)] = value;
+  });
+
+  Expect.throws(() {
+    typed_data[new C(-1)] = value;
+  });
+}
+
+void testIndexOutOfRange() {
+  testIndexOutOfRangeHelper(new Int8List(3), 0);
+  testIndexOutOfRangeHelper(new Uint8List(3), 0);
+  testIndexOutOfRangeHelper(new Uint8ClampedList(3), 0);
+  testIndexOutOfRangeHelper(new Int16List(3), 0);
+  testIndexOutOfRangeHelper(new Uint16List(3), 0);
+  testIndexOutOfRangeHelper(new Int32List(3), 0);
+  testIndexOutOfRangeHelper(new Uint32List(3), 0);
+  testIndexOutOfRangeHelper(new Int64List(3), 0);
+  testIndexOutOfRangeHelper(new Uint64List(3), 0);
+  testIndexOutOfRangeHelper(new Float32List(3), 0.0);
+  testIndexOutOfRangeHelper(new Float64List(3), 0.0);
+  testIndexOutOfRangeHelper(new Int64List(3), 0);
+  testIndexOutOfRangeHelper(new Uint64List(3), 0);
+}
+
+void testNoNullValueLoopSetter(list, value) {
+  for (int i = 0; i < list.length; i++) {
+    list[i] = value;
+  }
+}
+
+void testNoNullValueDirectSetter(list, value) {
+  list[0] = value;
+  list[1] = value;
+  list[2] = value;
+}
+
+void testNoNullValueHelper(list, value) {
+  testNoNullValueLoopSetter(list, value + 1);
+  for (int i = 0; i < list.length; i++) {
+    Expect.equals(value + 1, list[i]);
+  }
+  testNoNullValueDirectSetter(list, value + 2);
+  for (int i = 0; i < list.length; i++) {
+    Expect.equals(value + 2, list[i]);
+  }
+
+  Expect.throws(() {
+    testNoNullValueLoopSetter(list, null);
+  });
+
+  Expect.throws(() {
+    testNoNullValueDirectSetter(list, null);
+  });
+}
+
+void testNoNullValue() {
+  testNoNullValueHelper(new Int8List(3), 1);
+  testNoNullValueHelper(new Uint8List(3), 1);
+  testNoNullValueHelper(new Uint8ClampedList(3), 1);
+  testNoNullValueHelper(new Int16List(3), 1);
+  testNoNullValueHelper(new Uint16List(3), 1);
+  testNoNullValueHelper(new Int32List(3), 1);
+  testNoNullValueHelper(new Uint32List(3), 1);
+  testNoNullValueHelper(new Int64List(3), 1);
+  testNoNullValueHelper(new Uint64List(3), 1);
+  testNoNullValueHelper(new Float32List(3), 1.0);
+  testNoNullValueHelper(new Float64List(3), 1.0);
+  testNoNullValueHelper(new Int64List(3), 1);
+  testNoNullValueHelper(new Uint64List(3), 1);
+}
+
+void testIndexOfHelper(list) {
+  for (int i = 0; i < list.length; i++) {
+    list[i] = i + 10;
+  }
+  Expect.equals(0, list.indexOf(10));
+  Expect.equals(5, list.indexOf(15));
+  Expect.equals(9, list.indexOf(19));
+  Expect.equals(-1, list.indexOf(20));
+
+  list = new Float32List(10);
+  for (int i = 0; i < list.length; i++) {
+    list[i] = i + 10.0;
+  }
+  Expect.equals(0, list.indexOf(10.0));
+  Expect.equals(5, list.indexOf(15.0));
+  Expect.equals(9, list.indexOf(19.0));
+  Expect.equals(-1, list.indexOf(20.0));
+}
+
+void testIndexOf() {
+  testIndexOfHelper(new Uint8List(10));
+  testIndexOfHelper(new Uint8ClampedList(10));
+}
+
+void testGetAtIndex(TypedData list, num initial_value) {
+  var bdata = new ByteData.view(list.buffer);
+  for (int i = 0; i < bdata.lengthInBytes; i++) {
+    Expect.equals(42, bdata.getUint8(i));
+    Expect.equals(42, bdata.getInt8(i));
+  }
+  for (int i = 0; i < bdata.lengthInBytes - 1; i += 2) {
+    Expect.equals(10794, bdata.getUint16(i, Endian.little));
+    Expect.equals(10794, bdata.getInt16(i, Endian.little));
+  }
+  for (int i = 0; i < bdata.lengthInBytes - 3; i += 4) {
+    Expect.equals(707406378, bdata.getUint32(i, Endian.little));
+    Expect.equals(707406378, bdata.getInt32(i, Endian.little));
+    Expect.equals(1.511366173271439e-13, bdata.getFloat32(i, Endian.little));
+  }
+  for (int i = 0; i < bdata.lengthInBytes - 7; i += 8) {
+    Expect.equals(3038287259199220266, bdata.getUint64(i, Endian.little));
+    Expect.equals(3038287259199220266, bdata.getInt64(i, Endian.little));
+    Expect.equals(1.4260258159703532e-105, bdata.getFloat64(i, Endian.little));
+  }
+}
+
+void testSetAtIndex(List list, num initial_value, [bool use_double = false]) {
+  void validate([reinit = true]) {
+    for (int i = 0; i < list.length; i++) {
+      Expect.equals(initial_value, list[i]);
+      if (reinit) list[i] = use_double ? 0.0 : 0;
+    }
+  }
+
+  var bdata = new ByteData.view((list as TypedData).buffer);
+  for (int i = 0; i < bdata.lengthInBytes; i++) {
+    bdata.setUint8(i, 42);
+  }
+  validate();
+  for (int i = 0; i < bdata.lengthInBytes; i++) {
+    bdata.setInt8(i, 42);
+  }
+  validate();
+  for (int i = 0; i < bdata.lengthInBytes - 1; i += 2) {
+    bdata.setUint16(i, 10794, Endian.little);
+  }
+  validate();
+  for (int i = 0; i < bdata.lengthInBytes - 1; i += 2) {
+    bdata.setInt16(i, 10794, Endian.little);
+  }
+  validate();
+  for (int i = 0; i < bdata.lengthInBytes - 3; i += 4) {
+    bdata.setUint32(i, 707406378, Endian.little);
+  }
+  validate();
+  for (int i = 0; i < bdata.lengthInBytes - 3; i += 4) {
+    bdata.setInt32(i, 707406378, Endian.little);
+  }
+  validate();
+  for (int i = 0; i < bdata.lengthInBytes - 3; i += 4) {
+    bdata.setFloat32(i, 1.511366173271439e-13, Endian.little);
+  }
+  validate();
+  for (int i = 0; i < bdata.lengthInBytes - 7; i += 8) {
+    bdata.setUint64(i, 3038287259199220266, Endian.little);
+  }
+  validate();
+  for (int i = 0; i < bdata.lengthInBytes - 7; i += 8) {
+    bdata.setInt64(i, 3038287259199220266, Endian.little);
+  }
+  validate();
+  for (int i = 0; i < bdata.lengthInBytes - 7; i += 8) {
+    bdata.setFloat64(i, 1.4260258159703532e-105, Endian.little);
+  }
+  validate(false);
+}
+
+testViewCreation() {
+  var bytes = new Uint8List(1024).buffer;
+  var view;
+  view = new ByteData.view(bytes, 24);
+  Expect.equals(1000, view.lengthInBytes);
+  view = new Uint8List.view(bytes, 24);
+  Expect.equals(1000, view.lengthInBytes);
+  view = new Int8List.view(bytes, 24);
+  Expect.equals(1000, view.lengthInBytes);
+  view = new Uint8ClampedList.view(bytes, 24);
+  Expect.equals(1000, view.lengthInBytes);
+  view = new Uint16List.view(bytes, 24);
+  Expect.equals(1000, view.lengthInBytes);
+  view = new Int16List.view(bytes, 24);
+  Expect.equals(1000, view.lengthInBytes);
+  view = new Uint32List.view(bytes, 24);
+  Expect.equals(1000, view.lengthInBytes);
+  view = new Int32List.view(bytes, 24);
+  Expect.equals(1000, view.lengthInBytes);
+  view = new Uint64List.view(bytes, 24);
+  Expect.equals(1000, view.lengthInBytes);
+  view = new Int64List.view(bytes, 24);
+  Expect.equals(1000, view.lengthInBytes);
+  view = new Float32List.view(bytes, 24);
+  Expect.equals(1000, view.lengthInBytes);
+  view = new Float64List.view(bytes, 24);
+  Expect.equals(1000, view.lengthInBytes);
+  view = new Int32x4List.view(bytes, 16);
+  Expect.equals(1008, view.lengthInBytes); // Must be 16-byte aligned.
+  view = new Float32x4List.view(bytes, 16);
+  Expect.equals(1008, view.lengthInBytes);
+  view = new Float64x2List.view(bytes, 16);
+  Expect.equals(1008, view.lengthInBytes);
+
+  view = bytes.asByteData(24);
+  Expect.equals(1000, view.lengthInBytes);
+  view = bytes.asUint8List(24);
+  Expect.equals(1000, view.lengthInBytes);
+  view = bytes.asInt8List(24);
+  Expect.equals(1000, view.lengthInBytes);
+  view = bytes.asUint8ClampedList(24);
+  Expect.equals(1000, view.lengthInBytes);
+  view = bytes.asUint16List(24);
+  Expect.equals(1000, view.lengthInBytes);
+  view = bytes.asInt16List(24);
+  Expect.equals(1000, view.lengthInBytes);
+  view = bytes.asUint32List(24);
+  Expect.equals(1000, view.lengthInBytes);
+  view = bytes.asInt32List(24);
+  Expect.equals(1000, view.lengthInBytes);
+  view = bytes.asUint64List(24);
+  Expect.equals(1000, view.lengthInBytes);
+  view = bytes.asInt64List(24);
+  Expect.equals(1000, view.lengthInBytes);
+  view = bytes.asFloat32List(24);
+  Expect.equals(1000, view.lengthInBytes);
+  view = bytes.asFloat64List(24);
+  Expect.equals(1000, view.lengthInBytes);
+  view = bytes.asInt32x4List(16);
+  Expect.equals(1008, view.lengthInBytes);
+  view = bytes.asFloat32x4List(16);
+  Expect.equals(1008, view.lengthInBytes);
+  view = bytes.asFloat64x2List(16);
+  Expect.equals(1008, view.lengthInBytes);
+
+  view = bytes.asByteData(24, 800);
+  Expect.equals(800, view.lengthInBytes);
+  view = bytes.asUint8List(24, 800);
+  Expect.equals(800, view.lengthInBytes);
+  view = bytes.asInt8List(24, 800);
+  Expect.equals(800, view.lengthInBytes);
+  view = bytes.asUint8ClampedList(24, 800);
+  Expect.equals(800, view.lengthInBytes);
+  view = bytes.asUint16List(24, 400);
+  Expect.equals(800, view.lengthInBytes);
+  view = bytes.asInt16List(24, 400);
+  Expect.equals(800, view.lengthInBytes);
+  view = bytes.asUint32List(24, 200);
+  Expect.equals(800, view.lengthInBytes);
+  view = bytes.asInt32List(24, 200);
+  Expect.equals(800, view.lengthInBytes);
+  view = bytes.asUint64List(24, 100);
+  Expect.equals(800, view.lengthInBytes);
+  view = bytes.asInt64List(24, 100);
+  Expect.equals(800, view.lengthInBytes);
+  view = bytes.asFloat32List(24, 200);
+  Expect.equals(800, view.lengthInBytes);
+  view = bytes.asFloat64List(24, 100);
+  Expect.equals(800, view.lengthInBytes);
+  view = bytes.asInt32x4List(32, 50);
+  Expect.equals(800, view.lengthInBytes);
+  view = bytes.asFloat32x4List(32, 50);
+  Expect.equals(800, view.lengthInBytes);
+  view = bytes.asFloat64x2List(32, 50);
+  Expect.equals(800, view.lengthInBytes);
+}
+
+testWhere() {
+  var bytes = new Uint8List(13);
+  bytes.setRange(0, 5, [1, 1, 1, 1, 1]);
+  Expect.equals(5, bytes.where((v) => v > 0).length);
+}
+
+testCreationFromList() {
+  var intList = [
+    -1000000000000000000,
+    -255,
+    -127,
+    0,
+    128,
+    256,
+    1000000000000000000
+  ];
+  var intLists = [];
+  intLists.add(new Int8List.fromList(intList));
+  intLists.add(new Int16List.fromList(intList));
+  intLists.add(new Int32List.fromList(intList));
+  intLists.add(new Int64List.fromList(intList));
+  intLists.add(new Uint8List.fromList(intList));
+  intLists.add(new Uint16List.fromList(intList));
+  intLists.add(new Uint32List.fromList(intList));
+  intLists.add(new Uint64List.fromList(intList));
+  var doubleList = [
+    -123123123123.123123123123,
+    -123.0,
+    0.0,
+    123.0,
+    123123123123.123123123
+  ];
+  var doubleLists = [];
+  doubleLists.add(new Float32List.fromList(doubleList));
+  doubleLists.add(new Float64List.fromList(doubleList));
+  for (var ints in intLists) {
+    for (var doubles in doubleLists) {
+      Expect.throws(() => ints[0] = doubles[0]);
+      Expect.throws(() => doubles[0] = ints[0]);
+    }
+  }
+}
+
+void testStrings() {
+  test(List<int> list) {
+    Uint16List uints = new Uint16List(list.length)..setAll(0, list);
+    String string = new String.fromCharCodes(list);
+    for (int i = 0; i < string.length; i++) {
+      for (int j = i; j < string.length; j++) {
+        int length = j - i;
+        {
+          Uint16List copy = new Uint16List(length);
+          copy.setRange(0, length, string.codeUnits, i);
+          Expect.listEquals(uints.sublist(i, j), copy);
+        }
+        {
+          Uint8List buffer = new Uint8List(length * 2 + 8);
+          Uint16List copy = new Uint16List.view(buffer.buffer, 4, length);
+          copy.setRange(0, length, string.codeUnits, i);
+          Expect.listEquals(uints.sublist(i, j), copy);
+        }
+        {
+          String copy = new String.fromCharCodes(uints, i, j);
+          Expect.equals(string.substring(i, j), copy);
+        }
+      }
+    }
+  }
+
+  test([]);
+  test([0x00, 0x7f, 0xff]);
+  test([0x00, 0xdfff, 0xffff]);
+  test([0xd800, 0xdc00, 0x20, 0xdbff, 0xdfff]);
+}
+
+main() {
+  for (int i = 0; i < 20; i++) {
+    testCreateUint8TypedData();
+    testCreateClampedUint8TypedData();
+    testTypedDataRange(false);
+    testUnsignedTypedDataRange(false);
+    testClampedUnsignedTypedDataRange(false);
+    testSetRange();
+    testIndexOutOfRange();
+    testNoNullValue();
+    testIndexOf();
+
+    var int8list = new Int8List(128);
+    testSetAtIndex(int8list, 42);
+    testGetAtIndex(int8list, 42);
+
+    var uint8list = new Uint8List(128);
+    testSetAtIndex(uint8list, 42);
+    testGetAtIndex(uint8list, 42);
+
+    var int16list = new Int16List(64);
+    testSetAtIndex(int16list, 10794);
+    testGetAtIndex(int16list, 10794);
+
+    var uint16list = new Uint16List(64);
+    testSetAtIndex(uint16list, 10794);
+    testGetAtIndex(uint16list, 10794);
+
+    var int32list = new Int32List(32);
+    testSetAtIndex(int32list, 707406378);
+    testGetAtIndex(int32list, 707406378);
+
+    var uint32list = new Uint32List(32);
+    testSetAtIndex(uint32list, 707406378);
+    testGetAtIndex(uint32list, 707406378);
+
+    var int64list = new Int64List(16);
+    testSetAtIndex(int64list, 3038287259199220266);
+    testGetAtIndex(int64list, 3038287259199220266);
+
+    var uint64list = new Uint64List(16);
+    testSetAtIndex(uint64list, 3038287259199220266);
+    testGetAtIndex(uint64list, 3038287259199220266);
+
+    var float32list = new Float32List(32);
+    testSetAtIndex(float32list, 1.511366173271439e-13, true);
+    testGetAtIndex(float32list, 1.511366173271439e-13);
+
+    var float64list = new Float64List(16);
+    testSetAtIndex(float64list, 1.4260258159703532e-105, true);
+    testGetAtIndex(float64list, 1.4260258159703532e-105);
+  }
+  testTypedDataRange(true);
+  testUnsignedTypedDataRange(true);
+  testViewCreation();
+  testWhere();
+  testCreationFromList();
+  testStrings();
+  testSetRange();
+}
diff --git a/tests/standalone/typed_data_view_test.dart b/tests/standalone/typed_data_view_test.dart
new file mode 100644
index 0000000..cfcfb73
--- /dev/null
+++ b/tests/standalone/typed_data_view_test.dart
@@ -0,0 +1,83 @@
+// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+//
+// Dart test program for testing typed data.
+
+// Library tag to be able to run in html test framework.
+library TypedDataTest;
+
+import "package:expect/expect.dart";
+import 'dart:typed_data';
+
+validate(List list, num expected) {
+  for (int i = 0; i < list.length; i++) {
+    Expect.equals(expected, list[i]);
+  }
+}
+
+testView() {
+  var list = new Int8List(128);
+  for (var i = 0; i < list.length; i++) {
+    list[i] = 42;
+  }
+  var ba = list.buffer;
+
+  var slist = new Int16List.view(ba, 0, 32);
+  validate(slist, 10794);
+  var uslist = new Uint16List.view(ba, 0, 32);
+  validate(uslist, 10794);
+
+  var ilist = new Int32List.view(ba, 0, 16);
+  validate(ilist, 707406378);
+  var uilist = new Uint32List.view(ba, 0, 16);
+  validate(uilist, 707406378);
+
+  var llist = new Int64List.view(ba, 0, 8);
+  validate(llist, 3038287259199220266);
+  var ullist = new Uint64List.view(ba, 0, 8);
+  validate(ullist, 3038287259199220266);
+
+  var flist = new Float32List.view(ba, 0, 16);
+  validate(flist, 1.511366173271439e-13);
+  var dlist = new Float64List.view(ba, 0, 8);
+  validate(dlist, 1.4260258159703532e-105);
+}
+
+testSetters() {
+  var blist = new ByteData(128);
+  blist.setInt8(0, 0xffff);
+  Expect.equals(-1, blist.getInt8(0));
+  blist.setUint8(0, 0xffff);
+  Expect.equals(0xff, blist.getUint8(0));
+  blist.setInt16(0, 0xffffffff);
+  Expect.equals(-1, blist.getInt16(0, Endian.little));
+  blist.setUint16(0, 0xffffffff, Endian.little);
+  Expect.equals(0xffff, blist.getUint16(0, Endian.little));
+  blist.setInt32(0, 0xffffffffffff, Endian.little);
+  Expect.equals(-1, blist.getInt32(0, Endian.little));
+  blist.setUint32(0, 0xffffffffffff, Endian.little);
+  Expect.equals(0xffffffff, blist.getUint32(0, Endian.little));
+  blist.setInt64(0, 0xffffffffffffffff, Endian.little);
+  Expect.equals(-1, blist.getInt64(0, Endian.little));
+  blist.setUint64(0, 0xffffffffffffffff, Endian.little);
+  Expect.equals(0xffffffffffffffff, blist.getUint64(0, Endian.little));
+  blist.setInt32(0, 0xaabbccddfffffffe, Endian.little);
+  Expect.equals(-2, blist.getInt32(0, Endian.little));
+  blist.setUint32(0, 0xaabbccddfffffffe, Endian.little);
+  Expect.equals(0xfffffffe, blist.getUint32(0, Endian.little));
+  blist.setInt64(0, 0xfffffffffffffffe, Endian.little);
+  Expect.equals(-2, blist.getInt64(0, Endian.little));
+  blist.setUint64(0, 0xfffffffffffffffe, Endian.little);
+  Expect.equals(0xfffffffffffffffe, blist.getUint64(0, Endian.little));
+
+  blist.setFloat32(0, 18446744073709551614.0, Endian.little);
+  Expect.equals(18446744073709551614.0, blist.getFloat32(0, Endian.little));
+  blist.setFloat64(0, 18446744073709551614.0, Endian.little);
+  Expect.equals(18446744073709551614.0, blist.getFloat64(0, Endian.little));
+}
+
+main() {
+  testView();
+  testSetters();
+}
diff --git a/tests/standalone/unboxed_int_converter_test.dart b/tests/standalone/unboxed_int_converter_test.dart
new file mode 100644
index 0000000..5cbaa4d
--- /dev/null
+++ b/tests/standalone/unboxed_int_converter_test.dart
@@ -0,0 +1,78 @@
+// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+// Test UnboxedIntConverter for int32.
+// VMOptions=--optimization-counter-threshold=10 --no-use-osr --no-background-compilation
+
+import "package:expect/expect.dart";
+import "dart:typed_data";
+
+int32_add(a, b, c) => (a * c) + (b * c);
+int32_mul(a, b, c) => (a * c) * b;
+int32_sub(a, b, c) => (a * c) - (b * c);
+int32_shr(a, b, c) => (a * c * b) >> 16;
+int32_shl(a, b, c) => (a * c * b) << 16;
+int32_xor(a, b, c) => (a * c) ^ (b * c);
+int32_or(a, b, c) => (a * c) | (b * c);
+int32_and(a, b, c) => (a * c) & (b * c);
+
+int32_to_mint(a, b) {
+  var sum = 0;
+  var j = 0;
+  for (var i = a; i <= b; i++) {
+    sum -= (j * ++j) & 0xff;
+  }
+
+  return 0xffffffff + sum;
+}
+
+mint_to_int32(a, c, d) {
+  return a * a * a * (c - d);
+}
+
+uint32_to_int32(a, c) {
+  return (a * a * a) * (c & 0xFFFFFFFF);
+}
+
+main() {
+  for (var j = 0; j < 1000; j++) {
+    Expect.equals(2, int32_add(1, 1, 1));
+    Expect.equals(1, int32_mul(1, 1, 1));
+    Expect.equals(0, int32_sub(1, 1, 1));
+    Expect.equals(0, int32_shr(1, 1, 1));
+    Expect.equals(1 << 16, int32_shl(1, 1, 1));
+    Expect.equals(0, int32_xor(1, 1, 1));
+    Expect.equals(1, int32_or(1, 1, 1));
+    Expect.equals(1, int32_and(1, 1, 1));
+  }
+
+  Expect.equals(0x7ffffffe, int32_add(0x7ffffffc ~/ 2, 1, 2));
+  Expect.equals(-0x80000000, int32_add(-0x7ffffffe ~/ 2, -1, 2));
+  Expect.equals(-0x80000002, int32_add(-0x7ffffffe ~/ 2, -2, 2)); // Overflow.
+  Expect.equals(0x7ffffffe, int32_sub(0x7ffffffc ~/ 2, -1, 2));
+  Expect.equals(-0x80000000, int32_sub(-0x7ffffffe ~/ 2, 1, 2));
+  Expect.equals(-0x80000002, int32_sub(-0x7ffffffe ~/ 2, 2, 2)); // Overflow.
+  Expect.equals(-0x7ffffffe, int32_mul(0x7ffffffe ~/ 2, -1, 2));
+  Expect.equals(-0x80000000, int32_mul(-0x80000000 ~/ 2, 1, 2));
+  Expect.equals(0x80000000, int32_mul(-0x80000000 ~/ 2, -1, 2)); // Overflow.
+  Expect.equals(0x60000000, int32_xor(0x40000000 ~/ 2, 0x20000000 ~/ 2, 2));
+  Expect.equals(0x00000000, int32_xor(0x40000000 ~/ 2, 0x40000000 ~/ 2, 2));
+  Expect.equals(0x60000000, int32_or(0x40000000 ~/ 2, 0x20000000 ~/ 2, 2));
+  Expect.equals(0x60000000, int32_or(0x60000000 ~/ 2, 0x40000000 ~/ 2, 2));
+  Expect.equals(0x00000000, int32_and(0x40000000 ~/ 2, 0x20000000 ~/ 2, 2));
+  Expect.equals(0x40000000, int32_and(0x60000000 ~/ 2, 0x40000000 ~/ 2, 2));
+  Expect.equals(1, int32_shr(1, 1 << 16, 1));
+  Expect.equals(-1 << 15, int32_shr(1 << 15, -(1 << 16), 1));
+  Expect.equals(-0x080000000, int32_shl(-1 << 15, 1, 1));
+  Expect.equals(-0x100000000, int32_shl(-1 << 16, 1, 1)); // Overflow.
+
+  Expect.equals(0, int32_shr(1, 1, 1));
+  Expect.equals(1 << 16, int32_shl(1, 1, 1));
+
+  for (var j = 0; j < 1000; j++) {
+    Expect.equals(4294839503, int32_to_mint(0, 1000));
+    Expect.equals(-8, mint_to_int32(2, 0x100000000, 0x100000001));
+    Expect.equals(8, uint32_to_int32(2, 0x100000001));
+  }
+  Expect.equals(8 * 0x80000001, uint32_to_int32(2, 0x180000001));
+}
diff --git a/tests/standalone/verbose_gc_to_bmu_script.dart b/tests/standalone/verbose_gc_to_bmu_script.dart
new file mode 100644
index 0000000..33e488c
--- /dev/null
+++ b/tests/standalone/verbose_gc_to_bmu_script.dart
@@ -0,0 +1,19 @@
+// Copyright (c) 2011, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+// Testing GC, issue 1469.
+
+main() {
+  var div;
+  for (int i = 0; i < 200; ++i) {
+    List l = new List(1000000);
+    var m = 2;
+    div = (_) {
+      var b = l; // Was causing OutOfMemory.
+    };
+    var lSmall = new List(3);
+    // Circular reference between new and old gen objects.
+    lSmall[0] = l;
+    l[0] = lSmall;
+  }
+}
diff --git a/tests/standalone/verbose_gc_to_bmu_test.dart b/tests/standalone/verbose_gc_to_bmu_test.dart
new file mode 100644
index 0000000..860e5eb0
--- /dev/null
+++ b/tests/standalone/verbose_gc_to_bmu_test.dart
@@ -0,0 +1,71 @@
+// 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.
+
+// OtherResources=verbose_gc_to_bmu_script.dart
+
+// This test forks a second vm process that runs the BMU tool and verifies that
+// it produces some output. This test is mainly here to ensure that the BMU
+// tool compiles and runs.
+
+import "dart:async";
+import "dart:convert";
+import "dart:io";
+
+import "package:path/path.dart";
+
+// Tool script relative to the path of this test.
+var toolScript = Uri.parse(Platform.executable)
+    .resolve("../../runtime/tools/verbose_gc_to_bmu.dart")
+    .toFilePath();
+
+// Target script relative to this test.
+var targetScript =
+    Platform.script.resolve("verbose_gc_to_bmu_script.dart").toFilePath();
+const minOutputLines = 20;
+
+void checkExitCode(targetResult) {
+  if (exitCode != 0) {
+    print("Process terminated with exit code ${exitCode}.");
+    exit(-1);
+  }
+}
+
+void main() {
+  // Compute paths for tool and target relative to the path of this script.
+  var targetResult =
+      Process.runSync(Platform.executable, ["--verbose_gc", targetScript]);
+  checkExitCode(targetResult);
+  var gcLog = targetResult.stderr;
+  Process.start(Platform.executable, [toolScript]).then((Process process) {
+    // Feed the GC log of the target to the BMU tool.
+    process.stdin.write(gcLog);
+    process.stdin.close();
+    var stdoutStringStream =
+        process.stdout.transform(utf8.decoder).transform(new LineSplitter());
+    var stderrStringStream =
+        process.stderr.transform(utf8.decoder).transform(new LineSplitter());
+    // Wait for 3 future events: stdout and stderr streams closed, and
+    // process terminated.
+    var futures = <Future>[];
+    var stdoutLines = [];
+    var stderrLines = [];
+    var subscription = stdoutStringStream.listen(stdoutLines.add);
+    futures.add(subscription.asFuture(true));
+    subscription = stderrStringStream.listen(stderrLines.add);
+    futures.add(subscription.asFuture(true));
+    futures.add(process.exitCode.then(checkExitCode));
+    Future.wait(futures).then((results) {
+      if (stderrLines.isNotEmpty) {
+        print("Unexpected output on stderr:");
+        print(stderrLines.join('\n'));
+        exit(-1);
+      }
+      if (stdoutLines.length < minOutputLines) {
+        print("Less than expected output on stdout:");
+        print(stdoutLines.join('\n'));
+        exit(-1);
+      }
+    });
+  });
+}
diff --git a/tests/standalone_2/regress_42092_script.dart b/tests/standalone_2/regress_42092_script.dart
new file mode 100644
index 0000000..da357ad
--- /dev/null
+++ b/tests/standalone_2/regress_42092_script.dart
@@ -0,0 +1,21 @@
+// Copyright (c) 2020, the Dart project authors.  Please see the AUTHORS file
+// for 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';
+
+Future<void> main() async {
+  var count = 0;
+  ProcessSignal.sigint.watch().forEach((s) {
+    count++;
+    print('child: Got a SIGINT $count times, hit it 3 times to terminate');
+    if (count >= 3) {
+      exit(42);
+    }
+  });
+  print('Waiting...');
+  while (true) {
+    await Future.delayed(const Duration(seconds: 5));
+  }
+}
diff --git a/tests/standalone_2/regress_42092_test.dart b/tests/standalone_2/regress_42092_test.dart
new file mode 100644
index 0000000..a33d91f
--- /dev/null
+++ b/tests/standalone_2/regress_42092_test.dart
@@ -0,0 +1,51 @@
+// Copyright (c) 2020, the Dart project authors.  Please see the AUTHORS file
+// for 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:convert';
+import 'dart:io';
+
+import 'package:expect/expect.dart';
+
+Process process;
+bool lastKill = false;
+
+Future<void> sigint(int iterations) async {
+  for (int i = 0; i < iterations; ++i) {
+    if (i + 1 == iterations) {
+      lastKill = true;
+    }
+    process.kill(ProcessSignal.sigint);
+    // Yield to the event loop to allow for the signal to be sent.
+    await Future.value(null);
+  }
+}
+
+Future<void> main() async {
+  process = await Process.start(
+    Platform.resolvedExecutable,
+    [
+      Platform.script.resolve('regress_42092_script.dart').toString(),
+    ],
+  );
+  final startCompleter = Completer<void>();
+  StreamSubscription sub;
+  sub = process.stdout.transform(Utf8Decoder()).listen((event) {
+    if (event.contains('Waiting...')) {
+      startCompleter.complete();
+      sub.cancel();
+    }
+  });
+
+  // Wait for target script to setup its signal handling.
+  await startCompleter.future;
+
+  final exitCompleter = Completer<void>();
+  process.exitCode.then((code) {
+    Expect.isTrue(lastKill);
+    exitCompleter.complete();
+  });
+  await sigint(3);
+  await exitCompleter.future;
+}
diff --git a/tools/VERSION b/tools/VERSION
index d4131eb..b8eb434 100644
--- a/tools/VERSION
+++ b/tools/VERSION
@@ -33,7 +33,7 @@
 MAJOR 2
 MINOR 9
 PATCH 0
-PRERELEASE 20
+PRERELEASE 21
 PRERELEASE_PATCH 0
-ABI_VERSION 37
-OLDEST_SUPPORTED_ABI_VERSION 37
+ABI_VERSION 38
+OLDEST_SUPPORTED_ABI_VERSION 38
diff --git a/tools/bots/compare_results.dart b/tools/bots/compare_results.dart
index 792a473..b6f0ce4 100755
--- a/tools/bots/compare_results.dart
+++ b/tools/bots/compare_results.dart
@@ -40,17 +40,14 @@
 class Event {
   final Result before;
   final Result after;
-  final Result approved;
 
-  Event(this.before, this.after, this.approved);
+  Event(this.before, this.after);
 
   bool get isNew => before == null;
   bool get isNewPassing => before == null && after.matches;
   bool get isNewFailing => before == null && !after.matches;
   bool get changed => !unchanged;
   bool get unchanged => before != null && before.outcome == after.outcome;
-  bool get isApproved => approved != null && approved.outcome == after.outcome;
-  bool get isUnapproved => !isApproved;
   bool get remainedPassing => before.matches && after.matches;
   bool get remainedFailing => !before.matches && !after.matches;
   bool get flaked => after.flaked;
@@ -81,7 +78,6 @@
 bool search(
     String description,
     String searchForStatus,
-    String searchForApproval,
     List<Event> events,
     ArgResults options,
     Map<String, Map<String, dynamic>> logs,
@@ -103,12 +99,6 @@
         (event.after.flaked || event.after.matches)) {
       continue;
     }
-    if (searchForApproval == "approved" && !event.isApproved) {
-      continue;
-    }
-    if (searchForApproval == "unapproved" && !event.isUnapproved) {
-      continue;
-    }
     if (options["unchanged"] && !event.unchanged) continue;
     if (options["changed"] && !event.changed) continue;
     if (!beganSection) {
@@ -177,8 +167,6 @@
 
 main(List<String> args) async {
   final parser = new ArgParser();
-  parser.addFlag("approved",
-      abbr: 'A', negatable: false, help: "Show approved tests.");
   parser.addFlag("changed",
       abbr: 'c',
       negatable: false,
@@ -197,14 +185,9 @@
   parser.addFlag("flaky",
       abbr: 'F', negatable: false, help: "Show flaky tests.");
   parser.addFlag("help", help: "Show the program usage.", negatable: false);
-  parser.addFlag("human",
-      abbr: "h",
-      help: "Prove you can't read machine readable output.",
-      negatable: false);
+  parser.addFlag("human", abbr: "h", negatable: false);
   parser.addFlag("passing",
       abbr: 'p', negatable: false, help: "Show passing tests.");
-  parser.addFlag("unapproved",
-      abbr: 'U', negatable: false, help: "Show unapproved tests.");
   parser.addFlag("unchanged",
       abbr: 'u',
       negatable: false,
@@ -222,9 +205,8 @@
   final options = parser.parse(args);
   if (options["help"]) {
     print("""
-Usage: compare_results.dart [OPTION]... BEFORE AFTER [APPROVED]
+Usage: compare_results.dart [OPTION]... BEFORE AFTER
 Compare the old and new test results and list tests that pass the filters.
-Three-way compare with the approved results if provided.
 All tests are listed if no filters are given.
 
 The options are as follows:
@@ -241,9 +223,9 @@
   }
 
   final parameters = options.rest;
-  if (parameters.length != 2 && parameters.length != 3) {
-    print("error: Expected two or three parameters "
-        "(results before, results after, and (optionally) approved results)");
+  if (parameters.length != 2) {
+    print("error: Expected two parameters "
+        "(results before, results after)");
     exitCode = 2;
     return;
   }
@@ -251,9 +233,6 @@
   // Load the input and the flakiness data if specified.
   final before = await loadResultsMap(parameters[0]);
   final after = await loadResultsMap(parameters[1]);
-  final approved = 3 <= parameters.length
-      ? await loadResultsMap(parameters[2])
-      : <String, Map<String, dynamic>>{};
   final logs = options['logs'] == null
       ? <String, Map<String, dynamic>>{}
       : await loadResultsMap(options['logs']);
@@ -268,15 +247,11 @@
   for (final name in names) {
     final mapBefore = before[name];
     final mapAfter = after[name];
-    final mapApproved = approved[name];
     final resultBefore = mapBefore != null
         ? new Result.fromMap(mapBefore, flakinessData[name])
         : null;
     final resultAfter = new Result.fromMap(mapAfter, flakinessData[name]);
-    final resultApproved = mapApproved != null && mapApproved["result"] != null
-        ? new Result.fromMap(mapApproved, flakinessData[name])
-        : null;
-    final event = new Event(resultBefore, resultAfter, resultApproved);
+    final event = new Event(resultBefore, resultAfter);
     events.add(event);
   }
 
@@ -306,57 +281,24 @@
   final searchForStatuses =
       ["passing", "flaky", "failing"].where((option) => options[option]);
 
-  final approvalDescriptions = {
-    "passing": {
-      "approved": " (approved)",
-      "unapproved": " (should be approved)",
-      null: "",
-    },
-    "flaky": {
-      "approved": " (approved result)",
-      "unapproved": " (unapproved result)",
-      null: "",
-    },
-    "failing": {
-      "approved": " (approved)",
-      "unapproved": " (needs approval)",
-      null: "",
-    },
-    null: {
-      "approved": " (approved)",
-      "unapproved": " (needs approval)",
-      null: "",
-    },
-  };
-
-  final searchForApprovals =
-      ["approved", "unapproved"].where((option) => options[option]);
-
   // Report tests matching the filters.
   final logSection = <String>[];
   bool judgement = false;
   for (final searchForStatus
       in searchForStatuses.isNotEmpty ? searchForStatuses : <String>[null]) {
-    for (final searchForApproval in searchForApprovals.isNotEmpty
-        ? searchForApprovals
-        : <String>[null]) {
-      final searchForChanged = options["unchanged"]
-          ? "unchanged"
-          : options["changed"] ? "changed" : null;
-      final aboutStatus = filterDescriptions[searchForStatus][searchForChanged];
-      final aboutApproval =
-          approvalDescriptions[searchForStatus][searchForApproval];
-      final sectionHeader = "The following tests $aboutStatus$aboutApproval:";
-      final logSectionArg =
-          searchForStatus == "failing" || searchForStatus == "flaky"
-              ? logSection
-              : null;
-      bool possibleJudgement = search(sectionHeader, searchForStatus,
-          searchForApproval, events, options, logs, logSectionArg);
-      if ((searchForStatus == null || searchForStatus == "failing") &&
-          (searchForApproval == null || searchForApproval == "unapproved")) {
-        judgement = possibleJudgement;
-      }
+    final searchForChanged = options["unchanged"]
+        ? "unchanged"
+        : options["changed"] ? "changed" : null;
+    final aboutStatus = filterDescriptions[searchForStatus][searchForChanged];
+    final sectionHeader = "The following tests $aboutStatus:";
+    final logSectionArg =
+        searchForStatus == "failing" || searchForStatus == "flaky"
+            ? logSection
+            : null;
+    bool possibleJudgement = search(
+        sectionHeader, searchForStatus, events, options, logs, logSectionArg);
+    if ((searchForStatus == null || searchForStatus == "failing")) {
+      judgement = possibleJudgement;
     }
   }
 
diff --git a/tools/bots/try_benchmarks.sh b/tools/bots/try_benchmarks.sh
index 9e36db7..aaf6d55 100755
--- a/tools/bots/try_benchmarks.sh
+++ b/tools/bots/try_benchmarks.sh
@@ -174,19 +174,28 @@
 }
 EOF
     out/ReleaseIA32/dart --profile-period=10000 --packages=.packages hello.dart
+    out/ReleaseIA32/dart --null-safety --enable-experiment=non-nullable --profile-period=10000 --packages=.packages hello.dart
     out/ReleaseIA32/dart pkg/front_end/tool/perf.dart parse hello.dart
     out/ReleaseIA32/dart pkg/front_end/tool/perf.dart scan hello.dart
     out/ReleaseIA32/dart pkg/front_end/tool/fasta_perf.dart kernel_gen_e2e hello.dart
     out/ReleaseIA32/dart pkg/front_end/tool/fasta_perf.dart scan hello.dart
     out/ReleaseIA32/dart --print_metrics pkg/analyzer_cli/bin/analyzer.dart --dart-sdk=sdk hello.dart
     out/ReleaseIA32/run_vm_tests InitialRSS
+    out/ReleaseIA32/run_vm_tests --null-safety --enable-experiment=non-nullable InitialRSS
     out/ReleaseIA32/run_vm_tests GenKernelKernelLoadKernel
+    out/ReleaseIA32/run_vm_tests --null-safety --enable-experiment=non-nullable GenKernelKernelLoadKernel
     out/ReleaseIA32/run_vm_tests KernelServiceCompileAll
+    out/ReleaseIA32/run_vm_tests --null-safety --enable-experiment=non-nullable KernelServiceCompileAll
     out/ReleaseIA32/dart --profile-period=10000 --packages=.packages benchmarks/Example/dart2/Example.dart
+    out/ReleaseIA32/dart --null-safety --enable-experiment=non-nullable --profile-period=10000 --packages=.packages benchmarks/Example/dart/Example.dart
     out/ReleaseIA32/dart benchmarks/FfiBoringssl/dart2/FfiBoringssl.dart
+    out/ReleaseIA32/dart --null-safety --enable-experiment=non-nullable benchmarks/FfiBoringssl/dart/FfiBoringssl.dart
     out/ReleaseIA32/dart benchmarks/FfiCall/dart2/FfiCall.dart
+    out/ReleaseIA32/dart --null-safety --enable-experiment=non-nullable benchmarks/FfiCall/dart/FfiCall.dart
     out/ReleaseIA32/dart benchmarks/FfiMemory/dart2/FfiMemory.dart
+    out/ReleaseIA32/dart --null-safety --enable-experiment=non-nullable benchmarks/FfiMemory/dart/FfiMemory.dart
     out/ReleaseIA32/dart benchmarks/FfiStruct/dart2/FfiStruct.dart
+    out/ReleaseIA32/dart --null-safety --enable-experiment=non-nullable benchmarks/FfiStruct/dart/FfiStruct.dart
     cd ..
     rm -rf tmp
   elif [ "$command" = linux-x64-build ]; then
@@ -313,18 +322,25 @@
 }
 EOF
     out/ReleaseX64/dart --profile-period=10000 --packages=.packages hello.dart
+    out/ReleaseX64/dart --null-safety --enable-experiment=non-nullable --profile-period=10000 --packages=.packages hello.dart
     DART_CONFIGURATION=ReleaseX64 pkg/vm/tool/precompiler2 --packages=.packages hello.dart blob.bin
     DART_CONFIGURATION=ReleaseX64 pkg/vm/tool/dart_precompiled_runtime2 --profile-period=10000 blob.bin
+    DART_CONFIGURATION=ReleaseX64 pkg/vm/tool/precompiler2 --null-safety --enable-experiment=non-nullable --packages=.packages hello.dart blob.bin
+    DART_CONFIGURATION=ReleaseX64 pkg/vm/tool/dart_precompiled_runtime2 --null-safety --profile-period=10000 blob.bin
     out/ReleaseX64/dart --profile-period=10000 --packages=.packages --optimization-counter-threshold=-1 hello.dart
     out/ReleaseX64/dart-sdk/bin/dart2js --packages=.packages --out=out.js -m hello.dart
     third_party/d8/linux/x64/d8 --stack_size=1024 sdk/lib/_internal/js_runtime/lib/preambles/d8.js out.js
+    out/ReleaseX64/dart-sdk/bin/dart2js --enable-experiment=non-nullable --sound-null-safety --packages=.packages --out=out.js -m hello.dart
+    third_party/d8/linux/x64/d8 --stack_size=1024 sdk/lib/_internal/js_runtime/lib/preambles/d8.js out.js
     out/ReleaseX64/dart-sdk/bin/dart2js --packages=.packages --out=out.js -m hello.dart
     LD_LIBRARY_PATH=third_party/firefox_jsshell/linux/jsshell/ third_party/firefox_jsshell/linux/jsshell/js -f sdk/lib/_internal/js_runtime/lib/preambles/jsshell.js -f out.js
+    out/ReleaseX64/dart-sdk/bin/dart2js --enable-experiment=non-nullable --sound-null-safety --packages=.packages --out=out.js -m hello.dart
+    LD_LIBRARY_PATH=third_party/firefox_jsshell/linux/jsshell/ third_party/firefox_jsshell/linux/jsshell/js -f sdk/lib/_internal/js_runtime/lib/preambles/jsshell.js -f out.js
     out/ReleaseX64/dart-sdk/bin/dart2js --benchmarking-production --packages=.packages --out=out.js -m hello.dart
     third_party/d8/linux/x64/d8 --stack_size=1024 sdk/lib/_internal/js_runtime/lib/preambles/d8.js out.js
-    out/ReleaseX64/dart-sdk/bin/dart2js --benchmarking-x --packages=.packages --out=out.js -m hello.dart
+    out/ReleaseX64/dart-sdk/bin/dart2js --enable-experiment=non-nullable --sound-null-safety --benchmarking-production --packages=.packages --out=out.js -m hello.dart
     third_party/d8/linux/x64/d8 --stack_size=1024 sdk/lib/_internal/js_runtime/lib/preambles/d8.js out.js
-    out/ReleaseX64/dart-sdk/bin/dart2js --use-kernel --packages=.packages --out=out.js -m hello.dart
+    out/ReleaseX64/dart-sdk/bin/dart2js --benchmarking-x --packages=.packages --out=out.js -m hello.dart
     third_party/d8/linux/x64/d8 --stack_size=1024 sdk/lib/_internal/js_runtime/lib/preambles/d8.js out.js
     out/ReleaseX64/dart-sdk/bin/dart pkg/dev_compiler/tool/ddb -r d8 -b third_party/d8/linux/x64/d8 --kernel hello.dart
     out/ReleaseX64/dart-sdk/bin/dart pkg/dev_compiler/tool/ddb -r d8 -b third_party/d8/linux/x64/d8 --mode=compile --compile-vm-options=--print-metrics --packages=.packages --out out.js --kernel hello.dart
@@ -339,9 +355,13 @@
     out/ReleaseX64/dart --background-compilation=false pkg/front_end/tool/incremental_perf.dart.appjit --target=vm --sdk-summary=out/ReleaseX64/vm_platform_strong.dill --sdk-library-specification=sdk/lib/libraries.json pkg/front_end/benchmarks/ikg/hello.dart pkg/front_end/benchmarks/ikg/hello.edits.json
     out/ReleaseX64/dart --packages=.packages pkg/kernel/test/binary_bench.dart --golem AstFromBinaryLazy out/ReleaseX64/vm_platform_strong.dill
     out/ReleaseX64/run_vm_tests InitialRSS
+    out/ReleaseX64/run_vm_tests --null-safety --enable-experiment=non-nullable InitialRSS
     out/ReleaseX64/run_vm_tests GenKernelKernelLoadKernel
+    out/ReleaseX64/run_vm_tests --null-safety --enable-experiment=non-nullable GenKernelKernelLoadKernel
     out/ReleaseX64/run_vm_tests KernelServiceCompileAll
+    out/ReleaseX64/run_vm_tests --null-safety --enable-experiment=non-nullable KernelServiceCompileAll
     out/ReleaseX64/dart --profile-period=10000 --packages=.packages benchmarks/Example/dart2/Example.dart
+    out/ReleaseX64/dart --null-safety --enable-experiment=non-nullable --profile-period=10000 --packages=.packages benchmarks/Example/dart/Example.dart
     cd ..
     rm -rf tmp
   else
diff --git a/tools/dom/scripts/systemhtml.py b/tools/dom/scripts/systemhtml.py
index 2cf97d7..5948de3 100644
--- a/tools/dom/scripts/systemhtml.py
+++ b/tools/dom/scripts/systemhtml.py
@@ -39,6 +39,7 @@
         'ConsoleBase.assertCondition',
         'ConsoleBase.clear',
         'ConsoleBase.count',
+        'ConsoleBase.countReset',
         'ConsoleBase.debug',
         'ConsoleBase.dir',
         'ConsoleBase.dirxml',
diff --git a/tools/dom/src/dart2js_Console.dart b/tools/dom/src/dart2js_Console.dart
index b3297d2..a7a40b6 100644
--- a/tools/dom/src/dart2js_Console.dart
+++ b/tools/dom/src/dart2js_Console.dart
@@ -13,70 +13,94 @@
   MemoryInfo? get memory =>
       _isConsoleDefined ? JS('MemoryInfo', 'window.console.memory') : null;
 
-  void assertCondition(bool condition, Object arg) => _isConsoleDefined
-      ? JS('void', 'window.console.assertCondition(#, #)', condition, arg)
+  // Even though many of the following JS methods can take in multiple
+  // arguments, we historically and currently limit the number of variable
+  // arguments to 1. Depending on the need, these methods may be updated to
+  // allow for more.
+
+  // We rename assert to assertCondition here.
+  void assertCondition([bool? condition, Object? arg]) => _isConsoleDefined
+      ? JS('void', 'window.console.assert(#, #)', condition, arg)
       : null;
 
-  void clear(Object arg) =>
+  // clear no longer takes in an argument, but we keep this as optional to
+  // maintain backwards compatibility.
+  void clear([Object? arg]) =>
       _isConsoleDefined ? JS('void', 'window.console.clear(#)', arg) : null;
 
-  void count(Object arg) =>
+  // count takes in a String instead, but we keep this as an Object for
+  // backwards compatibility.
+  void count([Object? arg]) =>
       _isConsoleDefined ? JS('void', 'window.console.count(#)', arg) : null;
 
-  void debug(Object arg) =>
+  void countReset([String? arg]) => _isConsoleDefined
+      ? JS('void', 'window.console.countReset(#)', arg)
+      : null;
+
+  void debug(Object? arg) =>
       _isConsoleDefined ? JS('void', 'window.console.debug(#)', arg) : null;
 
-  void dir(Object arg) =>
-      _isConsoleDefined ? JS('void', 'window.console.dir(#)', arg) : null;
+  void dir([Object? item, Object? options]) => _isConsoleDefined
+      ? JS('void', 'window.console.dir(#, #)', item, options)
+      : null;
 
-  void dirxml(Object arg) =>
+  void dirxml(Object? arg) =>
       _isConsoleDefined ? JS('void', 'window.console.dirxml(#)', arg) : null;
 
-  void error(Object arg) =>
+  void error(Object? arg) =>
       _isConsoleDefined ? JS('void', 'window.console.error(#)', arg) : null;
 
-  void group(Object arg) =>
+  void group(Object? arg) =>
       _isConsoleDefined ? JS('void', 'window.console.group(#)', arg) : null;
 
-  void groupCollapsed(Object arg) => _isConsoleDefined
+  void groupCollapsed(Object? arg) => _isConsoleDefined
       ? JS('void', 'window.console.groupCollapsed(#)', arg)
       : null;
 
   void groupEnd() =>
       _isConsoleDefined ? JS('void', 'window.console.groupEnd()') : null;
 
-  void info(Object arg) =>
+  void info(Object? arg) =>
       _isConsoleDefined ? JS('void', 'window.console.info(#)', arg) : null;
 
-  void log(Object arg) =>
+  void log(Object? arg) =>
       _isConsoleDefined ? JS('void', 'window.console.log(#)', arg) : null;
 
-  void markTimeline(Object arg) => _isConsoleDefined
-      ? JS('void', 'window.console.markTimeline(#)', arg)
+  void table([Object? tabularData, List<String>? properties]) =>
+      _isConsoleDefined
+          ? JS('void', 'window.console.table(#, #)', tabularData, properties)
+          : null;
+
+  void time([String? label]) =>
+      _isConsoleDefined ? JS('void', 'window.console.time(#)', label) : null;
+
+  void timeEnd([String? label]) =>
+      _isConsoleDefined ? JS('void', 'window.console.timeEnd(#)', label) : null;
+
+  void timeLog([String? label, Object? arg]) => _isConsoleDefined
+      ? JS('void', 'window.console.timeLog(#, #)', label, arg)
       : null;
 
-  void profile(String title) =>
+  void trace(Object? arg) =>
+      _isConsoleDefined ? JS('void', 'window.console.trace(#)', arg) : null;
+
+  void warn(Object? arg) =>
+      _isConsoleDefined ? JS('void', 'window.console.warn(#)', arg) : null;
+
+  // The following are non-standard methods.
+  void profile([String? title]) =>
       _isConsoleDefined ? JS('void', 'window.console.profile(#)', title) : null;
 
-  void profileEnd(String title) => _isConsoleDefined
+  void profileEnd([String? title]) => _isConsoleDefined
       ? JS('void', 'window.console.profileEnd(#)', title)
       : null;
 
-  void table(Object arg) =>
-      _isConsoleDefined ? JS('void', 'window.console.table(#)', arg) : null;
-
-  void time(String title) =>
-      _isConsoleDefined ? JS('void', 'window.console.time(#)', title) : null;
-
-  void timeEnd(String title) =>
-      _isConsoleDefined ? JS('void', 'window.console.timeEnd(#)', title) : null;
-
-  void timeStamp(Object arg) =>
+  void timeStamp([Object? arg]) =>
       _isConsoleDefined ? JS('void', 'window.console.timeStamp(#)', arg) : null;
 
-  void trace(Object arg) =>
-      _isConsoleDefined ? JS('void', 'window.console.trace(#)', arg) : null;
-
-  void warn(Object arg) =>
-      _isConsoleDefined ? JS('void', 'window.console.warn(#)', arg) : null;
+  // The following is deprecated and should be removed once we drop support for
+  // older Safari browsers.
+  void markTimeline(Object? arg) => _isConsoleDefined
+      ? JS('void', 'window.console.markTimeline(#)', arg)
+      : null;
 }
diff --git a/tools/dom/templates/html/dart2js/impl_Console.darttemplate b/tools/dom/templates/html/dart2js/impl_Console.darttemplate
deleted file mode 100644
index 890ad2d..0000000
--- a/tools/dom/templates/html/dart2js/impl_Console.darttemplate
+++ /dev/null
@@ -1,81 +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.
-
-part of $LIBRARYNAME;
-
-$(ANNOTATIONS)$(CLASS_MODIFIERS)class Console {
-
-  const Console._safe();
-
-  static const Console _safeConsole = const Console._safe();
-
-  bool get _isConsoleDefined => JS('bool', 'typeof console != "undefined"');
-
-  MemoryInfo get memory => _isConsoleDefined ?
-      JS('MemoryInfo', 'console.memory') : null;
-
-  void assertCondition(bool condition, Object arg) => _isConsoleDefined ?
-      JS('void', 'console.assertCondition(#, #)', condition, arg) : null;
-
-  void clear(Object arg) => _isConsoleDefined ?
-      JS('void', 'console.clear(#)', arg) : null;
-
-  void count(Object arg) => _isConsoleDefined ?
-      JS('void', 'console.count(#)', arg) : null;
-
-  void debug(Object arg) => _isConsoleDefined ?
-      JS('void', 'console.debug(#)', arg) : null;
-
-  void dir(Object arg) => _isConsoleDefined ?
-      JS('void', 'console.dir(#)', arg) : null;
-
-  void dirxml(Object arg) => _isConsoleDefined ?
-      JS('void', 'console.dirxml(#)', arg) : null;
-
-  void error(Object arg) => _isConsoleDefined ?
-      JS('void', 'console.error(#)', arg) : null;
-
-  void group(Object arg) => _isConsoleDefined ?
-      JS('void', 'console.group(#)', arg) : null;
-
-  void groupCollapsed(Object arg) => _isConsoleDefined ?
-      JS('void', 'console.groupCollapsed(#)', arg) : null;
-
-  void groupEnd() => _isConsoleDefined ?
-      JS('void', 'console.groupEnd()') : null;
-
-  void info(Object arg) => _isConsoleDefined ?
-      JS('void', 'console.info(#)', arg) : null;
-
-  void log(Object arg) => _isConsoleDefined ?
-      JS('void', 'console.log(#)', arg) : null;
-
-  void markTimeline(Object arg) => _isConsoleDefined ?
-      JS('void', 'console.markTimeline(#)', arg) : null;
-
-  void profile(String title) => _isConsoleDefined ?
-      JS('void', 'console.profile(#)', title) : null;
-
-  void profileEnd(String title) => _isConsoleDefined ?
-      JS('void', 'console.profileEnd(#)', title) : null;
-
-  void table(Object arg) => _isConsoleDefined ?
-      JS('void', 'console.table(#)', arg) : null;
-
-  void time(String title) => _isConsoleDefined ?
-      JS('void', 'console.time(#)', title) : null;
-
-  void timeEnd(String title) => _isConsoleDefined ?
-      JS('void', 'console.timeEnd(#)', title) : null;
-
-  void timeStamp(Object arg) => _isConsoleDefined ?
-      JS('void', 'console.timeStamp(#)', arg) : null;
-
-  void trace(Object arg) => _isConsoleDefined ?
-      JS('void', 'console.trace(#)', arg) : null;
-
-  void warn(Object arg) => _isConsoleDefined ?
-      JS('void', 'console.warn(#)', arg) : null;
-$!MEMBERS
-}
diff --git a/tools/experimental_features.yaml b/tools/experimental_features.yaml
index 1a60f75..a680662 100644
--- a/tools/experimental_features.yaml
+++ b/tools/experimental_features.yaml
@@ -95,13 +95,13 @@
     help: "Triple-shift operator"
 
   variance:
-    help: "Sound variance."
+    help: "Sound variance"
 
   nonfunction-type-aliases:
-    help: "Type aliases define a <type>, not just a <functionType>."
+    help: "Type aliases define a <type>, not just a <functionType>"
 
   alternative-invalidation-strategy:
-    help: "Alternative invalidation strategy for incremental compilation."
+    help: "Alternative invalidation strategy for incremental compilation"
     category: "CFE"
 
 #
diff --git a/tools/gn.py b/tools/gn.py
index 830c8b3..4bd29b4 100755
--- a/tools/gn.py
+++ b/tools/gn.py
@@ -136,7 +136,7 @@
     return True
 
 
-def ToGnArgs(args, mode, arch, target_os, sanitizer):
+def ToGnArgs(args, mode, arch, target_os, sanitizer, verify_sdk_hash):
     gn_args = {}
 
     host_os = HostOsForGn(HOST_OS)
@@ -258,6 +258,8 @@
         gn_args['dart_debug_optimization_level'] = args.debug_opt_level
         gn_args['debug_optimization_level'] = args.debug_opt_level
 
+    gn_args['verify_sdk_hash'] = verify_sdk_hash
+
     return gn_args
 
 
@@ -466,6 +468,10 @@
         default=False,
         dest='use_qemu',
         action='store_true')
+    other_group.add_argument('--no-verify-sdk-hash',
+                             help='Disable SDK hash checks.',
+                             default=False,
+                             action='store_true')
 
     options = parser.parse_args(args)
     if not ProcessOptions(options):
@@ -506,7 +512,8 @@
                     # See dartbug.com/32364
                     command = [gn, 'gen', out_dir]
                     gn_args = ToCommandLine(
-                        ToGnArgs(args, mode, arch, target_os, sanitizer))
+                        ToGnArgs(args, mode, arch, target_os, sanitizer,
+                                 not args.no_verify_sdk_hash))
                     gn_args += GetGNArgs(args)
                     if args.verbose:
                         print("gn gen --check in %s" % out_dir)
diff --git a/tools/make_version.py b/tools/make_version.py
index eb01d35..f8356f8 100755
--- a/tools/make_version.py
+++ b/tools/make_version.py
@@ -7,19 +7,13 @@
 
 from __future__ import print_function
 
+import argparse
 import hashlib
 import os
 import sys
 import time
-from optparse import OptionParser
 import utils
 
-
-def debugLog(message):
-    print(message, file=sys.stderr)
-    sys.stderr.flush()
-
-
 # When these files change, snapshots created by the VM are potentially no longer
 # backwards-compatible.
 VM_SNAPSHOT_FILES = [
@@ -45,141 +39,152 @@
 ]
 
 
-def MakeVersionString(quiet, no_git_hash, custom_for_pub=None):
-    channel = utils.GetChannel()
-
-    if custom_for_pub and channel == 'be':
-        latest = utils.GetLatestDevTag()
-        if not latest:
-            # If grabbing the dev tag fails, then fall back on the VERSION file.
-            latest = utils.GetSemanticSDKVersion(no_git_hash=True)
-        if no_git_hash:
-            version_string = ("%s.%s" % (latest, custom_for_pub))
-        else:
-            git_hash = utils.GetShortGitHash()
-            version_string = ("%s.%s-%s" % (latest, custom_for_pub, git_hash))
-    else:
-        version_string = utils.GetSemanticSDKVersion(no_git_hash=no_git_hash)
-    if not quiet:
-        debugLog("Returning version string: %s " % version_string)
-    return version_string
-
-
 def MakeSnapshotHashString():
     vmhash = hashlib.md5()
     for vmfilename in VM_SNAPSHOT_FILES:
         vmfilepath = os.path.join(utils.DART_DIR, 'runtime', 'vm', vmfilename)
-        with open(vmfilepath) as vmfile:
-            vmhash.update(vmfile.read().encode('utf-8'))
+        with open(vmfilepath, 'rb') as vmfile:
+            vmhash.update(vmfile.read())
     return vmhash.hexdigest()
 
 
-def MakeFile(quiet,
-             output_file,
-             input_file,
-             no_git_hash,
-             custom_for_pub,
-             version_file=None):
-    if version_file:
-        version_string = utils.GetVersion(no_git_hash, version_file)
-    else:
-        version_string = MakeVersionString(quiet, no_git_hash, custom_for_pub)
+def GetSemanticVersionFormat(no_git_hash, custom_for_pub):
+    version_format = '{{SEMANTIC_SDK_VERSION}}'
 
-    version_cc_text = open(input_file).read()
-    version_cc_text = version_cc_text.replace("{{VERSION_STR}}", version_string)
+    if custom_for_pub and utils.GetChannel() == 'be':
+        if no_git_hash:
+            version_format = '{{LATEST}}.{{PUB_CUSTOM}}'
+        else:
+            version_format = '{{LATEST}}.{{PUB_CUSTOM}}-{{GIT_HASH}}'
+
+    return version_format
+
+
+def FormatVersionString(version,
+                        no_git_hash,
+                        custom_for_pub,
+                        version_file=None,
+                        git_revision_file=None):
+    use_git_hash = not no_git_hash
+
+    semantic_sdk_version = utils.GetSemanticSDKVersion(no_git_hash,
+                                                       version_file,
+                                                       git_revision_file)
+    semantic_version_format = GetSemanticVersionFormat(no_git_hash,
+                                                       custom_for_pub)
+    version_str = (semantic_sdk_version
+                   if version_file else semantic_version_format)
+
+    version = version.replace('{{VERSION_STR}}', version_str)
+
+    version = version.replace('{{SEMANTIC_SDK_VERSION}}', semantic_sdk_version)
+
+    if custom_for_pub:
+        # LATEST is only used for custom_for_pub.
+        latest = None
+        if use_git_hash:
+            # If grabbing the dev tag fails, then fall back on the default VERSION file.
+            latest = utils.GetLatestDevTag()
+        if not latest:
+            latest = utils.GetSemanticSDKVersion(no_git_hash=True)
+        version = version.replace('{{LATEST}}', latest)
+
+        version = version.replace('{{PUB_CUSTOM}}', custom_for_pub)
+
+    git_hash = None
+    if use_git_hash:
+        git_hash = utils.GetShortGitHash()
+    if git_hash is None or len(git_hash) != 10:
+        git_hash = '0000000000'
+    version = version.replace('{{GIT_HASH}}', git_hash)
+
     channel = utils.GetChannel()
-    version_cc_text = version_cc_text.replace("{{CHANNEL}}", channel)
-    version_time = utils.GetGitTimestamp()
-    if no_git_hash or version_time == None:
-        version_time = "Unknown timestamp"
-    version_cc_text = version_cc_text.replace("{{COMMIT_TIME}}", version_time.decode("utf-8"))
+    version = version.replace('{{CHANNEL}}', channel)
+
+    version_time = None
+    if use_git_hash:
+        version_time = utils.GetGitTimestamp()
+    if version_time == None:
+        version_time = 'Unknown timestamp'
+    version = version.replace('{{COMMIT_TIME}}', version_time.decode('utf-8'))
+
     abi_version = utils.GetAbiVersion(version_file)
-    version_cc_text = version_cc_text.replace("{{ABI_VERSION}}", abi_version)
+    version = version.replace('{{ABI_VERSION}}', abi_version)
+
     oldest_supported_abi_version = utils.GetOldestSupportedAbiVersion(
         version_file)
-    version_cc_text = version_cc_text.replace(
-        "{{OLDEST_SUPPORTED_ABI_VERSION}}", oldest_supported_abi_version)
+    version = version.replace('{{OLDEST_SUPPORTED_ABI_VERSION}}',
+                              oldest_supported_abi_version)
+
     snapshot_hash = MakeSnapshotHashString()
-    version_cc_text = version_cc_text.replace("{{SNAPSHOT_HASH}}",
-                                              snapshot_hash)
-    open(output_file, 'w').write(version_cc_text)
-    return True
+    version = version.replace('{{SNAPSHOT_HASH}}', snapshot_hash)
+
+    return version
 
 
-def main(args):
+def main():
     try:
         # Parse input.
-        parser = OptionParser()
-        parser.add_option(
-            "--custom_for_pub",
-            action="store",
-            type="string",
-            help=("Generates a version string that works with pub that includes"
-                  "the given string. This is silently ignored on channels other"
-                  "than be"))
-        parser.add_option(
-            "--input",
-            action="store",
-            type="string",
-            help="input template file.")
-        parser.add_option(
-            "--no_git_hash",
-            action="store_true",
+        parser = argparse.ArgumentParser()
+        parser.add_argument(
+            '--custom_for_pub',
+            help=('Generates a version string that works with pub that '
+                  'includes the given string. This is silently ignored on '
+                  'channels other than be.'))
+        parser.add_argument('--input', help='Input template file.')
+        parser.add_argument(
+            '--no_git_hash',
+            action='store_true',
             default=False,
-            help="Don't try to determine svn revision")
-        parser.add_option(
-            "--output", action="store", type="string", help="output file name")
-        parser.add_option(
-            "-q",
-            "--quiet",
-            action="store_true",
-            default=False,
-            help="disable console output")
-        parser.add_option(
-            "--version-file",
-            action="store",
-            type="string",
-            default=None,
-            help="Version file")
+            help=('Don\'t try to call git to derive things like '
+                  'git revision hash.'))
+        parser.add_argument('--output', help='output file name')
+        parser.add_argument('-q',
+                            '--quiet',
+                            action='store_true',
+                            default=False,
+                            help='DEPRECATED: Does nothing!')
+        parser.add_argument('--version-file', help='Path to the VERSION file.')
+        parser.add_argument('--git-revision-file',
+                            help='Path to the GIT_REVISION file.')
+        parser.add_argument(
+            '--format',
+            default='{{VERSION_STR}}',
+            help='Version format used if no input template is given.')
 
-        (options, args) = parser.parse_args()
+        args = parser.parse_args()
 
         # If there is no input template, then write the bare version string to
-        # options.output. If there is no options.output, then write the version
+        # args.output. If there is no args.output, then write the version
         # string to stdout.
-        if not options.input:
-            version_string = MakeVersionString(
-                options.quiet, options.no_git_hash, options.custom_for_pub)
-            if options.output:
-                open(options.output, 'w').write(version_string)
-            else:
-                print(version_string)
-            return 0
 
-        if not options.output:
-            sys.stderr.write('--output not specified\n')
-            return -1
-        if not options.input:
-            sys.stderr.write('--input not specified\n')
-            return -1
+        version_template = ''
+        if args.input:
+            version_template = open(args.input).read()
+        elif not args.format is None:
+            version_template = args.format
+        else:
+            raise 'No version template given! Set either --input or --format.'
 
-        files = []
-        for arg in args:
-            files.append(arg)
+        version = FormatVersionString(version_template, args.no_git_hash,
+                                      args.custom_for_pub, args.version_file,
+                                      args.git_revision_file)
 
-        if not MakeFile(options.quiet, options.output, options.input,
-                        options.no_git_hash, options.custom_for_pub,
-                        options.version_file):
-            return -1
+        if args.output:
+            with open(args.output, 'w') as fh:
+                fh.write(version)
+        else:
+            sys.stdout.write(version)
 
         return 0
+
     except Exception as inst:
         sys.stderr.write('make_version.py exception\n')
         sys.stderr.write(str(inst))
         sys.stderr.write('\n')
+
         return -1
 
 
 if __name__ == '__main__':
-    exit_code = main(sys.argv)
-    sys.exit(exit_code)
+    sys.exit(main())
diff --git a/tools/patches/flutter-engine/e7e45599cb1a74ff88d7d00a33f25029e42df757.patch b/tools/patches/flutter-engine/e7e45599cb1a74ff88d7d00a33f25029e42df757.patch
deleted file mode 100644
index 2ae1b31..0000000
--- a/tools/patches/flutter-engine/e7e45599cb1a74ff88d7d00a33f25029e42df757.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-diff --git a/third_party/tonic/dart_persistent_value.cc b/third_party/tonic/dart_persistent_value.cc
-index 9ed6f70f3532..3bc46505d31f 100644
---- a/third_party/tonic/dart_persistent_value.cc
-+++ b/third_party/tonic/dart_persistent_value.cc
-@@ -43,8 +43,12 @@ void DartPersistentValue::Clear() {
-     return;
-   }
- 
--  DartIsolateScope scope(dart_state->isolate());
--  Dart_DeletePersistentHandle(value_);
-+  if (Dart_CurrentIsolateGroup()) {
-+    Dart_DeletePersistentHandle(value_);
-+  } else {
-+    DartIsolateScope scope(dart_state->isolate());
-+    Dart_DeletePersistentHandle(value_);
-+  }
-   dart_state_.reset();
-   value_ = nullptr;
- }
-diff --git a/third_party/tonic/dart_wrappable.cc b/third_party/tonic/dart_wrappable.cc
-index 42c8fff2805b..89064ac8eef7 100644
---- a/third_party/tonic/dart_wrappable.cc
-+++ b/third_party/tonic/dart_wrappable.cc
-@@ -37,7 +37,7 @@ void DartWrappable::ClearDartWrapper() {
-   TONIC_CHECK(!LogIfError(Dart_SetNativeInstanceField(wrapper, kPeerIndex, 0)));
-   TONIC_CHECK(
-       !LogIfError(Dart_SetNativeInstanceField(wrapper, kWrapperInfoIndex, 0)));
--  Dart_DeleteWeakPersistentHandle(Dart_CurrentIsolate(), dart_wrapper_);
-+  Dart_DeleteWeakPersistentHandle(dart_wrapper_);
-   dart_wrapper_ = nullptr;
-   this->ReleaseDartWrappableReference();
- }
diff --git a/tools/spec_parser/Dart.g b/tools/spec_parser/Dart.g
index 2ee2a70..039e65f 100644
--- a/tools/spec_parser/Dart.g
+++ b/tools/spec_parser/Dart.g
@@ -146,17 +146,14 @@
     |    EXTERNAL functionSignature ';'
     |    EXTERNAL getterSignature ';'
     |    EXTERNAL setterSignature ';'
+    |    EXTERNAL finalVarOrType identifierList ';'
     |    getterSignature functionBody
     |    setterSignature functionBody
     |    functionSignature functionBody
     |    (FINAL | CONST) type? staticFinalDeclarationList ';'
     |    LATE FINAL type? initializedIdentifierList ';'
-    |    topLevelVariableDeclaration ';'
-    ;
-
-topLevelVariableDeclaration
-    :    LATE? varOrType identifier ('=' expression)?
-         (',' initializedIdentifier)*
+    |    LATE? varOrType identifier ('=' expression)?
+         (',' initializedIdentifier)* ';'
     ;
 
 declaredIdentifier
@@ -169,6 +166,11 @@
     |    LATE? varOrType
     ;
 
+finalVarOrType
+    :    FINAL type?
+    |    varOrType
+    ;
+
 varOrType
     :    VAR
     |    type
@@ -351,6 +353,8 @@
     |    (EXTERNAL STATIC?)? getterSignature
     |    (EXTERNAL STATIC?)? setterSignature
     |    (EXTERNAL STATIC?)? functionSignature
+    |    EXTERNAL (STATIC? finalVarOrType | COVARIANT varOrType) identifierList
+    |    ABSTRACT (finalVarOrType | COVARIANT varOrType) identifierList
     |    EXTERNAL? operatorSignature
     |    STATIC (FINAL | CONST) type? staticFinalDeclarationList
     |    STATIC LATE FINAL type? initializedIdentifierList
diff --git a/tools/utils.py b/tools/utils.py
index 1b543e3c..42a7db4 100644
--- a/tools/utils.py
+++ b/tools/utils.py
@@ -5,6 +5,8 @@
 # This file contains a set of utilities functions used by other Python-based
 # scripts.
 
+from __future__ import print_function
+
 import contextlib
 import datetime
 import glob
@@ -26,19 +28,87 @@
 except:
     pass
 
-DART_DIR = os.path.abspath(os.path.normpath(os.path.join(__file__, '..', '..')))
+
+# To eliminate clashing with older archived builds on bleeding edge we add
+# a base number bigger the largest svn revision (this also gives us an easy
+# way of seeing if an archive comes from git based or svn based commits).
+GIT_NUMBER_BASE = 100000
+
+# Mapping table between build mode and build configuration.
+BUILD_MODES = {
+    'debug': 'Debug',
+    'release': 'Release',
+    'product': 'Product',
+}
+
+# Mapping table between build mode and build configuration.
+BUILD_SANITIZERS = {
+    None: '',
+    'none': '',
+    'asan': 'ASAN',
+    'lsan': 'LSAN',
+    'msan': 'MSAN',
+    'tsan': 'TSAN',
+    'ubsan': 'UBSAN',
+}
+
+# Mapping table between OS and build output location.
+BUILD_ROOT = {
+    'win32': 'out',
+    'linux': 'out',
+    'freebsd': 'out',
+    'macos': 'xcodebuild',
+}
+
+# Note: gn expects these to be lower case.
+ARCH_FAMILY = {
+    'ia32': 'ia32',
+    'x64': 'ia32',
+    'arm': 'arm',
+    'armv6': 'arm',
+    'arm64': 'arm',
+    'arm_x64': 'arm',
+    'simarm': 'ia32',
+    'simarmv6': 'ia32',
+    'simarm64': 'ia32',
+    'simarm_x64': 'ia32',
+}
+
+BASE_DIR = os.path.abspath(os.path.join(os.curdir, '..'))
+DART_DIR = os.path.abspath(os.path.join(__file__, '..', '..'))
+VERSION_FILE = os.path.join(DART_DIR, 'tools', 'VERSION')
 
 
-def GetBotUtils():
+def GetArchFamily(arch):
+    return ARCH_FAMILY[arch]
+
+
+def GetBuildDir(host_os):
+    return BUILD_ROOT[host_os]
+
+
+def GetBuildMode(mode):
+    return BUILD_MODES[mode]
+
+
+def GetBuildSanitizer(sanitizer):
+    return BUILD_SANITIZERS[sanitizer]
+
+
+def GetBaseDir():
+    return BASE_DIR
+
+
+def GetBotUtils(repo_path=DART_DIR):
     '''Dynamically load the tools/bots/bot_utils.py python module.'''
     return imp.load_source(
-        'bot_utils', os.path.join(DART_DIR, 'tools', 'bots', 'bot_utils.py'))
+        'bot_utils', os.path.join(repo_path, 'tools', 'bots', 'bot_utils.py'))
 
 
-def GetMinidumpUtils():
+def GetMinidumpUtils(repo_path=DART_DIR):
     '''Dynamically load the tools/minidump.py python module.'''
     return imp.load_source('minidump',
-                           os.path.join(DART_DIR, 'tools', 'minidump.py'))
+                           os.path.join(repo_path, 'tools', 'minidump.py'))
 
 
 class Version(object):
@@ -58,22 +128,22 @@
 # Try to guess the host operating system.
 def GuessOS():
     os_id = platform.system()
-    if os_id == "Linux":
-        return "linux"
-    elif os_id == "Darwin":
-        return "macos"
-    elif os_id == "Windows" or os_id == "Microsoft":
-        # On Windows Vista platform.system() can return "Microsoft" with some
+    if os_id == 'Linux':
+        return 'linux'
+    elif os_id == 'Darwin':
+        return 'macos'
+    elif os_id == 'Windows' or os_id == 'Microsoft':
+        # On Windows Vista platform.system() can return 'Microsoft' with some
         # versions of Python, see http://bugs.python.org/issue1082 for details.
-        return "win32"
+        return 'win32'
     elif os_id == 'FreeBSD':
         return 'freebsd'
     elif os_id == 'OpenBSD':
         return 'openbsd'
     elif os_id == 'SunOS':
         return 'solaris'
-    else:
-        return None
+
+    return None
 
 
 # Try to guess the host architecture.
@@ -91,24 +161,24 @@
         return 'ia32'
     elif os_id == 'i86pc':
         return 'ia32'
-    else:
-        guess_os = GuessOS()
-        print ("Warning: Guessing architecture %s based on os %s\n"\
-              % (os_id, guess_os))
-        if guess_os == 'win32':
-            return 'ia32'
-        return None
+
+    guess_os = GuessOS()
+    print('Warning: Guessing architecture {} based on os {}\n'.format(
+        os_id, guess_os))
+    if guess_os == 'win32':
+        return 'ia32'
+    return None
 
 
 # Try to guess the number of cpus on this machine.
 def GuessCpus():
-    if os.getenv("DART_NUMBER_OF_CORES") is not None:
-        return int(os.getenv("DART_NUMBER_OF_CORES"))
-    if os.path.exists("/proc/cpuinfo"):
+    if os.getenv('DART_NUMBER_OF_CORES') is not None:
+        return int(os.getenv('DART_NUMBER_OF_CORES'))
+    if os.path.exists('/proc/cpuinfo'):
         return int(
             subprocess.check_output(
-                "grep -E '^processor' /proc/cpuinfo | wc -l", shell=True))
-    if os.path.exists("/usr/bin/hostinfo"):
+                'grep -E \'^processor\' /proc/cpuinfo | wc -l', shell=True))
+    if os.path.exists('/usr/bin/hostinfo'):
         return int(
             subprocess.check_output(
                 '/usr/bin/hostinfo |'
@@ -130,17 +200,17 @@
         wow6432Node = 'Wow6432Node\\'
     else:
         wow6432Node = ''
-    return r'SOFTWARE\%s%s' % (wow6432Node, name)
+    return r'SOFTWARE\{}{}'.format(wow6432Node, name)
 
 
 # Try to guess Visual Studio location when buiding on Windows.
 def GuessVisualStudioPath():
-    defaultPath = r"C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7" \
-                  r"\IDE"
-    defaultExecutable = "devenv.com"
+    defaultPath = r'C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7' \
+                  r'\IDE'
+    defaultExecutable = 'devenv.com'
 
     if not IsWindows():
-        return defaultPath, defaultExecutable
+        return (defaultPath, defaultExecutable)
 
     keyNamesAndExecutables = [
         # Pair for non-Express editions.
@@ -186,12 +256,12 @@
                             # Stop search since if we found non-Express VS2015 version
                             # installed, which is preferred version.
                             return installDir, executable
-                        else:
-                            version = float(subkeyName)
-                            # We prefer higher version of Visual Studio and given equal
-                            # version numbers we prefer non-Express edition.
-                            if version > bestGuess[0]:
-                                bestGuess = (version, (installDir, executable))
+
+                        version = float(subkeyName)
+                        # We prefer higher version of Visual Studio and given equal
+                        # version numbers we prefer non-Express edition.
+                        if version > bestGuess[0]:
+                            bestGuess = (version, (installDir, executable))
         finally:
             _winreg.CloseKey(key)
     return bestGuess[1]
@@ -246,87 +316,26 @@
     setattr(parser.values, option.dest, value)
 
 
-# Mapping table between build mode and build configuration.
-BUILD_MODES = {
-    'debug': 'Debug',
-    'release': 'Release',
-    'product': 'Product',
-}
-
-# Mapping table between build mode and build configuration.
-BUILD_SANITIZERS = {
-    None: '',
-    'none': '',
-    'asan': 'ASAN',
-    'lsan': 'LSAN',
-    'msan': 'MSAN',
-    'tsan': 'TSAN',
-    'ubsan': 'UBSAN',
-}
-
-# Mapping table between OS and build output location.
-BUILD_ROOT = {
-    'win32': os.path.join('out'),
-    'linux': os.path.join('out'),
-    'freebsd': os.path.join('out'),
-    'macos': os.path.join('xcodebuild'),
-}
-
-# Note: gn expects these to be lower case.
-ARCH_FAMILY = {
-    'ia32': 'ia32',
-    'x64': 'ia32',
-    'arm': 'arm',
-    'armv6': 'arm',
-    'arm64': 'arm',
-    'arm_x64': 'arm',
-    'simarm': 'ia32',
-    'simarmv6': 'ia32',
-    'simarm64': 'ia32',
-    'simarm_x64': 'ia32',
-}
-
-ARCH_GUESS = GuessArchitecture()
-BASE_DIR = os.path.abspath(os.path.join(os.curdir, '..'))
-DART_DIR = os.path.abspath(os.path.join(__file__, '..', '..'))
-VERSION_FILE = os.path.join(DART_DIR, 'tools', 'VERSION')
-
-
-def GetBuildMode(mode):
-    return BUILD_MODES[mode]
-
-
-def GetBuildSanitizer(sanitizer):
-    return BUILD_SANITIZERS[sanitizer]
-
-
-def GetArchFamily(arch):
-    return ARCH_FAMILY[arch]
-
-
 def IsCrossBuild(target_os, arch):
-    host_arch = ARCH_GUESS
+    host_arch = GuessArchitecture()
     return ((GetArchFamily(host_arch) != GetArchFamily(arch)) or
             (target_os != GuessOS()))
 
 
 def GetBuildConf(mode, arch, conf_os=None, sanitizer=None):
-    if conf_os is not None and conf_os != GuessOS() and conf_os != "host":
-        return '%s%s%s' % (GetBuildMode(mode), conf_os.title(), arch.upper())
-    else:
-        # Ask for a cross build if the host and target architectures don't match.
-        host_arch = ARCH_GUESS
-        cross_build = ''
-        if GetArchFamily(host_arch) != GetArchFamily(arch):
-            cross_build = 'X'
-        return '%s%s%s%s' % (GetBuildMode(mode), GetBuildSanitizer(sanitizer),
+    if conf_os is not None and conf_os != GuessOS() and conf_os != 'host':
+        return '{}{}{}'.format(GetBuildMode(mode), conf_os.title(),
+                               arch.upper())
+
+    # Ask for a cross build if the host and target architectures don't match.
+    host_arch = GuessArchitecture()
+    cross_build = ''
+    if GetArchFamily(host_arch) != GetArchFamily(arch):
+        cross_build = 'X'
+    return '{}{}{}{}'.format(GetBuildMode(mode), GetBuildSanitizer(sanitizer),
                              cross_build, arch.upper())
 
 
-def GetBuildDir(host_os):
-    return BUILD_ROOT[host_os]
-
-
 def GetBuildRoot(host_os, mode=None, arch=None, target_os=None, sanitizer=None):
     build_root = GetBuildDir(host_os)
     if mode:
@@ -340,35 +349,36 @@
     return os.path.join(build_root, 'dart-sdk', 'bin')
 
 
-def GetBaseDir():
-    return BASE_DIR
+def GetShortVersion(version_file=None):
+    version = ReadVersionFile(version_file)
+    return ('{}.{}.{}.{}.{}'.format(version.major, version.minor, version.patch,
+                                    version.prerelease,
+                                    version.prerelease_patch))
 
 
-def GetShortVersion():
-    version = ReadVersionFile()
-    return ('%s.%s.%s.%s.%s' % (version.major, version.minor, version.patch,
-                                version.prerelease, version.prerelease_patch))
-
-
-def GetSemanticSDKVersion(no_git_hash=False, version_file=None):
+def GetSemanticSDKVersion(no_git_hash=False,
+                          version_file=None,
+                          git_revision_file=None):
     version = ReadVersionFile(version_file)
     if not version:
         return None
 
+    suffix = ''
     if version.channel == 'be':
-        postfix = '-edge' if no_git_hash else '-edge.%s' % GetGitRevision()
+        suffix = '-edge' if no_git_hash else '-edge.{}'.format(
+            GetGitRevision(git_revision_file))
     elif version.channel in ('beta', 'dev'):
-        postfix = '-%s.%s.%s' % (version.prerelease, version.prerelease_patch,
-                                 version.channel)
+        suffix = '-{}.{}.{}'.format(version.prerelease,
+                                    version.prerelease_patch, version.channel)
     else:
         assert version.channel == 'stable'
-        postfix = ''
 
-    return '%s.%s.%s%s' % (version.major, version.minor, version.patch, postfix)
+    return '{}.{}.{}{}'.format(version.major, version.minor, version.patch,
+                               suffix)
 
 
-def GetVersion(no_git_hash=False, version_file=None):
-    return GetSemanticSDKVersion(no_git_hash, version_file)
+def GetVersion(no_git_hash=False, version_file=None, git_revision_file=None):
+    return GetSemanticSDKVersion(no_git_hash, version_file, git_revision_file)
 
 
 # The editor used to produce the VERSION file put on gcs. We now produce this
@@ -381,15 +391,15 @@
 #}
 def GetVersionFileContent():
     result = {
-        "date": str(datetime.date.today()),
-        "version": GetVersion(),
-        "revision": GetGitRevision()
+        'date': str(datetime.date.today()),
+        'version': GetVersion(),
+        'revision': GetGitRevision()
     }
     return json.dumps(result, indent=2)
 
 
-def GetChannel():
-    version = ReadVersionFile()
+def GetChannel(version_file=None):
+    version = ReadVersionFile(version_file)
     return version.channel
 
 
@@ -421,12 +431,12 @@
     if version_file == None:
         version_file = VERSION_FILE
 
+    content = None
     try:
-        fd = open(version_file)
-        content = fd.read()
-        fd.close()
+        with open(version_file) as fd:
+            content = fd.read()
     except:
-        print("Warning: Couldn't read VERSION file (%s)" % version_file)
+        print('Warning: Could not read VERSION file ({})'.format(version_file))
         return None
 
     channel = match_against('^CHANNEL ([A-Za-z0-9]+)$', content)
@@ -439,14 +449,14 @@
     oldest_supported_abi_version = match_against(
         '^OLDEST_SUPPORTED_ABI_VERSION (\d+)$', content)
 
-    if channel and major and minor and prerelease and prerelease_patch and \
-        abi_version and oldest_supported_abi_version:
+    if (channel and major and minor and prerelease and prerelease_patch and
+            abi_version and oldest_supported_abi_version):
         return Version(channel, major, minor, patch, prerelease,
                        prerelease_patch, abi_version,
                        oldest_supported_abi_version)
-    else:
-        print("Warning: VERSION file (%s) has wrong format" % version_file)
-        return None
+
+    print('Warning: VERSION file ({}) has wrong format'.format(version_file))
+    return None
 
 
 # Our schema for releases and archiving is based on an increasing
@@ -458,8 +468,8 @@
 # We only use numbers on the master branch (bleeding edge). On branches
 # we use the version number instead for archiving purposes.
 # The number on master is the count of commits on the master branch.
-def GetArchiveVersion():
-    version = ReadVersionFile()
+def GetArchiveVersion(version_file=None):
+    version = ReadVersionFile(version_file=None)
     if not version:
         raise 'Could not get the archive version, parsing the version file failed'
     if version.channel in ['be', 'integration']:
@@ -467,94 +477,98 @@
     return GetSemanticSDKVersion()
 
 
-def GetGitRevision():
+def GetGitRevision(git_revision_file=None, repo_path=DART_DIR):
     # When building from tarball use tools/GIT_REVISION
-    git_revision_file = os.path.join(DART_DIR, 'tools', 'GIT_REVISION')
+    if git_revision_file is None:
+        git_revision_file = os.path.join(repo_path, 'tools', 'GIT_REVISION')
     try:
         with open(git_revision_file) as fd:
-            return fd.read()
+            return fd.read().decode('utf-8').strip()
     except:
         pass
     p = subprocess.Popen(['git', 'rev-parse', 'HEAD'],
                          stdout=subprocess.PIPE,
                          stderr=subprocess.STDOUT,
                          shell=IsWindows(),
-                         cwd=DART_DIR)
+                         cwd=repo_path)
     output, _ = p.communicate()
-    output = output.strip()
+    revision = output.decode('utf-8').strip()
     # We expect a full git hash
-    if len(output) != 40:
-        print("Warning: could not parse git commit, output was %s" % output)
+    if len(revision) != 40:
+        print('Warning: Could not parse git commit, output was {}'.format(
+            revision),
+              file=sys.stderr)
         return None
-    return output
+    return revision
 
 
-def GetShortGitHash():
+def GetShortGitHash(repo_path=DART_DIR):
     p = subprocess.Popen(['git', 'rev-parse', '--short', 'HEAD'],
                          stdout=subprocess.PIPE,
                          stderr=subprocess.STDOUT,
                          shell=IsWindows(),
-                         cwd=DART_DIR)
+                         cwd=repo_path)
     output, _ = p.communicate()
-    output = output.strip()
+    revision = output.decode('utf-8').strip()
     if p.wait() != 0:
         return None
-    return output
+    return revision
 
 
-def GetLatestDevTag():
+def GetLatestDevTag(repo_path=DART_DIR):
+    # We used the old, pre-git2.13 refname:strip here since lstrip will fail on
+    # older git versions. strip is an alias for lstrip in later versions.
     cmd = [
         'git',
         'for-each-ref',
         'refs/tags/*dev*',
         '--sort=-taggerdate',
-        "--format=%(refname:lstrip=2)",
+        "--format=%(refname:strip=2)",
         '--count=1',
     ]
-    p = subprocess.Popen(
-        cmd,
-        stdout=subprocess.PIPE,
-        stderr=subprocess.STDOUT,
-        shell=IsWindows(),
-        cwd=DART_DIR)
+    p = subprocess.Popen(cmd,
+                         stdout=subprocess.PIPE,
+                         stderr=subprocess.STDOUT,
+                         shell=IsWindows(),
+                         cwd=repo_path)
     output, _ = p.communicate()
+    tag = output.decode('utf-8').strip()
     if p.wait() != 0:
-        print(
-            "Warning: Could not get the most recent dev branch tag %s" % output)
+        print('Warning: Could not get the most recent dev branch tag {}'.format(
+            tag),
+              file=sys.stderr)
         return None
-    return output.strip()
+    return tag
 
 
-def GetGitTimestamp():
+def GetGitTimestamp(repo_path=DART_DIR):
     p = subprocess.Popen(['git', 'log', '-n', '1', '--pretty=format:%cd'],
                          stdout=subprocess.PIPE,
                          stderr=subprocess.STDOUT,
                          shell=IsWindows(),
-                         cwd=DART_DIR)
+                         cwd=repo_path)
     output, _ = p.communicate()
+    timestamp = output.decode('utf-8').strip()
     if p.wait() != 0:
         return None
-    return output
+    return timestamp
 
 
-# To eliminate clashing with older archived builds on bleeding edge we add
-# a base number bigger the largest svn revision (this also gives us an easy
-# way of seeing if an archive comes from git based or svn based commits).
-GIT_NUMBER_BASE = 100000
-
-
-def GetGitNumber():
+def GetGitNumber(repo_path=DART_DIR):
     p = subprocess.Popen(['git', 'rev-list', 'HEAD', '--count'],
                          stdout=subprocess.PIPE,
                          stderr=subprocess.STDOUT,
                          shell=IsWindows(),
-                         cwd=DART_DIR)
+                         cwd=repo_path)
     output, _ = p.communicate()
+    number = output.decode('utf-8').strip()
     try:
-        number = int(output)
+        number = int(number)
         return number + GIT_NUMBER_BASE
     except:
-        print("Warning: could not parse git count, output was %s" % output)
+        print(
+            'Warning: Could not parse git count, output was {}'.format(number),
+            file=sys.stderr)
     return None
 
 
@@ -594,8 +608,7 @@
             RewritePathSeparator(o, workspace)
             for o in match.group(1).split(' ')
         ]
-    else:
-        return None
+    return None
 
 
 def ParseTestOptionsMultiple(pattern, source, workspace):
@@ -610,52 +623,36 @@
             else:
                 result.append([])
         return result
-    else:
-        return None
+    return None
 
 
 def Daemonize():
     """
-  Create a detached background process (daemon). Returns True for
-  the daemon, False for the parent process.
-  See: http://www.faqs.org/faqs/unix-faq/programmer/faq/
-  "1.7 How do I get my program to act like a daemon?"
-  """
+    Create a detached background process (daemon). Returns True for
+    the daemon, False for the parent process.
+    See: http://www.faqs.org/faqs/unix-faq/programmer/faq/
+    "1.7 How do I get my program to act like a daemon?"
+    """
     if os.fork() > 0:
         return False
     os.setsid()
     if os.fork() > 0:
         exit(0)
+        # TODO: What is this supposed to do? Didn't we already exit?
         raise
     return True
 
 
-def PrintError(string):
-    """Writes and flushes a string to stderr."""
-    sys.stderr.write(string)
-    sys.stderr.write('\n')
-
-
 def CheckedUnlink(name):
     """Unlink a file without throwing an exception."""
     try:
         os.unlink(name)
     except OSError as e:
-        PrintError("os.unlink() " + str(e))
+        sys.stderr.write('os.unlink() ' + str(e))
+        sys.stderr.write('\n')
 
 
-def Main():
-    print("GuessOS() -> ", GuessOS())
-    print("GuessArchitecture() -> ", GuessArchitecture())
-    print("GuessCpus() -> ", GuessCpus())
-    print("IsWindows() -> ", IsWindows())
-    print("GuessVisualStudioPath() -> ", GuessVisualStudioPath())
-    print("GetGitRevision() -> ", GetGitRevision())
-    print("GetGitTimestamp() -> ", GetGitTimestamp())
-    print("GetVersionFileContent() -> ", GetVersionFileContent())
-    print("GetGitNumber() -> ", GetGitNumber())
-
-
+# TODO(42528): Can we remove this? It's basically just an alias for Exception.
 class Error(Exception):
     pass
 
@@ -673,14 +670,14 @@
 def IsCrashExitCode(exit_code):
     if IsWindows():
         return 0x80000000 & exit_code
-    else:
-        return exit_code < 0
+    return exit_code < 0
 
 
 def DiagnoseExitCode(exit_code, command):
     if IsCrashExitCode(exit_code):
-        sys.stderr.write('Command: %s\nCRASHED with exit code %d (0x%x)\n' %
-                         (' '.join(command), exit_code, exit_code & 0xffffffff))
+        sys.stderr.write(
+            'Command: {}\nCRASHED with exit code {} (0x{:x})\n'.format(
+                ' '.join(command), exit_code, exit_code & 0xffffffff))
 
 
 def Touch(name):
@@ -691,8 +688,10 @@
 def ExecuteCommand(cmd):
     """Execute a command in a subprocess."""
     print('Executing: ' + ' '.join(cmd))
-    pipe = subprocess.Popen(
-        cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=IsWindows())
+    pipe = subprocess.Popen(cmd,
+                            stdout=subprocess.PIPE,
+                            stderr=subprocess.PIPE,
+                            shell=IsWindows())
     output = pipe.communicate()
     if pipe.returncode != 0:
         raise Exception('Execution failed: ' + str(output))
@@ -709,7 +708,8 @@
     try:
         osname = osdict[system]
     except KeyError:
-        sys.stderr.write('WARNING: platform "%s" not supported\n' % system)
+        sys.stderr.write(
+            'WARNING: platform "{}" not supported\n'.format(system))
         return None
     tools_dir = os.path.dirname(os.path.realpath(__file__))
     return os.path.join(tools_dir, 'sdks', 'dart-sdk')
@@ -749,9 +749,8 @@
             format(core_pattern_file, expected_core_pattern, core_pattern))
         if fatal:
             raise Exception(message)
-        else:
-            print(message)
-            return False
+        print(message)
+        return False
     return True
 
 
@@ -776,11 +775,11 @@
 
     def __enter__(self):
         self._old_cwd = os.getcwd()
-        print("Enter directory = ", self._working_directory)
+        print('Enter directory = ', self._working_directory)
         os.chdir(self._working_directory)
 
     def __exit__(self, *_):
-        print("Enter directory = ", self._old_cwd)
+        print('Enter directory = ', self._old_cwd)
         os.chdir(self._old_cwd)
 
 
@@ -792,8 +791,8 @@
         self.binaries = binaries
 
     def __str__(self):
-        return "Crash(%s: %s %s)" % (self.test, self.pid, ', '.join(
-            self.binaries))
+        return 'Crash({}: {} {})'.format(self.test, self.pid,
+                                         ', '.join(self.binaries))
 
 
 class PosixCoreDumpEnabler(object):
@@ -824,19 +823,19 @@
 
 class WindowsCoreDumpEnabler(object):
     """This enabler assumes that Dart binary was built with Crashpad support.
-  In this case DART_CRASHPAD_CRASHES_DIR environment variable allows to
-  specify the location of Crashpad crashes database. Actual minidumps will
-  be written into reports subfolder of the database.
-  """
-    CRASHPAD_DB_FOLDER = os.path.join(DART_DIR, r'crashes')
-    DUMPS_FOLDER = os.path.join(CRASHPAD_DB_FOLDER, r'reports')
+    In this case DART_CRASHPAD_CRASHES_DIR environment variable allows to
+    specify the location of Crashpad crashes database. Actual minidumps will
+    be written into reports subfolder of the database.
+    """
+    CRASHPAD_DB_FOLDER = os.path.join(DART_DIR, 'crashes')
+    DUMPS_FOLDER = os.path.join(CRASHPAD_DB_FOLDER, 'reports')
 
     def __init__(self):
         pass
 
     def __enter__(self):
-        print("INFO: Enabling coredump archiving into %s" %
-              (WindowsCoreDumpEnabler.CRASHPAD_DB_FOLDER))
+        print('INFO: Enabling coredump archiving into {}'.format(
+            WindowsCoreDumpEnabler.CRASHPAD_DB_FOLDER))
         os.environ[
             'DART_CRASHPAD_CRASHES_DIR'] = WindowsCoreDumpEnabler.CRASHPAD_DB_FOLDER
 
@@ -848,18 +847,18 @@
     try:
         os.unlink(file)
     except Exception as error:
-        print("ERROR: Failed to remove %s: %s" % (file, error))
+        print('ERROR: Failed to remove {}: {}'.format(file, error))
 
 
 class BaseCoreDumpArchiver(object):
     """This class reads coredumps file written by UnexpectedCrashDumpArchiver
-  into the current working directory and uploads all cores and binaries
-  listed in it into Cloud Storage (see
-  pkg/test_runner/lib/src/test_progress.dart).
-  """
+    into the current working directory and uploads all cores and binaries
+    listed in it into Cloud Storage (see
+    pkg/test_runner/lib/src/test_progress.dart).
+    """
 
     # test.dart will write a line for each unexpected crash into this file.
-    _UNEXPECTED_CRASHES_FILE = "unexpected-crashes"
+    _UNEXPECTED_CRASHES_FILE = 'unexpected-crashes'
 
     def __init__(self, search_dir, output_directory):
         self._bucket = 'dart-temp-crash-archive'
@@ -871,15 +870,15 @@
         try:
             return self._cleanup()
         except Exception as error:
-            print("ERROR: Failure during cleanup: %s" % error)
+            print('ERROR: Failure during cleanup: {}'.format(error))
             return False
 
     def __enter__(self):
-        print("INFO: Core dump archiving is activated")
+        print('INFO: Core dump archiving is activated')
 
         # Cleanup any stale files
         if self._safe_cleanup():
-            print("WARNING: Found and removed stale coredumps")
+            print('WARNING: Found and removed stale coredumps')
 
     def __exit__(self, *_):
         try:
@@ -889,22 +888,22 @@
                 archive_crashes = crashes[:10]
                 print('Archiving coredumps for crash (if possible):')
                 for crash in archive_crashes:
-                    print('----> %s' % crash)
+                    print('----> {}'.format(crash))
 
                 sys.stdout.flush()
 
                 self._archive(archive_crashes)
             else:
-                print("INFO: No unexpected crashes recorded")
+                print('INFO: No unexpected crashes recorded')
                 dumps = self._find_all_coredumps()
                 if dumps:
-                    print("INFO: However there are %d core dumps found" %
-                          len(dumps))
+                    print('INFO: However there are {} core dumps found'.format(
+                        len(dumps)))
                     for dump in dumps:
-                        print("INFO:        -> %s" % dump)
+                        print('INFO:        -> {}'.format(dump))
                     print()
         except Exception as error:
-            print("ERROR: Failed to archive crashes: %s" % error)
+            print('ERROR: Failed to archive crashes: {}'.format(error))
             raise
 
         finally:
@@ -947,14 +946,16 @@
         missing_as_string = ', '.join([str(c) for c in missing])
         other_files = list(glob.glob(os.path.join(self._search_dir, '*')))
         sys.stderr.write(
-            "Could not find crash dumps for '%s' in search directory '%s'.\n"
+            "Could not find crash dumps for '{}' in search directory '{}'.\n"
             "Existing files which *did not* match the pattern inside the search "
-            "directory are are:\n  %s\n" % (missing_as_string, self._search_dir,
-                                            '\n  '.join(other_files)))
+            "directory are are:\n  {}\n".format(missing_as_string,
+                                                self._search_dir,
+                                                '\n  '.join(other_files)))
         # TODO: Figure out why windows coredump generation does not work.
         # See http://dartbug.com/36469
         if throw and GuessOS() != 'win32':
-            raise Exception('Missing crash dumps for: %s' % missing_as_string)
+            raise Exception(
+                'Missing crash dumps for: {}'.format(missing_as_string))
 
     def _get_file_name(self, file):
         # Sanitize the name: actual cores follow 'core.%d' pattern, crashed
@@ -971,8 +972,8 @@
 
     def _move(self, files):
         for file in files:
-            print('+++ Moving %s to output_directory (%s)' %
-                  (file, self._output_directory))
+            print('+++ Moving {} to output_directory ({})'.format(
+                file, self._output_directory))
             (name, is_binary) = self._get_file_name(file)
             destination = os.path.join(self._output_directory, name)
             shutil.move(file, destination)
@@ -983,7 +984,7 @@
 
     def _tar(self, file):
         (name, is_binary) = self._get_file_name(file)
-        tarname = '%s.tar.gz' % name
+        tarname = '{}.tar.gz'.format(name)
 
         # Compress the file.
         tar = tarfile.open(tarname, mode='w:gz')
@@ -997,23 +998,24 @@
     def _upload(self, files):
         bot_utils = GetBotUtils()
         gsutil = bot_utils.GSUtil()
-        storage_path = '%s/%s/' % (self._bucket, uuid.uuid4())
-        gs_prefix = 'gs://%s' % storage_path
-        http_prefix = 'https://storage.cloud.google.com/%s' % storage_path
+        storage_path = '{}/{}/'.format(self._bucket, uuid.uuid4())
+        gs_prefix = 'gs://{}'.format(storage_path)
+        http_prefix = 'https://storage.cloud.google.com/{}'.format(storage_path)
 
-        print('\n--- Uploading into %s (%s) ---' % (gs_prefix, http_prefix))
+        print('\n--- Uploading into {} ({}) ---'.format(gs_prefix, http_prefix))
         for file in files:
             tarname = self._tar(file)
 
             # Remove / from absolute path to not have // in gs path.
-            gs_url = '%s%s' % (gs_prefix, tarname)
-            http_url = '%s%s' % (http_prefix, tarname)
+            gs_url = '{}{}'.format(gs_prefix, tarname)
+            http_url = '{}{}'.format(http_prefix, tarname)
 
             try:
                 gsutil.upload(tarname, gs_url)
-                print('+++ Uploaded %s (%s)' % (gs_url, http_url))
+                print('+++ Uploaded {} ({})'.format(gs_url, http_url))
             except Exception as error:
-                print('!!! Failed to upload %s, error: %s' % (tarname, error))
+                print('!!! Failed to upload {}, error: {}'.format(
+                    tarname, error))
 
             TryUnlink(tarname)
 
@@ -1021,15 +1023,15 @@
 
     def _find_all_coredumps(self):
         """Return coredumps that were recorded (if supported by the platform).
-    This method will be overriden by concrete platform specific implementations.
-    """
+        This method will be overriden by concrete platform specific implementations.
+        """
         return []
 
     def _find_unexpected_crashes(self):
         """Load coredumps file. Each line has the following format:
 
         test-name,pid,binary-file1,binary-file2,...
-    """
+        """
         try:
             with open(BaseCoreDumpArchiver._UNEXPECTED_CRASHES_FILE) as f:
                 return [
@@ -1065,7 +1067,8 @@
         return found
 
     def _find_coredump_file(self, crash):
-        core_filename = os.path.join(self._search_dir, 'core.%s' % crash.pid)
+        core_filename = os.path.join(self._search_dir,
+                                     'core.{}'.format(crash.pid))
         if os.path.exists(core_filename):
             return core_filename
 
@@ -1097,7 +1100,7 @@
         if not os.path.exists(win_toolchain_json_path):
             return None
 
-        with open(win_toolchain_json_path, "r") as f:
+        with open(win_toolchain_json_path, 'r') as f:
             win_toolchain_info = json.loads(f.read())
 
         win_sdk_path = win_toolchain_info['win_sdk']
@@ -1124,32 +1127,32 @@
         if not dumps:
             return
 
-        print("### Collected %d crash dumps" % len(dumps))
+        print('### Collected {} crash dumps'.format(len(dumps)))
         for dump in dumps:
             print()
-            print("### Dumping stacks from %s using CDB" % dump)
+            print('### Dumping stacks from {} using CDB'.format(dump))
             cdb_output = subprocess.check_output(
-                '"%s" -z "%s" -kqm -c "!uniqstack -b -v -p;qd"' % (cdb_path,
-                                                                   dump),
+                '"{}" -z "{}" -kqm -c "!uniqstack -b -v -p;qd"'.format(
+                    cdb_path, dump),
                 stderr=subprocess.STDOUT)
             # Extract output of uniqstack from the whole output of CDB.
             output = False
             for line in cdb_output.split('\n'):
                 if re.match(WindowsCoreDumpArchiver.CDBG_PROMPT_RE, line):
                     output = True
-                elif line.startswith("quit:"):
+                elif line.startswith('quit:'):
                     break
                 elif output:
                     print(line)
         print()
-        print("#############################################")
+        print('#############################################')
         print()
 
     def __exit__(self, *args):
         try:
             self._dump_all_stacks()
         except Exception as error:
-            print("ERROR: Unable to dump stacks from dumps: %s" % error)
+            print('ERROR: Unable to dump stacks from dumps: {}'.format(error))
 
         super(WindowsCoreDumpArchiver, self).__exit__(*args)
 
@@ -1187,7 +1190,8 @@
 
         if throw:
             missing_as_string = ', '.join([str(c) for c in missing])
-            raise Exception('Missing crash dumps for: %s' % missing_as_string)
+            raise Exception(
+                'Missing crash dumps for: {}'.format(missing_as_string))
 
 
 class IncreasedNumberOfFileDescriptors(object):
@@ -1228,21 +1232,32 @@
     elif osname == 'win32':
         return contextlib.nested(WindowsCoreDumpEnabler(),
                                  WindowsCoreDumpArchiver(output_directory))
-    else:
-        # We don't have support for MacOS yet.
-        return NooptContextManager()
+
+    # We don't have support for MacOS yet.
+    return NooptContextManager()
 
 
 def FileDescriptorLimitIncreaser():
     osname = GuessOS()
     if osname == 'macos':
         return IncreasedNumberOfFileDescriptors(nofiles=10000)
-    else:
-        assert osname in ('linux', 'win32')
-        # We don't have support for MacOS yet.
-        return NooptContextManager()
+
+    assert osname in ('linux', 'win32')
+    # We don't have support for MacOS yet.
+    return NooptContextManager()
 
 
-if __name__ == "__main__":
-    import sys
+def Main():
+    print('GuessOS() -> ', GuessOS())
+    print('GuessArchitecture() -> ', GuessArchitecture())
+    print('GuessCpus() -> ', GuessCpus())
+    print('IsWindows() -> ', IsWindows())
+    print('GuessVisualStudioPath() -> ', GuessVisualStudioPath())
+    print('GetGitRevision() -> ', GetGitRevision())
+    print('GetGitTimestamp() -> ', GetGitTimestamp())
+    print('GetVersionFileContent() -> ', GetVersionFileContent())
+    print('GetGitNumber() -> ', GetGitNumber())
+
+
+if __name__ == '__main__':
     Main()
diff --git a/utils/application_snapshot.gni b/utils/application_snapshot.gni
index 1074317..8f3f882 100644
--- a/utils/application_snapshot.gni
+++ b/utils/application_snapshot.gni
@@ -98,9 +98,11 @@
     depfile = "$output.d"
     abs_depfile = rebase_path(depfile)
     rebased_output = rebase_path(output, root_build_dir)
+
     vm_args = [
       "--depfile=$abs_depfile",
       "--depfile_output_filename=$rebased_output",
+      "-Dsdk_hash=$sdk_hash",
     ]
 
     script = gen_kernel_script
diff --git a/utils/compile_platform.gni b/utils/compile_platform.gni
index a2e94b3..447ed64 100644
--- a/utils/compile_platform.gni
+++ b/utils/compile_platform.gni
@@ -3,6 +3,7 @@
 # BSD-style license that can be found in the LICENSE file.
 
 import("../build/dart/dart_action.gni")
+import("../sdk_args.gni")
 
 _dart_root = get_path_info("..", "abspath")
 
@@ -46,6 +47,8 @@
 
     outputs = invoker.outputs
 
+    vm_args = [ "-Dsdk_hash=$sdk_hash" ]
+
     inputs = []
     deps = []
     args = []
diff --git a/utils/dartanalyzer/BUILD.gn b/utils/dartanalyzer/BUILD.gn
index f1d9b01..48c9dcf 100644
--- a/utils/dartanalyzer/BUILD.gn
+++ b/utils/dartanalyzer/BUILD.gn
@@ -44,6 +44,7 @@
   inputs = sdk_lib_files + analyzer_files
   output = "$root_gen_dir/strong.sum"
   outputs = [ output ]
+  vm_args = [ "-Dsdk_hash=$sdk_hash" ]
   args = [
     "build",
     rebase_path(output),
diff --git a/utils/dartdevc/BUILD.gn b/utils/dartdevc/BUILD.gn
index 15bfe16..c9ff655 100644
--- a/utils/dartdevc/BUILD.gn
+++ b/utils/dartdevc/BUILD.gn
@@ -82,6 +82,8 @@
 
     packages = "../../.packages"
 
+    vm_args = [ "-Dsdk_hash=$sdk_hash" ]
+
     args = [
       "$abs_main",
       "-m",
@@ -118,6 +120,8 @@
   # TODO(rnystrom): List the outputs more precisely?
   outputs = [ "$patched_sdk_dir/version" ]
 
+  vm_args = [ "-Dsdk_hash=$sdk_hash" ]
+
   args = [
     "--libraries",
     rebase_path("$sdk_root/lib/libraries.json"),
@@ -230,6 +234,8 @@
       "$js_gen_dir/$module.js",
     ]
 
+    vm_args = [ "-Dsdk_hash=$sdk_hash" ]
+
     args = [
       "-k",
       "--dart-sdk-summary=$sdk_path",
@@ -384,6 +390,8 @@
       "$js_gen_dir/legacy/dart_sdk.js.map",
     ]
 
+    vm_args = [ "-Dsdk_hash=$sdk_hash" ]
+
     script = "../../pkg/dev_compiler/bin/dartdevc.dart"
 
     args = [
diff --git a/utils/kernel-service/BUILD.gn b/utils/kernel-service/BUILD.gn
index 062c3ff..a01bb1b 100644
--- a/utils/kernel-service/BUILD.gn
+++ b/utils/kernel-service/BUILD.gn
@@ -85,9 +85,11 @@
     depfile = "$root_gen_dir/kernel_service" + invoker.target_name + "_dill.d"
     abs_depfile = rebase_path(depfile)
     rebased_output = rebase_path(output, root_build_dir)
+
     vm_args = [
       "--depfile=$abs_depfile",
       "--depfile_output_filename=$rebased_output",
+      "-Dsdk_hash=$sdk_hash",
     ]
 
     script = gen_kernel_script